47 : fWorldName(wName),fCurrentPS(nullptr),fConstructed(false),fActive(true),fShape(
undefinedMesh),
49 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
50 fDrawUnit(
""), fDrawUnitValue(1.), fMeshElementLogical(nullptr),
51 fParallelWorldProcess(nullptr), fGeometryHasBeenDestroyed(false)
75 for(
int i = 0; i < 3; i++)
fSize[i] = size[i];
78 G4String message =
" The size of scoring mesh can not be changed.";
95 for(
int i = 0; i < 3; i++)
fNSegment[i] = nSegment[i];
98 G4String message =
" The size of scoring segments can not be changed.";
99 G4Exception(
"G4VScoringMesh::SetNumberOfSegments()",
105 for(
int i = 0; i < 3; i++) nSegment[i] =
fNSegment[i];
126 G4cerr <<
"ERROR : G4VScoringMesh::SetPrimitiveScorer() : "
128 <<
" does not yet have mesh size or number of bins. Set them first." <<
G4endl
129 <<
"This Method is ignored." <<
G4endl;
133 << prs->
GetName() <<
" is registered."
149 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." <<
G4endl;
160 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
169 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
170 << name <<
"> does not found." <<
G4endl;
175 MeshScoreMap::iterator itr =
fMap.find(psname);
176 if(itr ==
fMap.end())
return false;
181 MeshScoreMap::iterator itr =
fMap.find(psname);
182 if(itr ==
fMap.end()) {
192 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
193 msg +=
" Current primitive scorer is null.";
203 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
204 msg +=
" Current primitive scorer is null.";
212 MeshScoreMap::iterator itr =
fMap.find(psname);
213 if(itr ==
fMap.end()) {
225 if(!
fMFD)
return nullptr;
228 for(
G4int i = 0; i < nps; i++) {
230 if(name == prs->
GetName())
return prs;
237 G4cout <<
" # of segments: ("
242 G4cout <<
" displacement: ("
248 G4cout <<
" rotation matrix: "
266 for(
int i = 0; i < nps; i++) {
280 mp.second->PrintAllHits();
290 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
291 if(fMapItr!=
fMap.end()) {
294 Draw(fMapItr->second, colorMap,axflg);
296 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
303 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
304 if(fMapItr!=
fMap.end()) {
307 DrawColumn(fMapItr->second,colorMap,idxPlane,iColumn);
309 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
316 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
317 *(fMapItr->second) += *map;
323 if(fMapItr ==
fMap.end()) {
336 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
337 *(fMapItr->second) += *map;
343 if(fMapItr ==
fMap.end()) {
361 G4cout << fWorldPhys->
GetName() <<
" --- All quantities are reset."
393 MeshScoreMap::const_iterator fMapItr =
fMap.begin();
394 MeshScoreMap::const_iterator mapItr = scMap.begin();
395 for(; fMapItr !=
fMap.end(); fMapItr++) {
397 *(fMapItr->second) += *(mapItr->second);
void GetNumberOfSegments(G4int nSegment[3])
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
G4VScoringMesh(const G4String &wName)
void DrawMesh(const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
G4ThreeVector fCenterPosition
void Merge(const G4VScoringMesh *scMesh)
G4bool FindPrimitiveScorer(const G4String &psname)
CLHEP::Hep3Vector G4ThreeVector
void RotateY(G4double delta)
HepRotation & rotateX(double delta)
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
CLHEP::HepRotation G4RotationMatrix
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
void SetCurrentPrimitiveScorer(const G4String &name)
G4MultiFunctionalDetector * fMFD
void SetSize(G4double size[3])
G4double GetPSUnitValue(const G4String &psname)
void SetFilter(G4VSDFilter *f)
void Accumulate(G4THitsMap< G4double > *map)
void RotateX(G4double delta)
HepRotation & rotateY(double delta)
void SetFilter(G4VSDFilter *filter)
void WorkerConstruct(G4VPhysicalVolume *fWorldPhys)
G4ThreeVector GetSize() const
G4String GetPSUnit(const G4String &psname)
void Construct(G4VPhysicalVolume *fWorldPhys)
void SetNijk(G4int i, G4int j, G4int k)
virtual void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual void List() const
G4VPrimitiveScorer * GetPrimitive(G4int id) const
G4double GetUnitValue() const
G4RotationMatrix * fRotationMatrix
static constexpr double cm
virtual size_t GetSize() const
G4bool ReadyForQuantity() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)=0
void SetCurrentPSUnit(const G4String &unit)
virtual ~G4VScoringMesh()
virtual void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
void RotateZ(G4double delta)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool fGeometryHasBeenDestroyed
G4LogicalVolume * fMeshElementLogical
void AddNewDetector(G4VSensitiveDetector *aSD)
void SetCenterPosition(G4double centerPosition[3])
G4VPrimitiveScorer * fCurrentPS
static G4SDManager * GetSDMpointer()
void GetDivisionAxisNames(G4String divisionAxisNames[3])
virtual void PrintAllHits()
MeshScoreMap GetScoreMap() const
HepRotation & rotateZ(double delta)
G4String GetCurrentPSUnit()
G4String fDivisionAxisNames[3]
const G4String & GetUnit() const
void SetUnit(const G4String &unit)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void SetNumberOfSegments(G4int nSegment[3])
std::map< G4String, RunScore * > MeshScoreMap
G4int GetNumberOfPrimitives() const
G4GLOB_DLL std::ostream G4cerr
G4VSDFilter * GetFilter() const