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];
95 for(
int i = 0; i < 3; i++)
fNSegment[i] = nSegment[i];
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);
G4ThreeVector GetSize() const
const G4String & GetUnit() const
MeshScoreMap GetScoreMap() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)=0
void Construct(G4VPhysicalVolume *fWorldPhys)
G4String GetCurrentPSUnit()
virtual void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector fCenterPosition
void SetNumberOfSegments(G4int nSegment[3])
G4VPrimitiveScorer * GetPrimitive(G4int id) const
void AddNewDetector(G4VSensitiveDetector *aSD)
void Merge(const G4VScoringMesh *scMesh)
G4int GetNumberOfPrimitives() const
CLHEP::HepRotation G4RotationMatrix
void Accumulate(G4THitsMap< G4double > *map)
void message(RunManager *runmanager)
void RotateY(G4double delta)
G4String GetPSUnit(const G4String &psname)
void GetDivisionAxisNames(G4String divisionAxisNames[3])
G4bool fGeometryHasBeenDestroyed
void DrawMesh(const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
void SetFilter(G4VSDFilter *f)
virtual void List() const
void RotateZ(G4double delta)
G4VSDFilter * GetFilter() const
void GetNumberOfSegments(G4int nSegment[3])
virtual void PrintAllHits()
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
G4double GetPSUnitValue(const G4String &psname)
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
virtual ~G4VScoringMesh()
G4GLOB_DLL std::ostream G4cerr
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SetFilter(G4VSDFilter *filter)
static G4SDManager * GetSDMpointer()
HepRotation & rotateY(double delta)
void SetSize(G4double size[3])
G4RotationMatrix * fRotationMatrix
void SetCurrentPSUnit(const G4String &unit)
virtual size_t GetSize() const
void SetUnit(const G4String &unit)
G4bool FindPrimitiveScorer(const G4String &psname)
HepRotation & rotateZ(double delta)
void WorkerConstruct(G4VPhysicalVolume *fWorldPhys)
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
virtual void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
void SetCenterPosition(G4double centerPosition[3])
G4double GetUnitValue() const
void SetNijk(G4int i, G4int j, G4int k)
G4VPrimitiveScorer * fCurrentPS
void SetCurrentPrimitiveScorer(const G4String &name)
G4LogicalVolume * fMeshElementLogical
G4String fDivisionAxisNames[3]
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
void RotateX(G4double delta)
G4MultiFunctionalDetector * fMFD
HepRotation & rotateX(double delta)
G4VScoringMesh(const G4String &wName)
const G4String & GetName() const
G4bool ReadyForQuantity() const
std::map< G4String, RunScore * > MeshScoreMap
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)