Geant4 9.6.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 &)
 
const G4THitsMap< G4double > * GetCurrentHits () const
 
- 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 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 42 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), fpCurrentHits(0)
45{
46 fType = "G4PSHitsModel";
47 fGlobalTag = "G4PSHitsModel for G4THitsMap<G4double> hits.";
49}
G4String fGlobalDescription
Definition: G4VModel.hh:110
G4String fType
Definition: G4VModel.hh:108
G4String fGlobalTag
Definition: G4VModel.hh:109

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

◆ GetCurrentHits()

const G4THitsMap< G4double > * G4PSHitsModel::GetCurrentHits ( ) const
inline

Definition at line 53 of file G4PSHitsModel.hh.

54 {return fpCurrentHits;}

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