GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Data Fields | Friends
GGSTPartHit Class Reference

Class to store G4 particle hits. More...

#include <GGSTHits.h>

Inheritance diagram for GGSTPartHit:
Inheritance graph
[legend]
Collaboration diagram for GGSTPartHit:
Collaboration graph
[legend]

Public Member Functions

 GGSTPartHit ()
 Constructor.
 
 ~GGSTPartHit ()
 Destructor.
 
void Clear (Option_t *)
 Resets data members. More...
 
virtual void UserConversion (const GGSPartHit &partHit)
 Hook for user-defined conversion. More...
 
void DumpHit ()
 Prints members values on standard output.
 
Int_t GetNPosHits ()
 Gets the number of position hits. More...
 
GGSTPosHitGetPosHit (unsigned int iHit)
 Get the specified position hit. More...
 

Data Fields

Float_t eDep
 Deposited energy.
 
Float_t time
 Time of the hit.
 
Float_t pathLength
 Path length of the hit.
 
Float_t entrancePoint [3]
 Entrance point.
 
Float_t exitPoint [3]
 Exit point.
 
Float_t entranceMomentum [3]
 Entrance momentum.
 
Float_t entranceEnergy
 Entrance kinetic energy.
 
Int_t trackID
 GEANT4 track ID.
 
Int_t parentID
 GEANT4 parent ID.
 
Int_t particlePdg
 Particle PDG ID.
 

Friends

class GGSHitsAction
 
class GGSTHitsReader
 

Detailed Description

Class to store G4 particle hits.

This class is used to write on ROOT files the informations stored in GGSPartHit. It inherits form TObject and has data members corresponding to those of GGSPartHit.

Definition at line 82 of file GGSTHits.h.

Member Function Documentation

void GGSTPartHit::Clear ( Option_t *  )

Resets data members.

This function has an unused Option_t argument so that a TClonesArray of GGSTPrimaryParticle can call this method when clearing the objects it contains (eg., when TClonesArray::Clear("C") is called).

Definition at line 91 of file GGSTHits.cpp.

91  {
92  eDep = 0.;
93  time = 0.;
94  pathLength = 0.;
95  entrancePoint[0] = entrancePoint[1] = entrancePoint[2] = 0.;
96  exitPoint[0] = exitPoint[1] = exitPoint[2] = 0.;
98  trackID = -1;
99  parentID = -2;
100  particlePdg = 0;
101  if (_posHits)
102  _posHits->Clear("C");
103  _posHitIndex = 0;
104 }
Float_t entrancePoint[3]
Entrance point.
Definition: GGSTHits.h:88
Float_t time
Time of the hit.
Definition: GGSTHits.h:86
Float_t pathLength
Path length of the hit.
Definition: GGSTHits.h:87
Int_t trackID
GEANT4 track ID.
Definition: GGSTHits.h:92
Float_t eDep
Deposited energy.
Definition: GGSTHits.h:85
Int_t particlePdg
Particle PDG ID.
Definition: GGSTHits.h:94
Float_t exitPoint[3]
Exit point.
Definition: GGSTHits.h:89
Int_t parentID
GEANT4 parent ID.
Definition: GGSTHits.h:93
Float_t entranceMomentum[3]
Entrance momentum.
Definition: GGSTHits.h:90
Int_t GGSTPartHit::GetNPosHits ( )

Gets the number of position hits.

Returns
The number of hits (0 if the information is not available).

Definition at line 166 of file GGSTHits.cpp.

166  {
167  if (_posHits)
168  return (_posHits->GetEntries());
169  else
170  return 0;
171 }
GGSTPosHit * GGSTPartHit::GetPosHit ( unsigned int  iHit)

Get the specified position hit.

Parameters
iHitThe desired hit.
Returns
Pointer to the hit object (NULL if iHit is out of bounds).

Definition at line 175 of file GGSTHits.cpp.

175  {
176  static GGSTPosHit *hit = NULL;
177  if (_posHits) {
178  hit = (GGSTPosHit*) (_posHits->At(iHit));
179  return hit;
180  }
181  return NULL;
182 }
Class to store G4 position hits.
Definition: GGSTHits.h:34
virtual void GGSTPartHit::UserConversion ( const GGSPartHit partHit)
inlinevirtual

Hook for user-defined conversion.

Derived classes can override this method to perform custom conversion of the simulation data stored in partHit.

Parameters
intHitReference to the particle hit object. It might refer to a class derived from GGSPartHit if that's what's actually in use.

Definition at line 120 of file GGSTHits.h.

120  {
121  IGNORE(partHit);
122  }

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