CbmRoot
CbmRichMirrorSortingCorrection.h
Go to the documentation of this file.
1 #ifndef CBMRICHMIRRORSORTINGCORRECTION_H
2 #define CBMRICHMIRRORSORTINGCORRECTION_H
3 
4 #include "CbmHistManager.h"
5 #include "CbmMCTrack.h"
6 #include "CbmRichRing.h"
7 #include "CbmRichRingFitterCOP.h"
9 #include "CbmRichRingLight.h"
10 #include "FairTask.h"
11 #include "FairTrackParam.h"
12 #include "TGeoNavigator.h"
13 #include "TVector3.h"
14 
15 using namespace std;
16 
17 
18 class CbmRichMirrorSortingCorrection : public FairTask {
19 public:
20  /*
21  * Constructor.
22  */
24 
25  /*
26  * Destructor.
27  */
29 
33  virtual InitStatus Init();
34 
35  void InitHistProjection();
36 
37  void InitHistoMap();
38 
42  virtual void Exec(Option_t* option);
43 
44  void GetPmtNormal(Int_t NofPMTPoints,
45  vector<Double_t>& normalPMT,
46  Double_t& normalCste);
47 
48  void ComputeR2(vector<Double_t>& ptR2Center,
49  vector<Double_t>& ptR2Mirr,
50  vector<Double_t> ptM,
51  vector<Double_t> ptC,
52  vector<Double_t> ptR1,
53  TGeoNavigator* navi,
54  TString option,
55  TString mirrorTileName);
56 
57  void ComputeP(vector<Double_t>& ptPMirr,
58  vector<Double_t>& ptPR2,
59  vector<Double_t> normalPMT,
60  vector<Double_t> ptM,
61  vector<Double_t> ptR2Mirr,
62  Double_t constantePMT);
63 
64  /*
65  * Function filling the diffX, diffY and distance histograms, from the outPos vector.
66  */
67  void FillHistProjection(TVector3 outPosIdeal,
68  TVector3 outPosUnCorr,
69  TVector3 outPos,
70  CbmRichRingLight ringLight,
71  vector<Double_t> normalPMT,
72  Double_t constantePMT,
73  string str);
74 
75  void DrawHistProjection();
76 
77  void DrawMap(Int_t strX, Int_t strY);
78 
79  void FillRingTrackDistance();
80 
81  bool IsMcPrimaryElectron(const CbmMCTrack* mctrack);
82 
83  void DrawRingTrackDistance(Int_t k);
84 
85  void FillRingTrackDistanceCorr(const CbmRichRing* richRing,
86  const FairTrackParam* pTrack,
87  const CbmMCTrack* mcTrack);
88 
90 
91  void DrawDistanceComp();
92 
93  void setOutputDir(TString s) { fOutputDir = s; }
94 
95  void setCorrectionTableDir(TString s) { fCorrectionTableDir = s; }
96 
97  void setStudyName(TString s) { fStudyName = s; }
98 
99  void setThreshold(Int_t t) { fThreshold = t; }
100 
104  virtual void Finish();
105 
106 
107 private:
108  UInt_t fEventNb;
111  TString fOutputDir;
113  TString fStudyName;
115  std::map<string, TH1D*> fDiffHistoMap;
120  Int_t fThreshold;
121 
122  TClonesArray* fGlobalTracks;
123  TClonesArray* fRichRings;
124  TClonesArray* fMCTracks;
125  TClonesArray* fMirrorPoints;
126  TClonesArray* fRefPlanePoints;
127  TClonesArray* fPmtPoints;
128  TClonesArray* fRichProjections;
129  TClonesArray* fTrackParams;
130  TClonesArray* fRichRingMatches;
131  TClonesArray* fStsTrackMatches;
132 
134 };
135 
136 #endif
CbmRichMirrorSortingCorrection::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmRichMirrorSortingCorrection.h:122
CbmRichMirrorSortingCorrection::setOutputDir
void setOutputDir(TString s)
Definition: CbmRichMirrorSortingCorrection.h:93
CbmRichRingFitterEllipseTau
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Definition: CbmRichRingFitterEllipseTau.h:35
CbmRichMirrorSortingCorrection::fTrackCenterDistanceCorrected
Double_t fTrackCenterDistanceCorrected
Definition: CbmRichMirrorSortingCorrection.h:117
CbmRichRingFitterEllipseTau.h
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
CbmRichMirrorSortingCorrection::fCopFit
CbmRichRingFitterCOP * fCopFit
Definition: CbmRichMirrorSortingCorrection.h:109
CbmRichMirrorSortingCorrection::fStudyName
TString fStudyName
Definition: CbmRichMirrorSortingCorrection.h:113
CbmRichRing
Definition: CbmRichRing.h:17
CbmRichMirrorSortingCorrection::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichMirrorSortingCorrection.h:130
CbmRichMirrorSortingCorrection::fCorrectionMatching
TString fCorrectionMatching
Definition: CbmRichMirrorSortingCorrection.h:119
CbmRichRing.h
CbmHistManager.h
Histogram manager.
CbmRichMirrorSortingCorrection::fRichProjections
TClonesArray * fRichProjections
Definition: CbmRichMirrorSortingCorrection.h:128
CbmRichRingFitterCOP
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Definition: CbmRichRingFitterCOP.h:28
CbmRichMirrorSortingCorrection::fRichRings
TClonesArray * fRichRings
Definition: CbmRichMirrorSortingCorrection.h:123
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichMirrorSortingCorrection::setThreshold
void setThreshold(Int_t t)
Definition: CbmRichMirrorSortingCorrection.h:99
CbmRichRingLight.h
CbmRichMirrorSortingCorrection::fTrackParams
TClonesArray * fTrackParams
Definition: CbmRichMirrorSortingCorrection.h:129
CbmRichMirrorSortingCorrection::fPmtPoints
TClonesArray * fPmtPoints
Definition: CbmRichMirrorSortingCorrection.h:127
CbmRichMirrorSortingCorrection::DrawRingTrackDistanceCorr
void DrawRingTrackDistanceCorr()
CbmRichMirrorSortingCorrection::setCorrectionTableDir
void setCorrectionTableDir(TString s)
Definition: CbmRichMirrorSortingCorrection.h:95
CbmRichMirrorSortingCorrection::ClassDef
ClassDef(CbmRichMirrorSortingCorrection, 1)
CbmRichMirrorSortingCorrection::fThreshold
Int_t fThreshold
Definition: CbmRichMirrorSortingCorrection.h:120
CbmRichMirrorSortingCorrection::fTrackCenterDistanceIdeal
Double_t fTrackCenterDistanceIdeal
Definition: CbmRichMirrorSortingCorrection.h:116
CbmRichMirrorSortingCorrection::fDiffHistoMap
std::map< string, TH1D * > fDiffHistoMap
Definition: CbmRichMirrorSortingCorrection.h:115
CbmRichMirrorSortingCorrection::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmRichMirrorSortingCorrection.h:131
CbmRichRingFitterCOP.h
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
CbmRichMirrorSortingCorrection::fOutputDir
TString fOutputDir
Definition: CbmRichMirrorSortingCorrection.h:111
CbmMCTrack.h
CbmRichMirrorSortingCorrection::fRefPlanePoints
TClonesArray * fRefPlanePoints
Definition: CbmRichMirrorSortingCorrection.h:126
CbmRichMirrorSortingCorrection::fMirrorPoints
TClonesArray * fMirrorPoints
Definition: CbmRichMirrorSortingCorrection.h:125
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmRichMirrorSortingCorrection::setStudyName
void setStudyName(TString s)
Definition: CbmRichMirrorSortingCorrection.h:97
CbmRichMirrorSortingCorrection::fCorrectionTableDir
TString fCorrectionTableDir
Definition: CbmRichMirrorSortingCorrection.h:112
CbmRichMirrorSortingCorrection::fTauFit
CbmRichRingFitterEllipseTau * fTauFit
Definition: CbmRichMirrorSortingCorrection.h:110
CbmRichMirrorSortingCorrection::fMCTracks
TClonesArray * fMCTracks
Definition: CbmRichMirrorSortingCorrection.h:124
CbmRichMirrorSortingCorrection::fHM2
CbmHistManager * fHM2
Definition: CbmRichMirrorSortingCorrection.h:114
CbmRichMirrorSortingCorrection::fEventNb
UInt_t fEventNb
Definition: CbmRichMirrorSortingCorrection.h:108
CbmRichMirrorSortingCorrection::fTrackCenterDistanceUncorrected
Double_t fTrackCenterDistanceUncorrected
Definition: CbmRichMirrorSortingCorrection.h:118
CbmRichRingLight
Definition: CbmRichRingLight.h:39
CbmRichMirrorSortingCorrection
Definition: CbmRichMirrorSortingCorrection.h:18