Geant4-11
Public Member Functions | Protected Attributes | Private Attributes
G4PSHitsModel Class Reference

#include <G4PSHitsModel.hh>

Inheritance diagram for G4PSHitsModel:
G4VModel

Public Member Functions

virtual void DescribeYourselfTo (G4VGraphicsScene &)
 
 G4PSHitsModel (const G4String &requestedMapName="all")
 
virtual G4String GetCurrentDescription () const
 
virtual G4String GetCurrentTag () const
 
const G4VisExtent & GetExtent () const
 
const G4String & GetGlobalDescription () const
 
const G4String & GetGlobalTag () const
 
const G4ModelingParameters * GetModelingParameters () const
 
const G4String & GetType () const
 
void SetExtent (const G4VisExtent &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetType (const G4String &)
 
virtual G4bool Validate (G4bool warn=true)
 
virtual ~G4PSHitsModel ()
 

Protected Attributes

G4VisExtent fExtent
 
G4String fGlobalDescription
 
G4String fGlobalTag
 
const G4ModelingParameters * fpMP
 
G4String fType
 

Private Attributes

G4String fRequestedMapName
 

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 fRequestedMapName
G4String fGlobalDescription
Definition: G4VModel.hh:100
G4String fType
Definition: G4VModel.hh:98
G4String fGlobalTag
Definition: G4VModel.hh:99

References G4VModel::fGlobalDescription, G4VModel::fGlobalTag, and G4VModel::fType.

◆ ~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
G4THitsMap< G4StatDouble > RunScore
G4bool IsActive() const
std::map< G4String, RunScore * > MeshScoreMap
MeshScoreMap GetScoreMap() const
const char * name(G4int ptype)

References G4VGraphicsScene::AddCompound(), fRequestedMapName, G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), G4VScoringMesh::GetScoreMap(), G4ScoringManager::GetScoringManagerIfExist(), G4VScoringMesh::IsActive(), and G4InuclParticleNames::name().

◆ GetCurrentDescription()

G4String G4VModel::GetCurrentDescription ( ) const
virtualinherited

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 51 of file G4VModel.cc.

51 {
52 // Override in concrete class if concept of "current" is meaningful.
53 return fGlobalDescription;
54}

References G4VModel::fGlobalDescription.

Referenced by G4OpenGLStoredQtSceneHandler::ExtraPOProcessing().

◆ GetCurrentTag()

G4String G4VModel::GetCurrentTag ( ) const
virtualinherited

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 46 of file G4VModel.cc.

46 {
47 // Override in concrete class if concept of "current" is meaningful.
48 return fGlobalTag;
49}

References G4VModel::fGlobalTag.

Referenced by G4Qt3DSceneHandler::AddPrimitive(), and G4ToolsSGSceneHandler::AddPrimitive().

◆ GetExtent()

const G4VisExtent & G4VModel::GetExtent ( ) const
inherited

◆ GetGlobalDescription()

const G4String & G4VModel::GetGlobalDescription ( ) const
inherited

◆ GetGlobalTag()

const G4String & G4VModel::GetGlobalTag ( ) const
inherited

◆ GetModelingParameters()

const G4ModelingParameters * G4VModel::GetModelingParameters ( ) const
inherited

◆ GetType()

const G4String & G4VModel::GetType ( ) const
inherited

◆ SetExtent()

void G4VModel::SetExtent ( const G4VisExtent &  )
inherited

◆ SetGlobalDescription()

void G4VModel::SetGlobalDescription ( const G4String &  )
inherited

◆ SetGlobalTag()

void G4VModel::SetGlobalTag ( const G4String &  )
inherited

◆ SetModelingParameters()

void G4VModel::SetModelingParameters ( const G4ModelingParameters *  )
inherited

◆ SetType()

void G4VModel::SetType ( const G4String &  )
inherited

◆ Validate()

G4bool G4VModel::Validate ( G4bool  warn = true)
virtualinherited

Reimplemented in G4PhysicalVolumeModel, and G4LogicalVolumeModel.

Definition at line 56 of file G4VModel.cc.

56 {
57 return true;
58}

Field Documentation

◆ fExtent

G4VisExtent G4VModel::fExtent
protectedinherited

◆ fGlobalDescription

G4String G4VModel::fGlobalDescription
protectedinherited

◆ fGlobalTag

G4String G4VModel::fGlobalTag
protectedinherited

◆ fpMP

const G4ModelingParameters* G4VModel::fpMP
protectedinherited

◆ fRequestedMapName

G4String G4PSHitsModel::fRequestedMapName
private

Definition at line 53 of file G4PSHitsModel.hh.

Referenced by DescribeYourselfTo().

◆ fType

G4String G4VModel::fType
protectedinherited

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