47 : fWorldName(wName),fCurrentPS(0),fConstructed(false),fActive(true),
49 verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
50 fDrawUnit(
""), fDrawUnitValue(1.), fMeshElementLogical(0)
66 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.begin();
67 for(; itr !=
fMap.end(); itr++) {
74 for(
int i = 0; i < 3; i++)
fSize[i] = size[i];
77 G4String message =
" The size of scoring mesh can not be changed.";
94 for(
int i = 0; i < 3; i++)
fNSegment[i] = nSegment[i];
97 G4String message =
" The size of scoring segments can not be changed.";
98 G4Exception(
"G4VScoringMesh::SetNumberOfSegments()",
104 for(
int i = 0; i < 3; i++) nSegment[i] =
fNSegment[i];
125 G4cerr <<
"ERROR : G4VScoringMesh::SetPrimitiveScorer() : " << ps->
GetName()
126 <<
" does not yet have mesh size or number of bins. Set them first." <<
G4endl
127 <<
"This Method is ignored." <<
G4endl;
131 << ps->
GetName() <<
" is registered."
147 G4cerr <<
"ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." <<
G4endl;
158 G4cout <<
"WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->
GetName()
167 G4cerr <<
"ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
168 << name <<
"> does not found." <<
G4endl;
173 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
174 if(itr ==
fMap.end())
return false;
179 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
180 if(itr ==
fMap.end()) {
190 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
191 msg +=
" Current primitive scorer is null.";
201 G4String msg =
"ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
202 msg +=
" Current primitive scorer is null.";
210 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.find(psname);;
211 if(itr ==
fMap.end()) {
223 if(
fMFD == 0)
return 0;
226 for(
G4int i = 0; i < nps; i++) {
228 if(name == ps->
GetName())
return ps;
235 G4cout <<
" # of segments: ("
240 G4cout <<
" displacement: ("
246 G4cout <<
" rotation matrix: "
264 for(
int i = 0; i < nps; i++) {
278 std::map<G4String, G4THitsMap<G4double>* >::iterator itr =
fMap.begin();
279 for(; itr !=
fMap.end(); itr++) {
281 itr->second->PrintAllHits();
291 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
292 if(fMapItr!=
fMap.end()) {
295 Draw(fMapItr->second->GetMap(), colorMap,axflg);
297 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
304 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
305 if(fMapItr!=
fMap.end()) {
308 DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn);
310 G4cerr <<
"Scorer <" << psName <<
"> is not defined. Method ignored." <<
G4endl;
317 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr =
fMap.find(psName);
318 *(fMapItr->second) += *map;
324 if(fMapItr ==
fMap.end()) {
326 << psName <<
" was not found." <<
G4endl;
353 MeshScoreMap::const_iterator fMapItr =
fMap.begin();
354 MeshScoreMap::const_iterator mapItr = scMap.begin();
355 for(; fMapItr !=
fMap.end(); fMapItr++) {
357 *(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)
HepRotation & rotateX(double 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)
HepRotation & rotateY(double delta)
void SetFilter(G4VSDFilter *filter)
virtual void WorkerConstruct(G4VPhysicalVolume *fWorldPhys)
G4ThreeVector GetSize() const
G4String GetPSUnit(const G4String &psname)
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
void SetCurrentPSUnit(const G4String &unit)
virtual ~G4VScoringMesh()
void RotateZ(G4double delta)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
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
HepRotation & rotateZ(double delta)
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