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