CbmRoot
Loading...
Searching...
No Matches
CbmRichGeoOpt.h
Go to the documentation of this file.
1/* Copyright (C) 2014-2015 UGiessen/JINR-LIT, Giessen/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Tariq Mahmoud, Semen Lebedev [committer] */
4
5#
14#ifndef CBM_RICH_GEO_OPT
15#define CBM_RICH_GEO_OPT
16
17#include "CbmRichPoint.h"
18#include "FairTask.h"
19
20#include <fstream>
21#include <sstream>
22
23class TVector3;
24class TH1;
25class TH2;
26class TH1D;
27class TH2D;
28class TH3D;
29class TClonesArray;
30class CbmRichRing;
32
33class TCanvas;
34
35#include "TVector3.h"
36
37#include <map>
38#include <vector>
39
40using namespace std;
41
50class CbmRichGeoOpt : public FairTask {
51
52 public:
57
61 virtual ~CbmRichGeoOpt();
62
66 virtual InitStatus Init();
67
71 virtual void Exec(Option_t* option);
72
76 virtual void Finish();
77
78
79 private:
80 TClonesArray* fRichPoints;
81 TClonesArray* fMcTracks;
82 TClonesArray* fRefPoints;
83 TClonesArray* fRichHits;
84 TClonesArray* fRichRings;
85 TClonesArray* fRichRingMatches;
86
87 Int_t fEventNum;
89 Int_t fMinNofHits; // Min number of hits in ring for detector acceptance calculation.
90
94 //TVector3 NormToXYPlane;
95 //TVector3 XYPlane_P0;TVector3 XYPlane_P1;TVector3 XYPlane_P2;
96 //double RotAngleX;
97 //double RotAngleY;
98
99 //Parameters to be read from a parameters file
100 vector<TVector3> PMTPlanePoints;
104 TVector3 MirrorCenter;
105 //TVector3 ReadMirrorCenter;
106 double RotX;
107 double RotY;
108 TVector3 PMT_r1;
109 TVector3 PMT_r2;
110 TVector3 PMT_norm;
114 TVector3 MirrPosition; //double MirrPosX; double MirrPosY; double MirrPosZ;
115
117 vector<TVector3> SensPlanePoints;
118 TVector3 Sens_r1;
119 TVector3 Sens_r2;
120 TVector3 Sens_norm;
121
122 //double PMTPlaneXatThird; double PMTPlaneYatThird;
123
127 void FillMcHist();
128
132 void InitHistograms();
133
137 void WriteHistograms();
138
142 CbmRichPoint* GetPMTPoint(int TrackIdOfSensPlane);
143
144
152 void HitsAndPoints();
156 void RingParameters();
157
161 void FillPointsAtPMT();
162
167
171 float GetDistanceMirrorCenterToPMTPoint(TVector3 PMTpoint);
175 float GetIntersectionPointsLS(TVector3 MirrCenter, TVector3 G_P1, TVector3 G_P2, float R);
176
180 bool CheckPointLiesOnSphere(TVector3 Point);
181
185 bool CheckPointLiesOnPlane(TVector3 Point, TVector3 p0, TVector3 n);
189 bool CheckLineIntersectsSphere(TVector3 Point);
190
194 bool CheckLineIntersectsPlane(TVector3 Point);
195
200 // void GetPlaneCenter(float RotMir, float RotX, float RotY);
201
206 void GetPMTRotAngels();
207
212
213
220
224 TH1D* H_PtPrim;
225 TH2D* H_MomPt;
232
237
238
241
242
243 TH2D* H_Hits_XY; // distribution of X and Y position of hits
245 ;
249
250 TH2D* H_PointsIn_XY; // distribution of X and Y position of points
255
256 TH2D* H_PointsOut_XY; // distribution of X and Y position of points (tilting pmt plane)
257 TH1D* H_NofPhotonsPerEv; // Number of photons per hit
258 TH1D* H_NofPhotonsPerHit; // Number of photons per hit
259 TH1D* H_NofPhotonsSmallerThan30; // Number of photons per hit
262
265 TH1D* H_Alpha;
266
274 //H_Alpha_UpLeft_RighttHalf
281
282
287
292 TH1D* H_Radius;
293 TH1D* H_aAxis;
294 TH1D* H_bAxis;
295
296 TH1D* H_boa;
302
303
304 TH1D* H_dR;
305 TH1D* H_dR_aa;
311
314
321
328
333
334
335 ClassDef(CbmRichGeoOpt, 1)
336};
337
338#endif
Optimization of the RICH geometry.
TVector3 MirrPosition
TH1D * H_boa_RightThird
TH1D * H_Alpha_UpLeft_Left2Thirds
TH1D * H_dFocalPoint_Delta
TH1D * H_Theta_TwoVectors
TH1D * H_dR_RightHalf
TClonesArray * fRichRings
Int_t nPhotonsNotOnSphere
TH3D * H_RingCenter_dR
CbmRichGeoOpt & operator=(const CbmRichGeoOpt &)
Assignment operator.
TClonesArray * fRichPoints
TH1D * H_dR_RightThird
TH2D * H_NofRings_NofHits
TH1D * H_Alpha_UpLeft_RightThird
vector< TVector3 > SensPlanePoints
TH1D * H_dFocalPoint_Rho
TH3D * H_RingCenter_dR_Left2Thirds
TVector3 MirrorCenter
TH3D * H_Alpha_XYposAtDet_RightThird
TH3D * H_RingCenter_boa_RegularTheta
TH3D * H_RingCenter_boa_LeftHalf
float GetDistanceMirrorCenterToPMTPoint(TVector3 PMTpoint)
calculate distance between mirror center and pmt-point.
TH1D * H_boa_RegularTheta
TH1D * H_acc_mom_el_RegularTheta
TH3D * H_Alpha_XYposAtDet_RightHalf
TH1D * H_Alpha_UpLeft_RegularTheta
double PMTPlaneCenterY
Int_t PMTPointsFilled
TH3D * H_RingCenter_Baxis
TH2D * H_PointsIn_XY_RightThird
TVector3 ReadPMTPlaneCenterOrig
TH3D * H_RingCenter_Aaxis
void FillPointsAtPMT()
get point coordinates.
void FillMcHist()
get MC Histos (P & Pt).
TH3D * H_RingCenter_dR_LeftHalf
TClonesArray * fRichHits
TH1D * H_NofPhotonsSmallerThan30
TH1D * H_DistancePMTtoMirr
TH3D * H_Alpha_XYposAtDet
void InitHistograms()
Initialize histograms.
bool CheckPointLiesOnSphere(TVector3 Point)
TH2D * H_Mom_Theta_Acc
TH3D * H_Alpha_XYposAtDet_RegularTheta
TH2D * H_Mom_Theta_MC
virtual void Finish()
Inherited from FairTask.
TH2D * H_PointsOut_XY
TH1D * H_Diff_LineRefPMT_MomAtPMT
histograms.
TH1D * H_boa_LeftHalf
TH1D * H_NofPhotonsPerEv
TH1D * H_DistancePMTtoMirrCenter
TH1D * H_boa_Left2Thirds
CbmRichGeoOpt()
Standard constructor.
bool CheckLineIntersectsSphere(TVector3 Point)
Check if a given line intersects a given sphere.
TH2D * H_PointsIn_XY_LeftHalf
TH1D * H_Alpha_UpLeft
virtual void Exec(Option_t *option)
Inherited from FairTask.
TH1D * H_Alpha_UpLeft_II
TH2D * H_Pt_Theta_Rec
virtual ~CbmRichGeoOpt()
Standard destructor.
TH1D * H_Alpha_UpLeft_LeftHalf
TH3D * H_Alpha_XYposAtDet_Left2Thirds
TH3D * H_RingCenter_dR_RightThird
float GetIntersectionPointsLS(TVector3 MirrCenter, TVector3 G_P1, TVector3 G_P2, float R)
TH1D * H_dR_RegularTheta
TVector3 Sens_norm
TH1D * H_boa_RightHalf
TH2D * H_Hits_XY_RightThird
void FillPointsAtPMTSensPlane()
get senspoint coordinates.
TH3D * H_RingCenter_boa_Left2Thirds
void WriteHistograms()
write histograms to a root-file.
TH2D * H_PointsIn_XY_Left2Thirds
TH2D * H_Hits_XY_RightHalf
TH3D * H_RingCenter_boa_RightThird
void HitsAndPointsWithRef()
TH3D * H_Alpha_XYposAtDet_LeftHalf
vector< TVector3 > PMTPlanePoints
TH3D * H_RingCenter_dR_RightHalf
double PMTPlaneCenterX
bool CheckLineIntersectsPlane(TVector3 Point)
Check if a given line intersects a given plane.
TH1D * H_Alpha_UpLeft_RightHalf
TH3D * H_Mom_XY_Theta25
TClonesArray * fMcTracks
virtual InitStatus Init()
Inherited from FairTask.
TH3D * H_RingCenter_boa_RightHalf
CbmRichPoint * GetPMTPoint(int TrackIdOfSensPlane)
get a point coressponding to point at sens-plane.
TVector3 PMT_norm
TH2D * H_Pt_Theta_Acc
TVector3 PMTPlaneCenter
CbmRichGeoOpt(const CbmRichGeoOpt &)
Copy constructor.
TH3D * H_RingCenter_dR_RegularTheta
TH1D * H_NofPhotonsPerHit
TH2D * H_Mom_Theta_Rec
double PMTPlaneThirdX
TH1D * H_dR_Left2Thirds
TH2D * H_Hits_XY_LeftHalf
TClonesArray * fRefPoints
TClonesArray * fRichRingMatches
TH2D * H_PointsIn_XY_RightHalf
TH1D * H_MomPrim_RegularTheta
bool CheckPointLiesOnPlane(TVector3 Point, TVector3 p0, TVector3 n)
Check if a given point lies on agiven plane.
TH3D * H_RingCenter_boa
TVector3 ReadPMTPlaneCenter
void RingParameters()
Loop over all rings in array and fill ring parameters histograms.
Int_t nPhotonsNotOnPlane
TH2D * H_Hits_XY_Left2Thirds
Hash for CbmL1LinkKey.