]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrDep/AliAnaCalorimeterQA.h
Fix for DA's
[u/mrichter/AliRoot.git] / PWG4 / PartCorrDep / AliAnaCalorimeterQA.h
CommitLineData
9725fd2a 1#ifndef ALIANACALORIMETERQA_H
2#define ALIANACALORIMETERQA_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5/* $Id: $ */
6
7//_________________________________________________________________________
8// Class to check results from simulations or reconstructed real data.
9// Fill few histograms and do some checking plots
10//
2302a644 11//-- Author: Gustavo Conesa (INFN-LNF)
9725fd2a 12
13// --- Root system ---
a5fafd85 14class TH3F;
9725fd2a 15class TH2F;
16class TH1F;
0c1383b5 17class TObjString;
9725fd2a 18
19// --- Analysis system ---
c8fe2783 20class AliVCaloCluster;
21class AliVTrack;
a5fafd85 22
9725fd2a 23#include "AliAnaPartCorrBaseClass.h"
24
25class AliAnaCalorimeterQA : public AliAnaPartCorrBaseClass {
26
2302a644 27public:
78219bac 28 AliAnaCalorimeterQA() ; // default ctor
29 virtual ~AliAnaCalorimeterQA() {;} //virtual dtor
2302a644 30private:
9725fd2a 31 AliAnaCalorimeterQA & operator = (const AliAnaCalorimeterQA & g) ;//cpy assignment
78219bac 32 AliAnaCalorimeterQA(const AliAnaCalorimeterQA & g) ; // cpy ctor
33
eb5a51ae 34public:
9725fd2a 35
521636d2 36 // General methods
37
0c1383b5 38 TObjString * GetAnalysisCuts();
521636d2 39
40 TList * GetCreateOutputObjects();
2302a644 41
521636d2 42 void Init();
9725fd2a 43
521636d2 44 void InitParameters();
45
46 void MakeAnalysisFillHistograms() ;
2302a644 47
521636d2 48 void Print(const Option_t * opt) const;
924e319f 49
521636d2 50 // Main methods
9725fd2a 51
e1e62b89 52 void ClusterHistograms(const TLorentzVector mom, Float_t *pos,
521636d2 53 const Int_t nCaloCellsPerCluster, const Int_t nModule,
256822f1 54 const Bool_t matched, const AliVTrack* track,
521636d2 55 const Int_t * labels, const Int_t nLabels);
56
57 void Correlate();
58
9e9f04cb 59 void FillCellPositionHistograms(const Int_t nCaloCellsPerCluster, const UShort_t * indexList,
60 const Float_t pos[3], const Float_t clEnergy);
61
521636d2 62 void MCHistograms(const TLorentzVector mom, const Int_t pdg);
a6f26052 63
521636d2 64 // Setters and Getters
65
55c05f8c 66
521636d2 67 Float_t GetEMCALCellAmpMin() const { return fEMCALCellAmpMin ; }
68 void SetEMCALCellAmpMin(Float_t amp) { fEMCALCellAmpMin = amp ; }
a6f26052 69
521636d2 70 Float_t GetPHOSCellAmpMin() const { return fPHOSCellAmpMin ; }
71 void SetPHOSCellAmpMin (Float_t amp) { fPHOSCellAmpMin = amp ; }
72
73 TString GetCalorimeter() const { return fCalorimeter ; }
74 void SetCalorimeter(TString calo) { fCalorimeter = calo ; }
f16a7271 75
521636d2 76 void SetNumberOfModules(Int_t nmod) { fNModules = nmod ; }
55c05f8c 77
521636d2 78 Double_t GetTimeCutMin() const { return fTimeCutMin ; }
79 Double_t GetTimeCutMax() const { return fTimeCutMax ; }
80 void SetTimeCut(Double_t min, Double_t max) {
81 fTimeCutMin = min ; fTimeCutMax = max ; }
17708df9 82
521636d2 83 // Histogram Switchs
2302a644 84
521636d2 85 void SwitchOnFillAllPositionHistogram() { fFillAllPosHisto = kTRUE ; }
86 void SwitchOffFillAllPositionHistogram() { fFillAllPosHisto = kFALSE ; }
2302a644 87
521636d2 88 void SwitchOnFillAllPositionHistogram2() { fFillAllPosHisto2 = kTRUE ; }
89 void SwitchOffFillAllPositionHistogram2() { fFillAllPosHisto2 = kFALSE ; }
2302a644 90
521636d2 91 void SwitchOnFillAllTH12Histogram() { fFillAllTH12 = kTRUE ; }
92 void SwitchOffFillAllTH12Histogram() { fFillAllTH12 = kFALSE ; }
2302a644 93
521636d2 94 void SwitchOnFillAllTH3Histogram() { fFillAllTH3 = kTRUE ; }
95 void SwitchOffFillAllTH3Histogram() { fFillAllTH3 = kFALSE ; }
2302a644 96
521636d2 97 void SwitchOnFillAllTrackMatchingHistogram() { fFillAllTMHisto = kTRUE ; }
98 void SwitchOffFillAllTrackMatchingHistogram() { fFillAllTMHisto = kFALSE ; }
b8187de4 99
521636d2 100 void SwitchOnFillAllPi0Histogram() { fFillAllPi0Histo = kTRUE ; }
101 void SwitchOffFillAllPi0Histogram() { fFillAllPi0Histo = kFALSE ; }
102
103 void SwitchOnCorrelation() { fCorrelate = kTRUE ; }
104 void SwitchOffCorrelation() { fCorrelate = kFALSE ; }
105
9725fd2a 106 private:
107
521636d2 108 TString fCalorimeter ; // Calorimeter selection
521636d2 109 Bool_t fFillAllPosHisto; // Fill all the position related histograms
110 Bool_t fFillAllPosHisto2; // Fill all the position related histograms 2
111 Bool_t fFillAllTH12 ; // Fill simple histograms which information is already in TH3 histograms
112 Bool_t fFillAllTH3 ; // Fill TH3 histograms
113 Bool_t fFillAllTMHisto ; // Fill track matching histograms
114 Bool_t fFillAllPi0Histo ; // Fill track matching histograms
115 Bool_t fCorrelate ; // Correlate PHOS/EMCAL cells/clusters, also with V0 and track multiplicity
35c71d5c 116 Int_t fNModules ; // Number of EMCAL/PHOS modules
117 Int_t fNRCU ; // Number of EMCAL/PHOS RCU
118 Int_t fNMaxCols ; // Number of EMCAL/PHOS rows
119 Int_t fNMaxRows ; // Number of EMCAL/PHOS columns
521636d2 120 Double_t fTimeCutMin ; // Remove clusters/cells with time smaller than this value, in ns
121 Double_t fTimeCutMax ; // Remove clusters/cells with time larger than this value, in ns
122 Float_t fEMCALCellAmpMin; // amplitude Threshold on emcal cells
123 Float_t fPHOSCellAmpMin ; // amplitude Threshold on phos cells
2302a644 124
521636d2 125 //CaloClusters
126 TH1F * fhE ; //! E distribution, Reco
127 TH1F * fhPt ; //! pT distribution, Reco
128 TH1F * fhPhi; //! phi distribution, Reco
129 TH1F * fhEta; //! eta distribution, Reco
130 TH3F * fhEtaPhiE ; //! eta vs phi vs E, Reco
131 TH1F * fhECharged ; //! E distribution, Reco, matched with track
132 TH1F * fhPtCharged ; //! pT distribution, Reco, matched with track
133 TH1F * fhPhiCharged; //! phi distribution, Reco, matched with track
134 TH1F * fhEtaCharged; //! eta distribution, Reco, matched with track
135 TH3F * fhEtaPhiECharged; //! eta vs phi vs E, Reco, matched with track
521636d2 136
137 TH2F * fhIM; //! cluster pairs invariant mass
521636d2 138 TH2F * fhAsym; //! cluster pairs invariant mass
139
3f5990d6 140 TH2F * fhNCellsPerCluster; //! N cells per cluster vs cluster energy vs eta of cluster
715fd81f 141 TH2F * fhNCellsPerClusterNoCut; //! N cells per cluster vs cluster energy vs eta of cluster
3f5990d6 142 TH2F * fhNCellsPerClusterMIP; //! N cells per cluster vs cluster energy vs eta of cluster, finer fixed pT bin for MIP search.
143 TH2F * fhNCellsPerClusterMIPCharged; //! N cells per cluster vs cluster energy vs eta of cluster, finer fixed pT bin for MIP search, cluster matched with track.
521636d2 144
f16a7271 145 TH2F * fhNCellsvsClusterMaxCellDiffE0; //! N cells per cluster vs cluster energy minus max cell, E < 2 GeV
146 TH2F * fhNCellsvsClusterMaxCellDiffE2; //! N cells per cluster vs cluster energy minus max cell, 2< E < 6 GeV
147 TH2F * fhNCellsvsClusterMaxCellDiffE6; //! N cells per cluster vs cluster energy minus max cell, E > 6 GeV
715fd81f 148
521636d2 149 TH1F * fhNClusters; //! Number of clusters
150
151 TH2F * fhClusterTimeEnergy; //! Cluster Time vs Energy
924e319f 152 TH2F * fhCellTimeSpreadRespectToCellMax; //! Difference of the time of cell with maximum dep energy and the rest of cells
9e9f04cb 153 TH2F * fhClusterMaxCellDiffAverageTime; //! Difference between cluster average time and time of cell with more energy
154 TH2F * fhClusterMaxCellDiffWeightTime; //! Difference between cluster weighted average time and time of cell with more energy
35c71d5c 155 TH2F * fhClusterDiffWeightAverTime; //! Difference between cluster weighted average time and average time divided by weighted time
156 TH2F * fhClusterMaxCellDiffAverageNoMaxTime;//! Difference between cluster average time without max cell and time of cell with more energy
157 TH2F * fhClusterMaxCellDiffWeightNoMaxTime; //! Difference between cluster weighted average time without max cell and time of cell with more energy
158 TH2F * fhClusterNoMaxCellWeight; //! energy weight of cells in cluster except maximum cell
521636d2 159 TH1F * fhCellIdCellLargeTimeSpread; //! Cells with large time respect to max (diff > 100 ns)
e1e62b89 160 TH2F * fhClusterPairDiffTimeE; //! Pair of clusters time difference vs E
161
162 TH2F * fhClusterMaxCellCloseCellRatio; //! Ratio between max cell energy and cell energy of the same cluster
924e319f 163 TH2F * fhClusterMaxCellCloseCellDiff; //! Difference between max cell energy and cell energy of the same cluster
164
715fd81f 165 TH2F * fhClusterMaxCellDiff; //! Difference between cluster energy and energy of cell with more energy, good clusters only
166 TH2F * fhClusterMaxCellDiffNoCut; //! Difference between cluster energy and energy of cell with more energy, no bad cluster rejection
715fd81f 167
168 TH2F * fhLambda0vsClusterMaxCellDiffE0; //! Lambda0 of bad cluster vs Fraction of energy of max cell for E < 2, no cut on bad clusters
169 TH2F * fhLambda0vsClusterMaxCellDiffE2; //! Lambda0 of bad cluster vs Fraction of energy of max cell for E > 2, E < 6, no cut on bad clusters
170 TH2F * fhLambda0vsClusterMaxCellDiffE6; //! Lambda0 of bad cluster vs Fraction of energy of max cell for E > 6, no cut on bad clusters
e1e62b89 171
172 TH1F * fhBadClusterEnergy; //! energy of bad cluster
173 TH2F * fhBadClusterTimeEnergy; //! Time Max cell of bad cluster
174 TH2F * fhBadClusterPairDiffTimeE; //! Pair of clusters time difference vs E, bad cluster
521636d2 175 TH2F * fhBadClusterMaxCellCloseCellRatio; //! Ratio between max cell energy and cell energy of the same cluster for bad clusters
4c8f7c2e 176 TH2F * fhBadClusterMaxCellCloseCellDiff ; //! Difference between max cell energy and cell energy of the same cluster for bad clusters
e1e62b89 177 TH2F * fhBadClusterMaxCellDiff; //! Difference between cluster energy and energy of cell with more energy
9e9f04cb 178 TH2F * fhBadClusterMaxCellDiffAverageTime;//! Difference between cluster average time and time of cell with more energy
179 TH2F * fhBadClusterMaxCellDiffWeightTime; //! Difference between cluster weighted average time and time of cell with more energy
35c71d5c 180 TH2F * fhBadClusterDiffWeightAverTime; //! Difference between cluster weighted average time and average time without max cell
181 TH2F * fhBadClusterMaxCellDiffAverageNoMaxTime;//! Difference between cluster average time without max cell and time of cell with more energy
182 TH2F * fhBadClusterMaxCellDiffWeightNoMaxTime; //! Difference between cluster weighted average time without max cell and time of cell with more energy
183 TH2F * fhBadClusterNoMaxCellWeight; //! energy weight of cells in cluster except maximum cell
9e9f04cb 184 TH2F * fhBadCellTimeSpreadRespectToCellMax; //! Difference of the time of cell with maximum dep energy and the rest of cells for bad clusters
185
4c8f7c2e 186 TH2F * fhBadClusterL0; //! Lambda0 for bad clusters
187 TH2F * fhBadClusterL1; //! Lambda1 for bad clusters
188 TH2F * fhBadClusterD; //! Dispersion for bad clusters
189
39de6caa 190 // Cluster cell size
9e9f04cb 191 TH2F * fhDeltaIEtaDeltaIPhiE0[2]; // Difference between max cell index and farthest cell, eta vs phi, E < 2 GeV, with and without matching;
192 TH2F * fhDeltaIEtaDeltaIPhiE2[2]; // Difference between max cell index and farthest cell, eta vs phi, 2 < E < 6 GeV, with and without matching;
193 TH2F * fhDeltaIEtaDeltaIPhiE6[2]; // Difference between max cell index and farthest cell, eta vs phi, E > 6 GeV, with and without matching;
194 TH2F * fhDeltaIA[2]; // Cluster "asymmetry" in cell terms vs E, with and without matching
195 TH2F * fhDeltaIAL0[2]; // Cluster "asymmetry" in cell units vs Lambda0 for E > 0.5 GeV, n cells in cluster > 3, with and without matching
196 TH2F * fhDeltaIAL1[2]; // Cluster "asymmetry" in cell units vs Lambda1 for E > 0.5 GeV, n cells in cluster > 3, with and without matching
197 TH2F * fhDeltaIANCells[2] ; // Cluster "asymmetry" in cell units vs number of cells in cluster for E > 0.5, with and without matching
198 TH2F * fhDeltaIAMC[4]; // Cluster "asymmetry" in cell terms vs E, from MC photon, electron, conversion or hadron
39de6caa 199
200 //Cluster/cell Position
521636d2 201 TH2F * fhRNCells ; //! R=sqrt(x^2+y^2) (cm) cluster distribution vs N cells in cluster
202 TH2F * fhXNCells ; //! X (cm) cluster distribution vs N cells in cluster
203 TH2F * fhYNCells ; //! Y (cm) cluster distribution vs N cells in cluster
204 TH2F * fhZNCells ; //! Z (cm) cluster distribution vs N cells in cluster
0866d83a 205
521636d2 206 TH2F * fhRE ; //! R=sqrt(x^2+y^2) (cm) cluster distribution vs cluster energy
207 TH2F * fhXE ; //! X (cm) cluster distribution vs cluster energy
208 TH2F * fhYE ; //! Y (cm) cluster distribution vs cluster energy
209 TH2F * fhZE ; //! Z (cm) cluster distribution vs cluster energy
210 TH3F * fhXYZ; //! cluster X vs Y vs Z (cm)
0866d83a 211
521636d2 212 TH2F * fhRCellE ; //! R=sqrt(x^2+y^2) (cm) cell distribution vs cell energy
213 TH2F * fhXCellE ; //! X (cm) cell distribution vs cell energy
214 TH2F * fhYCellE ; //! Y (cm) cell distribution vs cell energy
215 TH2F * fhZCellE ; //! Z (cm) cell distribution vs cell energy
216 TH3F * fhXYZCell; //! cell X vs Y vs Z (cm)
217
218 TH2F * fhDeltaCellClusterRNCells ; //! R cluster - R cell distribution (cm) vs N cells in cluster
219 TH2F * fhDeltaCellClusterXNCells ; //! X cluster - X cell distribution (cm) vs N cells in cluster
220 TH2F * fhDeltaCellClusterYNCells ; //! Y cluster - Y cell distribution (cm) vs N cells in cluster
221 TH2F * fhDeltaCellClusterZNCells ; //! Z cluster - Z cell distribution (cm) vs N cells in cluster
0866d83a 222
521636d2 223 TH2F * fhDeltaCellClusterRE ; //! R cluster - R cell distribution (cm) vs cluster energy
224 TH2F * fhDeltaCellClusterXE ; //! X cluster - X cell distribution (cm) vs cluster energy
225 TH2F * fhDeltaCellClusterYE ; //! Y cluster - Y cell distribution (cm) vs cluster energy
226 TH2F * fhDeltaCellClusterZE ; //! Z cluster - Z cell distribution (cm) vs cluster energy
0866d83a 227
9725fd2a 228 //Calo Cells
521636d2 229 TH1F * fhNCells; //! Number of towers/crystals with signal
230 TH1F * fhAmplitude; //! Amplitude measured in towers/crystals
231 TH2F * fhAmpId; //! Amplitude measured in towers/crystals vs id of tower.
232 TH3F * fhEtaPhiAmp; //! eta vs phi vs amplitude, cells
233
234 TH1F * fhTime; //! Time measured in towers/crystals
235 TH2F * fhTimeId; //! Time vs Absolute cell Id
236 TH2F * fhTimeAmp; //! Time vs Amplitude
2302a644 237
a0bb4dc0 238 //Calorimeters Correlation
521636d2 239 TH2F * fhCaloCorrNClusters; //! EMCAL vs PHOS, number of clusters
240 TH2F * fhCaloCorrEClusters; //! EMCAL vs PHOS, total measured cluster energy
241 TH2F * fhCaloCorrNCells; //! EMCAL vs PHOS, number of cells
242 TH2F * fhCaloCorrECells; //! EMCAL vs PHOS, total measured cell energy
a0bb4dc0 243
798a9b04 244 //V0 Correlation
521636d2 245 TH2F * fhCaloV0SCorrNClusters; //! Calo vs V0 signal , number of clusters
246 TH2F * fhCaloV0SCorrEClusters; //! Calo vs V0 signal, total measured cluster energy
247 TH2F * fhCaloV0SCorrNCells; //! Calo vs V0 signal, number of cells
248 TH2F * fhCaloV0SCorrECells; //! Calo vs V0 signal, total measured cell energy
249 TH2F * fhCaloV0MCorrNClusters; //! Calo vs V0 multiplicity , number of clusters
250 TH2F * fhCaloV0MCorrEClusters; //! Calo vs V0 multiplicity, total measured cluster energy
251 TH2F * fhCaloV0MCorrNCells; //! Calo vs V0 multiplicity, number of cells
252 TH2F * fhCaloV0MCorrECells; //! Calo vs V0 multiplicity, total measured cell energy
798a9b04 253
254 //Track Correlation
521636d2 255 TH2F * fhCaloTrackMCorrNClusters; //! Calo vs Track Multiplicity, number of clusters
256 TH2F * fhCaloTrackMCorrEClusters; //! Calo vs Track Multiplicity, total measured cluster energy
257 TH2F * fhCaloTrackMCorrNCells; //! Calo vs V0 Track Multiplicity, number of cells
258 TH2F * fhCaloTrackMCorrECells; //! Calo vs V0 Track Multipliticy, total measured cell energy
798a9b04 259
a5fafd85 260 //Module histograms
35c71d5c 261 TH2F * fhEMod ; //! E distribution for different module, Reco
262 TH2F * fhNClustersMod ; //! Number of clusters for different module, Reco
521636d2 263 TH2F ** fhNCellsPerClusterMod ; //! N cells per clusters different module, Reco
715fd81f 264 TH2F ** fhNCellsPerClusterModNoCut ; //! N cells per clusters different module, Reco, No cut
35c71d5c 265 TH2F * fhNCellsMod ; //! Number of towers/crystals with signal different module, Reco
266 TH2F * fhGridCellsMod ; //! Cells ordered in column/row for different module, Reco
267 TH2F * fhGridCellsEMod ; //! Cells ordered in column/row for different module, weighted with energy, Reco
268 TH2F * fhGridCellsTimeMod ; //! Cells ordered in column/row for different module, weighted with time, Reco
521636d2 269 TH2F ** fhTimeAmpPerRCU; //! Time vs Amplitude measured in towers/crystals different RCU
35c71d5c 270 TH2F ** fhIMMod; //! cluster pairs invariant mass, different module,
c1ac3823 271
715fd81f 272 //Pure MC
35c71d5c 273
274 enum mcTypes {mcPhoton = 0, mcPi0 = 1, mcEta = 2, mcElectron = 3, mcNeHadron = 4, mcChHadron = 5 };
275
276 TH2F * fhRecoMCE[6][2] ; //! E generated particle vs reconstructed E
277 TH2F * fhRecoMCPhi[6][2]; //! phi generated particle vs reconstructed phi
278 TH2F * fhRecoMCEta[6][2]; //! eta generated particle vs reconstructed Eta
279 TH2F * fhRecoMCDeltaE[6][2] ; //! Gen-Reco E generated particle vs reconstructed E
280 TH2F * fhRecoMCDeltaPhi[6][2]; //! Gen-Reco phi generated particle vs reconstructed E
281 TH2F * fhRecoMCDeltaEta[6][2]; //! Gen-Reco eta generated particle vs reconstructed E
282
283 TH1F * fhGenMCE[4] ; //! pt of primary particle
284 TH2F * fhGenMCEtaPhi[4] ; //! eta vs phi of primary particle
285 TH1F * fhGenMCAccE[4] ; //! pt of primary particle, in acceptance
286 TH2F * fhGenMCAccEtaPhi[4] ; //! eta vs phi of primary particle, in acceptance
287
521636d2 288 TH2F * fhEMVxyz ; //! Electromagnetic particle production vertex
289 TH2F * fhEMR ; //! Electromagnetic distance to vertex vs rec energy
290 TH2F * fhHaVxyz ; //! Hadron production vertex
291 TH2F * fhHaR ; //! Hadron distance to vertex vs rec energy
9725fd2a 292
521636d2 293 //Histograms for MC track-matching
35c71d5c 294// TH2F * fh1pOverE; //! p/E for track-cluster matches
295// TH1F * fh1dR; //! distance between projected track and cluster
296// TH2F * fh2EledEdx; //! dE/dx vs. momentum for electron candidates
297// TH2F * fh2MatchdEdx; //! dE/dx vs. momentum for all matches
298//
299// TH2F * fhMCEle1pOverE; //! p/E for track-cluster matches, MC electrons
300// TH1F * fhMCEle1dR; //! distance between projected track and cluster, MC electrons
301// TH2F * fhMCEle2MatchdEdx; //! dE/dx vs. momentum for all matches, MC electrons
302//
303// TH2F * fhMCChHad1pOverE; //! p/E for track-cluster matches, MC charged hadrons
304// TH1F * fhMCChHad1dR; //! distance between projected track and cluster, MC charged hadrons
305// TH2F * fhMCChHad2MatchdEdx; //! dE/dx vs. momentum for all matches, MC charged
306//
307// TH2F * fhMCNeutral1pOverE; //! p/E for track-cluster matches, MC neutral
308// TH1F * fhMCNeutral1dR; //! distance between projected track and cluster, MC neutral
309// TH2F * fhMCNeutral2MatchdEdx; //! dE/dx vs. momentum for all matches, MC neutral
310//
311// TH2F * fh1pOverER02; //! p/E for track-cluster matches, dR > 0.2
312// TH2F * fhMCEle1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC electrons
313// TH2F * fhMCChHad1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC charged hadrons
314// TH2F * fhMCNeutral1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC neutral
06e5656a 315
35c71d5c 316 ClassDef(AliAnaCalorimeterQA,19)
9725fd2a 317} ;
318
319
320#endif //ALIANACALORIMETERQA_H
321
322
323