51 , fRotationMatrix(nullptr)
58 , fMeshElementLogical(nullptr)
59 , fParallelWorldProcess(nullptr)
60 , fGeometryHasBeenDestroyed(false)
62 , layeredMassFlg(false)
68 fAngle[1] = CLHEP::twopi * rad;
76 G4cout <<
"G4VScoringMesh::ResetScore() is called." <<
G4endl;
77 for(
const auto& mp :
fMap)
80 G4cout <<
"G4VScoringMesh::ResetScore()" << mp.first <<
G4endl;
90 for(
G4int i = 0; i < 3; ++i)
97 G4String message =
" Mesh size has already been set and it cannot be changed.\n";
98 message +=
" This method is ignored.";
100 "DigiHitsUtilsScoreVScoringMesh000",
JustWarning, message);
120 G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
128 for(
G4int i = 0; i < 3; ++i)
134 G4String message =
" Number of bins has already been set and it cannot be changed.\n";
135 message +=
" This method is ignored.";
136 G4Exception(
"G4VScoringMesh::SetNumberOfSegments()",
137 "DigiHitsUtilsScoreVScoringMesh000",
JustWarning, message);
143 for(
G4int i = 0; i < 3; ++i)
172 G4cerr <<
"ERROR : G4VScoringMesh::SetPrimitiveScorer() : "
174 <<
" does not yet have mesh size or number of bins. Set them first."
179 G4cout <<
"G4VScoringMesh::SetPrimitiveScorer() : " << prs->
GetName()
196 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be "
197 "defined first. This method is ignored."
202 G4cout <<
"G4VScoringMesh::SetFilter() : " << filter->
GetName()
206 if(oldFilter !=
nullptr)
208 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
219 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The "
221 << name <<
"> does not found." <<
G4endl;
227 const auto itr =
fMap.find(psname);
228 return itr !=
fMap.cend();
233 const auto itr =
fMap.find(psname);
234 if(itr ==
fMap.cend())
247 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
248 msg +=
" Current primitive scorer is null.";
262 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
263 msg +=
" Current primitive scorer is null.";
274 const auto itr =
fMap.find(psname);
275 if(itr ==
fMap.cend())
285 for(
G4int i = 0; i < 3; ++i)
295 for(
G4int i = 0; i < nps; ++i)
325 for(
G4int i = 0; i < nps; ++i)
339 for(
const auto& mp :
fMap)
342 mp.second->PrintAllHits();
351 const auto fMapItr =
fMap.find(psName);
352 if(fMapItr !=
fMap.cend())
356 Draw(fMapItr->second, colorMap, axflg);
360 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored."
369 const auto fMapItr =
fMap.find(psName);
370 if(fMapItr !=
fMap.cend())
374 DrawColumn(fMapItr->second, colorMap, idxPlane, iColumn);
378 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored."
386 const auto fMapItr =
fMap.find(psName);
387 *(fMapItr->second) += *map;
394 if(fMapItr ==
fMap.cend())
410 const auto fMapItr =
fMap.find(psName);
411 *(fMapItr->second) += *map;
418 if(fMapItr ==
fMap.cend())
462 G4cout << fWorldPhys->
GetName() <<
" --- All quantities are reset."
477 auto fMapItr =
fMap.cbegin();
478 auto mapItr = scMap.cbegin();
479 for(; fMapItr !=
fMap.cend(); ++fMapItr)
482 G4cout <<
"G4VScoringMesh::Merge()" << fMapItr->first <<
G4endl;
483 *(fMapItr->second) += *(mapItr->second);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::HepRotation G4RotationMatrix
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
HepRotation & rotateX(double delta)
HepRotation & rotateZ(double delta)
HepRotation & rotateY(double delta)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
G4VPrimitiveScorer * GetPrimitive(G4int id) const
G4int GetNumberOfPrimitives() const
static G4SDManager * GetSDMpointer()
void AddNewDetector(G4VSensitiveDetector *aSD)
const G4String & GetName() const
const G4String & GetName() const
void SetUnit(const G4String &unit)
G4VSDFilter * GetFilter() const
void SetNijk(G4int i, G4int j, G4int k)
void SetFilter(G4VSDFilter *f)
const G4String & GetUnit() const
G4double GetUnitValue() const
void SetFilter(G4VSDFilter *filter)
G4bool ReadyForQuantity() const
G4RotationMatrix * fRotationMatrix
G4ThreeVector GetSize() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)=0
virtual void List() const
virtual void WorkerConstruct(G4VPhysicalVolume *fWorldPhys)
G4bool fGeometryHasBeenDestroyed
void RotateY(G4double delta)
void GetNumberOfSegments(G4int nSegment[3])
G4double GetPSUnitValue(const G4String &psname)
G4String GetPSUnit(const G4String &psname)
void SetAngles(G4double, G4double)
void SetCurrentPSUnit(const G4String &unit)
G4MultiFunctionalDetector * fMFD
void SetCurrentPrimitiveScorer(const G4String &name)
G4String fDivisionAxisNames[3]
G4LogicalVolume * fMeshElementLogical
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
std::map< G4String, RunScore * > MeshScoreMap
G4VPrimitiveScorer * fCurrentPS
G4String GetCurrentPSUnit()
void GetDivisionAxisNames(G4String divisionAxisNames[3])
void DrawMesh(const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
void Accumulate(G4THitsMap< G4double > *map)
void SetNumberOfSegments(G4int nSegment[3])
G4VScoringMesh(const G4String &wName)
MeshScoreMap GetScoreMap() const
void Merge(const G4VScoringMesh *scMesh)
virtual void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
void SetCenterPosition(G4double centerPosition[3])
void RotateX(G4double delta)
virtual void Construct(G4VPhysicalVolume *fWorldPhys)
void SetSize(G4double size[3])
virtual void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
G4bool FindPrimitiveScorer(const G4String &psname)
void RotateZ(G4double delta)
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
G4ThreeVector fCenterPosition
virtual size_t GetSize() const
virtual void PrintAllHits()