CbmRoot
CbmRichMirrorSortingAlignment.h
Go to the documentation of this file.
1 #ifndef CBMRICHMIRRORSORTINGALIGNMENT_H
2 #define CBMRICHMIRRORSORTINGALIGNMENT_H
3 
4 #include "CbmRichMirror.h"
5 #include "CbmRichRingFitterCOP.h"
7 #include "FairTask.h"
8 #include "TGeoNavigator.h"
9 
10 #include <fstream>
11 #include <iomanip>
12 #include <vector>
13 
14 using namespace std;
15 
16 class TClonesArray;
17 class TH1D;
18 class TH2D;
19 
20 
21 class CbmRichMirrorSortingAlignment : public FairTask {
22 public:
23  /*
24  * Constructor.
25  */
27 
28  /*
29  * Destructor.
30  */
32 
36  virtual InitStatus Init();
37 
41  virtual void Exec(Option_t* option);
42 
43  void ComputeAngles();
44 
45  void GetPmtNormal(Int_t NofPMTPoints,
46  vector<Double_t>& normalPMT,
47  Double_t& normalCste);
48 
49  void ComputeR2(vector<Double_t>& ptR2Center,
50  vector<Double_t>& ptR2Mirr,
51  vector<Double_t> ptM,
52  vector<Double_t> ptC,
53  vector<Double_t> ptR1,
54  TGeoNavigator* navi,
55  TString s);
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  void CreateHistoMap(std::map<string, vector<CbmRichMirror*>> mirrorMap,
65  std::map<string, TH2D*>& histoMap);
66 
67  void DrawFitAndExtractAngles(std::map<string, vector<Double_t>>& anglesMap,
68  std::map<string, TH2D*> histoMap);
69 
70  void setOutputDir(TString s) { fOutputDir = s; }
71 
72  void setStudyName(TString s) { fStudyName = s; }
73 
74  void setThreshold(Int_t t) { fThreshold = t; }
75 
79  virtual void Finish();
80 
81 
82 private:
83  UInt_t fEventNb;
86  TString fOutputDir;
87  TString fStudyName;
88  Int_t fThreshold;
89  std::map<string, vector<CbmRichMirror*>> fMirrorMap;
90 
91  TClonesArray* fGlobalTracks;
92  TClonesArray* fRichRings;
93  TClonesArray* fMCTracks;
94  TClonesArray* fMirrorPoints;
95  TClonesArray* fRefPlanePoints;
96  TClonesArray* fPmtPoints;
97  TClonesArray* fRichProjections;
98  TClonesArray* fTrackParams;
99  TClonesArray* fRichRingMatches;
100  TClonesArray* fStsTrackMatches;
101 
104 
106 };
107 
108 #endif
CbmRichMirrorSortingAlignment::setOutputDir
void setOutputDir(TString s)
Definition: CbmRichMirrorSortingAlignment.h:70
CbmRichMirrorSortingAlignment::fMirrorPoints
TClonesArray * fMirrorPoints
Definition: CbmRichMirrorSortingAlignment.h:94
CbmRichMirrorSortingAlignment::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichMirrorSortingAlignment.h:99
CbmRichRingFitterEllipseTau
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Definition: CbmRichRingFitterEllipseTau.h:35
CbmRichMirrorSortingAlignment::fRichRings
TClonesArray * fRichRings
Definition: CbmRichMirrorSortingAlignment.h:92
CbmRichMirrorSortingAlignment::fThreshold
Int_t fThreshold
Definition: CbmRichMirrorSortingAlignment.h:88
CbmRichRingFitterEllipseTau.h
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
CbmRichMirrorSortingAlignment::fTauFit
CbmRichRingFitterEllipseTau * fTauFit
Definition: CbmRichMirrorSortingAlignment.h:85
CbmRichMirrorSortingAlignment::CbmRichMirrorSortingAlignment
CbmRichMirrorSortingAlignment(const CbmRichMirrorSortingAlignment &)
CbmRichMirrorSortingAlignment::fStsTrackMatches
TClonesArray * fStsTrackMatches
Definition: CbmRichMirrorSortingAlignment.h:100
CbmRichMirrorSortingAlignment::setStudyName
void setStudyName(TString s)
Definition: CbmRichMirrorSortingAlignment.h:72
CbmRichMirrorSortingAlignment::fPmtPoints
TClonesArray * fPmtPoints
Definition: CbmRichMirrorSortingAlignment.h:96
CbmRichMirrorSortingAlignment::fTrackParams
TClonesArray * fTrackParams
Definition: CbmRichMirrorSortingAlignment.h:98
CbmRichRingFitterCOP
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Definition: CbmRichRingFitterCOP.h:28
CbmRichMirrorSortingAlignment::fOutputDir
TString fOutputDir
Definition: CbmRichMirrorSortingAlignment.h:86
CbmRichMirrorSortingAlignment::fMCTracks
TClonesArray * fMCTracks
Definition: CbmRichMirrorSortingAlignment.h:93
CbmRichMirrorSortingAlignment::fMirrorMap
std::map< string, vector< CbmRichMirror * > > fMirrorMap
Definition: CbmRichMirrorSortingAlignment.h:89
CbmRichMirrorSortingAlignment::fRichProjections
TClonesArray * fRichProjections
Definition: CbmRichMirrorSortingAlignment.h:97
CbmRichMirrorSortingAlignment::setThreshold
void setThreshold(Int_t t)
Definition: CbmRichMirrorSortingAlignment.h:74
CbmRichMirrorSortingAlignment::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmRichMirrorSortingAlignment.h:91
CbmRichMirrorSortingAlignment::operator=
CbmRichMirrorSortingAlignment operator=(const CbmRichMirrorSortingAlignment &)
CbmRichMirrorSortingAlignment::ComputeAngles
void ComputeAngles()
CbmRichRingFitterCOP.h
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
CbmRichMirrorSortingAlignment::fEventNb
UInt_t fEventNb
Definition: CbmRichMirrorSortingAlignment.h:83
CbmRichMirrorSortingAlignment
Definition: CbmRichMirrorSortingAlignment.h:21
CbmRichMirrorSortingAlignment::fCopFit
CbmRichRingFitterCOP * fCopFit
Definition: CbmRichMirrorSortingAlignment.h:84
CbmRichMirrorSortingAlignment::ClassDef
ClassDef(CbmRichMirrorSortingAlignment, 1)
CbmRichMirror.h
CbmRichMirrorSortingAlignment::fRefPlanePoints
TClonesArray * fRefPlanePoints
Definition: CbmRichMirrorSortingAlignment.h:95
CbmRichMirrorSortingAlignment::fStudyName
TString fStudyName
Definition: CbmRichMirrorSortingAlignment.h:87