Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ScoringRealWorld Class Reference

#include <G4ScoringRealWorld.hh>

+ Inheritance diagram for G4ScoringRealWorld:

Public Member Functions

 G4ScoringRealWorld (G4String lvName)
 
 ~G4ScoringRealWorld ()
 
virtual void List () const
 
virtual void Draw (RunScore *, G4VScoreColorMap *, G4int)
 
virtual void DrawColumn (RunScore *, G4VScoreColorMap *, G4int, G4int)
 
- Public Member Functions inherited from G4VScoringMesh
 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
 
G4VPrimitiveScorerGetPrimitiveScorer (const G4String &name)
 
void SetMeshElementLogical (G4LogicalVolume *val)
 
G4LogicalVolumeGetMeshElementLogical () const
 
void SetParallelWorldProcess (G4ParallelWorldProcess *proc)
 
G4ParallelWorldProcessGetParallelWorldProcess () const
 
void GeometryHasBeenDestroyed ()
 
void SetCopyNumberLevel (G4int val)
 
G4int GetCopyNumberLevel () const
 
G4bool LayeredMassFlg ()
 

Protected Member Functions

virtual void SetupGeometry (G4VPhysicalVolume *)
 
virtual void SetupGeometry (G4VPhysicalVolume *fWorldPhys)=0
 

Protected Attributes

G4String logVolName
 
- Protected Attributes inherited from G4VScoringMesh
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
 
G4int copyNumberLevel
 
G4bool layeredMassFlg
 

Additional Inherited Members

- Public Types inherited from G4VScoringMesh
enum class  MeshShape {
  box , cylinder , sphere , realWorldLogVol ,
  probe , undefined = -1
}
 
using EventScore = G4THitsMap< G4double >
 
using RunScore = G4THitsMap< G4StatDouble >
 
using MeshScoreMap = std::map< G4String, RunScore * >
 

Detailed Description

Definition at line 34 of file G4ScoringRealWorld.hh.

Constructor & Destructor Documentation

◆ G4ScoringRealWorld()

G4ScoringRealWorld::G4ScoringRealWorld ( G4String  lvName)

Definition at line 43 of file G4ScoringRealWorld.cc.

44 :G4VScoringMesh(lvName)
45{
47 logVolName = lvName;
48 G4double size[] = {0.,0.,0.};
49 SetSize(size);
50 G4int nBin[] = {1,1,1};
52}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
void SetNumberOfSegments(G4int nSegment[3])
void SetSize(G4double size[3])

◆ ~G4ScoringRealWorld()

G4ScoringRealWorld::~G4ScoringRealWorld ( )

Definition at line 54 of file G4ScoringRealWorld.cc.

55{
56}

Member Function Documentation

◆ Draw()

virtual void G4ScoringRealWorld::Draw ( RunScore ,
G4VScoreColorMap ,
G4int   
)
inlinevirtual

Implements G4VScoringMesh.

Definition at line 52 of file G4ScoringRealWorld.hh.

53 {;}

◆ DrawColumn()

virtual void G4ScoringRealWorld::DrawColumn ( RunScore ,
G4VScoreColorMap ,
G4int  ,
G4int   
)
inlinevirtual

Implements G4VScoringMesh.

Definition at line 54 of file G4ScoringRealWorld.hh.

56 {;}

◆ List()

void G4ScoringRealWorld::List ( ) const
virtual

Reimplemented from G4VScoringMesh.

Definition at line 58 of file G4ScoringRealWorld.cc.

59{
60 G4cout << "G4ScoringRealWorld : " << logVolName << G4endl;
62}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual void List() const

◆ SetupGeometry()

void G4ScoringRealWorld::SetupGeometry ( G4VPhysicalVolume )
protectedvirtual

Implements G4VScoringMesh.

Definition at line 66 of file G4ScoringRealWorld.cc.

67{
68 G4AutoLock l(&logvolmutex);
70 auto itr = store->begin();
71 for(;itr!=store->end();itr++)
72 {
73 if((*itr)->GetName()==logVolName)
74 {
75 fMeshElementLogical = (*itr); // Logical volume to score
76 G4int nb = 0;
78 auto pvItr = pvStore->begin();
79 for(;pvItr!=pvStore->end();pvItr++)
80 {
81 if((*pvItr)->GetLogicalVolume()==(*itr))
82 { nb += (*pvItr)->GetMultiplicity(); }
83 }
84 G4int nBin[] = {nb,1,1};
86 // check if this logical volume belongs to the real world
87 auto region = (*itr)->GetRegion();
88 if(region && !(region->IsInMassGeometry()))
89 {
91 ed << "Logical Volume with name <" << logVolName << "> is not used in the mass world.";
92 G4Exception("G4ScoringRealWorld","SWV0001",FatalException,ed);
93 }
94 // set the sensitive detector
96 return;
97 }
98 }
100 ed << "Logical Volume with name <" << logVolName << "> is not found";
101 G4Exception("G4ScoringRealWorld","SWV0000",FatalException,ed);
102}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static G4LogicalVolumeStore * GetInstance()
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
static G4PhysicalVolumeStore * GetInstance()
G4MultiFunctionalDetector * fMFD
G4LogicalVolume * fMeshElementLogical

Member Data Documentation

◆ logVolName

G4String G4ScoringRealWorld::logVolName
protected

Definition at line 45 of file G4ScoringRealWorld.hh.

Referenced by G4ScoringRealWorld(), List(), and SetupGeometry().


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