Geant4 10.7.0
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 G4Transform3D &modelTransformation=G4Transform3D(), 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 G4VisExtentGetTransformedExtent () const
 
const G4StringGetGlobalDescription () const
 
const G4StringGetGlobalTag () const
 
const G4Transform3DGetTransformation () const
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetExtent (const G4VisExtent &)
 
void SetType (const G4String &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
void SetTransformation (const G4Transform3D &)
 
virtual G4bool Validate (G4bool warn=true)
 

Additional Inherited Members

- Protected Attributes inherited from G4VModel
G4String fType
 
G4String fGlobalTag
 
G4String fGlobalDescription
 
G4VisExtent fExtent
 
G4Transform3D fTransform
 
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:112
G4String fType
Definition: G4VModel.hh:110
G4String fGlobalTag
Definition: G4VModel.hh:111

◆ ~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;
55 G4ScoringManager* scoringManager =
57 if (scoringManager) {
58 size_t nMeshes = scoringManager->GetNumberOfMesh();
59 for (size_t iMesh = 0; iMesh < nMeshes; ++iMesh) {
60 G4VScoringMesh* mesh = scoringManager->GetMesh(iMesh);
61 if (mesh && mesh->IsActive()) {
62 MeshScoreMap scoreMap = mesh->GetScoreMap();
63 for(MeshScoreMap::const_iterator i = scoreMap.begin();
64 i != scoreMap.end(); ++i) {
65 const G4String& name = i->first;
66 if (fRequestedMapName == "all" || name == fRequestedMapName) {
67 RunScore* fpCurrentHits = i->second;
68 //G4cout << name << ": " << fpCurrentHits << G4endl;
69 if (fpCurrentHits) sceneHandler.AddCompound(*fpCurrentHits);
70 }
71 }
72 }
73 }
74 }
75}
G4VScoringMesh * GetMesh(G4int i) const
size_t GetNumberOfMesh() const
static G4ScoringManager * GetScoringManagerIfExist()
virtual void AddCompound(const G4VTrajectory &)=0
G4bool IsActive() const
G4THitsMap< G4StatDouble > RunScore
std::map< G4String, RunScore * > MeshScoreMap
MeshScoreMap GetScoreMap() const
const char * name(G4int ptype)

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