CbmRoot
CbmMuchHitFinderQa.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMuchHitFinderQa header file -----
3 // ----- Modified 01/18 by Vikas Singhal -----
4 // ----- Created 16/11/07 by E. Kryshen -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef CbmMuchHitFinderQa_H
8 #define CbmMuchHitFinderQa_H
9 
10 #include "FairTask.h"
11 
12 #include "CbmMuchDigi.h"
13 #include "TClonesArray.h"
14 #include "TH1.h"
15 #include "TH2.h"
16 #include "TString.h"
17 
18 class CbmDigiManager;
19 class CbmMuchGeoScheme;
20 class TObjArray;
21 class TVector2;
22 
23 Double_t LandauMPV(Double_t* x, Double_t* par);
24 Double_t MPV_n_e(Double_t Tkin, Double_t mass);
25 
26 class CbmMuchHitFinderQa : public FairTask {
27 
28 public:
29  CbmMuchHitFinderQa(const char* name = "MuchHitFinderQa", Int_t verbose = 1);
30  virtual ~CbmMuchHitFinderQa();
31  virtual InitStatus Init();
32  virtual void Exec(Option_t* option);
33  virtual void FinishTask();
34  virtual void SetParContainers();
35  void SetGeoFileName(TString fileName) { fGeoFileName = fileName; }
36  void SetPerformanceFileName(TString fileName) { fFileName = fileName; }
37  void SetGeometryID(Int_t flag) { fFlag = flag; }
38 
39  void SetPullsQa(Bool_t on) { fPullsQaOn = on; }
40  void SetOccupancyQa(Bool_t on) { fOccupancyQaOn = on; }
41  void SetDigitizerQa(Bool_t on) { fDigitizerQaOn = on; }
42  void SetStatisticsQa(Bool_t on) { fStatisticsQaOn = on; }
43  void SetClusterDeconvQa(Bool_t on) { fClusterDeconvQaOn = on; }
44 
45 
46  void SetPrintToFile(Bool_t on) { fPrintToFileOn = on; }
47 
48 protected:
49  /* Analysis of hit uncertainty (pull) distributions
50  * as function of pad size and cluster shape
51  */
52  void PullsQa();
53 
54  /* Occupance analysis - all pads,fired pads,
55  * and fired/all distributions as functions of radius
56  */
57  void OccupancyQa();
58 
59  /* DigitizerQa - analysis of digitizer performance - charge distributions
60  * for tracks. Track length distrivutions. Statistics on particle types
61  */
62  void DigitizerQa();
63 
64  /* Information on clusters - number of pads in a cluster, number of points, contributed to
65  * a cluster, number of hits, created from a cluster
66  */
67  void StatisticsQa();
68 
69  /* Number of points and hits in a cluster for signal muons (MotherId = 0) */
70  void ClusterDeconvQa();
71 
72 private:
74  TString fGeoFileName;
75  TString fFileName;
76  Int_t fSignalPoints; // Number of signal MC points
77  Int_t fSignalHits; // Number of signal hits
78  Int_t fVerbose;
79  Int_t fEvent;
80  Int_t fFlag;
81  TClonesArray* fPoints;
82  TClonesArray* fDigis;
84  TClonesArray* fDigiMatches;
85  TClonesArray* fClusters;
86  TClonesArray* fHits;
87  TClonesArray* fMCTracks;
88  TClonesArray* fPointInfos;
89 
90  Int_t fNstations;
91 
92  TObjArray* fChargeHistos;
101  // TH1D* fhCharge;
102  TH1D* fhChargeLog;
104  TH2D* fhNpadsVsS;
105 
106  TH1D** fhCharge;
107  TH1D** fhOccupancyR;
108  TH1D** fhPadsTotalR;
109  TH1D** fhPadsFiredR;
110  TH1D** fhPullXpads1;
111  TH1D** fhPullYpads1;
112  TH1D** fhPullXpads2;
113  TH1D** fhPullYpads2;
114  TH1D** fhPullXpads3;
115  TH1D** fhPullYpads3;
116  Int_t fnPadSizesX;
117  Int_t fnPadSizesY;
118 
119  //TH1D** fhPullT;
121  //1D Histogram for PULL Distribution
122  TH1D* fhPullX;
123  TH1D* fhPullY;
124  TH1D* fhPullT;
125 
126  //1D Histogram for Residual Distribution
127  TH1D* fhResidualX;
128  TH1D* fhResidualY;
129  TH1D* fhResidualT;
130 
134 
135  Int_t* fNall; // number of all tracks at the first station
136  Int_t* fNpr; // number of protons at the first station
137  Int_t* fNpi; // number of pions at the first station
138  Int_t* fNel; // number of electrons at the first station
139  Int_t* fNmu; // number of muons at the first station
140  Int_t* fNka; // number of kaons at the first station
141  Int_t* fNprimary; // number of primary tracks at the first station
142  Int_t* fNsecondary; // number of secondary tracks at the first station
143 
147 
149  Bool_t fPullsQaOn;
153 
155 
156  Double_t fPadMinLx;
157  Double_t fPadMinLy;
158  Double_t fPadMaxLx;
159  Double_t fPadMaxLy;
160 
161  FILE* pointsFile;
162  FILE* padsFile;
163 
165  Bool_t IsSignalPoint(Int_t iPoint);
166 
167  Int_t GetNChannels(Int_t iStation);
168  Int_t GetNSectors(Int_t iStation);
169  TVector2 GetMinPadSize(Int_t iStation);
170  TVector2 GetMaxPadSize(Int_t iStation);
171 
174 
175  ClassDef(CbmMuchHitFinderQa, 1)
176 };
177 
178 #endif
CbmMuchHitFinderQa::fNpi
Int_t * fNpi
Definition: CbmMuchHitFinderQa.h:137
CbmMuchHitFinderQa::GetNChannels
Int_t GetNChannels(Int_t iStation)
Definition: CbmMuchHitFinderQa.cxx:1552
CbmMuchHitFinderQa::fNall
Int_t * fNall
Definition: CbmMuchHitFinderQa.h:135
CbmMuchHitFinderQa::fPointsOverCounted
Int_t fPointsOverCounted
Definition: CbmMuchHitFinderQa.h:146
CbmMuchHitFinderQa::fStatisticsQaOn
Bool_t fStatisticsQaOn
Definition: CbmMuchHitFinderQa.h:151
CbmMuchHitFinderQa::FinishTask
virtual void FinishTask()
Definition: CbmMuchHitFinderQa.cxx:540
CbmMuchDigi.h
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchHitFinderQa::fNel
Int_t * fNel
Definition: CbmMuchHitFinderQa.h:138
CbmMuchHitFinderQa::CbmMuchHitFinderQa
CbmMuchHitFinderQa(const CbmMuchHitFinderQa &)
CbmMuchHitFinderQa::fVerbose
Int_t fVerbose
Definition: CbmMuchHitFinderQa.h:78
CbmMuchHitFinderQa::fNprimary
Int_t * fNprimary
Definition: CbmMuchHitFinderQa.h:141
CbmMuchHitFinderQa::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchHitFinderQa.cxx:470
CbmMuchHitFinderQa::fDigiManager
CbmDigiManager * fDigiManager
Definition: CbmMuchHitFinderQa.h:83
CbmMuchHitFinderQa::fhPullY
TH1D * fhPullY
Definition: CbmMuchHitFinderQa.h:123
CbmMuchHitFinderQa::fDigis
TClonesArray * fDigis
Definition: CbmMuchHitFinderQa.h:82
CbmMuchHitFinderQa::padsFile
FILE * padsFile
Definition: CbmMuchHitFinderQa.h:162
CbmMuchHitFinderQa::fNpr
Int_t * fNpr
Definition: CbmMuchHitFinderQa.h:136
CbmMuchHitFinderQa::SetGeoFileName
void SetGeoFileName(TString fileName)
Definition: CbmMuchHitFinderQa.h:35
CbmMuchHitFinderQa::fPointInfos
TClonesArray * fPointInfos
Definition: CbmMuchHitFinderQa.h:88
CbmMuchHitFinderQa::fhChargeEnergyLog
TH2D * fhChargeEnergyLog
Definition: CbmMuchHitFinderQa.h:93
CbmMuchHitFinderQa::fNka
Int_t * fNka
Definition: CbmMuchHitFinderQa.h:140
CbmMuchHitFinderQa::fhResidualY
TH1D * fhResidualY
Definition: CbmMuchHitFinderQa.h:128
CbmMuchHitFinderQa::CbmMuchHitFinderQa
CbmMuchHitFinderQa(const char *name="MuchHitFinderQa", Int_t verbose=1)
Definition: CbmMuchHitFinderQa.cxx:55
CbmMuchHitFinderQa::IsSignalPoint
Bool_t IsSignalPoint(Int_t iPoint)
Definition: CbmMuchHitFinderQa.cxx:1527
CbmMuchHitFinderQa::SetOccupancyQa
void SetOccupancyQa(Bool_t on)
Definition: CbmMuchHitFinderQa.h:40
CbmMuchHitFinderQa::fhChargeTrackLengthEl
TH2D * fhChargeTrackLengthEl
Definition: CbmMuchHitFinderQa.h:100
MPV_n_e
Double_t MPV_n_e(Double_t Tkin, Double_t mass)
Definition: CbmMuchHitFinderQa.cxx:1620
CbmMuchHitFinderQa::fPointsUnderCounted
Int_t fPointsUnderCounted
Definition: CbmMuchHitFinderQa.h:145
CbmMuchHitFinderQa::fhChargePr_1GeV_3mm
TH1D * fhChargePr_1GeV_3mm
Definition: CbmMuchHitFinderQa.h:103
CbmMuchHitFinderQa::fGeoScheme
CbmMuchGeoScheme * fGeoScheme
Definition: CbmMuchHitFinderQa.h:73
CbmMuchHitFinderQa::fhPullYpads3
TH1D ** fhPullYpads3
Definition: CbmMuchHitFinderQa.h:115
CbmMuchHitFinderQa::SetClusterDeconvQa
void SetClusterDeconvQa(Bool_t on)
Definition: CbmMuchHitFinderQa.h:43
CbmMuchHitFinderQa::fhNpadsVsS
TH2D * fhNpadsVsS
Definition: CbmMuchHitFinderQa.h:104
CbmMuchHitFinderQa::fhPointsInCluster
TH1I ** fhPointsInCluster
Definition: CbmMuchHitFinderQa.h:131
CbmMuchHitFinderQa::fOccupancyQaOn
Bool_t fOccupancyQaOn
Definition: CbmMuchHitFinderQa.h:148
CbmMuchHitFinderQa::fhChargeTrackLength
TH2D * fhChargeTrackLength
Definition: CbmMuchHitFinderQa.h:97
CbmMuchHitFinderQa::fSignalHits
Int_t fSignalHits
Definition: CbmMuchHitFinderQa.h:77
CbmMuchHitFinderQa::OccupancyQa
void OccupancyQa()
Definition: CbmMuchHitFinderQa.cxx:1222
CbmMuchHitFinderQa::fhChargeEnergyLogEl
TH2D * fhChargeEnergyLogEl
Definition: CbmMuchHitFinderQa.h:96
CbmMuchHitFinderQa::fPullsQaOn
Bool_t fPullsQaOn
Definition: CbmMuchHitFinderQa.h:149
CbmMuchHitFinderQa::fhChargeLog
TH1D * fhChargeLog
Definition: CbmMuchHitFinderQa.h:102
CbmMuchHitFinderQa::fhPullT
TH1D * fhPullT
Definition: CbmMuchHitFinderQa.h:124
CbmMuchHitFinderQa::fhChargeTrackLengthPi
TH2D * fhChargeTrackLengthPi
Definition: CbmMuchHitFinderQa.h:98
CbmMuchHitFinderQa::fhDigisInCluster
TH1I ** fhDigisInCluster
Definition: CbmMuchHitFinderQa.h:132
CbmMuchHitFinderQa::pointsFile
FILE * pointsFile
Definition: CbmMuchHitFinderQa.h:161
CbmMuchHitFinderQa::fNmu
Int_t * fNmu
Definition: CbmMuchHitFinderQa.h:139
CbmMuchHitFinderQa::fDigiMatches
TClonesArray * fDigiMatches
Definition: CbmMuchHitFinderQa.h:84
CbmMuchHitFinderQa::fhPullXpads3
TH1D ** fhPullXpads3
Definition: CbmMuchHitFinderQa.h:114
CbmMuchHitFinderQa
Definition: CbmMuchHitFinderQa.h:26
CbmMuchHitFinderQa::fPadMinLy
Double_t fPadMinLy
Definition: CbmMuchHitFinderQa.h:157
CbmMuchHitFinderQa::GetMinPadSize
TVector2 GetMinPadSize(Int_t iStation)
Definition: CbmMuchHitFinderQa.cxx:1580
CbmMuchHitFinderQa::fhChargeEnergyLogPr
TH2D * fhChargeEnergyLogPr
Definition: CbmMuchHitFinderQa.h:95
CbmMuchHitFinderQa::fGeoFileName
TString fGeoFileName
Definition: CbmMuchHitFinderQa.h:74
CbmMuchHitFinderQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmMuchHitFinderQa.cxx:481
CbmMuchHitFinderQa::fPrintToFileOn
Bool_t fPrintToFileOn
Definition: CbmMuchHitFinderQa.h:154
CbmMuchHitFinderQa::fPadMinLx
Double_t fPadMinLx
Definition: CbmMuchHitFinderQa.h:156
CbmMuchHitFinderQa::fhPullX
TH1D * fhPullX
Definition: CbmMuchHitFinderQa.h:122
CbmMuchHitFinderQa::fhResidualT
TH1D * fhResidualT
Definition: CbmMuchHitFinderQa.h:129
CbmMuchHitFinderQa::fhPullXpads2
TH1D ** fhPullXpads2
Definition: CbmMuchHitFinderQa.h:112
CbmMuchHitFinderQa::fPoints
TClonesArray * fPoints
Definition: CbmMuchHitFinderQa.h:81
CbmMuchHitFinderQa::fhPullYpads1
TH1D ** fhPullYpads1
Definition: CbmMuchHitFinderQa.h:111
CbmMuchHitFinderQa::fChargeHistos
TObjArray * fChargeHistos
Definition: CbmMuchHitFinderQa.h:92
CbmMuchHitFinderQa::fSignalPoints
Int_t fSignalPoints
Definition: CbmMuchHitFinderQa.h:76
CbmMuchHitFinderQa::fhPullXpads1
TH1D ** fhPullXpads1
Definition: CbmMuchHitFinderQa.h:110
CbmMuchHitFinderQa::fFlag
Int_t fFlag
Definition: CbmMuchHitFinderQa.h:80
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMuchHitFinderQa::SetGeometryID
void SetGeometryID(Int_t flag)
Definition: CbmMuchHitFinderQa.h:37
CbmMuchHitFinderQa::fNstations
Int_t fNstations
Definition: CbmMuchHitFinderQa.h:90
CbmMuchHitFinderQa::fnPadSizesX
Int_t fnPadSizesX
Definition: CbmMuchHitFinderQa.h:116
CbmMuchHitFinderQa::fClusters
TClonesArray * fClusters
Definition: CbmMuchHitFinderQa.h:85
CbmMuchHitFinderQa::fPadMaxLy
Double_t fPadMaxLy
Definition: CbmMuchHitFinderQa.h:159
CbmMuchHitFinderQa::PullsQa
void PullsQa()
Definition: CbmMuchHitFinderQa.cxx:1325
CbmMuchHitFinderQa::SetPerformanceFileName
void SetPerformanceFileName(TString fileName)
Definition: CbmMuchHitFinderQa.h:36
LandauMPV
Double_t LandauMPV(Double_t *x, Double_t *par)
Definition: CbmMuchHitFinderQa.cxx:1047
CbmMuchHitFinderQa::fhPadsTotalR
TH1D ** fhPadsTotalR
Definition: CbmMuchHitFinderQa.h:108
CbmMuchHitFinderQa::fhChargeEnergyLogPi
TH2D * fhChargeEnergyLogPi
Definition: CbmMuchHitFinderQa.h:94
CbmMuchHitFinderQa::GetMaxPadSize
TVector2 GetMaxPadSize(Int_t iStation)
Definition: CbmMuchHitFinderQa.cxx:1600
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchHitFinderQa::SetPullsQa
void SetPullsQa(Bool_t on)
Definition: CbmMuchHitFinderQa.h:39
CbmMuchHitFinderQa::fPadMaxLx
Double_t fPadMaxLx
Definition: CbmMuchHitFinderQa.h:158
CbmMuchHitFinderQa::fhCharge
TH1D ** fhCharge
Definition: CbmMuchHitFinderQa.h:106
CbmMuchHitFinderQa::fFileName
TString fFileName
Definition: CbmMuchHitFinderQa.h:75
CbmMuchHitFinderQa::fMCTracks
TClonesArray * fMCTracks
Definition: CbmMuchHitFinderQa.h:87
CbmMuchHitFinderQa::fPointsTotal
Int_t fPointsTotal
Definition: CbmMuchHitFinderQa.h:144
CbmMuchHitFinderQa::fClusterDeconvQaOn
Bool_t fClusterDeconvQaOn
Definition: CbmMuchHitFinderQa.h:152
CbmMuchHitFinderQa::StatisticsQa
void StatisticsQa()
Definition: CbmMuchHitFinderQa.cxx:1251
CbmMuchHitFinderQa::fhResidualX
TH1D * fhResidualX
Definition: CbmMuchHitFinderQa.h:127
CbmMuchHitFinderQa::fhChargeTrackLengthPr
TH2D * fhChargeTrackLengthPr
Definition: CbmMuchHitFinderQa.h:99
CbmMuchHitFinderQa::fNTimingPulls
Int_t fNTimingPulls
Definition: CbmMuchHitFinderQa.h:120
CbmMuchHitFinderQa::operator=
CbmMuchHitFinderQa & operator=(const CbmMuchHitFinderQa &)
CbmMuchHitFinderQa::Init
virtual InitStatus Init()
Definition: CbmMuchHitFinderQa.cxx:142
CbmMuchHitFinderQa::fhHitsInCluster
TH1I ** fhHitsInCluster
Definition: CbmMuchHitFinderQa.h:133
CbmMuchHitFinderQa::DigitizerQa
void DigitizerQa()
Definition: CbmMuchHitFinderQa.cxx:1059
CbmMuchHitFinderQa::SetDigitizerQa
void SetDigitizerQa(Bool_t on)
Definition: CbmMuchHitFinderQa.h:41
CbmMuchHitFinderQa::fhPadsFiredR
TH1D ** fhPadsFiredR
Definition: CbmMuchHitFinderQa.h:109
CbmMuchHitFinderQa::SetPrintToFile
void SetPrintToFile(Bool_t on)
Definition: CbmMuchHitFinderQa.h:46
CbmMuchHitFinderQa::fhPullYpads2
TH1D ** fhPullYpads2
Definition: CbmMuchHitFinderQa.h:113
CbmMuchHitFinderQa::fnPadSizesY
Int_t fnPadSizesY
Definition: CbmMuchHitFinderQa.h:117
CbmMuchHitFinderQa::fNsecondary
Int_t * fNsecondary
Definition: CbmMuchHitFinderQa.h:142
CbmMuchHitFinderQa::ClusterDeconvQa
void ClusterDeconvQa()
Definition: CbmMuchHitFinderQa.cxx:1491
CbmMuchHitFinderQa::fhOccupancyR
TH1D ** fhOccupancyR
Definition: CbmMuchHitFinderQa.h:107
CbmMuchHitFinderQa::fEvent
Int_t fEvent
Definition: CbmMuchHitFinderQa.h:79
CbmMuchHitFinderQa::fHits
TClonesArray * fHits
Definition: CbmMuchHitFinderQa.h:86
CbmMuchHitFinderQa::fDigitizerQaOn
Bool_t fDigitizerQaOn
Definition: CbmMuchHitFinderQa.h:150
CbmMuchHitFinderQa::GetNSectors
Int_t GetNSectors(Int_t iStation)
Definition: CbmMuchHitFinderQa.cxx:1566
CbmMuchHitFinderQa::SetStatisticsQa
void SetStatisticsQa(Bool_t on)
Definition: CbmMuchHitFinderQa.h:42
CbmMuchHitFinderQa::~CbmMuchHitFinderQa
virtual ~CbmMuchHitFinderQa()
Definition: CbmMuchHitFinderQa.cxx:137