51 , fRotationMatrix(nullptr)
58 , fMeshElementLogical(nullptr)
59 , fParallelWorldProcess(nullptr)
60 , fGeometryHasBeenDestroyed(false)
62 , layeredMassFlg(false)
78 G4cout <<
"G4VScoringMesh::ResetScore() is called." <<
G4endl;
82 G4cout <<
"G4VScoringMesh::ResetScore()" << mp.first <<
G4endl;
92 for(
int i = 0; i < 3; i++)
99 G4String message =
" Mesh size has already been set and it cannot be changed.\n";
100 message +=
" This method is ignored.";
102 "DigiHitsUtilsScoreVScoringMesh000",
JustWarning, message);
121 G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
128 for(
int 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);
142 for(
int i = 0; i < 3; i++)
170 G4cerr <<
"ERROR : G4VScoringMesh::SetPrimitiveScorer() : "
172 <<
" does not yet have mesh size or number of bins. Set them first."
177 G4cout <<
"G4VScoringMesh::SetPrimitiveScorer() : " << prs->
GetName()
194 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be "
195 "defined first. This method is ignored."
200 G4cout <<
"G4VScoringMesh::SetFilter() : " << filter->
GetName()
206 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
217 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The "
225 MeshScoreMap::iterator itr =
fMap.find(psname);
226 if(itr ==
fMap.end())
233 MeshScoreMap::iterator itr =
fMap.find(psname);
234 if(itr ==
fMap.end())
249 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
250 msg +=
" Current primitive scorer is null.";
264 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
265 msg +=
" Current primitive scorer is null.";
276 MeshScoreMap::iterator itr =
fMap.find(psname);
277 if(itr ==
fMap.end())
289 for(
int i = 0; i < 3; i++)
328 for(
int i = 0; i <
nps; i++)
345 mp.second->PrintAllHits();
354 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
355 if(fMapItr !=
fMap.end())
359 Draw(fMapItr->second, colorMap, axflg);
363 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored."
372 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
373 if(fMapItr !=
fMap.end())
377 DrawColumn(fMapItr->second, colorMap, idxPlane, iColumn);
381 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored."
389 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
390 *(fMapItr->second) += *
map;
397 if(fMapItr ==
fMap.end())
413 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
414 *(fMapItr->second) += *
map;
421 if(fMapItr ==
fMap.end())
465 G4cout << fWorldPhys->
GetName() <<
" --- All quantities are reset."
480 MeshScoreMap::const_iterator fMapItr =
fMap.begin();
481 MeshScoreMap::const_iterator mapItr = scMap.begin();
482 for(; fMapItr !=
fMap.end(); fMapItr++)
485 G4cout <<
"G4VScoringMesh::Merge()" << fMapItr->first <<
G4endl;
486 *(fMapItr->second) += *(mapItr->second);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::HepRotation G4RotationMatrix
static constexpr double rad
static constexpr double cm
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
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 ~G4VScoringMesh()
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
static constexpr double twopi
const char * name(G4int ptype)