CbmRoot
CbmRichAlignment.h
Go to the documentation of this file.
1 #ifndef CBMRICHALIGNMENT_H
2 #define CBMRICHALIGNMENT_H
3 
4 
5 #include "CbmHistManager.h"
6 #include "CbmRichRingFitterCOP.h"
8 #include "FairTask.h"
9 #include <vector>
10 
11 using namespace std;
12 
13 class TClonesArray;
14 class TH1D;
15 class TH2D;
16 
17 
18 class CbmRichAlignment : public FairTask {
19 private:
20  static const int kMAX_NOF_HITS = 100; // Maximum number of hits in ring
21 
22 public:
23  /*
24  * Constructor.
25  */
27 
28  /*
29  * Destructor.
30  */
31  virtual ~CbmRichAlignment();
32 
36  virtual InitStatus Init();
37 
41  virtual void Exec(Option_t* option);
42 
46  virtual void Finish();
47 
48  /*
49  * Histogram initialization for alignment method.
50  */
51  void InitHistAlignment();
52 
53  /*
54  * Calculate the distances between C and C', the Cherenkov distances and angles (Theta_Ch vs Phi_Ch) for each photon hit in a given event and draw the corresponding
55  * distributions.
56  */
57  void CalculateAnglesAndDrawDistrib();
58 
59  /*
60  * Get x and y positions on the PMT plane from the extrapolated track.
61  */
62  void GetTrackPosition(Double_t& x, Double_t& y);
63 
64  /*
65  * Draw histograms for alignment method.
66  */
67  void DrawHistAlignment();
68 
69  /*
70  *
71  */
72  void DrawFit(vector<Double_t>& outputFit, Int_t thresh);
73 
74  /*
75  * Draw histograms from root file.
76  */
77  void DrawHistFromFile(TString fileName);
78 
79  /*
80  * Set output directory for images.
81  */
82  void SetOutputDir(TString dir) { fOutputDir = dir; }
83 
84  /*
85  * Set run title. It is also a part of the file name of image files.
86  */
87  void SetRunTitle(TString title) { fRunTitle = title; }
88 
89  /*
90  * Set axis rotation title. It is also a part of the file name of image files.
91  */
92  void SetAxisRotTitle(TString title) { fAxisRotTitle = title; }
93 
94  /*
95  * Set to TRUE if you want to draw histograms.
96  */
97  void SetDrawAlignment(Bool_t b) { fDrawAlignment = b; }
98 
99  /*
100  *
101  */
102  void SetNumbAxis(TString n) { fNumbAxis = n; }
103 
104  /*
105  *
106  */
107  void SetTileName(TString a) { fTile = a; }
108 
109 
110 private:
111  TClonesArray* fRichHits; // Array of RICH hits
112  TClonesArray* fRichRings; // Array of found RICH rings
113  TClonesArray* fRichProjections;
114  TClonesArray* fRichPoints;
115  TClonesArray* fMCTracks;
116  TClonesArray* fRichRingMatches;
117  TClonesArray* fRichMirrorPoints;
118  // TClonesArray* fRichRefPlanePoints;
119  // TClonesArray* fRichMCPoints;
120  // TClonesArray* fGlobalTracks;
122 
123  UInt_t fEventNum; // Event counter
124  TString fNumbAxis; // Misalignment applied on the geometry.
125  TString fTile;
126  Bool_t fDrawAlignment; // If TRUE, draws the alignment and fitting plots.
127  vector<Float_t> fPhi;
128 
129  TString fOutputDir; // Output directory to store figures.
130  TString fRunTitle; // Title of the run.
131  TString fAxisRotTitle; // Rotation around which axis.
132 
135 
138 
140 };
141 
142 #endif
CbmRichAlignment::fRichProjections
TClonesArray * fRichProjections
Definition: CbmRichAlignment.h:113
CbmRichAlignment
Definition: CbmRichAlignment.h:18
CbmRichAlignment::ClassDef
ClassDef(CbmRichAlignment, 1)
CbmRichRingFitterEllipseTau
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Definition: CbmRichRingFitterEllipseTau.h:35
CbmRichAlignment::fEventNum
UInt_t fEventNum
Definition: CbmRichAlignment.h:123
CbmRichRingFitterEllipseTau.h
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
CbmRichAlignment::fNumbAxis
TString fNumbAxis
Definition: CbmRichAlignment.h:124
CbmRichAlignment::SetDrawAlignment
void SetDrawAlignment(Bool_t b)
Definition: CbmRichAlignment.h:97
CbmRichAlignment::SetAxisRotTitle
void SetAxisRotTitle(TString title)
Definition: CbmRichAlignment.h:92
CbmRichAlignment::SetTileName
void SetTileName(TString a)
Definition: CbmRichAlignment.h:107
CbmRichAlignment::fRichPoints
TClonesArray * fRichPoints
Definition: CbmRichAlignment.h:114
CbmHistManager.h
Histogram manager.
CbmRichAlignment::fPhi
vector< Float_t > fPhi
Definition: CbmRichAlignment.h:127
CbmRichAlignment::SetNumbAxis
void SetNumbAxis(TString n)
Definition: CbmRichAlignment.h:102
CbmRichAlignment::fRichRingMatches
TClonesArray * fRichRingMatches
Definition: CbmRichAlignment.h:116
CbmRichRingFitterCOP
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Definition: CbmRichRingFitterCOP.h:28
CbmRichAlignment::fOutputDir
TString fOutputDir
Definition: CbmRichAlignment.h:129
CbmRichAlignment::fHM
CbmHistManager * fHM
Definition: CbmRichAlignment.h:121
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmRichAlignment::fRichHits
TClonesArray * fRichHits
Definition: CbmRichAlignment.h:111
CbmRichAlignment::fMCTracks
TClonesArray * fMCTracks
Definition: CbmRichAlignment.h:115
CbmRichAlignment::fTile
TString fTile
Definition: CbmRichAlignment.h:125
CbmRichAlignment::SetOutputDir
void SetOutputDir(TString dir)
Definition: CbmRichAlignment.h:82
CbmRichAlignment::operator=
CbmRichAlignment operator=(const CbmRichAlignment &)
CbmRichAlignment::fTauFit
CbmRichRingFitterEllipseTau * fTauFit
Definition: CbmRichAlignment.h:134
CbmRichRingFitterCOP.h
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
CbmRichAlignment::SetRunTitle
void SetRunTitle(TString title)
Definition: CbmRichAlignment.h:87
CbmRichAlignment::fDrawAlignment
Bool_t fDrawAlignment
Definition: CbmRichAlignment.h:126
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmRichAlignment::CbmRichAlignment
CbmRichAlignment(const CbmRichAlignment &)
CbmRichAlignment::fRunTitle
TString fRunTitle
Definition: CbmRichAlignment.h:130
CbmRichAlignment::fAxisRotTitle
TString fAxisRotTitle
Definition: CbmRichAlignment.h:131
CbmRichAlignment::fRichMirrorPoints
TClonesArray * fRichMirrorPoints
Definition: CbmRichAlignment.h:117
CbmRichAlignment::fCopFit
CbmRichRingFitterCOP * fCopFit
Definition: CbmRichAlignment.h:133
CbmRichAlignment::fRichRings
TClonesArray * fRichRings
Definition: CbmRichAlignment.h:112