CbmRoot
Loading...
Searching...
No Matches
CbmRichPMTMapping.h
Go to the documentation of this file.
1/* Copyright (C) 2016 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Jordan Bendarouach [committer] */
4
5#ifndef CBMRICHPMTMAPPING_H
6#define CBMRICHPMTMAPPING_H
7
8
9#include "CbmHistManager.h"
10#include "CbmRichPoint.h"
11#include "CbmRichRecGeoPar.h"
12#include "CbmRichRing.h"
15#include "CbmRichRingLight.h"
16#include "FairTask.h"
17#include "TString.h"
18
19#include <map>
20#include <vector>
21
22using namespace std;
23
24class TClonesArray;
25class TH1D;
26class TH2D;
27
28
29class CbmRichPMTMapping : public FairTask {
30 private:
31 static const int kMAX_NOF_HITS = 100; // Maximum number of hits in ring
32
33 public:
34 /*
35 * Constructor.
36 */
38
39 /*
40 * Destructor.
41 */
42 virtual ~CbmRichPMTMapping();
43
47 virtual InitStatus Init();
48
52 virtual void Exec(Option_t* option);
53
57 virtual void Finish();
58
59 /*
60 * Histogram initialization.
61 */
62 void InitHist();
63
64 /*
65 * Fill the PMT plane with hits, ONLY for event with SEVERAL particles.
66 */
67 void MatchFinder();
68
69 /*
70 *
71 */
72 void FillPMTMap(const Char_t* mirr_path, CbmRichPoint* pPoint);
73
74 /*
75 *
76 */
77 void FillPMTMapEllipse(const Char_t* mirr_path, Float_t CenterX, Float_t CenterY);
78
79 /*
80 * From incoming track on the mirrors, do reflection of its trajectory and extrapolation of its intersection on the PMT plane.
81 */
82 void ProjectionProducer();
83
85
86 /*
87 * Giving as inputs empty sphere center coordinates, empty radius and mirror ID, returns sphere center coordinates and inner radius calculated from
88 * translation matrices of volumes containing the mirror.
89 */
90 void CalculateSphereParameters(const Char_t* mirrID, Double_t& sphereX, Double_t& sphereY, Double_t& sphereZ,
91 Double_t& sphereR);
92
93 void CalculateSphereParameters2(const Char_t* mirrID, Double_t& sphereX, Double_t& sphereY, Double_t& sphereZ,
94 Double_t& sphereR);
95
96 /*
97 * Get pmt normal from 3 different points on the plane.
98 */
99 void GetPmtNormal(Int_t NofPMTPoints, Double_t& normalX, Double_t& normalY, Double_t& normalZ, Double_t& normalCste);
100
102
103 /*
104 * Draw histograms.
105 */
106 void DrawHist();
107
108 /*
109 * Draw histograms from root file.
110 */
111 void DrawHistFromFile(TString fileName);
112
113 /*
114 * Set output directory for images.
115 */
116 void SetOutputDir(TString dir) { fOutputDir = dir; }
117
118 /*
119 * Set run title. It is also a part of the file name of image files.
120 */
121 void SetRunTitle(TString title) { fRunTitle = title; }
122
123 /*
124 * Set to TRUE if you want to draw histograms.
125 */
126 void SetDrawHist(Bool_t b) { fDrawHist = b; }
127
128
129 private:
130 TClonesArray* fRichHits; // Array of RICH hits
131 TClonesArray* fRichRings; // Array of found RICH rings
132 TClonesArray* fRichMirrorPoints;
133 TClonesArray* fRichProjections;
134 TClonesArray* fRichMCPoints;
135 TClonesArray* fMCTracks;
136 TClonesArray* fRichRingMatches;
137 TClonesArray* fRichRefPlanePoints;
138 TClonesArray* fRichPoints;
139 TClonesArray* fGlobalTracks;
142
143 UInt_t fEventNum; // Event counter
146 Bool_t fDrawHist;
148 Double_t fArray[3];
149
150 std::map<string, string> fPathsMap;
151 std::map<string, string> fPathsMapEllipse;
152
153 TString fOutputDir; // Output directory to store figures
154 TString fRunTitle; // Title of the run
155
158
161
163};
164
165#endif
Histogram manager.
RICH geometry parameters for the reconstruction. This class is used for convinient storing of the bas...
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Histogram manager.
void SetOutputDir(TString dir)
void RotateAndCopyHitsToRingLight(const CbmRichRing *ring1, CbmRichRingLight *ring2)
void FillPMTMapEllipse(const Char_t *mirr_path, Float_t CenterX, Float_t CenterY)
void SetDrawHist(Bool_t b)
static const int kMAX_NOF_HITS
TClonesArray * fRichPoints
void SetRunTitle(TString title)
TClonesArray * fGlobalTracks
CbmHistManager * fHM
TClonesArray * fRichRingMatches
void CalculateSphereParameters(const Char_t *mirrID, Double_t &sphereX, Double_t &sphereY, Double_t &sphereZ, Double_t &sphereR)
TClonesArray * fRichMirrorPoints
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmRichPMTMapping operator=(const CbmRichPMTMapping &)
TClonesArray * fMCTracks
TClonesArray * fRichMCPoints
CbmRichPMTMapping(const CbmRichPMTMapping &)
std::map< string, string > fPathsMap
ClassDef(CbmRichPMTMapping, 1)
virtual void Finish()
Inherited from FairTask.
CbmRichRingFitterEllipseTau * fTauFit
void CalculateSphereParameters2(const Char_t *mirrID, Double_t &sphereX, Double_t &sphereY, Double_t &sphereZ, Double_t &sphereR)
TClonesArray * fRichRings
void GetPmtNormal(Int_t NofPMTPoints, Double_t &normalX, Double_t &normalY, Double_t &normalZ, Double_t &normalCste)
TClonesArray * fRichRefPlanePoints
virtual InitStatus Init()
Inherited from FairTask.
std::map< string, string > fPathsMapEllipse
CbmRichRecGeoPar fGP
void DrawHistFromFile(TString fileName)
void FillPMTMap(const Char_t *mirr_path, CbmRichPoint *pPoint)
TClonesArray * fRichHits
TClonesArray * fRichProjections
CbmRichRingFitterCOP * fCopFit
PMT parameters for the RICH geometry.
Here the ring is fitted with the COP algorithm from A. Ayriyan/G. Ososkov.
Here the ring is fitted with Taubin algorithm from A. Ayriyan, G. Ososkov, N. Chernov.
Hash for CbmL1LinkKey.