GGS(GenericGEANT4Simulation)Software  2.7.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 "TClonesArray.h"
13 #include "TObject.h"
14 #include "TString.h"
15 
16 // GGS headers
17 #include "montecarlo/dataobjs/GGSTParticle.h"
18 
20 class GGSTMCTruthInfo : public TObject {
21 public:
24 
27 
32  UInt_t GetNPrimaries() {
33  if (_primaries)
34  return _primaries->GetEntries();
35  else
36  return 0;
37  }
38 
45  GGSTParticle *GetPrimaryParticle(UInt_t particleNumber);
46 
51  void AddPrimaryParticle(GGSTParticle *primaryParticle);
52 
54  void Reset();
55 
56  Int_t eventID;
57 
66  UInt_t nDiscarded;
67 
68 private:
69  TClonesArray *_primaries;
70 
71  ClassDef(GGSTMCTruthInfo, 1)
72 };
73 
74 #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...