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

#include <G4HitsModel.hh>

Inheritance diagram for G4HitsModel:
G4VModel

Public Member Functions

virtual void DescribeYourselfTo (G4VGraphicsScene &)
 
 G4HitsModel ()
 
virtual G4String GetCurrentDescription () const
 
const G4VHit * GetCurrentHit () 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 ~G4HitsModel ()
 

Protected Attributes

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

Private Attributes

const G4VHit * fpCurrentHit
 

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 :
42{
43 fType = "G4HitsModel";
44 fGlobalTag = "G4HitsModel for all hits.";
46}
const G4VHit * fpCurrentHit
Definition: G4HitsModel.hh:62
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.

◆ ~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 = HCE -> GetCapacity ();
55 for (int iHC = 0; iHC < nHC; iHC++) {
56 G4VHitsCollection* HC = HCE -> GetHC (iHC);
57 if (HC) {
58 for(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 size_t GetSize() const
const G4ModelingParameters * fpMP
Definition: G4VModel.hh:102

References G4VGraphicsScene::AddCompound(), fpCurrentHit, G4VModel::fpMP, G4ModelingParameters::GetEvent(), and G4VHitsCollection::GetSize().

◆ 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().

◆ GetCurrentHit()

const G4VHit * G4HitsModel::GetCurrentHit ( ) const
inline

Definition at line 57 of file G4HitsModel.hh.

58 {return fpCurrentHit;}

References fpCurrentHit.

Referenced by G4VSceneHandler::LoadAtts().

◆ 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

◆ fpCurrentHit

const G4VHit* G4HitsModel::fpCurrentHit
private

Definition at line 62 of file G4HitsModel.hh.

Referenced by DescribeYourselfTo(), and GetCurrentHit().

◆ fpMP

const G4ModelingParameters* G4VModel::fpMP
protectedinherited

◆ fType

G4String G4VModel::fType
protectedinherited

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