46 : fWorldName(wName),fCurrentPS(nullptr),fConstructed(false),fActive(true),
49 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
50 fDrawUnit(
""), fDrawUnitValue(1.), fMeshElementLogical(nullptr),
51 fParallelWorldProcess(nullptr), fGeometryHasBeenDestroyed(false),
52 copyNumberLevel(0), layeredMassFlg(false)
76 for(
int i = 0; i < 3; i++)
fSize[i] = size[i];
79 G4String message =
" The size of scoring mesh is updated.";
96 for(
int i = 0; i < 3; i++)
fNSegment[i] = nSegment[i];
99 G4String message =
" The size of scoring segments can not be changed.";
100 G4Exception(
"G4VScoringMesh::SetNumberOfSegments()",
106 for(
int i = 0; i < 3; i++) nSegment[i] =
fNSegment[i];
127 G4cerr <<
"ERROR : G4VScoringMesh::SetPrimitiveScorer() : "
129 <<
" does not yet have mesh size or number of bins. Set them first." <<
G4endl
130 <<
"This Method is ignored." <<
G4endl;
134 << prs->
GetName() <<
" is registered."
150 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." <<
G4endl;
161 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
170 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
171 << name <<
"> does not found." <<
G4endl;
176 MeshScoreMap::iterator itr =
fMap.find(psname);
177 if(itr ==
fMap.end())
return false;
182 MeshScoreMap::iterator itr =
fMap.find(psname);
183 if(itr ==
fMap.end()) {
193 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
194 msg +=
" Current primitive scorer is null.";
204 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
205 msg +=
" Current primitive scorer is null.";
213 MeshScoreMap::iterator itr =
fMap.find(psname);
214 if(itr ==
fMap.end()) {
226 if(!
fMFD)
return nullptr;
229 for(
G4int i = 0; i < nps; i++) {
231 if(name == prs->
GetName())
return prs;
238 G4cout <<
" # of segments: ("
243 G4cout <<
" displacement: ("
249 G4cout <<
" rotation matrix: "
267 for(
int i = 0; i < nps; i++) {
281 mp.second->PrintAllHits();
291 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
292 if(fMapItr!=
fMap.end()) {
295 Draw(fMapItr->second, colorMap,axflg);
297 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
304 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
305 if(fMapItr!=
fMap.end()) {
308 DrawColumn(fMapItr->second,colorMap,idxPlane,iColumn);
310 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
317 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
318 *(fMapItr->second) += *map;
324 if(fMapItr ==
fMap.end()) {
337 MeshScoreMap::const_iterator fMapItr =
fMap.find(psName);
338 *(fMapItr->second) += *map;
344 if(fMapItr ==
fMap.end()) {
394 MeshScoreMap::const_iterator fMapItr =
fMap.begin();
395 MeshScoreMap::const_iterator mapItr = scMap.begin();
396 for(; fMapItr !=
fMap.end(); fMapItr++) {
398 *(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
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 SetCurrentPSUnit(const G4String &unit)
G4MultiFunctionalDetector * fMFD
void SetCurrentPrimitiveScorer(const G4String &name)
std::map< G4String, RunScore * > MeshScoreMap
G4String fDivisionAxisNames[3]
G4LogicalVolume * fMeshElementLogical
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
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)
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()