CbmRoot
CbmTofGeometryQa.h
Go to the documentation of this file.
1 
11 #ifndef _CbmTofGeometryQa_H_
12 #define _CbmTofGeometryQa_H_
13 
14 #include "FairTask.h"
15 
16 class FairMCEventHeader;
17 class CbmTofGeoHandler;
18 class CbmTofCell;
19 // Geometry
20 class CbmTofGeoHandler;
21 class CbmTofDetectorId;
22 class CbmTofCell;
23 
24 class CbmTofDigiPar;
25 class CbmTofDigiBdfPar;
26 
27 class TClonesArray;
28 class TH1;
29 class TH2;
30 class TH3;
31 class TProfile2D;
32 class TString;
33 
34 class CbmTofGeometryQa : public FairTask {
35 
36 public:
38  CbmTofGeometryQa(const char* name, Int_t verbose = 1);
39  virtual ~CbmTofGeometryQa();
40 
41  virtual InitStatus Init();
42  virtual void Exec(Option_t* option);
43  virtual void Finish();
44 
48  virtual void SetParContainers();
49 
50  Bool_t RegisterInputs();
51 
52  Bool_t SetHistoFileName(TString sFilenameIn);
53 
54  Bool_t SetWallPosZ(Double_t dWallPosCm = 1000);
55 
56  void SetCentralityDepFlag(Bool_t bFlag = kTRUE) { fbCentDepOn = bFlag; }
57  void SetSphereApproxCheckFlag(Bool_t bFlag = kTRUE) { fbSphAppOn = bFlag; }
58 
59 private:
60  Bool_t CreateHistos();
61  Bool_t FillHistos();
64  Bool_t WriteHistos();
65  Bool_t DeleteHistos();
66 
70  Bool_t LoadGeometry();
71 
74 
75  Int_t fEvents; // Number of processed events
76 
77  // Geometry infos
81  Int_t iNbSmTot;
82  std::vector<Int_t>
83  fvTypeSmOffs; // Offset in SM index for first SM of each SM type
84  Int_t iNbRpcTot;
85  std::vector<std::vector<Int_t>>
86  fvSmRpcOffs; // Offset in RPC index for first RPC of each SM
87  Int_t fiNbChTot;
88  std::vector<std::vector<std::vector<Int_t>>>
89  fvRpcChOffs; // Offset in channel index for first channel of each RPC
90 
91  // Parameters
92 
93  // Data IO
94  FairMCEventHeader* fMCEventHeader; // MC event header
95  // TClonesArray * fStsPointsColl; // STS MC points
96  TClonesArray* fTofPointsColl; // TOF MC points
97  TClonesArray* fMcTracksColl; // MC tracks
98  TClonesArray* fRealTofPointsColl; // Realistics TOF MC points
99  TClonesArray*
100  fRealTofMatchColl; // Index of Realistics TOF MC points for each MC Point (CbmMatch)
102 
103  // Histograms
104  // Output file name and path
106  // Position of the TOF wall on Z axis for centering histos with Z
107  Double_t fdWallPosZ;
108  // Geometric Mapping
109  Bool_t fbCentDepOn; // Switch on study of dependence on centrality
110  std::vector<TH2*>
111  fvhTrackAllStartZCent; // Dependence of Track origin on centrality, if TOF points
112  std::vector<TH2*>
113  fvhTrackSecStartZCent; // Dependence of Track origin on centrality, if TOF points
114  std::vector<TH3*>
115  fvhTrackAllStartXZCent; // Dependence of Track origin on centrality, if TOF points
116  std::vector<TH3*>
117  fvhTofPntAllAngCent; // Dependence of Tof Point position (angular) on centrality
118  std::vector<TH2*> fvhTrackAllStartXZ; // Track origin mapping, if TOF points
119  std::vector<TH2*> fvhTrackAllStartYZ; // Track origin mapping, if TOF points
120  TH2* fhTrackMapXY; // Only when creating normalization histos
121  TH2* fhTrackMapXZ; // Only when creating normalization histos
122  TH2* fhTrackMapYZ; // Only when creating normalization histos
123  TH2* fhTrackMapAng; // Only when creating normalization histos
124  TH2* fhTrackMapSph; // Only when creating normalization histos
125  TH2* fhTrackMapAngPrimAll; // For angular acceptance study
126  TH2* fhTrackMapAngPrimSts; // For angular acceptance study
127  TH2* fhTrackMapAngPrimRich; // For angular acceptance study
128  TH2* fhTrackMapAngPrimMuch; // For angular acceptance study
129  TH2* fhTrackMapAngPrimTrd; // For angular acceptance study
130  TH2* fhTrackMapAngPrimTof; // For angular acceptance study
131  /*
132  TH2 * fhTrackMapAngSecAll; // For angular acceptance study
133  TH2 * fhTrackMapAngSecSts; // For angular acceptance study
134  TH2 * fhTrackMapAngSecRich; // For angular acceptance study
135  TH2 * fhTrackMapAngSecMuch; // For angular acceptance study
136  TH2 * fhTrackMapAngSecTrd; // For angular acceptance study
137  TH2 * fhTrackMapAngSecTof; // For angular acceptance study
138 */
149  TH2* fhPointMapAngWithSts; // For angular acceptance study
150  TH2* fhPointMapAngWithRich; // For angular acceptance study
151  TH2* fhPointMapAngWithMuch; // For angular acceptance study
152  TH2* fhPointMapAngWithTrd; // For angular acceptance study
153 
154  // Errors relative to spherical approx
155  Bool_t fbSphAppOn;
166 
167  // Physics coord mapping, 1 per particle type
168  // Phase space
169  // Primary tracks
170  std::vector<TH2*> fvhPtmRapGenTrk;
171  std::vector<TH2*> fvhPtmRapStsPnt;
172  std::vector<TH2*> fvhPtmRapTofPnt;
173  // Secondary tracks
174  std::vector<TH2*> fvhPtmRapSecGenTrk;
175  std::vector<TH2*> fvhPtmRapSecStsPnt;
176  std::vector<TH2*> fvhPtmRapSecTofPnt;
177 
178  // PLab
179  // Primary tracks
180  std::vector<TH1*> fvhPlabGenTrk;
181  std::vector<TH1*> fvhPlabStsPnt;
182  std::vector<TH1*> fvhPlabTofPnt;
183  // Secondary tracks
184  std::vector<TH1*> fvhPlabSecGenTrk;
185  std::vector<TH1*> fvhPlabSecStsPnt;
186  std::vector<TH1*> fvhPlabSecTofPnt;
187 
188  // MC Tracks losses
189  // Primary tracks
190  std::vector<TH2*> fvhPtmRapGenTrkTofPnt;
191  std::vector<TH1*> fvhPlabGenTrkTofPnt;
192  std::vector<TH1*> fvhPlabStsTrkTofPnt;
193  // Secondary tracks
194  std::vector<TH2*> fvhPtmRapSecGenTrkTofPnt;
195  std::vector<TH1*> fvhPlabSecGenTrkTofPnt;
196  std::vector<TH1*> fvhPlabSecStsTrkTofPnt;
197 
199 };
200 
201 #endif
CbmTofGeometryQa::fhPointSphAprZposErrMapSph
TProfile2D * fhPointSphAprZposErrMapSph
Definition: CbmTofGeometryQa.h:165
CbmTofGeometryQa::fTofId
CbmTofDetectorId * fTofId
Definition: CbmTofGeometryQa.h:79
CbmTofGeometryQa::RegisterInputs
Bool_t RegisterInputs()
Definition: CbmTofGeometryQa.cxx:380
CbmTofGeometryQa::fvhTrackAllStartZCent
std::vector< TH2 * > fvhTrackAllStartZCent
Definition: CbmTofGeometryQa.h:111
CbmTofGeometryQa::fvhTofPntAllAngCent
std::vector< TH3 * > fvhTofPntAllAngCent
Definition: CbmTofGeometryQa.h:117
CbmTofGeometryQa::ClassDef
ClassDef(CbmTofGeometryQa, 1)
CbmTofGeometryQa::fhPointSphAprZposErrMapXY
TProfile2D * fhPointSphAprZposErrMapXY
Definition: CbmTofGeometryQa.h:161
CbmTofGeometryQa::fhPointMapAngWithRich
TH2 * fhPointMapAngWithRich
Definition: CbmTofGeometryQa.h:150
CbmTofGeometryQa::fRealTofPointsColl
TClonesArray * fRealTofPointsColl
Definition: CbmTofGeometryQa.h:98
CbmTofGeometryQa::fhPointMapAngWithTrd
TH2 * fhPointMapAngWithTrd
Definition: CbmTofGeometryQa.h:152
CbmTofGeometryQa::fvhPtmRapTofPnt
std::vector< TH2 * > fvhPtmRapTofPnt
Definition: CbmTofGeometryQa.h:172
CbmTofGeometryQa::fhPointSphAprRadiusErrMapSph
TProfile2D * fhPointSphAprRadiusErrMapSph
Definition: CbmTofGeometryQa.h:160
CbmTofGeometryQa::fhTrackMapAngPrimSts
TH2 * fhTrackMapAngPrimSts
Definition: CbmTofGeometryQa.h:126
CbmTofGeometryQa::fhPointSphAprZposErrMapYZ
TProfile2D * fhPointSphAprZposErrMapYZ
Definition: CbmTofGeometryQa.h:163
CbmTofGeometryQa::DeleteHistos
Bool_t DeleteHistos()
Definition: CbmTofGeometryQa.cxx:1634
CbmTofGeometryQa::fvTypeSmOffs
std::vector< Int_t > fvTypeSmOffs
Definition: CbmTofGeometryQa.h:83
CbmTofGeometryQa::fvhPlabSecStsTrkTofPnt
std::vector< TH1 * > fvhPlabSecStsTrkTofPnt
Definition: CbmTofGeometryQa.h:196
CbmTofGeometryQa::fvhPlabGenTrkTofPnt
std::vector< TH1 * > fvhPlabGenTrkTofPnt
Definition: CbmTofGeometryQa.h:191
CbmTofGeometryQa::fvhPlabTofPnt
std::vector< TH1 * > fvhPlabTofPnt
Definition: CbmTofGeometryQa.h:182
CbmTofGeometryQa::LoadGeometry
Bool_t LoadGeometry()
Load the geometry: for now just resizing the Digis temporary vectors.
Definition: CbmTofGeometryQa.cxx:416
CbmTofGeometryQa::iNbSmTot
Int_t iNbSmTot
Definition: CbmTofGeometryQa.h:81
CbmTofGeometryQa::fvhPlabSecGenTrk
std::vector< TH1 * > fvhPlabSecGenTrk
Definition: CbmTofGeometryQa.h:184
CbmTofGeometryQa::fsHistoOutFilename
TString fsHistoOutFilename
Definition: CbmTofGeometryQa.h:105
CbmTofGeometryQa::fRealTofMatchColl
TClonesArray * fRealTofMatchColl
Definition: CbmTofGeometryQa.h:100
CbmTofGeometryQa::fhPointMapAng
TH2 * fhPointMapAng
Definition: CbmTofGeometryQa.h:142
CbmTofGeometryQa::fMCEventHeader
FairMCEventHeader * fMCEventHeader
Definition: CbmTofGeometryQa.h:94
CbmTofGeometryQa::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmTofGeometryQa.cxx:344
CbmTofGeometryQa::SetHistoFileName
Bool_t SetHistoFileName(TString sFilenameIn)
Definition: CbmTofGeometryQa.cxx:1513
CbmTofGeometryQa::fbCentDepOn
Bool_t fbCentDepOn
Definition: CbmTofGeometryQa.h:109
CbmTofGeometryQa::fhTrackMapSph
TH2 * fhTrackMapSph
Definition: CbmTofGeometryQa.h:124
CbmTofGeometryQa::fhPointSphAprRadiusErrMapYZ
TProfile2D * fhPointSphAprRadiusErrMapYZ
Definition: CbmTofGeometryQa.h:158
CbmTofGeometryQa::fMcTracksColl
TClonesArray * fMcTracksColl
Definition: CbmTofGeometryQa.h:97
CbmTofGeometryQa::fhPointMapSph
TH2 * fhPointMapSph
Definition: CbmTofGeometryQa.h:143
CbmTofGeometryQa::fvhPtmRapSecStsPnt
std::vector< TH2 * > fvhPtmRapSecStsPnt
Definition: CbmTofGeometryQa.h:175
CbmTofGeometryQa::fhPointSphAprZposErrMapXZ
TProfile2D * fhPointSphAprZposErrMapXZ
Definition: CbmTofGeometryQa.h:162
CbmTofGeometryQa::NormalizeMapHistos
Bool_t NormalizeMapHistos()
CbmTofGeometryQa::fhRealPointMapXZ
TH2 * fhRealPointMapXZ
Definition: CbmTofGeometryQa.h:145
CbmTofGeometryQa::fTofPointsColl
TClonesArray * fTofPointsColl
Definition: CbmTofGeometryQa.h:96
CbmTofGeometryQa::fhTrackMapAngPrimRich
TH2 * fhTrackMapAngPrimRich
Definition: CbmTofGeometryQa.h:127
CbmTofGeometryQa::fEvents
Int_t fEvents
Definition: CbmTofGeometryQa.h:75
CbmTofGeometryQa::CreateHistos
Bool_t CreateHistos()
Definition: CbmTofGeometryQa.cxx:471
CbmTofGeometryQa::fChannelInfo
CbmTofCell * fChannelInfo
Definition: CbmTofGeometryQa.h:80
CbmTofGeometryQa::fvhTrackSecStartZCent
std::vector< TH2 * > fvhTrackSecStartZCent
Definition: CbmTofGeometryQa.h:113
CbmTofGeometryQa::SetSphereApproxCheckFlag
void SetSphereApproxCheckFlag(Bool_t bFlag=kTRUE)
Definition: CbmTofGeometryQa.h:57
CbmTofGeometryQa::fhRealPointMapXY
TH2 * fhRealPointMapXY
Definition: CbmTofGeometryQa.h:144
CbmTofGeometryQa::fhRealPointMapSph
TH2 * fhRealPointMapSph
Definition: CbmTofGeometryQa.h:148
CbmTofGeometryQa::fvhPlabSecTofPnt
std::vector< TH1 * > fvhPlabSecTofPnt
Definition: CbmTofGeometryQa.h:186
CbmTofGeometryQa::fvhPtmRapSecGenTrkTofPnt
std::vector< TH2 * > fvhPtmRapSecGenTrkTofPnt
Definition: CbmTofGeometryQa.h:194
CbmTofGeometryQa::fhRealPointMapAng
TH2 * fhRealPointMapAng
Definition: CbmTofGeometryQa.h:147
CbmTofGeometryQa::fvhPlabSecStsPnt
std::vector< TH1 * > fvhPlabSecStsPnt
Definition: CbmTofGeometryQa.h:185
CbmTofGeoHandler
Definition: CbmTofGeoHandler.h:30
CbmTofGeometryQa::fvhPlabStsTrkTofPnt
std::vector< TH1 * > fvhPlabStsTrkTofPnt
Definition: CbmTofGeometryQa.h:192
CbmTofGeometryQa::operator=
CbmTofGeometryQa operator=(const CbmTofGeometryQa &)
CbmTofGeometryQa::Init
virtual InitStatus Init()
Definition: CbmTofGeometryQa.cxx:309
CbmTofCell
Definition: CbmTofCell.h:8
CbmTofGeometryQa
QA class for the TOF event based Hit finder tasks (clusterizers, ...)
Definition: CbmTofGeometryQa.h:34
CbmTofGeometryQa::fvhPlabGenTrk
std::vector< TH1 * > fvhPlabGenTrk
Definition: CbmTofGeometryQa.h:180
CbmTofGeometryQa::fhPointMapXY
TH2 * fhPointMapXY
Definition: CbmTofGeometryQa.h:139
CbmTofDigiBdfPar
Parameters class for the CBM ToF digitizer using beam data distributions.
Definition: CbmTofDigiBdfPar.h:30
CbmTofGeometryQa::SetWallPosZ
Bool_t SetWallPosZ(Double_t dWallPosCm=1000)
Definition: CbmTofGeometryQa.cxx:464
CbmTofGeometryQa::fhTrackMapXZ
TH2 * fhTrackMapXZ
Definition: CbmTofGeometryQa.h:121
CbmTofGeometryQa::CbmTofGeometryQa
CbmTofGeometryQa(const CbmTofGeometryQa &)
CbmTofGeometryQa::fvSmRpcOffs
std::vector< std::vector< Int_t > > fvSmRpcOffs
Definition: CbmTofGeometryQa.h:86
CbmTofGeometryQa::NormalizeNormHistos
Bool_t NormalizeNormHistos()
CbmTofGeometryQa::fhTrackMapXY
TH2 * fhTrackMapXY
Definition: CbmTofGeometryQa.h:120
CbmTofGeometryQa::fhTrackMapAngPrimTof
TH2 * fhTrackMapAngPrimTof
Definition: CbmTofGeometryQa.h:130
CbmTofGeometryQa::fGeoHandler
CbmTofGeoHandler * fGeoHandler
Definition: CbmTofGeometryQa.h:78
CbmTofGeometryQa::fhPointSphAprRadiusErrMapXY
TProfile2D * fhPointSphAprRadiusErrMapXY
Definition: CbmTofGeometryQa.h:156
CbmTofGeometryQa::fvhPtmRapGenTrk
std::vector< TH2 * > fvhPtmRapGenTrk
Definition: CbmTofGeometryQa.h:170
CbmTofGeometryQa::fhTrackMapAngPrimAll
TH2 * fhTrackMapAngPrimAll
Definition: CbmTofGeometryQa.h:125
CbmTofGeometryQa::fvhTrackAllStartXZ
std::vector< TH2 * > fvhTrackAllStartXZ
Definition: CbmTofGeometryQa.h:118
CbmTofGeometryQa::Finish
virtual void Finish()
Definition: CbmTofGeometryQa.cxx:368
CbmTofGeometryQa::fvhPtmRapGenTrkTofPnt
std::vector< TH2 * > fvhPtmRapGenTrkTofPnt
Definition: CbmTofGeometryQa.h:190
CbmTofGeometryQa::fvhTrackAllStartYZ
std::vector< TH2 * > fvhTrackAllStartYZ
Definition: CbmTofGeometryQa.h:119
CbmTofGeometryQa::fhTrackMapYZ
TH2 * fhTrackMapYZ
Definition: CbmTofGeometryQa.h:122
CbmTofGeometryQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmTofGeometryQa.cxx:354
CbmTofGeometryQa::fhPointMapXZ
TH2 * fhPointMapXZ
Definition: CbmTofGeometryQa.h:140
CbmTofGeometryQa::fhPointSphAprZposErrMapAng
TProfile2D * fhPointSphAprZposErrMapAng
Definition: CbmTofGeometryQa.h:164
CbmTofGeometryQa::fvRpcChOffs
std::vector< std::vector< std::vector< Int_t > > > fvRpcChOffs
Definition: CbmTofGeometryQa.h:89
CbmTofGeometryQa::SetCentralityDepFlag
void SetCentralityDepFlag(Bool_t bFlag=kTRUE)
Definition: CbmTofGeometryQa.h:56
CbmTofDigiPar
Definition: CbmTofDigiPar.h:18
CbmTofGeometryQa::fdWallPosZ
Double_t fdWallPosZ
Definition: CbmTofGeometryQa.h:107
CbmTofGeometryQa::~CbmTofGeometryQa
virtual ~CbmTofGeometryQa()
Definition: CbmTofGeometryQa.cxx:303
CbmTofGeometryQa::fhPointMapAngWithSts
TH2 * fhPointMapAngWithSts
Definition: CbmTofGeometryQa.h:149
CbmTofGeometryQa::fhPointMapYZ
TH2 * fhPointMapYZ
Definition: CbmTofGeometryQa.h:141
CbmTofGeometryQa::fvhPlabStsPnt
std::vector< TH1 * > fvhPlabStsPnt
Definition: CbmTofGeometryQa.h:181
CbmTofGeometryQa::fvhPtmRapStsPnt
std::vector< TH2 * > fvhPtmRapStsPnt
Definition: CbmTofGeometryQa.h:171
CbmTofGeometryQa::fvhPtmRapSecTofPnt
std::vector< TH2 * > fvhPtmRapSecTofPnt
Definition: CbmTofGeometryQa.h:176
CbmTofGeometryQa::fiNbChTot
Int_t fiNbChTot
Definition: CbmTofGeometryQa.h:87
CbmTofGeometryQa::fhTrackMapAng
TH2 * fhTrackMapAng
Definition: CbmTofGeometryQa.h:123
CbmTofGeometryQa::CbmTofGeometryQa
CbmTofGeometryQa()
Definition: CbmTofGeometryQa.cxx:99
CbmTofGeometryQa::fhPointSphAprRadiusErrMapAng
TProfile2D * fhPointSphAprRadiusErrMapAng
Definition: CbmTofGeometryQa.h:159
CbmTofGeometryQa::fvhPlabSecGenTrkTofPnt
std::vector< TH1 * > fvhPlabSecGenTrkTofPnt
Definition: CbmTofGeometryQa.h:195
CbmTofGeometryQa::WriteHistos
Bool_t WriteHistos()
Definition: CbmTofGeometryQa.cxx:1517
CbmTofGeometryQa::fhPointMapAngWithMuch
TH2 * fhPointMapAngWithMuch
Definition: CbmTofGeometryQa.h:151
CbmTofGeometryQa::fbRealPointAvail
Bool_t fbRealPointAvail
Definition: CbmTofGeometryQa.h:101
CbmTofDetectorId
Definition: CbmTofDetectorId.h:66
CbmTofGeometryQa::iNbRpcTot
Int_t iNbRpcTot
Definition: CbmTofGeometryQa.h:84
CbmTofGeometryQa::fhRealPointMapYZ
TH2 * fhRealPointMapYZ
Definition: CbmTofGeometryQa.h:146
CbmTofGeometryQa::fhPointSphAprRadiusErrMapXZ
TProfile2D * fhPointSphAprRadiusErrMapXZ
Definition: CbmTofGeometryQa.h:157
CbmTofGeometryQa::fhTrackMapAngPrimMuch
TH2 * fhTrackMapAngPrimMuch
Definition: CbmTofGeometryQa.h:128
CbmTofGeometryQa::fvhPtmRapSecGenTrk
std::vector< TH2 * > fvhPtmRapSecGenTrk
Definition: CbmTofGeometryQa.h:174
CbmTofGeometryQa::fvhTrackAllStartXZCent
std::vector< TH3 * > fvhTrackAllStartXZCent
Definition: CbmTofGeometryQa.h:115
CbmTofGeometryQa::fbSphAppOn
Bool_t fbSphAppOn
Definition: CbmTofGeometryQa.h:155
CbmTofGeometryQa::FillHistos
Bool_t FillHistos()
Definition: CbmTofGeometryQa.cxx:1184
CbmTofGeometryQa::fhTrackMapAngPrimTrd
TH2 * fhTrackMapAngPrimTrd
Definition: CbmTofGeometryQa.h:129