PandaRoot
PndPropagationTest.h
Go to the documentation of this file.
1 //* $Id: */
2 
3 // -------------------------------------------------------------------------
4 // ----- PndPropagationTest header file -----
5 // ----- Created 05/12/2010 by R. Karabowicz -----
6 // -------------------------------------------------------------------------
7 
18 #ifndef PndPropagationTest_H
19 #define PndPropagationTest_H 1
20 
21 #include "PndPersistencyTask.h"
22 
23 #include "FairGeanePro.h"
24 
25 #include "TClonesArray.h"
26 
27 #include <map>
28 
29 class TH1;
30 class TH2;
31 class FairMCPoint;
32 
34 
35  public:
38 
40  PndPropagationTest(Int_t propParticle, Int_t iVerbose = 0);
41 
43  PndPropagationTest(const char *name, Int_t iVerbose);
44 
46  virtual ~PndPropagationTest();
47 
48  void SetDectectorBranchNames(TString branchName) { fDetArrays[branchName] = nullptr; }
49  // Test
50  void SetPhotonBranchName(TString val) { fPhotonDetectorName = val; }
51  void SetPropPdg(int val) { fPropPdg = val; }
52 
53  void SetInnerExtrapolationRadius(double val) { fInnerExtrapoRadius = val; }
54 
56  virtual void Exec(Option_t *opt);
57 
58  protected:
59  // TVector3 GetPhotonCorrection(int option, FairMCPoint *currentPoint = nullptr);
60  TVector3 GetMCMomentumCorrection(); // uses MC truth momentum of photon hit
61  TVector3 GetEnergyHitCorrection(TVector3 &innerPos); // uses MC truth energy plus direction between photon hit and electron hit
62  Bool_t IsPhotonFromMother(FairMCPoint *point, Int_t motherPdg = 11); // checks if the point comes from a photon and if this comes from the primary electron.
63  private:
65  virtual void SetParContainers();
66 
68  virtual InitStatus Init();
69 
71  virtual InitStatus ReInit();
72 
74  void Reset();
75 
77  virtual void Finish();
78 
79  TClonesArray *fMcTracks = nullptr;
80  std::map<TString, TClonesArray *> fDetArrays;
81  TClonesArray *fPhotonDetector = nullptr;
82  TString fPhotonDetectorName = "IdealTubePoint";
83  TClonesArray *fPhotonStart = nullptr;
84  FairGeanePro *fGeanePropagator = nullptr;
85  int fPropPdg = -211;
86 
87  int fGeaneNotFitted = 0;
88  int fGenfitNotFitted = 0;
89 
90  double fInnerExtrapoRadius = -1;
91 
92  std::map<TString, TH1 *> fHistos;
93  std::map<TString, TH2 *> f2DHistos;
94 
95  ClassDef(PndPropagationTest, 1);
96 };
97 
98 #endif
virtual void Exec(Option_t *opt)
void SetPhotonBranchName(TString val)
TVector3 GetEnergyHitCorrection(TVector3 &innerPos)
void SetDectectorBranchNames(TString branchName)
virtual ~PndPropagationTest()
Bool_t IsPhotonFromMother(FairMCPoint *point, Int_t motherPdg=11)
void SetPropPdg(int val)
TVector3 GetMCMomentumCorrection()
void SetInnerExtrapolationRadius(double val)