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

#include <G4HitsModel.hh>

+ Inheritance diagram for G4HitsModel:

Public Member Functions

 G4HitsModel ()
 
virtual ~G4HitsModel ()
 
virtual void DescribeYourselfTo (G4VGraphicsScene &)
 
const G4VHitGetCurrentHit () const
 
- Public Member Functions inherited from G4VModel
 G4VModel (const G4ModelingParameters *=0)
 
virtual ~G4VModel ()
 
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 46 of file G4HitsModel.hh.

Constructor & Destructor Documentation

◆ G4HitsModel()

G4HitsModel::G4HitsModel ( )

Definition at line 40 of file G4HitsModel.cc.

40 :
41 fpCurrentHit(nullptr)
42{
43 fType = "G4HitsModel";
44 fGlobalTag = "G4HitsModel for all hits.";
46}
G4String fGlobalDescription
Definition G4VModel.hh:96
G4String fType
Definition G4VModel.hh:94
G4String fGlobalTag
Definition G4VModel.hh:95

◆ ~G4HitsModel()

G4HitsModel::~G4HitsModel ( )
virtual

Definition at line 38 of file G4HitsModel.cc.

38{}

Member Function Documentation

◆ DescribeYourselfTo()

void G4HitsModel::DescribeYourselfTo ( G4VGraphicsScene & sceneHandler)
virtual

Implements G4VModel.

Definition at line 48 of file G4HitsModel.cc.

49{
50 const G4Event* event = fpMP->GetEvent();
51 if (event) {
52 G4HCofThisEvent* HCE = event->GetHCofThisEvent();
53 if (HCE) {
54 G4int nHC = (G4int)HCE->GetCapacity();
55 for (G4int iHC = 0; iHC < nHC; ++iHC) {
56 G4VHitsCollection* HC = HCE -> GetHC (iHC);
57 if (HC) {
58 for(std::size_t iHit = 0; iHit < HC->GetSize(); ++iHit) {
59 fpCurrentHit = HC->GetHit(iHit);
60 if (fpCurrentHit) sceneHandler.AddCompound(*fpCurrentHit);
61 }
62 }
63 }
64 }
65 }
66}
int G4int
Definition G4Types.hh:85
const G4Event * GetEvent() const
virtual void AddCompound(const G4VTrajectory &)=0
virtual G4VHit * GetHit(size_t) const
virtual size_t GetSize() const
const G4ModelingParameters * fpMP
Definition G4VModel.hh:98

◆ GetCurrentHit()

const G4VHit * G4HitsModel::GetCurrentHit ( ) const
inline

Definition at line 57 of file G4HitsModel.hh.

58 {return fpCurrentHit;}

Referenced by G4VSceneHandler::LoadAtts().


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