PandaRoot
PndPropagationTest.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //* $Id: */
14 
15 // -------------------------------------------------------------------------
16 // ----- PndPropagationTest header file -----
17 // ----- Created 05/12/2010 by R. Karabowicz -----
18 // -------------------------------------------------------------------------
19 
30 #ifndef PndPropagationTest_H
31 #define PndPropagationTest_H 1
32 
33 #include "PndPersistencyTask.h"
34 
35 #include "FairGeanePro.h"
36 
37 #include "TClonesArray.h"
38 
39 #include <map>
40 
41 class TH1;
42 class TH2;
43 class FairMCPoint;
44 
46 
47  public:
50 
52  PndPropagationTest(Int_t propParticle, Int_t iVerbose = 0);
53 
55  PndPropagationTest(const char *name, Int_t iVerbose);
56 
58  virtual ~PndPropagationTest();
59 
60  void SetDectectorBranchNames(TString branchName) { fDetArrays[branchName] = nullptr; }
61  // Test
62  void SetPhotonBranchName(TString val) { fPhotonDetectorName = val; }
63  void SetPropPdg(int val) { fPropPdg = val; }
64 
65  void SetInnerExtrapolationRadius(double val) { fInnerExtrapoRadius = val; }
66 
68  virtual void Exec(Option_t *opt);
69 
70  protected:
71  // TVector3 GetPhotonCorrection(int option, FairMCPoint *currentPoint = nullptr);
72  TVector3 GetMCMomentumCorrection(); // uses MC truth momentum of photon hit
73  TVector3 GetEnergyHitCorrection(TVector3 &innerPos); // uses MC truth energy plus direction between photon hit and electron hit
74  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.
75  private:
77  virtual void SetParContainers();
78 
80  virtual InitStatus Init();
81 
83  virtual InitStatus ReInit();
84 
86  void Reset();
87 
89  virtual void Finish();
90 
91  TClonesArray *fMcTracks = nullptr;
92  std::map<TString, TClonesArray *> fDetArrays;
93  TClonesArray *fPhotonDetector = nullptr;
94  TString fPhotonDetectorName = "IdealTubePoint";
95  TClonesArray *fPhotonStart = nullptr;
96  FairGeanePro *fGeanePropagator = nullptr;
97  int fPropPdg = -211;
98 
99  int fGeaneNotFitted = 0;
100  int fGenfitNotFitted = 0;
101 
102  double fInnerExtrapoRadius = -1;
103 
104  std::map<TString, TH1 *> fHistos;
105  std::map<TString, TH2 *> f2DHistos;
106 
107  ClassDef(PndPropagationTest, 1);
108 };
109 
110 #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)