GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSTMCTruthInfo.h
1 /*
2  * GGSTMCTruthInfo.h
3  *
4  * Created on: 16 Aug 2011
5  * Author: Nicola Mori
6  */
7 
8 #ifndef GGSTMCTRUTHINFO_H_
9 #define GGSTMCTRUTHINFO_H_
10 
11 // ROOT headers
12 #include "TObject.h"
13 #include "TString.h"
14 #include "TClonesArray.h"
15 
16 // GGS headers
17 #include "montecarlo/dataobjs/GGSTParticle.h"
18 
20 class GGSTMCTruthInfo: public TObject {
21 public:
22 
25 
28 
33  UInt_t GetNPrimaries() {
34  if (_primaries)
35  return _primaries->GetEntries();
36  else
37  return 0;
38  }
39 
46  GGSTParticle *GetPrimaryParticle(UInt_t particleNumber);
47 
52  void AddPrimaryParticle(GGSTParticle* primaryParticle);
53 
55  void Reset();
56 
57  Int_t eventID;
58 
67  UInt_t nDiscarded;
68 
69 private:
70 
71  TClonesArray *_primaries;
72 
73 ClassDef(GGSTMCTruthInfo,1)
74 
75 };
76 
77 #endif /* GGSTMCTRUTHINFO_H_ */
UInt_t GetNPrimaries()
Retrieves the number of primaries in this event.
GGSTParticle * GetPrimaryParticle(UInt_t particleNumber)
Retrieves a primary particle.
void Reset()
Resets the object's properties.
Class to store G4 particles.
Definition: GGSTParticle.h:19
GGSTMCTruthInfo()
Constructor.
~GGSTMCTruthInfo()
Destructor.
void AddPrimaryParticle(GGSTParticle *primaryParticle)
Adds a primary particle to the particles' array.
A class to store MC truth informations on ROOT files.
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...