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

A class to store MC truth informations on ROOT files. More...

#include <GGSTMCTruthInfo.h>

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

Public Member Functions

 GGSTMCTruthInfo ()
 Constructor.
 
 ~GGSTMCTruthInfo ()
 Destructor.
 
UInt_t GetNPrimaries ()
 Retrieves the number of primaries in this event. More...
 
GGSTParticleGetPrimaryParticle (UInt_t particleNumber)
 Retrieves a primary particle. More...
 
void AddPrimaryParticle (GGSTParticle *primaryParticle)
 Adds a primary particle to the particles' array. More...
 
void Reset ()
 Resets the object's properties.
 

Data Fields

Int_t eventID
 The event ID.
 
UInt_t nDiscarded
 The number of discarded + killed events the current event and the previous event saved in file. More...
 

Detailed Description

A class to store MC truth informations on ROOT files.

Definition at line 20 of file GGSTMCTruthInfo.h.

Member Function Documentation

void GGSTMCTruthInfo::AddPrimaryParticle ( GGSTParticle primaryParticle)

Adds a primary particle to the particles' array.

Parameters
primaryParticleThe particle to add.

Definition at line 48 of file GGSTMCTruthInfo.cpp.

48  {
49 
50  Int_t n = _primaries->GetEntries();
51  new ((*_primaries)[n]) GGSTParticle(*primaryParticle);
52 }
Class to store G4 particles.
Definition: GGSTParticle.h:19
UInt_t GGSTMCTruthInfo::GetNPrimaries ( )
inline

Retrieves the number of primaries in this event.

Returns
The number of primary particles in the event

Definition at line 32 of file GGSTMCTruthInfo.h.

32  {
33  if (_primaries)
34  return _primaries->GetEntries();
35  else
36  return 0;
37  }
GGSTParticle * GGSTMCTruthInfo::GetPrimaryParticle ( UInt_t  particleNumber)

Retrieves a primary particle.

Parameters
particleNumberThe particle to retrieve (0 is first particle).
Returns
Pointer to the primary particle object
NULL if particle number is not valid.

Definition at line 38 of file GGSTMCTruthInfo.cpp.

38  {
39 
40  if (particleNumber < (UInt_t)(_primaries->GetEntries())) {
41  return (GGSTParticle *)(_primaries->At(particleNumber));
42  } else
43  return NULL;
44 }
Class to store G4 particles.
Definition: GGSTParticle.h:19

Field Documentation

UInt_t GGSTMCTruthInfo::nDiscarded

The number of discarded + killed events the current event and the previous event saved in file.

In case some condition is imposed on event generation (eg. acceptance check), some events may be discarded or killed before one is considered "good" and actually saved on file. This member stores the number of discarded + killed events between the current event on the output file and the previous one.

Definition at line 66 of file GGSTMCTruthInfo.h.


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