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

Class to store G4 position hits. More...

#include <GGSTHits.h>

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

Public Member Functions

 GGSTIntHit ()
 Constructor.
 
 ~GGSTIntHit ()
 Destructor.
 
void Clear (Option_t *)
 Resets data members. More...
 
virtual void UserConversion (const GGSIntHit &intHit)
 Hook for user-defined conversion. More...
 
const TString & GetDetectorName ()
 Retrieves the name of the detector associated to the hit. More...
 
const TArrayF & GetTimeBins ()
 Retrieves the time bins for the hit. More...
 
const TString & GetVolumeName ()
 Retrieves the name of the volume associated to the hit. More...
 
const Float_t * GetVolumePosition ()
 Retrieves the position of the volume associated to the hit. More...
 
Int_t GetVolumeID ()
 Retrieves the ID of the volume associated to the hit. More...
 
Int_t GetNPartHits ()
 Gets the number of particle hits. More...
 
GGSTPartHitGetPartHit (unsigned int iHit)
 Get the specified particle hit. More...
 

Data Fields

Float_t eDep
 Deposited energy (transient).
 
TArrayF eDepTimeBin
 Energy deposit in each time bin.
 
Float_t time
 Time of the hit (in ns).
 

Friends

class GGSHitsAction
 
class GGSTHitsReader
 

Detailed Description

Class to store G4 position hits.

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

Definition at line 160 of file GGSTHits.h.

Member Function Documentation

void GGSTIntHit::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 207 of file GGSTHits.cpp.

207  {
208  eDep = 0.;
209  eDepTimeBin.Reset();
210  time = 0.;
211  _volumeIndex = 0;
212  if (_partHits)
213  _partHits->Clear("C");
214 }
Float_t eDep
Deposited energy (transient).
Definition: GGSTHits.h:164
Float_t time
Time of the hit (in ns).
Definition: GGSTHits.h:166
TArrayF eDepTimeBin
Energy deposit in each time bin.
Definition: GGSTHits.h:165
const TString& GGSTIntHit::GetDetectorName ( )
inline

Retrieves the name of the detector associated to the hit.

Returns
The name of the detector (i.e. logical volume).

Definition at line 200 of file GGSTHits.h.

200  {
201  static const TString nullString("");
202  if (_hitDetInfo)
203  return _hitDetInfo->detectorName;
204  else
205  return nullString;
206  }
TString detectorName
Name of detector associated to integrated hits.
Int_t GGSTIntHit::GetNPartHits ( )

Gets the number of particle hits.

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

Definition at line 239 of file GGSTHits.cpp.

239  {
240  if (_partHits)
241  return (_partHits->GetEntries());
242  else
243  return 0;
244 }
GGSTPartHit * GGSTIntHit::GetPartHit ( unsigned int  iHit)

Get the specified particle hit.

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

Definition at line 248 of file GGSTHits.cpp.

248  {
249  static GGSTPartHit *hit = NULL;
250  if (_partHits) {
251  hit = (GGSTPartHit*) (_partHits->At(iHit));
252  return hit;
253  }
254  return NULL;
255 }
Class to store G4 particle hits.
Definition: GGSTHits.h:82
const TArrayF& GGSTIntHit::GetTimeBins ( )
inline

Retrieves the time bins for the hit.

See GGSIntHit::GetTimeBins for details.

Returns
The time bins

Definition at line 214 of file GGSTHits.h.

214  {
215  return *_timeBins;
216  }
Int_t GGSTIntHit::GetVolumeID ( )
inline

Retrieves the ID of the volume associated to the hit.

Returns
The ID of the volume.

Definition at line 245 of file GGSTHits.h.

245  {
246  if (_hitVolInfo)
247  return _hitVolInfo->id;
248  else
249  return -1;
250  }
Int_t id
ID of the volume.
const TString& GGSTIntHit::GetVolumeName ( )
inline

Retrieves the name of the volume associated to the hit.

Returns
The name of the volume.

Definition at line 222 of file GGSTHits.h.

222  {
223  static const TString nullString("");
224  if (_hitVolInfo)
225  return _hitVolInfo->volumeName;
226  else
227  return nullString;
228  }
TString volumeName
Name of the physical volume.
const Float_t* GGSTIntHit::GetVolumePosition ( )
inline

Retrieves the position of the volume associated to the hit.

Returns
The position of the volume (as a Float_t[3] array containing (X,Y,Z) coordinates in cm)).

Definition at line 234 of file GGSTHits.h.

234  {
235  if (_hitVolInfo)
236  return _hitVolInfo->volumePos;
237  else
238  return NULL;
239  }
Float_t volumePos[3]
Position of the touchable in world volume coordinates [cm].
virtual void GGSTIntHit::UserConversion ( const GGSIntHit intHit)
inlinevirtual

Hook for user-defined conversion.

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

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

Definition at line 192 of file GGSTHits.h.

192  {
193  IGNORE(intHit);
194  }

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