G4HitsModel Class Reference

#include <G4HitsModel.hh>

Inheritance diagram for G4HitsModel:

G4VModel

Public Member Functions

 G4HitsModel ()
virtual ~G4HitsModel ()
virtual void DescribeYourselfTo (G4VGraphicsScene &)
const G4VHitGetCurrentHit () const

Detailed Description

Definition at line 47 of file G4HitsModel.hh.


Constructor & Destructor Documentation

G4HitsModel::G4HitsModel (  ) 

Definition at line 41 of file G4HitsModel.cc.

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

00041                          :
00042   fpCurrentHit(0)
00043 {
00044   fType = "G4HitsModel";
00045   fGlobalTag = "G4HitsModel for all hits.";
00046   fGlobalDescription = fGlobalTag;
00047 }

G4HitsModel::~G4HitsModel (  )  [virtual]

Definition at line 39 of file G4HitsModel.cc.

00039 {}


Member Function Documentation

void G4HitsModel::DescribeYourselfTo ( G4VGraphicsScene  )  [virtual]

Implements G4VModel.

Definition at line 49 of file G4HitsModel.cc.

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

00050 {
00051   const G4Event* event = fpMP->GetEvent();
00052   if (event) {
00053     G4HCofThisEvent* HCE = event -> GetHCofThisEvent ();
00054     if (HCE) {
00055       G4int nHC = HCE -> GetCapacity ();
00056       for (int iHC = 0; iHC < nHC; iHC++) {
00057         G4VHitsCollection* HC = HCE -> GetHC (iHC);
00058         if (HC) {
00059           for(size_t iHit = 0; iHit < HC->GetSize(); ++iHit) {
00060             fpCurrentHit = HC -> GetHit (iHit);
00061             if (fpCurrentHit) sceneHandler.AddCompound (*fpCurrentHit);
00062           }
00063         }
00064       }
00065     }
00066   }
00067 }

const G4VHit* G4HitsModel::GetCurrentHit (  )  const [inline]

Definition at line 58 of file G4HitsModel.hh.

Referenced by G4VSceneHandler::LoadAtts().

00059   {return fpCurrentHit;}


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:14 2013 for Geant4 by  doxygen 1.4.7