StructuredG4Tree.h
Go to the documentation of this file.
1 /*
2  * StructuredG4Tree.h
3  *
4  * Created on: Feb 18, 2021
5  * Author: chilgenb
6  */
7 
8 #ifndef GARANA_STRUCTUREDG4TREE_H_
9 #define GARANA_STRUCTUREDG4TREE_H_
10 
11 #include "garana/Base/G4Tree.h"
13 
14 using std::vector;
15 
16 namespace garana {
17 
18  class StructuredG4Tree : public G4Tree {
19 
20  public:
21 
22  //StructuredG4Tree() {};
23  StructuredG4Tree(TTree* tree=0);
24  // ~StructuredG4Tree(){}
25 
26  const UInt_t NSim() const override;
27  const UInt_t NPoints(const UInt_t& iparticle) const override;
28  const UInt_t NRegions(const UInt_t& iparticle) const override;
29  const Int_t Region(const UInt_t& iparticle, const UInt_t& iregion) const override;
30  const vector<const TLorentzVector*>* SimMomEnter(const UInt_t& iparticle) const override;
31  const vector<const TLorentzVector*>* SimMomExit(const UInt_t& iparticle) const override;
32  const vector<const TLorentzVector*>* SimPosEnter(const UInt_t& iparticle) const override;
33  const vector<const TLorentzVector*>* SimPosExit(const UInt_t& iparticle) const override;
34  const TLorentzVector* SimMomEnter(const UInt_t& iparticle, const UInt_t& iregion)const override;
35  const TLorentzVector* SimMomExit(const UInt_t& iparticle, const UInt_t& iregion) const override;
36  const TLorentzVector* SimPosEnter(const UInt_t& iparticle, const UInt_t& iregion)const override;
37  const TLorentzVector* SimPosExit(const UInt_t& iparticle, const UInt_t& iregion) const override;
38  const bool IsPrimary(const UInt_t& iparticle) const override;
39  const Int_t PDG(const UInt_t& iparticle) const override;
40  const int ParentPDG(const UInt_t& iparticle) const override;
41  const int ProgenitorPDG(const UInt_t& iparticle) const override;
42  const int TrackID(const UInt_t& iparticle) const override;
43  const int ParentTrackID(const UInt_t& iparticle) const override;
44  const int ProgenitorTrackID(const UInt_t& iparticle) const override;
45  const Int_t ProcessI(const UInt_t& iparticle) const override;
46  const Int_t ProcessF(const UInt_t& iparticle) const override;
47 
48  const G4Particle* GetParticle(const UInt_t& iparticle) const;
49  //vector<G4Particle*>* GetParticles();
50 
51  private:
52 
53  //pure virtual function from TreeReader
54  bool SetBranchAddresses() override;
55 
56 
57  //leaves and branches
58  vector<G4Particle>* fG4Particles = nullptr; ///< 'condensed' nusimdata::MCParticles from G4
59  TBranch* b_G4Particles = nullptr;
60 
61  //G4Particle* fG4p = nullptr;
62  // vector<G4Particle*>* fG4ps = nullptr;
63 
64  };//class
65 }//namespace
66 #endif /* GARANA_STRUCTUREDG4TREE_H_ */
const int ParentPDG(const UInt_t &iparticle) const override
parent particle&#39;s PDG code
const UInt_t NSim() const override
number of particles
const int ParentTrackID(const UInt_t &iparticle) const override
G4 track ID of parent particle.
struct vector vector
const UInt_t NPoints(const UInt_t &iparticle) const override
number of G4 steps (i.e. trajectory points)
const bool IsPrimary(const UInt_t &iparticle) const override
did particle come from generator?
const vector< const TLorentzVector * > * SimMomEnter(const UInt_t &iparticle) const override
particle 4-momentum at entry point, all regions
const Int_t ProcessF(const UInt_t &iparticle) const override
code for process that killed this one
const vector< const TLorentzVector * > * SimMomExit(const UInt_t &iparticle) const override
particle 4-momentum at exit point, all regions
const UInt_t NRegions(const UInt_t &iparticle) const override
number of regions traversed by particle
vector< G4Particle > * fG4Particles
&#39;condensed&#39; nusimdata::MCParticles from G4
bool SetBranchAddresses() override
const Int_t ProcessI(const UInt_t &iparticle) const override
code for process that created this one
const Int_t PDG(const UInt_t &iparticle) const override
particle PDG code
const vector< const TLorentzVector * > * SimPosEnter(const UInt_t &iparticle) const override
particle 4-position at entry point, all regions
const G4Particle * GetParticle(const UInt_t &iparticle) const
const Int_t Region(const UInt_t &iparticle, const UInt_t &iregion) const override
region number
const int TrackID(const UInt_t &iparticle) const override
G4 track ID (can be <0 if it fell below trking threshold)
const vector< const TLorentzVector * > * SimPosExit(const UInt_t &iparticle) const override
particle 4-position at exit point, all regions
const int ProgenitorTrackID(const UInt_t &iparticle) const override
G4 track ID of primary that led this one.
const int ProgenitorPDG(const UInt_t &iparticle) const override
PDG of primary that led this one.