47 : fWorldName(wName),fCurrentPS(0),fConstructed(false),fActive(true),fShape(
undefinedMesh),
49 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
50 fDrawUnit(
""), fDrawUnitValue(1.), fMeshElementLogical(0),
51 fParallelWorldProcess(0), fGeometryHasBeenDestroyed(false)
67 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.begin();
68 for(; itr !=
fMap.end(); itr++) {
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() : " << ps->
GetName()
127 <<
" does not yet have mesh size or number of bins. Set them first." <<
G4endl
128 <<
"This Method is ignored." <<
G4endl;
132 << ps->
GetName() <<
" is registered."
148 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." <<
G4endl;
159 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
168 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
169 << name <<
"> does not found." <<
G4endl;
174 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
175 if(itr ==
fMap.end())
return false;
180 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
181 if(itr ==
fMap.end()) {
191 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
192 msg +=
" Current primitive scorer is null.";
202 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
203 msg +=
" Current primitive scorer is null.";
211 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
212 if(itr ==
fMap.end()) {
224 if(
fMFD == 0)
return 0;
227 for(
G4int i = 0; i < nps; i++) {
229 if(name == ps->
GetName())
return ps;
236 G4cout <<
" # of segments: ("
241 G4cout <<
" displacement: ("
247 G4cout <<
" rotation matrix: "
265 for(
int i = 0; i < nps; i++) {
279 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.begin();
280 for(; itr !=
fMap.end(); itr++) {
282 itr->second->PrintAllHits();
292 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
293 if(fMapItr!=
fMap.end()) {
296 Draw(fMapItr->second->GetMap(), colorMap,axflg);
298 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
305 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
306 if(fMapItr!=
fMap.end()) {
309 DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn);
311 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
318 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
319 *(fMapItr->second) += *map;
325 if(fMapItr ==
fMap.end()) {
327 << psName <<
" was not found." <<
G4endl;
344 G4cout << fWorldPhys->
GetName() <<
" --- All quantities are reset."
376 MeshScoreMap::const_iterator fMapItr =
fMap.begin();
377 MeshScoreMap::const_iterator mapItr = scMap.begin();
378 for(; fMapItr !=
fMap.end(); fMapItr++) {
380 *(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)
std::map< G4String, G4THitsMap< G4double > * > MeshScoreMap
CLHEP::Hep3Vector G4ThreeVector
void RotateY(G4double 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)
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)
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual void List() const
G4VPrimitiveScorer * GetPrimitive(G4int id) const
G4double GetUnitValue() const
G4RotationMatrix * fRotationMatrix
virtual size_t GetSize() const
virtual void DrawColumn(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
G4bool ReadyForQuantity() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)=0
void SetCurrentPSUnit(const G4String &unit)
virtual ~G4VScoringMesh()
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)
virtual void Draw(std::map< G4int, G4double * > *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
void SetCenterPosition(G4double centerPosition[3])
G4VPrimitiveScorer * fCurrentPS
static G4SDManager * GetSDMpointer()
void GetDivisionAxisNames(G4String divisionAxisNames[3])
virtual void PrintAllHits()
MeshScoreMap GetScoreMap() const
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, G4THitsMap< G4double > * > fMap
G4int GetNumberOfPrimitives() const
G4GLOB_DLL std::ostream G4cerr
G4VSDFilter * GetFilter() const