Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VScoringMesh Class Referenceabstract

#include <G4VScoringMesh.hh>

Inheritance diagram for G4VScoringMesh:
Collaboration diagram for G4VScoringMesh:

Public Member Functions

 G4VScoringMesh (const G4String &wName)
 
virtual ~G4VScoringMesh ()
 
void Construct (G4VPhysicalVolume *fWorldPhys)
 
void WorkerConstruct (G4VPhysicalVolume *fWorldPhys)
 
virtual void List () const
 
const G4StringGetWorldName () const
 
G4bool IsActive () const
 
void Activate (G4bool vl=true)
 
MeshShape GetShape () const
 
void Accumulate (G4THitsMap< G4double > *map)
 
void Accumulate (G4THitsMap< G4StatDouble > *map)
 
void Merge (const G4VScoringMesh *scMesh)
 
void Dump ()
 
void DrawMesh (const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
 
void DrawMesh (const G4String &psName, G4int idxPlane, G4int iColumn, G4VScoreColorMap *colorMap)
 
virtual void Draw (RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
 
virtual void DrawColumn (RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
 
void ResetScore ()
 
void SetSize (G4double size[3])
 
G4ThreeVector GetSize () const
 
void SetCenterPosition (G4double centerPosition[3])
 
G4ThreeVector GetTranslation () const
 
void RotateX (G4double delta)
 
void RotateY (G4double delta)
 
void RotateZ (G4double delta)
 
G4RotationMatrix GetRotationMatrix () const
 
void SetNumberOfSegments (G4int nSegment[3])
 
void GetNumberOfSegments (G4int nSegment[3])
 
void SetPrimitiveScorer (G4VPrimitiveScorer *ps)
 
void SetFilter (G4VSDFilter *filter)
 
void SetCurrentPrimitiveScorer (const G4String &name)
 
G4bool FindPrimitiveScorer (const G4String &psname)
 
G4bool IsCurrentPrimitiveScorerNull ()
 
G4String GetPSUnit (const G4String &psname)
 
G4String GetCurrentPSUnit ()
 
void SetCurrentPSUnit (const G4String &unit)
 
G4double GetPSUnitValue (const G4String &psname)
 
void SetDrawPSName (const G4String &psname)
 
void GetDivisionAxisNames (G4String divisionAxisNames[3])
 
void SetNullToCurrentPrimitiveScorer ()
 
void SetVerboseLevel (G4int vl)
 
MeshScoreMap GetScoreMap () const
 
G4bool ReadyForQuantity () const
 
void SetMeshElementLogical (G4LogicalVolume *val)
 
G4LogicalVolumeGetMeshElementLogical () const
 
void SetParallelWorldProcess (G4ParallelWorldProcess *proc)
 
G4ParallelWorldProcessGetParallelWorldProcess () const
 
void GeometryHasBeenDestroyed ()
 

Protected Member Functions

virtual void SetupGeometry (G4VPhysicalVolume *fWorldPhys)=0
 
G4VPrimitiveScorerGetPrimitiveScorer (const G4String &name)
 

Protected Attributes

G4String fWorldName
 
G4VPrimitiveScorerfCurrentPS
 
G4bool fConstructed
 
G4bool fActive
 
MeshShape fShape
 
G4double fSize [3]
 
G4ThreeVector fCenterPosition
 
G4RotationMatrixfRotationMatrix
 
G4int fNSegment [3]
 
MeshScoreMap fMap
 
G4MultiFunctionalDetectorfMFD
 
G4int verboseLevel
 
G4bool sizeIsSet
 
G4bool nMeshIsSet
 
G4String fDrawUnit
 
G4double fDrawUnitValue
 
G4String fDrawPSName
 
G4String fDivisionAxisNames [3]
 
G4LogicalVolumefMeshElementLogical
 
G4ParallelWorldProcessfParallelWorldProcess
 
G4bool fGeometryHasBeenDestroyed
 

Detailed Description

Definition at line 57 of file G4VScoringMesh.hh.

Constructor & Destructor Documentation

G4VScoringMesh::G4VScoringMesh ( const G4String wName)

Definition at line 46 of file G4VScoringMesh.cc.

47  : fWorldName(wName),fCurrentPS(nullptr),fConstructed(false),fActive(true),fShape(undefinedMesh),
48  fRotationMatrix(nullptr), fMFD(new G4MultiFunctionalDetector(wName)),
49  verboseLevel(0),sizeIsSet(false),nMeshIsSet(false),
50  fDrawUnit(""), fDrawUnitValue(1.), fMeshElementLogical(nullptr),
52 {
54 
55  fSize[0] = fSize[1] = fSize[2] = 0.;
56  fNSegment[0] = fNSegment[1] = fNSegment[2] = 1;
58 }
G4MultiFunctionalDetector * fMFD
G4double fSize[3]
G4ParallelWorldProcess * fParallelWorldProcess
G4double fDrawUnitValue
G4RotationMatrix * fRotationMatrix
G4bool fGeometryHasBeenDestroyed
G4LogicalVolume * fMeshElementLogical
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
G4VPrimitiveScorer * fCurrentPS
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
G4String fDivisionAxisNames[3]

Here is the call graph for this function:

G4VScoringMesh::~G4VScoringMesh ( )
virtual

Definition at line 60 of file G4VScoringMesh.cc.

60  {
61  ;
62 }

Member Function Documentation

void G4VScoringMesh::Accumulate ( G4THitsMap< G4double > *  map)

Definition at line 313 of file G4VScoringMesh.cc.

314 {
315  G4String psName = map->GetName();
316  MeshScoreMap::const_iterator fMapItr = fMap.find(psName);
317  *(fMapItr->second) += *map;
318 
319  if(verboseLevel > 9) {
320  G4cout << G4endl;
321  G4cout << "G4VScoringMesh::Accumulate()" << G4endl;
322  G4cout << " PS name : " << psName << G4endl;
323  if(fMapItr == fMap.end()) {
324  G4cout << " " << psName << " was not found." << G4endl;
325  } else {
326  G4cout << " map size : " << map->GetSize() << G4endl;
327  map->PrintAllHits();
328  }
329  G4cout << G4endl;
330  }
331 }
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
virtual size_t GetSize() const
Definition: G4THitsMap.hh:208
virtual void PrintAllHits()
Definition: G4THitsMap.hh:251
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::Accumulate ( G4THitsMap< G4StatDouble > *  map)

Definition at line 333 of file G4VScoringMesh.cc.

334 {
335  G4String psName = map->GetName();
336  MeshScoreMap::const_iterator fMapItr = fMap.find(psName);
337  *(fMapItr->second) += *map;
338 
339  if(verboseLevel > 9) {
340  G4cout << G4endl;
341  G4cout << "G4VScoringMesh::Accumulate()" << G4endl;
342  G4cout << " PS name : " << psName << G4endl;
343  if(fMapItr == fMap.end()) {
344  G4cout << " " << psName << " was not found." << G4endl;
345  } else {
346  G4cout << " map size : " << map->GetSize() << G4endl;
347  map->PrintAllHits();
348  }
349  G4cout << G4endl;
350  }
351 }
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
virtual size_t GetSize() const
Definition: G4THitsMap.hh:208
virtual void PrintAllHits()
Definition: G4THitsMap.hh:251
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4VScoringMesh::Activate ( G4bool  vl = true)
inline

Definition at line 84 of file G4VScoringMesh.hh.

85  { fActive = vl; }
void G4VScoringMesh::Construct ( G4VPhysicalVolume fWorldPhys)

Definition at line 353 of file G4VScoringMesh.cc.

354 {
355  if(fConstructed) {
357  SetupGeometry(fWorldPhys);
359  }
360  if(verboseLevel > 0)
361  G4cout << fWorldPhys->GetName() << " --- All quantities are reset."
362  << G4endl;
363  ResetScore();
364  }
365  else {
366  fConstructed = true;
367  SetupGeometry(fWorldPhys);
368  }
369 }
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual void SetupGeometry(G4VPhysicalVolume *fWorldPhys)=0
G4bool fGeometryHasBeenDestroyed
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void G4VScoringMesh::Draw ( RunScore map,
G4VScoreColorMap colorMap,
G4int  axflg = 111 
)
pure virtual

Implemented in G4ScoringBox, and G4ScoringCylinder.

Here is the caller graph for this function:

virtual void G4VScoringMesh::DrawColumn ( RunScore map,
G4VScoreColorMap colorMap,
G4int  idxProj,
G4int  idxColumn 
)
pure virtual

Implemented in G4ScoringBox, and G4ScoringCylinder.

Here is the caller graph for this function:

void G4VScoringMesh::DrawMesh ( const G4String psName,
G4VScoreColorMap colorMap,
G4int  axflg = 111 
)

Definition at line 287 of file G4VScoringMesh.cc.

288 {
289  fDrawPSName = psName;
290  MeshScoreMap::const_iterator fMapItr = fMap.find(psName);
291  if(fMapItr!=fMap.end()) {
292  fDrawUnit = GetPSUnit(psName);
293  fDrawUnitValue = GetPSUnitValue(psName);
294  Draw(fMapItr->second, colorMap,axflg);
295  } else {
296  G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl;
297  }
298 }
G4double GetPSUnitValue(const G4String &psname)
G4String GetPSUnit(const G4String &psname)
virtual void Draw(RunScore *map, G4VScoreColorMap *colorMap, G4int axflg=111)=0
G4double fDrawUnitValue
MeshScoreMap fMap
#define G4endl
Definition: G4ios.hh:61
G4String fDrawPSName
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::DrawMesh ( const G4String psName,
G4int  idxPlane,
G4int  iColumn,
G4VScoreColorMap colorMap 
)

Definition at line 300 of file G4VScoringMesh.cc.

301 {
302  fDrawPSName = psName;
303  MeshScoreMap::const_iterator fMapItr = fMap.find(psName);
304  if(fMapItr!=fMap.end()) {
305  fDrawUnit = GetPSUnit(psName);
306  fDrawUnitValue = GetPSUnitValue(psName);
307  DrawColumn(fMapItr->second,colorMap,idxPlane,iColumn);
308  } else {
309  G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl;
310  }
311 }
G4double GetPSUnitValue(const G4String &psname)
G4String GetPSUnit(const G4String &psname)
G4double fDrawUnitValue
MeshScoreMap fMap
virtual void DrawColumn(RunScore *map, G4VScoreColorMap *colorMap, G4int idxProj, G4int idxColumn)=0
#define G4endl
Definition: G4ios.hh:61
G4String fDrawPSName
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

void G4VScoringMesh::Dump ( )

Definition at line 274 of file G4VScoringMesh.cc.

274  {
275  G4cout << "scoring mesh name: " << fWorldName << G4endl;
276  G4cout << "# of G4THitsMap : " << fMap.size() << G4endl;
277  for(auto mp : fMap)
278  {
279  G4cout << "[" << mp.first << "]" << G4endl;
280  mp.second->PrintAllHits();
281  }
282  G4cout << G4endl;
283 
284 }
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4bool G4VScoringMesh::FindPrimitiveScorer ( const G4String psname)

Definition at line 174 of file G4VScoringMesh.cc.

174  {
175  MeshScoreMap::iterator itr = fMap.find(psname);
176  if(itr == fMap.end()) return false;
177  return true;
178 }
MeshScoreMap fMap

Here is the caller graph for this function:

void G4VScoringMesh::GeometryHasBeenDestroyed ( )
inline

Definition at line 217 of file G4VScoringMesh.hh.

218  {
220  fMeshElementLogical = nullptr;
221  }
G4bool fGeometryHasBeenDestroyed
G4LogicalVolume * fMeshElementLogical

Here is the caller graph for this function:

G4String G4VScoringMesh::GetCurrentPSUnit ( )

Definition at line 189 of file G4VScoringMesh.cc.

189  {
190  G4String unit = "";
191  if(!fCurrentPS) {
192  G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
193  msg += " Current primitive scorer is null.";
194  G4cerr << msg << G4endl;
195  }else{
196  unit = fCurrentPS->GetUnit();
197  }
198  return unit;
199 }
G4VPrimitiveScorer * fCurrentPS
#define G4endl
Definition: G4ios.hh:61
const G4String & GetUnit() const
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::GetDivisionAxisNames ( G4String  divisionAxisNames[3])

Definition at line 220 of file G4VScoringMesh.cc.

220  {
221  for(int i = 0; i < 3; i++) divisionAxisNames[i] = fDivisionAxisNames[i];
222 }
G4String fDivisionAxisNames[3]

Here is the caller graph for this function:

G4LogicalVolume* G4VScoringMesh::GetMeshElementLogical ( ) const
inline

Definition at line 206 of file G4VScoringMesh.hh.

207  { return fMeshElementLogical; }
G4LogicalVolume * fMeshElementLogical

Here is the caller graph for this function:

void G4VScoringMesh::GetNumberOfSegments ( G4int  nSegment[3])

Definition at line 104 of file G4VScoringMesh.cc.

104  {
105  for(int i = 0; i < 3; i++) nSegment[i] = fNSegment[i];
106 }

Here is the caller graph for this function:

G4ParallelWorldProcess* G4VScoringMesh::GetParallelWorldProcess ( ) const
inline

Definition at line 215 of file G4VScoringMesh.hh.

216  { return fParallelWorldProcess; }
G4ParallelWorldProcess * fParallelWorldProcess

Here is the caller graph for this function:

G4VPrimitiveScorer * G4VScoringMesh::GetPrimitiveScorer ( const G4String name)
protected

Definition at line 224 of file G4VScoringMesh.cc.

224  {
225  if(!fMFD) return nullptr;
226 
228  for(G4int i = 0; i < nps; i++) {
230  if(name == prs->GetName()) return prs;
231  }
232 
233  return nullptr;
234 }
G4String GetName() const
G4MultiFunctionalDetector * fMFD
int G4int
Definition: G4Types.hh:78
G4VPrimitiveScorer * GetPrimitive(G4int id) const

Here is the call graph for this function:

Here is the caller graph for this function:

G4String G4VScoringMesh::GetPSUnit ( const G4String psname)

Definition at line 180 of file G4VScoringMesh.cc.

180  {
181  MeshScoreMap::iterator itr = fMap.find(psname);
182  if(itr == fMap.end()) {
183  return G4String("");
184  } else {
185  return GetPrimitiveScorer(psname)->GetUnit();
186  }
187 }
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
MeshScoreMap fMap
const G4String & GetUnit() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4VScoringMesh::GetPSUnitValue ( const G4String psname)

Definition at line 211 of file G4VScoringMesh.cc.

211  {
212  MeshScoreMap::iterator itr = fMap.find(psname);
213  if(itr == fMap.end()) {
214  return 1.;
215  } else {
216  return GetPrimitiveScorer(psname)->GetUnitValue();
217  }
218 }
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
MeshScoreMap fMap
G4double GetUnitValue() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4RotationMatrix G4VScoringMesh::GetRotationMatrix ( ) const
inline

Definition at line 123 of file G4VScoringMesh.hh.

123  {
124  if(fRotationMatrix) return *fRotationMatrix;
125  else return G4RotationMatrix::IDENTITY;
126  }
static DLL_API const HepRotation IDENTITY
Definition: Rotation.h:369
G4RotationMatrix * fRotationMatrix

Here is the caller graph for this function:

MeshScoreMap G4VScoringMesh::GetScoreMap ( ) const
inline

Definition at line 165 of file G4VScoringMesh.hh.

166  { return fMap; }
MeshScoreMap fMap

Here is the caller graph for this function:

MeshShape G4VScoringMesh::GetShape ( ) const
inline

Definition at line 87 of file G4VScoringMesh.hh.

88  { return fShape; }

Here is the caller graph for this function:

G4ThreeVector G4VScoringMesh::GetSize ( ) const

Definition at line 84 of file G4VScoringMesh.cc.

84  {
85  if(sizeIsSet)
86  return G4ThreeVector(fSize[0], fSize[1], fSize[2]);
87  else
88  return G4ThreeVector(0., 0., 0.);
89 }
CLHEP::Hep3Vector G4ThreeVector
G4double fSize[3]

Here is the caller graph for this function:

G4ThreeVector G4VScoringMesh::GetTranslation ( ) const
inline

Definition at line 115 of file G4VScoringMesh.hh.

115 {return fCenterPosition;}
G4ThreeVector fCenterPosition

Here is the caller graph for this function:

const G4String& G4VScoringMesh::GetWorldName ( ) const
inline

Definition at line 78 of file G4VScoringMesh.hh.

79  { return fWorldName; }

Here is the caller graph for this function:

G4bool G4VScoringMesh::IsActive ( ) const
inline

Definition at line 81 of file G4VScoringMesh.hh.

82  { return fActive; }

Here is the caller graph for this function:

G4bool G4VScoringMesh::IsCurrentPrimitiveScorerNull ( )
inline

Definition at line 141 of file G4VScoringMesh.hh.

141  {
142  if(fCurrentPS == nullptr) return true;
143  else return false;
144  }
G4VPrimitiveScorer * fCurrentPS

Here is the caller graph for this function:

void G4VScoringMesh::List ( ) const
virtual

Reimplemented in G4ScoringBox, and G4ScoringCylinder.

Definition at line 235 of file G4VScoringMesh.cc.

235  {
236 
237  G4cout << " # of segments: ("
238  << fNSegment[0] << ", "
239  << fNSegment[1] << ", "
240  << fNSegment[2] << ")"
241  << G4endl;
242  G4cout << " displacement: ("
243  << fCenterPosition.x()/cm << ", "
244  << fCenterPosition.y()/cm << ", "
245  << fCenterPosition.z()/cm << ") [cm]"
246  << G4endl;
247  if(fRotationMatrix != 0) {
248  G4cout << " rotation matrix: "
249  << fRotationMatrix->xx() << " "
250  << fRotationMatrix->xy() << " "
251  << fRotationMatrix->xz() << G4endl
252  << " "
253  << fRotationMatrix->yx() << " "
254  << fRotationMatrix->yy() << " "
255  << fRotationMatrix->yz() << G4endl
256  << " "
257  << fRotationMatrix->zx() << " "
258  << fRotationMatrix->zy() << " "
259  << fRotationMatrix->zz() << G4endl;
260  }
261 
262 
263  G4cout << " registered primitve scorers : " << G4endl;
265  G4VPrimitiveScorer * prs;
266  for(int i = 0; i < nps; i++) {
267  prs = fMFD->GetPrimitive(i);
268  G4cout << " " << i << " " << prs->GetName();
269  if(prs->GetFilter() != 0) G4cout << " with " << prs->GetFilter()->GetName();
270  G4cout << G4endl;
271  }
272 }
double xx() const
G4ThreeVector fCenterPosition
G4String GetName() const
double x() const
G4MultiFunctionalDetector * fMFD
double yy() const
double xz() const
G4String GetName() const
Definition: G4VSDFilter.hh:57
int G4int
Definition: G4Types.hh:78
double zx() const
double z() const
double yz() const
G4GLOB_DLL std::ostream G4cout
G4VPrimitiveScorer * GetPrimitive(G4int id) const
G4RotationMatrix * fRotationMatrix
static constexpr double cm
Definition: G4SIunits.hh:119
double zy() const
double y() const
#define G4endl
Definition: G4ios.hh:61
double yx() const
double zz() const
double xy() const
G4VSDFilter * GetFilter() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::Merge ( const G4VScoringMesh scMesh)

Definition at line 389 of file G4VScoringMesh.cc.

390 {
391  const MeshScoreMap scMap = scMesh->GetScoreMap();
392 
393  MeshScoreMap::const_iterator fMapItr = fMap.begin();
394  MeshScoreMap::const_iterator mapItr = scMap.begin();
395  for(; fMapItr != fMap.end(); fMapItr++) {
396  if(verboseLevel > 9) G4cout << "G4VScoringMesh::Merge()" << fMapItr->first << G4endl;
397  *(fMapItr->second) += *(mapItr->second);
398  mapItr++;
399  }
400 }
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
MeshScoreMap GetScoreMap() const
#define G4endl
Definition: G4ios.hh:61
std::map< G4String, RunScore * > MeshScoreMap

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4VScoringMesh::ReadyForQuantity ( ) const
inline

Definition at line 168 of file G4VScoringMesh.hh.

169  { return (sizeIsSet && nMeshIsSet); }

Here is the caller graph for this function:

void G4VScoringMesh::ResetScore ( )

Definition at line 64 of file G4VScoringMesh.cc.

64  {
65  if(verboseLevel > 9) G4cout << "G4VScoringMesh::ResetScore() is called." << G4endl;
66  for(auto mp : fMap)
67  {
68  if(verboseLevel > 9) G4cout << "G4VScoringMesh::ResetScore()" << mp.first << G4endl;
69  mp.second->clear();
70  }
71 }
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

void G4VScoringMesh::RotateX ( G4double  delta)

Definition at line 107 of file G4VScoringMesh.cc.

107  {
109  fRotationMatrix->rotateX(delta);
110 }
HepRotation & rotateX(double delta)
Definition: Rotation.cc:66
CLHEP::HepRotation G4RotationMatrix
G4RotationMatrix * fRotationMatrix

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::RotateY ( G4double  delta)

Definition at line 112 of file G4VScoringMesh.cc.

112  {
114  fRotationMatrix->rotateY(delta);
115 }
CLHEP::HepRotation G4RotationMatrix
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
G4RotationMatrix * fRotationMatrix

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::RotateZ ( G4double  delta)

Definition at line 117 of file G4VScoringMesh.cc.

117  {
119  fRotationMatrix->rotateZ(delta);
120 }
CLHEP::HepRotation G4RotationMatrix
G4RotationMatrix * fRotationMatrix
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetCenterPosition ( G4double  centerPosition[3])

Definition at line 90 of file G4VScoringMesh.cc.

90  {
91  fCenterPosition = G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
92 }
G4ThreeVector fCenterPosition
CLHEP::Hep3Vector G4ThreeVector

Here is the caller graph for this function:

void G4VScoringMesh::SetCurrentPrimitiveScorer ( const G4String name)

Definition at line 166 of file G4VScoringMesh.cc.

166  {
168  if(!fCurrentPS) {
169  G4cerr << "ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
170  << name << "> does not found." << G4endl;
171  }
172 }
G4VPrimitiveScorer * GetPrimitiveScorer(const G4String &name)
G4VPrimitiveScorer * fCurrentPS
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetCurrentPSUnit ( const G4String unit)

Definition at line 201 of file G4VScoringMesh.cc.

201  {
202  if(!fCurrentPS) {
203  G4String msg = "ERROR : G4VScoringMesh::GetCurrentPSUnit() : ";
204  msg += " Current primitive scorer is null.";
205  G4cerr << msg << G4endl;
206  }else{
207  fCurrentPS->SetUnit(unit);
208  }
209 }
G4VPrimitiveScorer * fCurrentPS
#define G4endl
Definition: G4ios.hh:61
void SetUnit(const G4String &unit)
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetDrawPSName ( const G4String psname)
inline

Definition at line 154 of file G4VScoringMesh.hh.

154 {fDrawPSName = psname;}
G4String fDrawPSName
void G4VScoringMesh::SetFilter ( G4VSDFilter filter)

Definition at line 146 of file G4VScoringMesh.cc.

146  {
147 
148  if(!fCurrentPS) {
149  G4cerr << "ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." << G4endl;
150  return;
151  }
152  if(verboseLevel > 0) G4cout << "G4VScoringMesh::SetFilter() : "
153  << filter->GetName()
154  << " is set to "
155  << fCurrentPS->GetName() << G4endl;
156 
157  G4VSDFilter* oldFilter = fCurrentPS->GetFilter();
158  if(oldFilter)
159  {
160  G4cout << "WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->GetName()
161  << " is overwritten by " << filter->GetName() << G4endl;
162  }
163  fCurrentPS->SetFilter(filter);
164 }
G4String GetName() const
void SetFilter(G4VSDFilter *f)
G4String GetName() const
Definition: G4VSDFilter.hh:57
G4GLOB_DLL std::ostream G4cout
G4VPrimitiveScorer * fCurrentPS
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr
G4VSDFilter * GetFilter() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetMeshElementLogical ( G4LogicalVolume val)
inline

Definition at line 204 of file G4VScoringMesh.hh.

205  { fMeshElementLogical = val; }
G4LogicalVolume * fMeshElementLogical

Here is the caller graph for this function:

void G4VScoringMesh::SetNullToCurrentPrimitiveScorer ( )
inline

Definition at line 160 of file G4VScoringMesh.hh.

160 {fCurrentPS = nullptr;}
G4VPrimitiveScorer * fCurrentPS

Here is the caller graph for this function:

void G4VScoringMesh::SetNumberOfSegments ( G4int  nSegment[3])

Definition at line 93 of file G4VScoringMesh.cc.

93  {
94  if ( !nMeshIsSet ){
95  for(int i = 0; i < 3; i++) fNSegment[i] = nSegment[i];
96  nMeshIsSet = true;
97  } else {
98  G4String message = " The size of scoring segments can not be changed.";
99  G4Exception("G4VScoringMesh::SetNumberOfSegments()",
100  "DigiHitsUtilsScoreVScoringMesh000", JustWarning,
101  message);
102  }
103 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetParallelWorldProcess ( G4ParallelWorldProcess proc)
inline

Definition at line 213 of file G4VScoringMesh.hh.

214  { fParallelWorldProcess = proc; }
G4ParallelWorldProcess * fParallelWorldProcess

Here is the caller graph for this function:

void G4VScoringMesh::SetPrimitiveScorer ( G4VPrimitiveScorer ps)

Definition at line 122 of file G4VScoringMesh.cc.

122  {
123 
124  if(!ReadyForQuantity())
125  {
126  G4cerr << "ERROR : G4VScoringMesh::SetPrimitiveScorer() : "
127  << prs->GetName()
128  << " does not yet have mesh size or number of bins. Set them first." << G4endl
129  << "This Method is ignored." << G4endl;
130  return;
131  }
132  if(verboseLevel > 0) G4cout << "G4VScoringMesh::SetPrimitiveScorer() : "
133  << prs->GetName() << " is registered."
134  << " 3D size: ("
135  << fNSegment[0] << ", "
136  << fNSegment[1] << ", "
137  << fNSegment[2] << ")" << G4endl;
138 
139  prs->SetNijk(fNSegment[0], fNSegment[1], fNSegment[2]);
140  fCurrentPS = prs;
141  fMFD->RegisterPrimitive(prs);
142  G4THitsMap<G4StatDouble> * map = new G4THitsMap<G4StatDouble>(fWorldName, prs->GetName());
143  fMap[prs->GetName()] = map;
144 }
G4bool RegisterPrimitive(G4VPrimitiveScorer *)
G4MultiFunctionalDetector * fMFD
MeshScoreMap fMap
G4GLOB_DLL std::ostream G4cout
G4bool ReadyForQuantity() const
G4VPrimitiveScorer * fCurrentPS
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VScoringMesh::SetSize ( G4double  size[3])

Definition at line 73 of file G4VScoringMesh.cc.

73  {
74  if ( !sizeIsSet ){
75  for(int i = 0; i < 3; i++) fSize[i] = size[i];
76  sizeIsSet = true;
77  }else{
78  G4String message = " The size of scoring mesh can not be changed.";
79  G4Exception("G4VScoringMesh::SetSize()",
80  "DigiHitsUtilsScoreVScoringMesh000", JustWarning,
81  message);
82  }
83 }
G4double fSize[3]
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void G4VScoringMesh::SetupGeometry ( G4VPhysicalVolume fWorldPhys)
protectedpure virtual

Implemented in G4ScoringBox, and G4ScoringCylinder.

Here is the caller graph for this function:

void G4VScoringMesh::SetVerboseLevel ( G4int  vl)
inline

Definition at line 162 of file G4VScoringMesh.hh.

163  { verboseLevel = vl; }

Here is the caller graph for this function:

void G4VScoringMesh::WorkerConstruct ( G4VPhysicalVolume fWorldPhys)

Definition at line 371 of file G4VScoringMesh.cc.

372 {
373  if(fConstructed) {
377  }
378 
379  if(verboseLevel > 0)
380  G4cout << fWorldPhys->GetName() << " --- All quantities are reset." << G4endl;
381  ResetScore();
382 
383  } else {
384  fConstructed = true;
386  }
387 }
G4MultiFunctionalDetector * fMFD
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4bool fGeometryHasBeenDestroyed
G4LogicalVolume * fMeshElementLogical
#define G4endl
Definition: G4ios.hh:61
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4bool G4VScoringMesh::fActive
protected

Definition at line 179 of file G4VScoringMesh.hh.

G4ThreeVector G4VScoringMesh::fCenterPosition
protected

Definition at line 183 of file G4VScoringMesh.hh.

G4bool G4VScoringMesh::fConstructed
protected

Definition at line 178 of file G4VScoringMesh.hh.

G4VPrimitiveScorer* G4VScoringMesh::fCurrentPS
protected

Definition at line 177 of file G4VScoringMesh.hh.

G4String G4VScoringMesh::fDivisionAxisNames[3]
protected

Definition at line 199 of file G4VScoringMesh.hh.

G4String G4VScoringMesh::fDrawPSName
protected

Definition at line 197 of file G4VScoringMesh.hh.

G4String G4VScoringMesh::fDrawUnit
protected

Definition at line 195 of file G4VScoringMesh.hh.

G4double G4VScoringMesh::fDrawUnitValue
protected

Definition at line 196 of file G4VScoringMesh.hh.

G4bool G4VScoringMesh::fGeometryHasBeenDestroyed
protected

Definition at line 211 of file G4VScoringMesh.hh.

MeshScoreMap G4VScoringMesh::fMap
protected

Definition at line 187 of file G4VScoringMesh.hh.

G4LogicalVolume* G4VScoringMesh::fMeshElementLogical
protected

Definition at line 201 of file G4VScoringMesh.hh.

G4MultiFunctionalDetector* G4VScoringMesh::fMFD
protected

Definition at line 188 of file G4VScoringMesh.hh.

G4int G4VScoringMesh::fNSegment[3]
protected

Definition at line 185 of file G4VScoringMesh.hh.

G4ParallelWorldProcess* G4VScoringMesh::fParallelWorldProcess
protected

Definition at line 210 of file G4VScoringMesh.hh.

G4RotationMatrix* G4VScoringMesh::fRotationMatrix
protected

Definition at line 184 of file G4VScoringMesh.hh.

MeshShape G4VScoringMesh::fShape
protected

Definition at line 180 of file G4VScoringMesh.hh.

G4double G4VScoringMesh::fSize[3]
protected

Definition at line 182 of file G4VScoringMesh.hh.

G4String G4VScoringMesh::fWorldName
protected

Definition at line 176 of file G4VScoringMesh.hh.

G4bool G4VScoringMesh::nMeshIsSet
protected

Definition at line 193 of file G4VScoringMesh.hh.

G4bool G4VScoringMesh::sizeIsSet
protected

Definition at line 192 of file G4VScoringMesh.hh.

G4int G4VScoringMesh::verboseLevel
protected

Definition at line 190 of file G4VScoringMesh.hh.


The documentation for this class was generated from the following files: