PandaRoot
PndDrcRecoLookupMapS.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndDrcRecoLookupMapS header file -----
3 // ----- Created 30/09/11 by Maria Patsyuk -----
4 // ----- -----
5 // ----- -----
6 // -------------------------------------------------------------------------
7 
16 #ifndef PNDDRCRECOLOOKUPMAPS_H
17 #define PNDDRCRECOLOOKUPMAPS_H
18 
19 #include "FairTask.h"
20 #include "TClonesArray.h"
21 #include "PndMCTrack.h"
22 #include "PndDrcHit.h"
23 #include "PndDrcPDHit.h"
24 #include "PndStack.h"
25 #include "FairBaseParSet.h"
26 #include "PndGeoDrcPar.h"
27 #include "TString.h"
28 #include <string>
29 #include "PndDrcDigiPar.h"
30 #include "PndDrcDigi.h"
31 #include "PndGeoHandling.h"
32 
33 #include "TH1.h"
34 #include "TH2.h"
35 #include "TTree.h"
36 #include "TGraph2D.h"
37 #include "TColor.h"
38 #include "TStyle.h"
39 #include "TLine.h"
40 #include "TPolyLine.h"
41 
42 #ifndef ROOT_TParticlePDG
43 #include "TParticlePDG.h"
44 #endif
45 #ifndef ROOT_TDatabasePDG
46 #include "TDatabasePDG.h"
47 #endif
48 
49 class PndDrcRecoLookupMapS : public FairTask {
50 
51  public:
54 
56  PndDrcRecoLookupMapS(Int_t verbose);
57 
59  virtual ~PndDrcRecoLookupMapS();
60 
61  virtual InitStatus Init();
62 
64  virtual void Exec(Option_t *option);
65 
67  virtual void Finish();
68 
69  void SetHistoWidth(double wid = 0.01) { fWidth = wid; } // 0.01
70  void SetNSigma(double nsig = 3.) { fNSigma = nsig; }
71  void SetMagneticField(double mag = 0.) { fB = mag; } // [Tesla]
72  void SetOutputFile(TString outName = "PndDrcRecoLookupMapS_output.root") { fOutputName = outName; }
73 
74  protected:
75  private:
76  void ProcessPhotonHit();
77  void ProcessPhotonMC();
78  void WriteToFile();
79  void CreateHisto();
80  void DrawHisto();
81  void ProcessBarHit();
82 
83  // parameters:
84  Double_t fpi;
85  Double_t fR;
86  Double_t fzup;
87  Double_t fzdown;
88  Double_t fHThick;
89  Double_t fBboxNum;
90  Double_t fBarNum;
91  Double_t fPipehAngle;
92  Double_t fBarBoxGap;
93  Double_t fLSide;
94  Double_t fBarWidth;
95  Double_t fDphi;
96 
97  // output trees
98  TTree *mapstree;
99  Float_t fxx, fyy, fchdiff;
100 
101  // look up table
102  virtual void SetParContainers();
103  PndDrcDigiPar *fDigiPar;
104 
105  Double_t InBarCoordSyst(TVector3, TVector3 *, TVector3 *, TVector3 *, TVector3 *);
106  Int_t NumberOfBounces(TVector3, TVector3, Int_t);
107  Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t);
108  Double_t CherenkovPhi(TVector3, TVector3, Double_t *, Double_t *);
109  Double_t RecoAmbigTime(TVector3, TVector3, Double_t *, Bool_t);
110  void DrawBarBox(TVector3, TVector3, TVector3, TVector3);
111  Int_t fDetectorID;
112 
113  TClonesArray *fBarPointArray; // DRC MC points in the bars
114  TClonesArray *fPDPointArray; // DRC points in the photon detector
115  TClonesArray *fHitArray; // DRC Hits in the bars
116  TClonesArray *fPDHitArray; // DRC Hits in the photon detector
117  TClonesArray *fMCArray; // DRC Hits in the photon detector
118  TClonesArray *fDigiArray;
119 
120  // TClonesArray* fChPhoArray; // output array of PndChPho
121  TClonesArray *fDrcLutInfoArray;
122 
123  TList *fHistoList;
124 
125  PndGeoDrc *fGeo;
126  PndGeoHandling *fGeoH;
127 
129  void SetDefaultParameters();
130 
132  Int_t fVerbose;
133 
134  Int_t nevents;
135 
136  TString fOutputName;
137  Double_t fWidth;
138  Double_t fPixelSize;
139  Double_t fHAngleInBDeg;
140 
141  Double_t fCHrecoMin;
142  Double_t fCHrecoMax;
143  Double_t fNSigma;
144  Double_t fB;
145 
146  TVector3 fnX1;
147  TVector3 fnY1;
148 
149  Double_t flambdah;
150  Double_t fpixID;
151  Double_t fxbar;
152  Double_t fybar;
153  Double_t fxPHit;
154  Double_t fyPHit;
155  Double_t fzPHit;
156  Double_t ftime;
157  Double_t ftime0;
158  Double_t fPhiRot;
159  TVector3 fPMo;
160  TVector3 fPMoB;
161  TVector3 fPphoInit;
162  TVector3 fkBar;
163  Double_t fWeight;
164  Int_t fBarId;
165 
166  Bool_t print;
167 
168  // look up parameters
169  Int_t NHitPix;
170  Int_t NPixPar;
171  Int_t NAmb;
172 
173  Double_t fkxBar, fkyBar, fkzBar;
174  Double_t fPxMoBar, fPyMoBar, fPzMoBar;
175  Double_t fxnew, fynew;
176  Double_t CHexp;
177  Double_t CHreal;
178  TVector3 fPphoB; // kBar
179  TVector3 fStartVertex;
180  TVector3 fPphoPD;
181  Double_t fPath;
182  Double_t fPhiMap;
183  Double_t fThetaMap;
184 
185  // vertices of hit BarBox
186  TVector3 fBBver1;
187  TVector3 fBBver2;
188  TVector3 fBBver3;
189  TVector3 fBBver4;
190 
191  ClassDef(PndDrcRecoLookupMapS, 1)
192 };
193 
194 #endif
void SetHistoWidth(double wid=0.01)
void SetOutputFile(TString outName="PndDrcRecoLookupMapS_output.root")
virtual void Finish()
Class to access the naming information of the MVD.
virtual ~PndDrcRecoLookupMapS()
void SetNSigma(double nsig=3.)
virtual InitStatus Init()
Digitization Parameter Class for DIRC barrel part.
Definition: PndDrcDigiPar.h:28
void SetMagneticField(double mag=0.)
virtual void Exec(Option_t *option)