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

#include <G4PSHitsModel.hh>

+ Inheritance diagram for G4PSHitsModel:

Public Member Functions

 G4PSHitsModel (const G4String &requestedMapName="all")
 
virtual ~G4PSHitsModel ()
 
virtual void DescribeYourselfTo (G4VGraphicsScene &)
 
- Public Member Functions inherited from G4VModel
 G4VModel (const G4ModelingParameters *=0)
 
virtual ~G4VModel ()
 
virtual void DescribeYourselfTo (G4VGraphicsScene &)=0
 
const G4ModelingParametersGetModelingParameters () const
 
const G4StringGetType () const
 
virtual G4String GetCurrentDescription () const
 
virtual G4String GetCurrentTag () const
 
const G4VisExtentGetExtent () const
 
const G4StringGetGlobalDescription () const
 
const G4StringGetGlobalTag () const
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetExtent (const G4VisExtent &)
 
void SetType (const G4String &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
virtual G4bool Validate (G4bool warn=true)
 

Additional Inherited Members

- Protected Attributes inherited from G4VModel
G4String fType
 
G4String fGlobalTag
 
G4String fGlobalDescription
 
G4VisExtent fExtent
 
const G4ModelingParametersfpMP
 

Detailed Description

Definition at line 40 of file G4PSHitsModel.hh.

Constructor & Destructor Documentation

◆ G4PSHitsModel()

G4PSHitsModel::G4PSHitsModel ( const G4String requestedMapName = "all")

Definition at line 43 of file G4PSHitsModel.cc.

43 :
44 fRequestedMapName(requestedMapName)
45{
46 fType = "G4PSHitsModel";
47 fGlobalTag = "G4PSHitsModel for G4THitsMap<G4StatDouble> hits.";
49}
G4String fGlobalDescription
Definition: G4VModel.hh:100
G4String fType
Definition: G4VModel.hh:98
G4String fGlobalTag
Definition: G4VModel.hh:99

◆ ~G4PSHitsModel()

G4PSHitsModel::~G4PSHitsModel ( )
virtual

Definition at line 41 of file G4PSHitsModel.cc.

41{}

Member Function Documentation

◆ DescribeYourselfTo()

void G4PSHitsModel::DescribeYourselfTo ( G4VGraphicsScene sceneHandler)
virtual

Implements G4VModel.

Definition at line 51 of file G4PSHitsModel.cc.

52{
53 using MeshScoreMap = G4VScoringMesh::MeshScoreMap;
54 using RunScore = G4VScoringMesh::RunScore;
56 if (scoringManager) {
57 G4int nMeshes = (G4int)scoringManager->GetNumberOfMesh();
58 for (G4int iMesh = 0; iMesh < nMeshes; ++iMesh) {
59 G4VScoringMesh* mesh = scoringManager->GetMesh(iMesh);
60 if (mesh && mesh->IsActive()) {
61 MeshScoreMap scoreMap = mesh->GetScoreMap();
62 for(MeshScoreMap::const_iterator i = scoreMap.cbegin();
63 i != scoreMap.cend(); ++i) {
64 const G4String& name = i->first;
65 if (fRequestedMapName == "all" || name == fRequestedMapName) {
66 RunScore* fpCurrentHits = i->second;
67 if (fpCurrentHits) sceneHandler.AddCompound(*fpCurrentHits);
68 }
69 }
70 }
71 }
72 }
73}
int G4int
Definition: G4Types.hh:85
G4VScoringMesh * GetMesh(G4int i) const
size_t GetNumberOfMesh() const
static G4ScoringManager * GetScoringManagerIfExist()
virtual void AddCompound(const G4VTrajectory &)=0
G4THitsMap< G4StatDouble > RunScore
G4bool IsActive() const
std::map< G4String, RunScore * > MeshScoreMap
MeshScoreMap GetScoreMap() const
const char * name(G4int ptype)

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