Geant4 11.2.2
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 () override=default
 
void List () const override
 
void Draw (RunScore *, G4VScoreColorMap *, G4int) override
 
void DrawColumn (RunScore *, G4VScoreColorMap *, G4int, G4int) override
 
- Public Member Functions inherited from G4VScoringMesh
 G4VScoringMesh (const G4String &wName)
 
virtual ~G4VScoringMesh ()=default
 
virtual void Construct (G4VPhysicalVolume *fWorldPhys)
 
virtual void WorkerConstruct (G4VPhysicalVolume *fWorldPhys)
 
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)
 
void ResetScore ()
 
void SetSize (G4double size[3])
 
G4ThreeVector GetSize () const
 
void SetAngles (G4double, G4double)
 
G4double GetStartAngle () const
 
G4double GetAngleSpan () 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

void SetupGeometry (G4VPhysicalVolume *) override
 
- Protected Member Functions inherited from G4VScoringMesh

Protected Attributes

G4String logVolName
 
- Protected Attributes inherited from G4VScoringMesh
G4String fWorldName
 
G4VPrimitiveScorerfCurrentPS
 
G4bool fConstructed
 
G4bool fActive
 
MeshShape fShape
 
G4double fSize [3]
 
G4double fAngle [2]
 
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 42 of file G4ScoringRealWorld.cc.

43 : G4VScoringMesh(lvName)
44{
46 logVolName = lvName;
47 G4double size[] = { 0., 0., 0. };
48 SetSize(size);
49 G4int nBin[] = { 1, 1, 1 };
51}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
void SetNumberOfSegments(G4int nSegment[3])
G4VScoringMesh(const G4String &wName)
void SetSize(G4double size[3])

◆ ~G4ScoringRealWorld()

G4ScoringRealWorld::~G4ScoringRealWorld ( )
overridedefault

Member Function Documentation

◆ Draw()

void G4ScoringRealWorld::Draw ( RunScore * ,
G4VScoreColorMap * ,
G4int  )
inlineoverridevirtual

Implements G4VScoringMesh.

Definition at line 44 of file G4ScoringRealWorld.hh.

46 {}

◆ DrawColumn()

void G4ScoringRealWorld::DrawColumn ( RunScore * ,
G4VScoreColorMap * ,
G4int ,
G4int  )
inlineoverridevirtual

Implements G4VScoringMesh.

Definition at line 48 of file G4ScoringRealWorld.hh.

50 {}

◆ List()

void G4ScoringRealWorld::List ( ) const
overridevirtual

Reimplemented from G4VScoringMesh.

Definition at line 53 of file G4ScoringRealWorld.cc.

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

◆ SetupGeometry()

void G4ScoringRealWorld::SetupGeometry ( G4VPhysicalVolume * )
overrideprotectedvirtual

Implements G4VScoringMesh.

Definition at line 64 of file G4ScoringRealWorld.cc.

65{
66 G4AutoLock l(&logvolmutex);
68 auto itr = store->begin();
69 for(; itr != store->end(); itr++)
70 {
71 if((*itr)->GetName() == logVolName)
72 {
73 fMeshElementLogical = (*itr); // Logical volume to score
74 G4int nb = 0;
76 auto pvItr = pvStore->begin();
77 for(; pvItr != pvStore->end(); pvItr++)
78 {
79 if((*pvItr)->GetLogicalVolume() == (*itr))
80 {
81 nb += (*pvItr)->GetMultiplicity();
82 }
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 != nullptr) && !(region->IsInMassGeometry()))
89 {
91 ed << "Logical Volume with name <" << logVolName
92 << "> is not used in the mass world.";
93 G4Exception("G4ScoringRealWorld", "SWV0001", FatalException, ed);
94 }
95 // set the sensitive detector
97 return;
98 }
99 }
101 ed << "Logical Volume with name <" << logVolName << "> is not found";
102 G4Exception("G4ScoringRealWorld", "SWV0000", FatalException, ed);
103}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
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 57 of file G4ScoringRealWorld.hh.

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


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