CbmRoot
Loading...
Searching...
No Matches
CbmTrdQa.h
Go to the documentation of this file.
1/* Copyright (C) 2012-2018 Institut fuer Kernphysik, Westfaelische Wilhelms-Universitaet Muenster, Muenster
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Cyrano Bergmann [committer] */
4
5#ifndef CBMTRDQA_H
6#define CBMTRDQA_H
7
8#include "FairTask.h"
9
10#include <map>
11class CbmTrdRadiator;
13class CbmTrdParSetGeo;
15class TClonesArray;
16class CbmTrdPoint;
17class CbmTrdDigi;
18class CbmTrdCluster;
19class CbmTrdHit;
20class TProfile;
21class TProfile2D;
22class TH1;
23class TH1F;
24class TH1I;
25class TH2I;
26class TH2F;
27class TCanvas;
28class TPolyLine;
29class CbmTrdQa : public FairTask {
30
31 public:
32 CbmTrdQa(std::shared_ptr<CbmTrdRadiator> radiator = nullptr);
33 CbmTrdQa(CbmTrdRadiator* radiator);
34 CbmTrdQa(const char* name, const char* title = "CBM Task", const char* geo = "", Double_t triggerThreshold = 1.0e-6,
35 std::shared_ptr<CbmTrdRadiator> radiator = nullptr);
36 CbmTrdQa(const char* name, const char* title, const char* geo, Double_t triggerThreshold, CbmTrdRadiator* radiator);
37 virtual ~CbmTrdQa();
38 virtual InitStatus ReInit();
39 virtual InitStatus Init();
40 virtual void SetParContainers();
41 virtual void Exec(Option_t* option);
42 void CreateLayerView(std::map<Int_t, TH1*>& Map, TString folder, TString pics, TString zAxisTitle, Double_t fmax,
43 Double_t fmin, Bool_t logScale);
44 virtual void FinishEvent();
45 virtual void FinishTask();
46 void Register();
47 void SetTriggerThreshold(Double_t triggerthreshold);
48 void SetTriangularPads(Bool_t triangles);
49
50 private:
51 Double_t CalcAngle(const CbmTrdPoint* pointA, const CbmTrdPoint* pointB);
52 void SaveHistos();
53 TPolyLine* CreateTriangularPad(Int_t column, Int_t row, Double_t content);
54 void NormalizeHistos();
55 void CreateLayerView();
56 void GetPadInfos(Int_t moduleAddress, Double_t x, Double_t y, Int_t& iCol, Int_t& iRow, Double_t& padSizeX,
57 Double_t& padSizeY);
58 Double_t GetTrackLength(CbmTrdPoint* point);
59
62
63 TClonesArray* fMCTracks;
64 TClonesArray* fPoints;
65 TClonesArray* fDigis;
66 TClonesArray* fClusters;
67 TClonesArray* fHits;
71 std::map<Int_t, TCanvas*> fLayerMap;
72 std::map<Int_t, TCanvas*>::iterator fLayerMapIt;
73 std::map<Int_t, TH2I*> fLayerPointMap;
74 std::map<Int_t, TH2I*>::iterator fLayerPointMapIt;
75 std::map<Int_t, TH2I*> fLayerHitMap;
76 std::map<Int_t, TH2I*>::iterator fLayerHitMapIt;
77
78 std::map<Int_t, std::vector<Int_t>> fModulePointMap;
79 std::map<Int_t, std::vector<Int_t>>::iterator fModulePointMapIt;
80 std::map<Int_t, std::vector<Int_t>> fModuleDigiMap;
81 std::map<Int_t, std::vector<Int_t>>::iterator fModuleDigiMapIt;
82 std::map<Int_t, std::vector<Int_t>> fModuleClusterMap;
83 std::map<Int_t, std::vector<Int_t>>::iterator fModuleClusterMapIt;
84 std::map<Int_t, std::vector<Int_t>> fModuleHitMap;
85 std::map<Int_t, std::vector<Int_t>>::iterator fModuleHitMapIt;
86
87
88 std::map<Int_t, TH1I*> fModuleAveragePointsMap;
89 std::map<Int_t, TH1I*>::iterator fModuleAveragePointsMapIt;
90 std::map<Int_t, TH1I*> fModuleTrackableMap2;
91 std::map<Int_t, TH1I*>::iterator fModuleTrackableMap2It;
92 std::map<Int_t, TH1I*> fModuleTrackableMap;
93 std::map<Int_t, TH1I*>::iterator fModuleTrackableMapIt;
94 std::map<Int_t, TH1I*> fModuleClusterSizeMap;
95 std::map<Int_t, TH1I*>::iterator fModuleClusterSizeMapIt;
96 std::map<Int_t, TH1I*> fModuledEdxMap;
97 std::map<Int_t, TH1I*>::iterator fModuledEdxMapIt;
98 std::map<Int_t, TH1I*> fModuleTracklengthMap;
99 std::map<Int_t, TH1I*>::iterator fModuleTracklengthMapIt;
100 std::map<Int_t, TH1I*> fModuleMultiPointMap;
101 std::map<Int_t, TH1I*>::iterator fModuleMultiPointMapIt;
102 std::map<Int_t, TH1I*> fModuleDeltaEMap;
103 std::map<Int_t, TH1I*>::iterator fModuleDeltaEMapIt;
104 std::map<Int_t, TH1I*> fModuleGhostMap;
105 std::map<Int_t, TH1I*>::iterator fModuleGhostMapIt;
106 std::map<Int_t, TH1I*> fModuleLostMap;
107 std::map<Int_t, TH1I*>::iterator fModuleLostMapIt;
108 std::map<Int_t, TH1I*> fModuleEfficiencyMap;
109 std::map<Int_t, TH1I*>::iterator fModuleEfficiencyMapIt;
110
112 TString fGeo;
113
114 //histos
115
116 Bool_t fD;
117 Bool_t fT;
118 Bool_t fP;
119 Bool_t fC;
120 Bool_t fH;
121
123
128 TH2F* fMuchTrdPoints[11];
129 TH2F* fMuchTofPoints[11];
130 TH2F* fTrdTofPoints[11];
131
136
138
145
152
155
158
162 TH1F* fdEdxHit;
163
170
175
178 TProfile* fMultiHitsVsR;
179 TProfile* fGhostHitVsR;
180 TProfile* fLostPointVsR;
186 TProfile* fPRF_1D;
187 TH2I* fPRF_2D;
188 //LayerView
189
190 std::shared_ptr<CbmTrdRadiator> fRadiator = nullptr;
191
193};
194#endif //
Data Container for TRD clusters.
data class for a reconstructed Energy-4D measurement in the TRD
Definition CbmTrdHit.h:40
TH1I * fDistanceMcToHit
Definition CbmTrdQa.h:153
Bool_t fC
Definition CbmTrdQa.h:119
std::map< Int_t, TH1I * > fModuleEfficiencyMap
Definition CbmTrdQa.h:108
CbmTrdQa(const CbmTrdQa &)
TH2I * fMultiHitAdjacentPadPerMcTrack_motherzBirth
Definition CbmTrdQa.h:150
void SetTriggerThreshold(Double_t triggerthreshold)
Definition CbmTrdQa.cxx:718
CbmTrdParSetGeo * fGeoPar
Definition CbmTrdQa.h:69
TH2I * fMultiHitAdjacentPadPerMcTrack_zBirth
Definition CbmTrdQa.h:148
virtual ~CbmTrdQa()
Definition CbmTrdQa.cxx:170
std::map< Int_t, TH1I * > fModuleTracklengthMap
Definition CbmTrdQa.h:98
std::map< Int_t, TCanvas * >::iterator fLayerMapIt
Definition CbmTrdQa.h:72
TH1I * fMultiHitAdjacentPadPerMcTrack_angle
Definition CbmTrdQa.h:147
std::map< Int_t, TH1I * >::iterator fModuleDeltaEMapIt
Definition CbmTrdQa.h:103
std::map< Int_t, TH2I * >::iterator fLayerHitMapIt
Definition CbmTrdQa.h:76
std::map< Int_t, TH1I * >::iterator fModuleAveragePointsMapIt
Definition CbmTrdQa.h:89
std::map< Int_t, TH1I * >::iterator fModuleLostMapIt
Definition CbmTrdQa.h:107
TClonesArray * fDigis
Definition CbmTrdQa.h:65
void SaveHistos()
TH2F * fTrdPointsPerMcTrack_PID
Definition CbmTrdQa.h:133
TProfile * fPRF_1D
Definition CbmTrdQa.h:186
TH1I * fMultiHitSamePadPerMcTrack
Definition CbmTrdQa.h:139
std::map< Int_t, std::vector< Int_t > >::iterator fModulePointMapIt
Definition CbmTrdQa.h:79
std::map< Int_t, TH1I * > fModuleGhostMap
Definition CbmTrdQa.h:104
TH1I * fClusterPerHit
Definition CbmTrdQa.h:174
TProfile * fHitToPointEfficiencyVsR
Definition CbmTrdQa.h:181
std::map< Int_t, TH2I * > fLayerPointMap
Definition CbmTrdQa.h:73
Double_t GetTrackLength(CbmTrdPoint *point)
Definition CbmTrdQa.cxx:711
TProfile * fGhostHitVsR
Definition CbmTrdQa.h:179
TH2I * fMultiHitSamePadPerMcTrack_PID
Definition CbmTrdQa.h:142
TH2F * fMuchTrdPoints[11]
Definition CbmTrdQa.h:128
std::map< Int_t, std::vector< Int_t > >::iterator fModuleDigiMapIt
Definition CbmTrdQa.h:81
TH1I * fClusterSize
Definition CbmTrdQa.h:171
TH1F * fdEdxHit
Definition CbmTrdQa.h:162
TClonesArray * fMCTracks
Definition CbmTrdQa.h:63
Double_t fTriggerThreshold
Definition CbmTrdQa.h:111
TH1I * fDigiPerCluster
Definition CbmTrdQa.h:173
Bool_t fP
Definition CbmTrdQa.h:118
CbmTrdGeoHandler * fGeoHandler
Definition CbmTrdQa.h:70
void Register()
std::map< Int_t, TH1I * >::iterator fModuledEdxMapIt
Definition CbmTrdQa.h:97
TH2F * fStsTrdPoints
Definition CbmTrdQa.h:125
TH1F * fdEdxElectronMc
Definition CbmTrdQa.h:167
virtual void FinishTask()
void NormalizeHistos()
TH2I * fMultiHitSamePadPerMcTrack_motherzBirth
Definition CbmTrdQa.h:144
TClonesArray * fPoints
Definition CbmTrdQa.h:64
std::map< Int_t, TH1I * >::iterator fModuleGhostMapIt
Definition CbmTrdQa.h:105
TProfile * fLostPointVsAlpha
Definition CbmTrdQa.h:184
TProfile * fMultiHitsVsR
Definition CbmTrdQa.h:178
TH1F * fdEdxPoint
Definition CbmTrdQa.h:159
std::map< Int_t, TH1I * > fModuleAveragePointsMap
Definition CbmTrdQa.h:88
TH1I * fPointsPerDigi
Definition CbmTrdQa.h:172
void GetPadInfos(Int_t moduleAddress, Double_t x, Double_t y, Int_t &iCol, Int_t &iRow, Double_t &padSizeX, Double_t &padSizeY)
void CreateLayerView()
std::map< Int_t, TH1I * > fModuleLostMap
Definition CbmTrdQa.h:106
TH1I * fMultiHitSamePadPerMcTrack_angle
Definition CbmTrdQa.h:140
TH1F * fdEdxPionMc
Definition CbmTrdQa.h:164
TClonesArray * fClusters
Definition CbmTrdQa.h:66
TH1F * fdEdxDigi
Definition CbmTrdQa.h:160
Bool_t fT
Definition CbmTrdQa.h:117
TH2F * fTrdPointsPerMcTrack_P
Definition CbmTrdQa.h:135
virtual void FinishEvent()
std::map< Int_t, TCanvas * > fLayerMap
Definition CbmTrdQa.h:71
TH2F * fTrdTofPoints[11]
Definition CbmTrdQa.h:130
std::map< Int_t, TH1I * > fModuleDeltaEMap
Definition CbmTrdQa.h:102
std::map< Int_t, TH1I * >::iterator fModuleTrackableMapIt
Definition CbmTrdQa.h:93
TProfile * fGhostPointsVsR
Definition CbmTrdQa.h:177
std::map< Int_t, TH1I * >::iterator fModuleMultiPointMapIt
Definition CbmTrdQa.h:101
std::map< Int_t, TH1I * > fModuleTrackableMap
Definition CbmTrdQa.h:92
ClassDef(CbmTrdQa, 1)
CbmTrdParSetDigi * fDigiPar
Definition CbmTrdQa.h:68
std::map< Int_t, std::vector< Int_t > > fModuleClusterMap
Definition CbmTrdQa.h:82
TProfile * fHitToPointEfficiencyVsAlpha
Definition CbmTrdQa.h:185
TH2I * fMultiHitAdjacentPadPerMcTrack_motherPID
Definition CbmTrdQa.h:151
std::shared_ptr< CbmTrdRadiator > fRadiator
Definition CbmTrdQa.h:190
TProfile * fMultiPointssVsR
Definition CbmTrdQa.h:176
Double_t CalcAngle(const CbmTrdPoint *pointA, const CbmTrdPoint *pointB)
std::map< Int_t, TH2I * >::iterator fLayerPointMapIt
Definition CbmTrdQa.h:74
std::map< Int_t, std::vector< Int_t > > fModulePointMap
Definition CbmTrdQa.h:78
CbmTrdQa(std::shared_ptr< CbmTrdRadiator > radiator=nullptr)
Definition CbmTrdQa.cxx:59
Bool_t fTrianglePads
Definition CbmTrdQa.h:122
TH1F * fdEdxElectronHit
Definition CbmTrdQa.h:168
virtual InitStatus ReInit()
Definition CbmTrdQa.cxx:326
std::map< Int_t, TH1I * >::iterator fModuleTracklengthMapIt
Definition CbmTrdQa.h:99
std::map< Int_t, TH1I * >::iterator fModuleEfficiencyMapIt
Definition CbmTrdQa.h:109
std::map< Int_t, TH1I * >::iterator fModuleClusterSizeMapIt
Definition CbmTrdQa.h:95
TH2F * fTrdPointsPerMcTrack_PT
Definition CbmTrdQa.h:134
std::map< Int_t, TH1I * > fModuleClusterSizeMap
Definition CbmTrdQa.h:94
TH1F * fdEdxCluster
Definition CbmTrdQa.h:161
TH1F * fdEdxPionGhost
Definition CbmTrdQa.h:166
TString fGeo
Definition CbmTrdQa.h:112
Bool_t fD
Definition CbmTrdQa.h:116
TH2F * fStsMuchPoints
Definition CbmTrdQa.h:126
TH2F * fStsTofPoints
Definition CbmTrdQa.h:127
virtual void Exec(Option_t *option)
Definition CbmTrdQa.cxx:734
TH2F * fStsTrdPointsTrackable
Definition CbmTrdQa.h:132
TH2I * fPRF_2D
Definition CbmTrdQa.h:187
TProfile * fLostPointVsR
Definition CbmTrdQa.h:180
std::map< Int_t, std::vector< Int_t > > fModuleHitMap
Definition CbmTrdQa.h:84
TH1I * fDistanceMcToHitAll
Definition CbmTrdQa.h:154
std::map< Int_t, TH1I * > fModuleTrackableMap2
Definition CbmTrdQa.h:90
TH2F * fTrdTrackCrossedRadiator
Definition CbmTrdQa.h:137
TH2I * fMultiHitSamePadPerMcTrack_zBirth
Definition CbmTrdQa.h:141
std::map< Int_t, TH1I * > fModuledEdxMap
Definition CbmTrdQa.h:96
CbmTrdQa & operator=(const CbmTrdQa &)
TProfile * fMultiHitsVsAlpha
Definition CbmTrdQa.h:182
TPolyLine * CreateTriangularPad(Int_t column, Int_t row, Double_t content)
Definition CbmTrdQa.cxx:720
TClonesArray * fHits
Definition CbmTrdQa.h:67
std::map< Int_t, std::vector< Int_t > >::iterator fModuleClusterMapIt
Definition CbmTrdQa.h:83
TH2F * fMuchTofPoints[11]
Definition CbmTrdQa.h:129
TH1F * fdEdxPionHit
Definition CbmTrdQa.h:165
TH1I * fPositionResolutionShort
Definition CbmTrdQa.h:156
virtual InitStatus Init()
Definition CbmTrdQa.cxx:335
Bool_t fH
Definition CbmTrdQa.h:120
TH1I * fMultiHitAdjacentPadPerMcTrack
Definition CbmTrdQa.h:146
TH2I * fLayerDummy
Definition CbmTrdQa.h:124
TH1I * fPositionResolutionLong
Definition CbmTrdQa.h:157
TH2I * fMultiHitAdjacentPadPerMcTrack_PID
Definition CbmTrdQa.h:149
std::map< Int_t, TH2I * > fLayerHitMap
Definition CbmTrdQa.h:75
TH2I * fMultiHitSamePadPerMcTrack_motherPID
Definition CbmTrdQa.h:143
std::map< Int_t, TH1I * > fModuleMultiPointMap
Definition CbmTrdQa.h:100
std::map< Int_t, TH1I * >::iterator fModuleTrackableMap2It
Definition CbmTrdQa.h:91
TH1F * fdEdxElectronGhost
Definition CbmTrdQa.h:169
virtual void SetParContainers()
Definition CbmTrdQa.cxx:317
std::map< Int_t, std::vector< Int_t > >::iterator fModuleHitMapIt
Definition CbmTrdQa.h:85
std::map< Int_t, std::vector< Int_t > > fModuleDigiMap
Definition CbmTrdQa.h:80
void SetTriangularPads(Bool_t triangles)
TProfile * fGhostHitVsAlpha
Definition CbmTrdQa.h:183