FairRoot/PandaRoot
PndDrcReco.h
Go to the documentation of this file.
1 // -----------------------------------------
2 // PndDrcReco.h
3 //
4 // Created on: 04.03.2016
5 // Author: R.Dzhygadlo at gsi.de
6 // -----------------------------------------
7 // look-up-table and time imaging reconstruction
8 
9 #ifndef PNDDRCRECO_H
10 #define PNDDRCRECO_H
11 
12 #include "FairTask.h"
13 #include "TClonesArray.h"
14 #include "PndMCTrack.h"
15 #include "PndDrcBarPoint.h"
16 #include "PndDrcEVPoint.h"
17 #include "PndDrcPDPoint.h"
18 #include "PndDrcHit.h"
19 #include "PndDrcPDHit.h"
20 #include "PndDrcDigi.h"
21 #include "PndGeoDrc.h"
22 
23 #include "TString.h"
24 #include "TFile.h"
25 #include "TH1.h"
26 #include "TH2.h"
27 #include "TF1.h"
28 #include "TSpectrum.h"
29 #include "TKey.h"
30 #include "TRandom.h"
31 
32 #include "PndDrcTrackInfo.h"
33 #include "PndDrcPhotonInfo.h"
34 #include "PndDrcAmbiguityInfo.h"
35 
36 
37 class PndDrcReco : public FairTask {
38 
39 public:
40 
41  PndDrcReco();
42  PndDrcReco(TString outFile, TString lutFile, TString pdfFile, Int_t verbose=0, Double_t r1=0, Double_t r2=0);
43 
44  virtual ~PndDrcReco(){};
45 
46  virtual InitStatus Init();
47 
48  // Executed task
49  virtual void Exec(Option_t* option);
50 
51  // Finish task
52  virtual void Finish();
53 
54 private:
55 
56  void DetermineCherenkov(Int_t boxId, Int_t barId);
57  void DetermineBarId(Double_t &boxPhi, Int_t &barId);
58  void LookUpTable(Int_t barId, Int_t sensorId);
59  void TimeImaging(Int_t sensorId);
60 
62  Int_t FindPdg(Double_t mom, Double_t cangle);
63  void CanvasAdd(TString name="c",Int_t w=800, Int_t h=400);
64  void CanvasSave(TString path="data/reco");
67 
68  TClonesArray* fMCArray; // DRC MCPoints in the photon detector
69  TClonesArray *fBarPointArray;
70  TClonesArray *fEVPointArray;
71  TClonesArray* fPDPointArray; // DRC points in the photon detector
72  TClonesArray* fDigiArray;
73  TClonesArray* fPDHitArray; // DRC Hits in the photon detector
74  TClonesArray *fLut[5];
75  TClonesArray *fDrcTrackInfoArray;
76 
77  TFile *fFile;
78  TFile *fFileOut;
79  TTree *fTree;
80  TTree *fTreeOut;
81 
88 
89  // Set the parameters to the default values.
90  void SetDefaultParameters();
91 
92  // Verbosity level
93  Int_t fVerbose;
94  Int_t nevents;
99  TH1F *fHist,*fHist1,*fHist2;
100  TF1 *fFit;
101  TSpectrum *fSpect;
102 
103  Int_t fMethod, fParticleArray[3000];
104  TVector3 fMomInBar;
105  TVector3 fPosInBar;
114  TF1 *fFunc[5], *fFnph[5],*fhNphArr[5][40][150];
115 
119  TH1F *fhLk1[5], *fhLk2[5],*fhTang[5], *fhTime[5],*fhDiff[5],*fhNph[5];
120  TH1F *fhPdf[5][40][120][1100];
121 
125  Int_t fEvents[5], fEventsEff[5],fEventsMis[5],fHits[5], fHitsE[5];
126  TVector3 fNx, fNy;
128  TRandom fRandom;
129 
130  TList *fCanvasList;
131 
132  Double_t c_spr[5][50][150], c_mean[5][50][150];
133 
134  ClassDef(PndDrcReco,1)
135 
136 };
137 
138 #endif
Int_t fMethod
Definition: PndDrcReco.h:103
Double_t fDiffLn1
Definition: PndDrcReco.h:118
TClonesArray * fDrcTrackInfoArray
Definition: PndDrcReco.h:75
TH1F * fhTime[5]
Definition: PndDrcReco.h:119
Int_t FindPdg(Double_t mom, Double_t cangle)
Definition: PndDrcReco.cxx:580
virtual ~PndDrcReco()
Definition: PndDrcReco.h:44
TTree * fTree
Definition: PndDrcReco.h:79
Double_t fPdg[5]
Definition: PndDrcReco.h:111
PndDrcEVPoint * fEVPoint
Definition: PndDrcReco.h:84
Double_t fCangle[5]
Definition: PndDrcReco.h:122
virtual InitStatus Init()
Definition: PndDrcReco.cxx:39
PndDrcBarPoint * fBarPoint
Definition: PndDrcReco.h:83
TH1F * fhNph[5]
Definition: PndDrcReco.h:119
PndDrcPDPoint * fPDPoint
Definition: PndDrcReco.h:85
Double_t c_spr[5][50][150]
Definition: PndDrcReco.h:132
TVector3 fMomInBar
Definition: PndDrcReco.h:104
TClonesArray * fPDHitArray
Definition: PndDrcReco.h:73
TClonesArray * fLut[5]
Definition: PndDrcReco.h:74
Int_t fVerbose
Definition: PndDrcReco.h:93
Double_t fMissId[5]
Definition: PndDrcReco.h:123
Double_t fPipehAngle
Definition: PndDrcReco.h:66
void CanvasSave(TString path="data/reco")
Definition: PndDrcReco.cxx:597
Double_t fNph[5]
Definition: PndDrcReco.h:122
Double_t fR1
Definition: PndDrcReco.h:127
TTree * fTreeOut
Definition: PndDrcReco.h:80
TFile * fFileOut
Definition: PndDrcReco.h:78
Double_t fCriticalAngle
Definition: PndDrcReco.h:109
TString outFile
Definition: hit_dirc.C:17
TF1 * fFunc[5]
Definition: PndDrcReco.h:114
#define verbose
Double_t fDphi
Definition: PndDrcReco.h:66
TVector3 fPosInBar
Definition: PndDrcReco.h:105
TVector3 fNy
Definition: PndDrcReco.h:126
Double_t FindPeak()
Definition: PndDrcReco.cxx:551
Int_t fHitsE[5]
Definition: PndDrcReco.h:125
void DetermineBarId(Double_t &boxPhi, Int_t &barId)
Definition: PndDrcReco.cxx:533
Double_t fMom
Definition: PndDrcReco.h:122
Double_t mom
Definition: plot_dirc.C:14
TClonesArray * fBarPointArray
Definition: PndDrcReco.h:69
double r1
TString fLutFile
Definition: PndDrcReco.h:96
void DetermineCherenkov(Int_t boxId, Int_t barId)
Definition: PndDrcReco.cxx:314
Double_t fSpr[5]
Definition: PndDrcReco.h:122
Int_t fParticleArray[3000]
Definition: PndDrcReco.h:103
Int_t fEventsMis[5]
Definition: PndDrcReco.h:125
TF1 * fhNphArr[5][40][150]
Definition: PndDrcReco.h:114
PndDrcDigi * fDigi
Definition: PndDrcReco.h:86
Double_t fPhi
Definition: PndDrcReco.h:122
TH1F * fhPdf[5][40][120][1100]
Definition: PndDrcReco.h:120
TH1F * fHist1
Definition: PndDrcReco.h:99
Int_t fPidDist
Definition: PndDrcReco.h:124
Double_t
TClonesArray * fMCArray
Definition: PndDrcReco.h:68
Double_t fTimeInBar
Definition: PndDrcReco.h:106
TFile * fFile
Definition: PndDrcReco.h:77
TH1F * fhLk1[5]
Definition: PndDrcReco.h:119
Double_t fLenz
Definition: PndDrcReco.h:108
Double_t fLk2[5]
Definition: PndDrcReco.h:117
Double_t c_mean[5][50][150]
Definition: PndDrcReco.h:132
Double_t fSeparation[2]
Definition: PndDrcReco.h:122
void LookUpTable(Int_t barId, Int_t sensorId)
Definition: PndDrcReco.cxx:436
virtual void Exec(Option_t *option)
Definition: PndDrcReco.cxx:257
Int_t nevents
Definition: PndDrcReco.h:94
Double_t fLikelihood[2]
Definition: PndDrcReco.h:122
Double_t fTimeHit
Definition: PndDrcReco.h:107
TH1F * fHist2
Definition: PndDrcReco.h:99
void SetDefaultParameters()
TF1 * fFit
Definition: PndDrcReco.h:100
PndGeoDrc * fGeo
Definition: PndDrcReco.h:65
TRandom fRandom
Definition: PndDrcReco.h:128
PndMCTrack * fMCTrack
Definition: PndDrcReco.h:82
void CanvasAdd(TString name="c", Int_t w=800, Int_t h=400)
Definition: PndDrcReco.cxx:593
TString name
virtual void Finish()
Definition: PndDrcReco.cxx:638
TClonesArray * fDigiArray
Definition: PndDrcReco.h:72
TF1 * fFnph[5]
Definition: PndDrcReco.h:114
Int_t fPidLike[2]
Definition: PndDrcReco.h:124
Int_t fEvType
Definition: PndDrcReco.h:98
TH1F * fhLk2[5]
Definition: PndDrcReco.h:119
TSpectrum * fSpect
Definition: PndDrcReco.h:101
TString fPdfFile
Definition: PndDrcReco.h:97
TString fOutFile
Definition: PndDrcReco.h:95
TH1F * fhDiff[5]
Definition: PndDrcReco.h:119
TList * fCanvasList
Definition: PndDrcReco.h:130
Double_t fLk1[5]
Definition: PndDrcReco.h:116
Int_t fLensType
Definition: PndDrcReco.h:98
Double_t fBboxNum
Definition: PndDrcReco.h:66
Int_t fRadType
Definition: PndDrcReco.h:98
PndDrcPDHit * fPDHit
Definition: PndDrcReco.h:87
Bool_t fReflected
Definition: PndDrcReco.h:110
TClonesArray * fPDPointArray
Definition: PndDrcReco.h:71
Int_t fHits[5]
Definition: PndDrcReco.h:125
Double_t fBarPhi
Definition: PndDrcReco.h:66
Double_t fMass[5]
Definition: PndDrcReco.h:112
Double_t fAngle[5]
Definition: PndDrcReco.h:113
Int_t fPidTrue
Definition: PndDrcReco.h:124
TVector3 fNx
Definition: PndDrcReco.h:126
Double_t fTheta
Definition: PndDrcReco.h:122
Int_t fEvents[5]
Definition: PndDrcReco.h:125
Double_t fEfficiency[5]
Definition: PndDrcReco.h:123
TClonesArray * fEVPointArray
Definition: PndDrcReco.h:70
Int_t fMcTrackId
Definition: PndDrcReco.h:124
Int_t fEventsEff[5]
Definition: PndDrcReco.h:125
void TimeImaging(Int_t sensorId)
Definition: PndDrcReco.cxx:514
Double_t fR2
Definition: PndDrcReco.h:127
double r2
TH1F * fHist
Definition: PndDrcReco.h:99
Double_t fDiffLn2
Definition: PndDrcReco.h:118
TH1F * fhTang[5]
Definition: PndDrcReco.h:119