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 */
7 //_________________________________________________________________________
8 // Class to check results from simulations or reconstructed real data.
9 // Fill few histograms and do some checking plots
11 //-- Author: Gustavo Conesa (INFN-LNF)
13 // --- Root system ---
20 // --- Analysis system ---
22 class AliVCaloCluster;
25 #include "AliAnaPartCorrBaseClass.h"
27 class AliAnaCalorimeterQA : public AliAnaPartCorrBaseClass {
30 AliAnaCalorimeterQA() ; // default ctor
31 virtual ~AliAnaCalorimeterQA() {;} //virtual dtor
33 AliAnaCalorimeterQA & operator = (const AliAnaCalorimeterQA & g) ;//cpy assignment
34 AliAnaCalorimeterQA(const AliAnaCalorimeterQA & g) ; // cpy ctor
40 TObjString * GetAnalysisCuts();
42 TList * GetCreateOutputObjects();
46 void InitParameters();
48 void MakeAnalysisFillHistograms() ;
50 void Print(const Option_t * opt) const;
54 void BadClusterHistograms(AliVCluster* clus, TObjArray *caloClusters, AliVCaloCells * cells,
55 const Int_t absIdMax, const Double_t maxCellFraction, const Double_t tmax,
56 Double_t timeAverages[2]);
58 void CalculateAverageTime(AliVCluster *clus, AliVCaloCells *cells, Double_t timeAverages[2]);
60 void CellHistograms(AliVCaloCells * cells);
62 void CellInClusterPositionHistograms(AliVCluster* cluster);
64 void ClusterAsymmetryHistograms(AliVCluster* clus, const Int_t absIdMax);
66 void ClusterHistograms(AliVCluster* cluster, TObjArray *caloClusters, AliVCaloCells * cells,
67 const Int_t absIdMax, const Double_t maxCellFraction, const Double_t tmax,
68 Double_t timeAverages[2]);
70 void ClusterLoopHistograms(TObjArray * clusters, AliVCaloCells * cells);
72 Bool_t ClusterMCHistograms(const TLorentzVector mom,const Bool_t matched,
73 const Int_t * labels, const Int_t nLabels, Int_t & pdg );
75 void ClusterMatchedWithTrackHistograms(AliVCluster* clus, TLorentzVector mom,
76 const Bool_t mcOK, const Int_t pdg);
80 Float_t GetECross(const Int_t absId, AliVCaloCells* cells);
82 void InvariantMassHistograms(const Int_t iclus, const TLorentzVector mom, const Int_t nModule,
83 TObjArray* caloClusters, AliVCaloCells * cells);
85 Bool_t IsGoodCluster(const Int_t absIdMax, AliVCaloCells *cells);
89 void MCHistograms(const TLorentzVector mom, const Int_t pdg);
91 void RecalibrateCellAmplitude(Float_t & amp, const Int_t absId);
93 void RecalibrateCellTime (Double_t & time, const Int_t absId);
95 void WeightHistograms(AliVCluster *clus, AliVCaloCells* cells);
97 // Setters and Getters
100 Float_t GetEMCALCellAmpMin() const { return fEMCALCellAmpMin ; }
101 void SetEMCALCellAmpMin(Float_t amp) { fEMCALCellAmpMin = amp ; }
103 Float_t GetPHOSCellAmpMin() const { return fPHOSCellAmpMin ; }
104 void SetPHOSCellAmpMin (Float_t amp) { fPHOSCellAmpMin = amp ; }
106 TString GetCalorimeter() const { return fCalorimeter ; }
107 void SetCalorimeter(TString calo) { fCalorimeter = calo ; }
109 void SetNumberOfModules(Int_t nmod) { fNModules = nmod ; }
111 Double_t GetTimeCutMin() const { return fTimeCutMin ; }
112 Double_t GetTimeCutMax() const { return fTimeCutMax ; }
113 void SetTimeCut(Double_t min, Double_t max) {
114 fTimeCutMin = min ; fTimeCutMax = max ; }
118 void SwitchOnFillAllPositionHistogram() { fFillAllPosHisto = kTRUE ; }
119 void SwitchOffFillAllPositionHistogram() { fFillAllPosHisto = kFALSE ; }
121 void SwitchOnFillAllPositionHistogram2() { fFillAllPosHisto2 = kTRUE ; }
122 void SwitchOffFillAllPositionHistogram2() { fFillAllPosHisto2 = kFALSE ; }
124 void SwitchOnFillAllTH12Histogram() { fFillAllTH12 = kTRUE ; }
125 void SwitchOffFillAllTH12Histogram() { fFillAllTH12 = kFALSE ; }
127 void SwitchOnFillAllTH3Histogram() { fFillAllTH3 = kTRUE ; }
128 void SwitchOffFillAllTH3Histogram() { fFillAllTH3 = kFALSE ; }
130 void SwitchOnFillAllTrackMatchingHistogram() { fFillAllTMHisto = kTRUE ; }
131 void SwitchOffFillAllTrackMatchingHistogram() { fFillAllTMHisto = kFALSE ; }
133 void SwitchOnFillAllPi0Histogram() { fFillAllPi0Histo = kTRUE ; }
134 void SwitchOffFillAllPi0Histogram() { fFillAllPi0Histo = kFALSE ; }
136 void SwitchOnCorrelation() { fCorrelate = kTRUE ; }
137 void SwitchOffCorrelation() { fCorrelate = kFALSE ; }
139 void SwitchOnStudyBadClusters() { fStudyBadClusters = kTRUE ; }
140 void SwitchOffStudyBadClusters() { fStudyBadClusters = kFALSE ; }
142 void SwitchOnStudyClustersAsymmetry() { fStudyClustersAsymmetry = kTRUE ; }
143 void SwitchOffStudyClustersAsymmetry() { fStudyClustersAsymmetry = kFALSE ; }
145 void SwitchOnStudyWeight() { fStudyWeight = kTRUE ; }
146 void SwitchOffStudyWeight() { fStudyWeight = kFALSE ; }
151 TString fCalorimeter ; // Calorimeter selection
154 Bool_t fFillAllPosHisto; // Fill all the position related histograms
155 Bool_t fFillAllPosHisto2; // Fill all the position related histograms 2
156 Bool_t fFillAllTH12 ; // Fill simple histograms which information is already in TH3 histograms
157 Bool_t fFillAllTH3 ; // Fill TH3 histograms
158 Bool_t fFillAllTMHisto ; // Fill track matching histograms
159 Bool_t fFillAllPi0Histo ; // Fill track matching histograms
160 Bool_t fCorrelate ; // Correlate PHOS/EMCAL cells/clusters, also with V0 and track multiplicity
161 Bool_t fStudyBadClusters; // Study bad clusters
162 Bool_t fStudyClustersAsymmetry; // Study asymmetry of clusters
163 Bool_t fStudyWeight; // Study the energy weight used in different cluster calculations
166 Int_t fNModules ; // Number of EMCAL/PHOS modules
167 Int_t fNRCU ; // Number of EMCAL/PHOS RCU
168 Int_t fNMaxCols ; // Number of EMCAL/PHOS rows
169 Int_t fNMaxRows ; // Number of EMCAL/PHOS columns
172 Double_t fTimeCutMin ; // Remove clusters/cells with time smaller than this value, in ns
173 Double_t fTimeCutMax ; // Remove clusters/cells with time larger than this value, in ns
174 Float_t fEMCALCellAmpMin; // amplitude Threshold on emcal cells
175 Float_t fPHOSCellAmpMin ; // amplitude Threshold on phos cells
178 TH1F * fhE ; //! E distribution, Reco
179 TH1F * fhPt ; //! pT distribution, Reco
180 TH1F * fhPhi; //! phi distribution, Reco
181 TH1F * fhEta; //! eta distribution, Reco
182 TH3F * fhEtaPhiE ; //! eta vs phi vs E, Reco
183 TH1F * fhECharged ; //! E distribution, Reco, matched with track
184 TH1F * fhPtCharged ; //! pT distribution, Reco, matched with track
185 TH1F * fhPhiCharged; //! phi distribution, Reco, matched with track
186 TH1F * fhEtaCharged; //! eta distribution, Reco, matched with track
187 TH3F * fhEtaPhiECharged; //! eta vs phi vs E, Reco, matched with track
189 TH2F * fhIM; //! cluster pairs invariant mass
190 TH2F * fhAsym; //! cluster pairs invariant mass
192 TH2F * fhNCellsPerCluster; //! N cells per cluster vs cluster energy vs eta of cluster
193 TH2F * fhNCellsPerClusterNoCut; //! N cells per cluster vs cluster energy vs eta of cluster
195 TH1F * fhNClusters; //! Number of clusters
197 TH2F * fhClusterTimeEnergy; //! Cluster Time vs Energy
198 TH2F * fhCellTimeSpreadRespectToCellMax; //! Difference of the time of cell with maximum dep energy and the rest of cells
199 TH1F * fhCellIdCellLargeTimeSpread; //! Cells with large time respect to max (diff > 100 ns)
200 TH2F * fhClusterPairDiffTimeE; //! Pair of clusters time difference vs E
202 TH2F * fhClusterMaxCellCloseCellRatio; //! Ratio between max cell energy and cell energy of the same cluster
203 TH2F * fhClusterMaxCellCloseCellDiff; //! Difference between max cell energy and cell energy of the same cluster
204 TH2F * fhClusterMaxCellDiff; //! Difference between cluster energy and energy of cell with more energy, good clusters only
205 TH2F * fhClusterMaxCellDiffNoCut; //! Difference between cluster energy and energy of cell with more energy, no bad cluster rejection
207 TH2F * fhClusterMaxCellDiffAverageTime; //! Difference between cluster average time and time of cell with more energy
208 TH2F * fhClusterMaxCellDiffWeightedTime; //! Difference between cluster weighted time and time of cell with more energy
209 TH2F * fhClusterMaxCellECross; //! 1 - Energy in cross around max energy cell / max energy cell vs cluster energy, good clusters
211 TH2F * fhLambda0; //! cluster Lambda0 vs Energy
212 TH2F * fhLambda1; //! cluster Lambda1 vs Energy
213 TH2F * fhDispersion; //! cluster Dispersion vs Energy
215 // Bad clusters histograms
216 TH1F * fhBadClusterEnergy; //! energy of bad cluster
217 TH2F * fhBadClusterTimeEnergy; //! Time Max cell of bad cluster
218 TH2F * fhBadClusterPairDiffTimeE; //! Pair of clusters time difference vs E, bad cluster
219 TH2F * fhBadCellTimeSpreadRespectToCellMax; //! Difference of the time of cell with maximum dep energy and the rest of cells for bad clusters
221 TH2F * fhBadClusterMaxCellCloseCellRatio; //! Ratio between max cell energy and cell energy of the same cluster for bad clusters
222 TH2F * fhBadClusterMaxCellCloseCellDiff ; //! Difference between max cell energy and cell energy of the same cluster for bad clusters
223 TH2F * fhBadClusterMaxCellDiff; //! Difference between cluster energy and energy of cell with more energy
225 TH2F * fhBadClusterMaxCellDiffAverageTime; //! Difference between cluster average time and time of cell with more energy
226 TH2F * fhBadClusterMaxCellDiffWeightedTime; //! Difference between cluster weighted time and time of cell with more energy
227 TH2F * fhBadClusterMaxCellECross; //! 1 - Energy in cross around max energy cell / max energy cell vs cluster energy, bad clusters
230 TH2F * fhDeltaIEtaDeltaIPhiE0[2]; //! Difference between max cell index and farthest cell, eta vs phi, E < 2 GeV, with and without matching;
231 TH2F * fhDeltaIEtaDeltaIPhiE2[2]; //! Difference between max cell index and farthest cell, eta vs phi, 2 < E < 6 GeV, with and without matching;
232 TH2F * fhDeltaIEtaDeltaIPhiE6[2]; //! Difference between max cell index and farthest cell, eta vs phi, E > 6 GeV, with and without matching;
233 TH2F * fhDeltaIA[2]; //! Cluster "asymmetry" in cell terms vs E, with and without matching
234 TH2F * fhDeltaIAL0[2]; //! Cluster "asymmetry" in cell units vs Lambda0 for E > 0.5 GeV, n cells in cluster > 3, with and without matching
235 TH2F * fhDeltaIAL1[2]; //! Cluster "asymmetry" in cell units vs Lambda1 for E > 0.5 GeV, n cells in cluster > 3, with and without matching
236 TH2F * fhDeltaIANCells[2] ; //! Cluster "asymmetry" in cell units vs number of cells in cluster for E > 0.5, with and without matching
237 TH2F * fhDeltaIAMC[4]; //! Cluster "asymmetry" in cell terms vs E, from MC photon, electron, conversion or hadron
239 //Cluster/cell Position
240 TH2F * fhRNCells ; //! R=sqrt(x^2+y^2) (cm) cluster distribution vs N cells in cluster
241 TH2F * fhXNCells ; //! X (cm) cluster distribution vs N cells in cluster
242 TH2F * fhYNCells ; //! Y (cm) cluster distribution vs N cells in cluster
243 TH2F * fhZNCells ; //! Z (cm) cluster distribution vs N cells in cluster
245 TH2F * fhRE ; //! R=sqrt(x^2+y^2) (cm) cluster distribution vs cluster energy
246 TH2F * fhXE ; //! X (cm) cluster distribution vs cluster energy
247 TH2F * fhYE ; //! Y (cm) cluster distribution vs cluster energy
248 TH2F * fhZE ; //! Z (cm) cluster distribution vs cluster energy
249 TH3F * fhXYZ; //! cluster X vs Y vs Z (cm)
251 TH2F * fhRCellE ; //! R=sqrt(x^2+y^2) (cm) cell distribution vs cell energy
252 TH2F * fhXCellE ; //! X (cm) cell distribution vs cell energy
253 TH2F * fhYCellE ; //! Y (cm) cell distribution vs cell energy
254 TH2F * fhZCellE ; //! Z (cm) cell distribution vs cell energy
255 TH3F * fhXYZCell; //! cell X vs Y vs Z (cm)
257 TH2F * fhDeltaCellClusterRNCells ; //! R cluster - R cell distribution (cm) vs N cells in cluster
258 TH2F * fhDeltaCellClusterXNCells ; //! X cluster - X cell distribution (cm) vs N cells in cluster
259 TH2F * fhDeltaCellClusterYNCells ; //! Y cluster - Y cell distribution (cm) vs N cells in cluster
260 TH2F * fhDeltaCellClusterZNCells ; //! Z cluster - Z cell distribution (cm) vs N cells in cluster
262 TH2F * fhDeltaCellClusterRE ; //! R cluster - R cell distribution (cm) vs cluster energy
263 TH2F * fhDeltaCellClusterXE ; //! X cluster - X cell distribution (cm) vs cluster energy
264 TH2F * fhDeltaCellClusterYE ; //! Y cluster - Y cell distribution (cm) vs cluster energy
265 TH2F * fhDeltaCellClusterZE ; //! Z cluster - Z cell distribution (cm) vs cluster energy
268 TH1F * fhNCells; //! Number of towers/crystals with signal
269 TH1F * fhAmplitude; //! Amplitude measured in towers/crystals
270 TH2F * fhAmpId; //! Amplitude measured in towers/crystals vs id of tower.
271 TH3F * fhEtaPhiAmp; //! eta vs phi vs amplitude, cells
273 TH1F * fhTime; //! Time measured in towers/crystals
274 TH2F * fhTimeVz; //! Time measured in towers/crystals vs vertex z component, for E > 0.5
275 TH2F * fhTimeId; //! Time vs Absolute cell Id
276 TH2F * fhTimeAmp; //! Time vs Amplitude
278 TH2F * fhCellECross; //! 1 - Energy in cross around cell / cell energy
280 //Calorimeters Correlation
281 TH2F * fhCaloCorrNClusters; //! EMCAL vs PHOS, number of clusters
282 TH2F * fhCaloCorrEClusters; //! EMCAL vs PHOS, total measured cluster energy
283 TH2F * fhCaloCorrNCells; //! EMCAL vs PHOS, number of cells
284 TH2F * fhCaloCorrECells; //! EMCAL vs PHOS, total measured cell energy
287 TH2F * fhCaloV0SCorrNClusters; //! Calo vs V0 signal , number of clusters
288 TH2F * fhCaloV0SCorrEClusters; //! Calo vs V0 signal, total measured cluster energy
289 TH2F * fhCaloV0SCorrNCells; //! Calo vs V0 signal, number of cells
290 TH2F * fhCaloV0SCorrECells; //! Calo vs V0 signal, total measured cell energy
291 TH2F * fhCaloV0MCorrNClusters; //! Calo vs V0 multiplicity , number of clusters
292 TH2F * fhCaloV0MCorrEClusters; //! Calo vs V0 multiplicity, total measured cluster energy
293 TH2F * fhCaloV0MCorrNCells; //! Calo vs V0 multiplicity, number of cells
294 TH2F * fhCaloV0MCorrECells; //! Calo vs V0 multiplicity, total measured cell energy
297 TH2F * fhCaloTrackMCorrNClusters; //! Calo vs Track Multiplicity, number of clusters
298 TH2F * fhCaloTrackMCorrEClusters; //! Calo vs Track Multiplicity, total measured cluster energy
299 TH2F * fhCaloTrackMCorrNCells; //! Calo vs V0 Track Multiplicity, number of cells
300 TH2F * fhCaloTrackMCorrECells; //! Calo vs V0 Track Multipliticy, total measured cell energy
303 TH2F * fhEMod ; //! cluster E distribution for different module, Reco
304 TH2F * fhAmpMod ; //! cell amplitude distribution for different module, Reco
305 TH2F * fhTimeMod ; //! cell time distribution for different module, Reco
306 TH2F * fhNClustersMod ; //! Number of clusters for different module, Reco
307 TH2F * fhNCellsMod ; //! Number of towers/crystals with signal different module, Reco
308 TH2F ** fhNCellsPerClusterMod ; //! N cells per clusters different module, Reco
309 TH2F ** fhNCellsPerClusterModNoCut ; //! N cells per clusters different module, Reco, No cut
310 TH2F * fhGridCells ; //! Cells ordered in column/row for different module, Reco
311 TH2F * fhGridCellsE ; //! Cells ordered in column/row for different module, weighted with energy, Reco
312 TH2F * fhGridCellsTime ; //! Cells ordered in column/row for different module, weighted with time, Reco
313 TH2F ** fhTimeAmpPerRCU; //! Time vs Amplitude measured in towers/crystals different RCU
314 TH2F ** fhIMMod; //! cluster pairs invariant mass, different module,
318 TH2F* fhECellClusterRatio; //! e cell / e cluster vs e cluster
319 TH2F* fhECellClusterLogRatio; //! log (e cell / e cluster) vs e cluster
320 TH2F* fhEMaxCellClusterRatio; //! e max cell / e cluster vs e cluster
321 TH2F* fhEMaxCellClusterLogRatio; //! log (e max cell / e cluster) vs e cluster
323 TH2F* fhLambda0ForW0[14]; //! L0 for 7 defined w0= 3, 3.5 ... 6
324 //TH2F* fhLambda1ForW0[7]; //! L1 for 7 defined w0= 3, 3.5 ... 6
326 TH2F* fhLambda0ForW0MC[14][5]; //! L0 for 7 defined w0= 3, 3.5 ... 6, depending on the particle of origin
327 //TH2F* fhLambda1ForW0MC[7][5]; //! L1 for 7 defined w0= 3, 3.5 ... 6, depending on the particle of origin
331 enum mcTypes {mcPhoton = 0, mcPi0 = 1, mcEta = 2, mcElectron = 3, mcNeHadron = 4, mcChHadron = 5 };
333 TH2F * fhRecoMCE[6][2] ; //! E generated particle vs reconstructed E
334 TH2F * fhRecoMCPhi[6][2] ; //! phi generated particle vs reconstructed phi
335 TH2F * fhRecoMCEta[6][2] ; //! eta generated particle vs reconstructed Eta
336 TH2F * fhRecoMCDeltaE[6][2] ; //! Gen-Reco E generated particle vs reconstructed E
337 TH2F * fhRecoMCRatioE[6][2] ; //! Reco/Gen E generated particle vs reconstructed E
338 TH2F * fhRecoMCDeltaPhi[6][2]; //! Gen-Reco phi generated particle vs reconstructed E
339 TH2F * fhRecoMCDeltaEta[6][2]; //! Gen-Reco eta generated particle vs reconstructed E
341 TH1F * fhGenMCE[4] ; //! pt of primary particle
342 TH2F * fhGenMCEtaPhi[4] ; //! eta vs phi of primary particle
343 TH1F * fhGenMCAccE[4] ; //! pt of primary particle, in acceptance
344 TH2F * fhGenMCAccEtaPhi[4] ; //! eta vs phi of primary particle, in acceptance
346 TH2F * fhEMVxyz ; //! Electromagnetic particle production vertex
347 TH2F * fhEMR ; //! Electromagnetic distance to vertex vs rec energy
348 TH2F * fhHaVxyz ; //! Hadron production vertex
349 TH2F * fhHaR ; //! Hadron distance to vertex vs rec energy
351 //Histograms for MC track-matching
352 TH2F * fh1pOverE; //! p/E for track-cluster matches
353 TH1F * fh1dR; //! distance between projected track and cluster
354 TH2F * fh2EledEdx; //! dE/dx vs. momentum for electron candidates
355 TH2F * fh2MatchdEdx; //! dE/dx vs. momentum for all matches
357 TH2F * fhMCEle1pOverE; //! p/E for track-cluster matches, MC electrons
358 TH1F * fhMCEle1dR; //! distance between projected track and cluster, MC electrons
359 TH2F * fhMCEle2MatchdEdx; //! dE/dx vs. momentum for all matches, MC electrons
361 TH2F * fhMCChHad1pOverE; //! p/E for track-cluster matches, MC charged hadrons
362 TH1F * fhMCChHad1dR; //! distance between projected track and cluster, MC charged hadrons
363 TH2F * fhMCChHad2MatchdEdx; //! dE/dx vs. momentum for all matches, MC charged
365 TH2F * fhMCNeutral1pOverE; //! p/E for track-cluster matches, MC neutral
366 TH1F * fhMCNeutral1dR; //! distance between projected track and cluster, MC neutral
367 TH2F * fhMCNeutral2MatchdEdx; //! dE/dx vs. momentum for all matches, MC neutral
369 TH2F * fh1pOverER02; //! p/E for track-cluster matches, dR > 0.2
370 TH2F * fhMCEle1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC electrons
371 TH2F * fhMCChHad1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC charged hadrons
372 TH2F * fhMCNeutral1pOverER02; //! p/E for track-cluster matches, dR > 0.2, MC neutral
374 ClassDef(AliAnaCalorimeterQA,21)
378 #endif //ALIANACALORIMETERQA_H