]>
Commit | Line | Data |
---|---|---|
9725fd2a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
9725fd2a | 15 | |
a6f26052 | 16 | //_________________________________________________________________________ |
17 | // Class to check results from simulations or reconstructed real data. | |
18 | // Fill few histograms and do some checking plots | |
19 | // | |
20 | //-- Author: Gustavo Conesa (INFN-LNF) | |
21 | //_________________________________________________________________________ | |
9725fd2a | 22 | |
23 | ||
a6f26052 | 24 | // --- ROOT system --- |
d55bb5e1 | 25 | #include <TObjArray.h> |
26 | #include <TParticle.h> | |
27 | #include <TDatabasePDG.h> | |
28 | #include <TH3F.h> | |
0c1383b5 | 29 | #include <TObjString.h> |
9725fd2a | 30 | |
a6f26052 | 31 | //---- AliRoot system ---- |
9725fd2a | 32 | #include "AliAnaCalorimeterQA.h" |
33 | #include "AliCaloTrackReader.h" | |
34 | #include "AliStack.h" | |
c8fe2783 | 35 | #include "AliVCaloCells.h" |
ff45398a | 36 | #include "AliFiducialCut.h" |
c8fe2783 | 37 | #include "AliVCluster.h" |
d55bb5e1 | 38 | #include "AliVTrack.h" |
c8fe2783 | 39 | #include "AliVEvent.h" |
902aa95c | 40 | #include "AliVEventHandler.h" |
902aa95c | 41 | #include "AliAODMCParticle.h" |
42 | #include "AliMCAnalysisUtils.h" | |
9725fd2a | 43 | |
c5693f62 | 44 | // --- Detectors --- |
45 | #include "AliPHOSGeoUtils.h" | |
46 | #include "AliEMCALGeometry.h" | |
47 | ||
9725fd2a | 48 | ClassImp(AliAnaCalorimeterQA) |
c8fe2783 | 49 | |
649b825d | 50 | //________________________________________ |
c8fe2783 | 51 | AliAnaCalorimeterQA::AliAnaCalorimeterQA() : |
765206a5 | 52 | AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), |
649b825d | 53 | |
54 | //Switches | |
e6fec6f5 | 55 | fFillAllCellTimeHisto(kTRUE), |
45769d5b | 56 | fFillAllPosHisto(kFALSE), fFillAllPosHisto2(kTRUE), |
57 | fFillAllTH3(kFALSE), | |
35c71d5c | 58 | fFillAllTMHisto(kTRUE), fFillAllPi0Histo(kTRUE), |
649b825d | 59 | fCorrelate(kTRUE), fStudyBadClusters(kFALSE), |
f1538a5f | 60 | fStudyClustersAsymmetry(kFALSE), fStudyExotic(kFALSE), |
61 | fStudyWeight(kFALSE), | |
649b825d | 62 | |
63 | //Parameters and cuts | |
35c71d5c | 64 | fNModules(12), fNRCU(2), |
65 | fNMaxCols(48), fNMaxRows(24), | |
f15c25da | 66 | fTimeCutMin(-10000), fTimeCutMax(10000), |
9e9f04cb | 67 | fEMCALCellAmpMin(0), fPHOSCellAmpMin(0), |
649b825d | 68 | |
f1538a5f | 69 | // Exotic |
70 | fExoNECrossCuts(0), fExoECrossCuts(), | |
71 | fExoNDTimeCuts(0), fExoDTimeCuts(), | |
72 | ||
649b825d | 73 | //Histograms |
9e9f04cb | 74 | fhE(0), fhPt(0), |
75 | fhPhi(0), fhEta(0), fhEtaPhiE(0), | |
76 | fhECharged(0), fhPtCharged(0), | |
77 | fhPhiCharged(0), fhEtaCharged(0), fhEtaPhiECharged(0), | |
521636d2 | 78 | |
79 | //Invariant mass | |
9e9f04cb | 80 | fhIM(0 ), fhAsym(0), |
a82b4462 | 81 | |
82 | fhNCellsPerCluster(0), fhNCellsPerClusterNoCut(0), fhNClusters(0), | |
3129a79e | 83 | |
e1e62b89 | 84 | //Timing |
9e9f04cb | 85 | fhClusterTimeEnergy(0), fhCellTimeSpreadRespectToCellMax(0), |
9e9f04cb | 86 | fhCellIdCellLargeTimeSpread(0), fhClusterPairDiffTimeE(0), |
9e9f04cb | 87 | fhClusterMaxCellCloseCellRatio(0), fhClusterMaxCellCloseCellDiff(0), |
88 | fhClusterMaxCellDiff(0), fhClusterMaxCellDiffNoCut(0), | |
a82b4462 | 89 | fhClusterMaxCellDiffAverageTime(0), fhClusterMaxCellDiffWeightedTime(0), |
1a72f6c5 | 90 | fhClusterMaxCellECross(0), |
649b825d | 91 | fhLambda0(0), fhLambda1(0), fhDispersion(0), |
715fd81f | 92 | |
649b825d | 93 | //bad clusters |
94 | fhBadClusterEnergy(0), fhBadClusterTimeEnergy(0), | |
95 | fhBadClusterPairDiffTimeE(0), fhBadCellTimeSpreadRespectToCellMax(0), | |
9e9f04cb | 96 | fhBadClusterMaxCellCloseCellRatio(0), fhBadClusterMaxCellCloseCellDiff(0), fhBadClusterMaxCellDiff(0), |
a82b4462 | 97 | fhBadClusterMaxCellDiffAverageTime(0), fhBadClusterMaxCellDiffWeightedTime(0), |
1a72f6c5 | 98 | fhBadClusterMaxCellECross(0), |
1a83b960 | 99 | fhBadClusterDeltaIEtaDeltaIPhiE0(0), fhBadClusterDeltaIEtaDeltaIPhiE2(0), |
100 | fhBadClusterDeltaIEtaDeltaIPhiE6(0), fhBadClusterDeltaIA(0), | |
9e9f04cb | 101 | |
521636d2 | 102 | //Position |
9e9f04cb | 103 | fhRNCells(0), fhXNCells(0), |
104 | fhYNCells(0), fhZNCells(0), | |
105 | fhRE(0), fhXE(0), | |
106 | fhYE(0), fhZE(0), | |
521636d2 | 107 | fhXYZ(0), |
9e9f04cb | 108 | fhRCellE(0), fhXCellE(0), |
109 | fhYCellE(0), fhZCellE(0), | |
521636d2 | 110 | fhXYZCell(0), |
9e9f04cb | 111 | fhDeltaCellClusterRNCells(0), fhDeltaCellClusterXNCells(0), |
112 | fhDeltaCellClusterYNCells(0), fhDeltaCellClusterZNCells(0), | |
113 | fhDeltaCellClusterRE(0), fhDeltaCellClusterXE(0), | |
114 | fhDeltaCellClusterYE(0), fhDeltaCellClusterZE(0), | |
649b825d | 115 | |
521636d2 | 116 | // Cells |
9e9f04cb | 117 | fhNCells(0), fhAmplitude(0), |
118 | fhAmpId(0), fhEtaPhiAmp(0), | |
1a72f6c5 | 119 | fhTime(0), fhTimeVz(0), |
120 | fhTimeId(0), fhTimeAmp(0), | |
121 | fhCellECross(0), | |
9e9f04cb | 122 | fhCaloCorrNClusters(0), fhCaloCorrEClusters(0), |
123 | fhCaloCorrNCells(0), fhCaloCorrECells(0), | |
124 | fhCaloV0SCorrNClusters(0), fhCaloV0SCorrEClusters(0), | |
125 | fhCaloV0SCorrNCells(0), fhCaloV0SCorrECells(0), | |
126 | fhCaloV0MCorrNClusters(0), fhCaloV0MCorrEClusters(0), | |
127 | fhCaloV0MCorrNCells(0), fhCaloV0MCorrECells(0), | |
128 | fhCaloTrackMCorrNClusters(0), fhCaloTrackMCorrEClusters(0), | |
129 | fhCaloTrackMCorrNCells(0), fhCaloTrackMCorrECells(0), | |
653aed3c | 130 | fhCaloCenNClusters(0), fhCaloCenEClusters(0), |
131 | fhCaloCenNCells(0), fhCaloCenECells(0), | |
132 | fhCaloEvPNClusters(0), fhCaloEvPEClusters(0), | |
133 | fhCaloEvPNCells(0), fhCaloEvPECells(0), | |
521636d2 | 134 | //Super-Module dependent histgrams |
649b825d | 135 | fhEMod(0), fhAmpMod(0), fhTimeMod(0), |
136 | fhNClustersMod(0), fhNCellsMod(0), | |
137 | fhNCellsPerClusterMod(0), fhNCellsPerClusterModNoCut(0), | |
138 | ||
139 | fhGridCells(0), fhGridCellsE(0), fhGridCellsTime(0), | |
140 | fhTimeAmpPerRCU(0), fhIMMod(0), | |
141 | ||
142 | // Weight studies | |
143 | fhECellClusterRatio(0), fhECellClusterLogRatio(0), | |
144 | fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0), | |
715fd81f | 145 | |
765206a5 | 146 | fhExoL0ECross(0), fhExoL1ECross(0), |
147 | ||
715fd81f | 148 | // MC and reco |
649b825d | 149 | fhRecoMCE(), fhRecoMCPhi(), fhRecoMCEta(), |
150 | fhRecoMCDeltaE(), fhRecoMCRatioE(), | |
151 | fhRecoMCDeltaPhi(), fhRecoMCDeltaEta(), | |
715fd81f | 152 | |
521636d2 | 153 | // MC only |
649b825d | 154 | fhGenMCE(), fhGenMCEtaPhi(), |
155 | fhGenMCAccE(), fhGenMCAccEtaPhi(), | |
35c71d5c | 156 | |
157 | //matched MC | |
649b825d | 158 | fhEMVxyz(0), fhEMR(0), |
159 | fhHaVxyz(0), fhHaR(0), | |
d55bb5e1 | 160 | fh1EOverP(0), fh2dR(0), |
649b825d | 161 | fh2EledEdx(0), fh2MatchdEdx(0), |
d55bb5e1 | 162 | fhMCEle1EOverP(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0), |
163 | fhMCChHad1EOverP(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0), | |
a054a582 | 164 | fhMCNeutral1EOverP(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0), fh1EOverPR02(0), |
165 | fhMCEle1EOverPR02(0), fhMCChHad1EOverPR02(0), fhMCNeutral1EOverPR02(0), | |
653aed3c | 166 | fh1EleEOverP(0), fhMCEle1EleEOverP(0), |
167 | fhMCChHad1EleEOverP(0), fhMCNeutral1EleEOverP(0), | |
168 | fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0), | |
169 | fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0) | |
9725fd2a | 170 | { |
a6f26052 | 171 | //Default Ctor |
afabc52f | 172 | |
649b825d | 173 | //Weight studies |
1a72f6c5 | 174 | for(Int_t i =0; i < 14; i++){ |
649b825d | 175 | fhLambda0ForW0[i] = 0; |
1a72f6c5 | 176 | //fhLambda1ForW0[i] = 0; |
649b825d | 177 | |
178 | for(Int_t j = 0; j < 5; j++){ | |
179 | fhLambda0ForW0MC[i][j] = 0; | |
1a72f6c5 | 180 | //fhLambda1ForW0MC[i][j] = 0; |
649b825d | 181 | } |
182 | ||
183 | } | |
c8fe2783 | 184 | |
649b825d | 185 | //Cluster size |
186 | fhDeltaIEtaDeltaIPhiE0[0] = 0 ; fhDeltaIEtaDeltaIPhiE2[0] = 0; fhDeltaIEtaDeltaIPhiE6[0] = 0; | |
187 | fhDeltaIEtaDeltaIPhiE0[1] = 0 ; fhDeltaIEtaDeltaIPhiE2[1] = 0; fhDeltaIEtaDeltaIPhiE6[1] = 0; | |
188 | fhDeltaIA[0] = 0 ; fhDeltaIAL0[0] = 0; fhDeltaIAL1[0] = 0; | |
189 | fhDeltaIA[1] = 0 ; fhDeltaIAL0[1] = 0; fhDeltaIAL1[1] = 0; | |
190 | fhDeltaIANCells[0] = 0 ; fhDeltaIANCells[1] = 0; | |
191 | fhDeltaIAMC[0] = 0 ; fhDeltaIAMC[1] = 0; | |
192 | fhDeltaIAMC[2] = 0 ; fhDeltaIAMC[3] = 0; | |
2302a644 | 193 | |
f1538a5f | 194 | // Exotic |
195 | for (Int_t ie = 0; ie < 10 ; ie++) | |
196 | { | |
197 | fhExoDTime[ie] = 0; | |
198 | for (Int_t idt = 0; idt < 5 ; idt++) | |
199 | { | |
200 | fhExoNCell [ie][idt] = 0; | |
201 | fhExoL0 [ie][idt] = 0; | |
765206a5 | 202 | fhExoL1 [ie][idt] = 0; |
f1538a5f | 203 | fhExoECross [ie][idt] = 0; |
204 | fhExoTime [ie][idt] = 0; | |
765206a5 | 205 | fhExoL0NCell [ie][idt] = 0; |
206 | fhExoL1NCell [ie][idt] = 0; | |
f1538a5f | 207 | } |
208 | } | |
209 | ||
649b825d | 210 | // MC |
c8fe2783 | 211 | |
45769d5b | 212 | for(Int_t i = 0; i < 6; i++) |
213 | { | |
649b825d | 214 | fhRecoMCE[i][0] = 0; fhRecoMCE[i][1] = 0; |
215 | fhRecoMCPhi[i][0] = 0; fhRecoMCPhi[i][1] = 0; | |
216 | fhRecoMCEta[i][0] = 0; fhRecoMCEta[i][1] = 0; | |
217 | fhRecoMCDeltaE[i][0] = 0; fhRecoMCDeltaE[i][1] = 0; | |
218 | fhRecoMCRatioE[i][0] = 0; fhRecoMCRatioE[i][1] = 0; | |
219 | fhRecoMCDeltaPhi[i][0] = 0; fhRecoMCDeltaPhi[i][1] = 0; | |
45769d5b | 220 | fhRecoMCDeltaEta[i][0] = 0; fhRecoMCDeltaEta[i][1] = 0; |
649b825d | 221 | } |
2302a644 | 222 | |
649b825d | 223 | //Initialize parameters |
224 | InitParameters(); | |
225 | } | |
3f5990d6 | 226 | |
b94e038e | 227 | //______________________________________________________________________________________________________________________ |
c5693f62 | 228 | void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells, |
b94e038e | 229 | Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, |
45769d5b | 230 | Double_t tmax) |
649b825d | 231 | { |
232 | //Bad cluster histograms | |
b0114dba | 233 | |
234 | // printf("AliAnaCalorimeterQA::BadClusterHistograms() - Event %d - Calorimeter %s \n \t E %f, n cells %d, max cell absId %d, maxCellFrac %f\n", | |
235 | // GetReader()->GetEventNumber(), fCalorimeter.Data(), | |
236 | // clus->E(),clus->GetNCells(),absIdMax,maxCellFraction); | |
1a72f6c5 | 237 | |
649b825d | 238 | fhBadClusterEnergy ->Fill(clus->E()); |
239 | Double_t tof = clus->GetTOF()*1.e9; | |
1a83b960 | 240 | fhBadClusterTimeEnergy ->Fill(clus->E(),tof); |
241 | fhBadClusterMaxCellDiff ->Fill(clus->E(),maxCellFraction); | |
242 | fhBadClusterMaxCellECross->Fill(clus->E(),eCrossFrac); | |
243 | ||
244 | if(fStudyClustersAsymmetry) ClusterAsymmetryHistograms(clus,absIdMax,kFALSE); | |
1a72f6c5 | 245 | |
a82b4462 | 246 | //Clusters in event time differencem bad minus good |
2302a644 | 247 | |
45769d5b | 248 | for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ ) |
249 | { | |
649b825d | 250 | AliVCluster* clus2 = (AliVCluster*)caloClusters->At(iclus2); |
a6f26052 | 251 | |
649b825d | 252 | if(clus->GetID()==clus2->GetID()) continue; |
715fd81f | 253 | |
a82b4462 | 254 | Float_t maxCellFraction2 = 0.; |
255 | Int_t absIdMax2 = GetCaloUtils()->GetMaxEnergyCell(cells, clus2,maxCellFraction2); | |
45769d5b | 256 | if(IsGoodCluster(absIdMax2,cells)) |
257 | { | |
a82b4462 | 258 | Double_t tof2 = clus2->GetTOF()*1.e9; |
649b825d | 259 | fhBadClusterPairDiffTimeE ->Fill(clus->E(), (tof-tof2)); |
649b825d | 260 | } |
a82b4462 | 261 | |
649b825d | 262 | } // loop |
924e319f | 263 | |
649b825d | 264 | // Max cell compared to other cells in cluster |
e6fec6f5 | 265 | if(fFillAllCellTimeHisto) |
2747966a | 266 | { |
45769d5b | 267 | // Get some time averages |
268 | Double_t timeAverages[2] = {0.,0.}; | |
269 | CalculateAverageTime(clus, cells, timeAverages); | |
270 | ||
649b825d | 271 | fhBadClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]); |
649b825d | 272 | fhBadClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]); |
649b825d | 273 | } |
715fd81f | 274 | |
2747966a | 275 | for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) |
276 | { | |
649b825d | 277 | Int_t absId = clus->GetCellsAbsId()[ipos]; |
2747966a | 278 | if(absId!=absIdMax && cells->GetCellAmplitude(absIdMax) > 0.01) |
279 | { | |
649b825d | 280 | Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax); |
281 | ||
282 | fhBadClusterMaxCellCloseCellRatio->Fill(clus->E(),frac); | |
283 | fhBadClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId)); | |
284 | ||
e6fec6f5 | 285 | if(fFillAllCellTimeHisto) |
dbba06ca | 286 | { |
649b825d | 287 | Double_t time = cells->GetCellTime(absId); |
dbba06ca | 288 | GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
289 | ||
649b825d | 290 | Float_t diff = (tmax-time*1e9); |
291 | fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff); | |
292 | ||
e6fec6f5 | 293 | } |
649b825d | 294 | }// Not max |
295 | }//loop | |
715fd81f | 296 | |
649b825d | 297 | } |
715fd81f | 298 | |
dbf54f1e | 299 | //______________________________________________________________________ |
300 | void AliAnaCalorimeterQA::CalculateAverageTime(AliVCluster *clus, | |
301 | AliVCaloCells* cells, | |
302 | Double_t timeAverages[2]) | |
649b825d | 303 | { |
304 | // Calculate time averages and weights | |
a95eac90 | 305 | |
649b825d | 306 | // First recalculate energy in case non linearity was applied |
307 | Float_t energy = 0; | |
308 | Float_t ampMax = 0, amp = 0; | |
ecdde216 | 309 | // Int_t absIdMax =-1; |
2747966a | 310 | for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) |
311 | { | |
649b825d | 312 | Int_t id = clus->GetCellsAbsId()[ipos]; |
e1e62b89 | 313 | |
649b825d | 314 | //Recalibrate cell energy if needed |
315 | amp = cells->GetCellAmplitude(id); | |
dbba06ca | 316 | GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id); |
4c8f7c2e | 317 | |
649b825d | 318 | energy += amp; |
e1e62b89 | 319 | |
2747966a | 320 | if(amp> ampMax) |
321 | { | |
649b825d | 322 | ampMax = amp; |
ecdde216 | 323 | // absIdMax = id; |
649b825d | 324 | } |
649b825d | 325 | } // energy loop |
326 | ||
327 | // Calculate average time of cells in cluster and weighted average | |
dbf54f1e | 328 | Double_t aTime = 0; |
329 | Double_t wTime = 0; | |
330 | Float_t wTot = 0; | |
331 | Double_t time = 0; | |
332 | Int_t id =-1; | |
333 | Double_t w = 0; | |
334 | Int_t ncells = clus->GetNCells(); | |
45769d5b | 335 | |
2747966a | 336 | for (Int_t ipos = 0; ipos < ncells; ipos++) |
337 | { | |
dbf54f1e | 338 | id = clus ->GetCellsAbsId()[ipos]; |
339 | amp = cells->GetCellAmplitude(id); | |
340 | time = cells->GetCellTime(id); | |
649b825d | 341 | |
342 | //Recalibrate energy and time | |
dbba06ca | 343 | GetCaloUtils()->RecalibrateCellAmplitude(amp , fCalorimeter, id); |
344 | GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber()); | |
345 | ||
dbf54f1e | 346 | w = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cells->GetCellAmplitude(id),energy); |
649b825d | 347 | aTime += time*1e9; |
348 | wTime += time*1e9 * w; | |
349 | wTot += w; | |
35c71d5c | 350 | |
649b825d | 351 | } |
f3138ecf | 352 | |
dbf54f1e | 353 | if(ncells > 0) aTime /= ncells; |
354 | else aTime = 0; | |
649b825d | 355 | |
dbf54f1e | 356 | if(wTot > 0) wTime /= wTot; |
f3138ecf | 357 | else wTime = 0; |
358 | ||
dbf54f1e | 359 | timeAverages[0] = aTime; |
360 | timeAverages[1] = wTime; | |
39de6caa | 361 | |
649b825d | 362 | } |
363 | ||
364 | //____________________________________________________________ | |
365 | void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells) | |
366 | { | |
367 | // Plot histograms related to cells only | |
9e9f04cb | 368 | |
649b825d | 369 | Int_t ncells = cells->GetNumberOfCells(); |
39de6caa | 370 | |
649b825d | 371 | if(GetDebug() > 0) |
372 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - %s cell entries %d\n", fCalorimeter.Data(), ncells ); | |
373 | ||
374 | //Init arrays and used variables | |
375 | Int_t *nCellsInModule = new Int_t[fNModules]; | |
376 | for(Int_t imod = 0; imod < fNModules; imod++ ) nCellsInModule[imod] = 0; | |
a82b4462 | 377 | |
649b825d | 378 | Int_t icol = -1; |
379 | Int_t irow = -1; | |
380 | Int_t iRCU = -1; | |
381 | Float_t amp = 0.; | |
382 | Double_t time = 0.; | |
383 | Int_t id = -1; | |
384 | Float_t recalF = 1.; | |
a82b4462 | 385 | Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber(); |
649b825d | 386 | |
45769d5b | 387 | for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++) |
388 | { | |
649b825d | 389 | if(GetDebug() > 2) |
390 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Cell : amp %f, absId %d \n", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)); | |
45769d5b | 391 | |
649b825d | 392 | Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),fCalorimeter, icol, irow, iRCU); |
393 | if(GetDebug() > 2) | |
394 | printf("\t module %d, column %d, row %d \n", nModule,icol,irow); | |
395 | ||
f1538a5f | 396 | if(nModule < fNModules) |
397 | { | |
649b825d | 398 | //Check if the cell is a bad channel |
45769d5b | 399 | if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn()) |
400 | { | |
ae2c2bc4 | 401 | if(fCalorimeter=="EMCAL") |
402 | { | |
649b825d | 403 | if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue; |
404 | } | |
ae2c2bc4 | 405 | else |
406 | { | |
407 | if(GetCaloUtils()->GetPHOSChannelStatus(nModule,icol,irow) ) continue; | |
649b825d | 408 | } |
409 | } // use bad channel map | |
410 | ||
411 | amp = cells->GetAmplitude(iCell)*recalF; | |
412 | time = cells->GetTime(iCell); | |
413 | id = cells->GetCellNumber(iCell); | |
414 | ||
415 | // Amplitude recalibration if set | |
dbba06ca | 416 | GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id); |
649b825d | 417 | |
418 | // Time recalibration if set | |
dbba06ca | 419 | GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
649b825d | 420 | |
421 | //Transform time to ns | |
422 | time *= 1.0e9; | |
f15c25da | 423 | |
e6fec6f5 | 424 | if(time < fTimeCutMin || time > fTimeCutMax) |
a87e069d | 425 | { |
822cc7aa | 426 | if(GetDebug() > 0 ) |
f1538a5f | 427 | printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time); |
649b825d | 428 | continue; |
e6fec6f5 | 429 | } |
06f1b12a | 430 | |
431 | // Remove exotic cells, defined only for EMCAL | |
432 | if(fCalorimeter=="EMCAL" && | |
433 | GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue; | |
434 | ||
649b825d | 435 | |
436 | fhAmplitude->Fill(amp); | |
437 | fhAmpId ->Fill(amp,id); | |
438 | fhAmpMod ->Fill(amp,nModule); | |
439 | ||
440 | if ((fCalorimeter=="EMCAL" && amp > fEMCALCellAmpMin) || | |
45769d5b | 441 | (fCalorimeter=="PHOS" && amp > fPHOSCellAmpMin ) ) |
2747966a | 442 | { |
443 | ||
444 | //E cross for exotic cells | |
45769d5b | 445 | if(amp > 0.05) fhCellECross->Fill(amp,1-GetECross(id,cells)/amp); |
e3300002 | 446 | |
649b825d | 447 | nCellsInModule[nModule]++ ; |
06f1b12a | 448 | |
649b825d | 449 | Int_t icols = icol; |
450 | Int_t irows = irow; | |
57d8227a | 451 | |
452 | if(fCalorimeter=="EMCAL") | |
453 | { | |
649b825d | 454 | icols = (nModule % 2) ? icol + fNMaxCols : icol; |
57d8227a | 455 | if(nModule < 10 ) |
456 | irows = irow + fNMaxRows * Int_t(nModule / 2); | |
457 | else // 1/3 SM | |
458 | irows = irow + (fNMaxRows / 3) * Int_t(nModule / 2); | |
649b825d | 459 | } |
57d8227a | 460 | else |
461 | { | |
06f1b12a | 462 | irows = irow + fNMaxRows * nModule; |
649b825d | 463 | } |
06f1b12a | 464 | |
649b825d | 465 | fhGridCells ->Fill(icols,irows); |
466 | fhGridCellsE->Fill(icols,irows,amp); | |
467 | ||
e6fec6f5 | 468 | if(fFillAllCellTimeHisto) |
a87e069d | 469 | { |
649b825d | 470 | //printf("%s: time %g\n",fCalorimeter.Data(), time); |
1a72f6c5 | 471 | |
472 | Double_t v[3] = {0,0,0}; //vertex ; | |
473 | GetReader()->GetVertex(v); | |
474 | if(amp > 0.5) fhTimeVz ->Fill(TMath::Abs(v[2]),time); | |
475 | ||
649b825d | 476 | fhTime ->Fill(time); |
477 | fhTimeId ->Fill(time,id); | |
478 | fhTimeAmp ->Fill(amp,time); | |
479 | fhGridCellsTime->Fill(icols,irows,time); | |
480 | fhTimeMod ->Fill(time,nModule); | |
481 | fhTimeAmpPerRCU [nModule*fNRCU+iRCU]->Fill(amp, time); | |
482 | ||
483 | } | |
484 | } | |
485 | ||
486 | //Get Eta-Phi position of Cell | |
487 | if(fFillAllPosHisto) | |
488 | { | |
489 | if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){ | |
490 | Float_t celleta = 0.; | |
491 | Float_t cellphi = 0.; | |
492 | GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi); | |
493 | ||
494 | fhEtaPhiAmp->Fill(celleta,cellphi,amp); | |
495 | Double_t cellpos[] = {0, 0, 0}; | |
496 | GetEMCALGeometry()->GetGlobal(id, cellpos); | |
497 | fhXCellE->Fill(cellpos[0],amp) ; | |
498 | fhYCellE->Fill(cellpos[1],amp) ; | |
499 | fhZCellE->Fill(cellpos[2],amp) ; | |
500 | Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0]+cellpos[1]*cellpos[1]);//+cellpos[2]*cellpos[2]); | |
501 | fhRCellE->Fill(rcell,amp) ; | |
502 | fhXYZCell->Fill(cellpos[0],cellpos[1],cellpos[2]) ; | |
503 | }//EMCAL Cells | |
504 | else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet()){ | |
505 | TVector3 xyz; | |
506 | Int_t relId[4], module; | |
507 | Float_t xCell, zCell; | |
508 | ||
509 | GetPHOSGeometry()->AbsToRelNumbering(id,relId); | |
510 | module = relId[0]; | |
511 | GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell); | |
512 | GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz); | |
513 | Float_t rcell = TMath::Sqrt(xyz.X()*xyz.X()+xyz.Y()*xyz.Y()); | |
514 | fhXCellE ->Fill(xyz.X(),amp) ; | |
515 | fhYCellE ->Fill(xyz.Y(),amp) ; | |
516 | fhZCellE ->Fill(xyz.Z(),amp) ; | |
517 | fhRCellE ->Fill(rcell ,amp) ; | |
518 | fhXYZCell->Fill(xyz.X(),xyz.Y(),xyz.Z()) ; | |
519 | }//PHOS cells | |
520 | }//fill cell position histograms | |
521 | ||
522 | if (fCalorimeter=="EMCAL" && amp > fEMCALCellAmpMin) ncells ++ ; | |
45769d5b | 523 | else if(fCalorimeter=="PHOS" && amp > fPHOSCellAmpMin ) ncells ++ ; |
649b825d | 524 | //else |
525 | // printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - no %s CELLS passed the analysis cut\n",fCalorimeter.Data()); | |
526 | }//nmodules | |
527 | }//cell loop | |
528 | ||
45769d5b | 529 | if( ncells > 0 )fhNCells->Fill(ncells) ; //fill the cells after the cut |
649b825d | 530 | |
531 | //Number of cells per module | |
45769d5b | 532 | for(Int_t imod = 0; imod < fNModules; imod++ ) |
533 | { | |
649b825d | 534 | if(GetDebug() > 1) |
535 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s cells %d\n", imod, fCalorimeter.Data(), nCellsInModule[imod]); | |
536 | ||
537 | fhNCellsMod->Fill(nCellsInModule[imod],imod) ; | |
649b825d | 538 | } |
539 | ||
540 | delete [] nCellsInModule; | |
541 | ||
542 | } | |
543 | ||
544 | //__________________________________________________________________________ | |
545 | void AliAnaCalorimeterQA::CellInClusterPositionHistograms(AliVCluster* clus) | |
546 | { | |
547 | // Fill histograms releated to cell position | |
548 | ||
649b825d | 549 | Int_t nCaloCellsPerCluster = clus->GetNCells(); |
550 | UShort_t * indexList = clus->GetCellsAbsId(); | |
551 | Float_t pos[3]; | |
552 | clus->GetPosition(pos); | |
553 | Float_t clEnergy = clus->E(); | |
554 | ||
555 | //Loop on cluster cells | |
45769d5b | 556 | for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++) |
557 | { | |
649b825d | 558 | // printf("Index %d\n",ipos); |
559 | Int_t absId = indexList[ipos]; | |
560 | ||
561 | //Get position of cell compare to cluster | |
562 | ||
563 | if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){ | |
564 | ||
565 | Double_t cellpos[] = {0, 0, 0}; | |
566 | GetEMCALGeometry()->GetGlobal(absId, cellpos); | |
567 | ||
568 | fhDeltaCellClusterXNCells->Fill(pos[0]-cellpos[0],nCaloCellsPerCluster) ; | |
569 | fhDeltaCellClusterYNCells->Fill(pos[1]-cellpos[1],nCaloCellsPerCluster) ; | |
570 | fhDeltaCellClusterZNCells->Fill(pos[2]-cellpos[2],nCaloCellsPerCluster) ; | |
571 | ||
572 | fhDeltaCellClusterXE->Fill(pos[0]-cellpos[0],clEnergy) ; | |
573 | fhDeltaCellClusterYE->Fill(pos[1]-cellpos[1],clEnergy) ; | |
574 | fhDeltaCellClusterZE->Fill(pos[2]-cellpos[2],clEnergy) ; | |
575 | ||
576 | Float_t r = TMath::Sqrt(pos[0] *pos[0] + pos[1] * pos[1] ); | |
577 | Float_t rcell = TMath::Sqrt(cellpos[0]*cellpos[0] + cellpos[1]* cellpos[1]); | |
578 | ||
579 | fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster) ; | |
580 | fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy) ; | |
581 | ||
582 | }//EMCAL and its matrices are available | |
45769d5b | 583 | else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet()) |
584 | { | |
649b825d | 585 | TVector3 xyz; |
586 | Int_t relId[4], module; | |
587 | Float_t xCell, zCell; | |
588 | ||
589 | GetPHOSGeometry()->AbsToRelNumbering(absId,relId); | |
590 | module = relId[0]; | |
591 | GetPHOSGeometry()->RelPosInModule(relId,xCell,zCell); | |
592 | GetPHOSGeometry()->Local2Global(module,xCell,zCell,xyz); | |
593 | ||
594 | fhDeltaCellClusterXNCells->Fill(pos[0]-xyz.X(),nCaloCellsPerCluster) ; | |
595 | fhDeltaCellClusterYNCells->Fill(pos[1]-xyz.Y(),nCaloCellsPerCluster) ; | |
596 | fhDeltaCellClusterZNCells->Fill(pos[2]-xyz.Z(),nCaloCellsPerCluster) ; | |
597 | ||
598 | fhDeltaCellClusterXE->Fill(pos[0]-xyz.X(),clEnergy) ; | |
599 | fhDeltaCellClusterYE->Fill(pos[1]-xyz.Y(),clEnergy) ; | |
600 | fhDeltaCellClusterZE->Fill(pos[2]-xyz.Z(),clEnergy) ; | |
601 | ||
602 | Float_t r = TMath::Sqrt(pos[0] * pos[0] + pos[1] * pos[1] ); | |
603 | Float_t rcell = TMath::Sqrt(xyz.X() * xyz.X() + xyz.Y() * xyz.Y()); | |
604 | ||
605 | fhDeltaCellClusterRNCells->Fill(r-rcell, nCaloCellsPerCluster) ; | |
606 | fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy) ; | |
607 | ||
608 | }//PHOS and its matrices are available | |
609 | }// cluster cell loop | |
610 | } | |
611 | ||
612 | //___________________________________________________________________________________________ | |
b94e038e | 613 | void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, Int_t absIdMax, |
614 | Bool_t goodCluster) | |
649b825d | 615 | { |
616 | // Study the shape of the cluster in cell units terms | |
617 | ||
618 | //No use to study clusters with less than 4 cells | |
45769d5b | 619 | if( clus->GetNCells() <= 3 ) return; |
649b825d | 620 | |
621 | Int_t dIeta = 0; | |
622 | Int_t dIphi = 0; | |
623 | ||
624 | Int_t ietaMax=-1; Int_t iphiMax = 0; Int_t rcuMax = 0; | |
625 | Int_t smMax = GetModuleNumberCellIndexes(absIdMax,fCalorimeter, ietaMax, iphiMax, rcuMax); | |
626 | ||
627 | for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) { | |
628 | ||
629 | Int_t absId = clus->GetCellsAbsId()[ipos]; | |
630 | ||
631 | Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0; | |
632 | Int_t sm = GetModuleNumberCellIndexes(absId,fCalorimeter, ieta, iphi, rcu); | |
633 | ||
634 | if(dIphi < TMath::Abs(iphi-iphiMax)) dIphi = TMath::Abs(iphi-iphiMax); | |
635 | ||
45769d5b | 636 | if(smMax==sm) |
637 | { | |
649b825d | 638 | if(dIeta < TMath::Abs(ieta-ietaMax)) dIeta = TMath::Abs(ieta-ietaMax); |
639 | } | |
45769d5b | 640 | else |
641 | { | |
649b825d | 642 | Int_t ietaShift = ieta; |
643 | Int_t ietaMaxShift = ietaMax; | |
644 | if (ieta > ietaMax) ietaMaxShift+=48; | |
645 | else ietaShift +=48; | |
646 | if(dIeta < TMath::Abs(ietaShift-ietaMaxShift)) dIeta = TMath::Abs(ietaShift-ietaMaxShift); | |
647 | } | |
648 | ||
649b825d | 649 | }// fill cell-cluster histogram loop |
650 | ||
649b825d | 651 | |
1a83b960 | 652 | Float_t dIA = 1.*(dIphi-dIeta)/(dIeta+dIphi); |
653 | ||
654 | if(goodCluster) | |
655 | { | |
649b825d | 656 | |
1a83b960 | 657 | // Was cluster matched? |
658 | Bool_t matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(),GetReader()->GetInputEvent()); | |
649b825d | 659 | |
1a83b960 | 660 | if (clus->E() < 2 ) fhDeltaIEtaDeltaIPhiE0[matched]->Fill(dIeta,dIphi); |
661 | else if(clus->E() < 6 ) fhDeltaIEtaDeltaIPhiE2[matched]->Fill(dIeta,dIphi); | |
662 | else fhDeltaIEtaDeltaIPhiE6[matched]->Fill(dIeta,dIphi); | |
663 | ||
664 | fhDeltaIA[matched]->Fill(clus->E(),dIA); | |
665 | ||
666 | if(clus->E() > 0.5){ | |
667 | ||
668 | fhDeltaIAL0[matched] ->Fill(clus->GetM02(),dIA); | |
669 | fhDeltaIAL1[matched] ->Fill(clus->GetM20(),dIA); | |
670 | fhDeltaIANCells[matched]->Fill(clus->GetNCells(),dIA); | |
671 | ||
649b825d | 672 | } |
673 | ||
1a83b960 | 674 | // Origin of clusters |
675 | Int_t nLabel = clus->GetNLabels(); | |
676 | Int_t* labels = clus->GetLabels(); | |
45769d5b | 677 | if(IsDataMC()) |
678 | { | |
2644ead9 | 679 | Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader()); |
1a83b960 | 680 | if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && |
681 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) && | |
682 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) && | |
683 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
684 | fhDeltaIAMC[0]->Fill(clus->E(),dIA);//Pure Photon | |
685 | } | |
686 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) && | |
687 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
688 | fhDeltaIAMC[1]->Fill(clus->E(),dIA);//Pure electron | |
689 | } | |
690 | else if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && | |
691 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
692 | fhDeltaIAMC[2]->Fill(clus->E(),dIA);//Converted cluster | |
693 | } | |
694 | else if(!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton)){ | |
695 | fhDeltaIAMC[3]->Fill(clus->E(),dIA);//Hadrons | |
696 | } | |
697 | ||
698 | } // MC | |
699 | } // good cluster | |
700 | else | |
701 | { | |
702 | if (clus->E() < 2 ) fhBadClusterDeltaIEtaDeltaIPhiE0->Fill(dIeta,dIphi); | |
703 | else if(clus->E() < 6 ) fhBadClusterDeltaIEtaDeltaIPhiE2->Fill(dIeta,dIphi); | |
704 | else fhBadClusterDeltaIEtaDeltaIPhiE6->Fill(dIeta,dIphi); | |
705 | ||
706 | fhBadClusterDeltaIA->Fill(clus->E(),dIA); | |
707 | ||
708 | } | |
649b825d | 709 | } |
710 | ||
b94e038e | 711 | //__________________________________________________________________________________________________________________ |
712 | void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells, | |
713 | Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, | |
45769d5b | 714 | Double_t tmax) |
649b825d | 715 | { |
716 | //Fill CaloCluster related histograms | |
717 | ||
1a83b960 | 718 | Double_t tof = clus->GetTOF()*1.e9; |
649b825d | 719 | |
1a83b960 | 720 | fhLambda0 ->Fill(clus->E(),clus->GetM02()); |
721 | fhLambda1 ->Fill(clus->E(),clus->GetM20()); | |
722 | fhDispersion ->Fill(clus->E(),clus->GetDispersion()); | |
649b825d | 723 | |
a82b4462 | 724 | fhClusterMaxCellDiff ->Fill(clus->E(),maxCellFraction); |
725 | fhClusterMaxCellECross->Fill(clus->E(),eCrossFrac); | |
726 | fhClusterTimeEnergy ->Fill(clus->E(),tof); | |
649b825d | 727 | |
1a83b960 | 728 | if(fStudyClustersAsymmetry) ClusterAsymmetryHistograms(clus,absIdMax,kTRUE); |
729 | ||
649b825d | 730 | //Clusters in event time difference |
45769d5b | 731 | for(Int_t iclus2 = 0; iclus2 < caloClusters->GetEntriesFast(); iclus2++ ) |
732 | { | |
649b825d | 733 | AliVCluster* clus2 = (AliVCluster*) caloClusters->At(iclus2); |
734 | ||
45769d5b | 735 | if( clus->GetID() == clus2->GetID() ) continue; |
649b825d | 736 | |
45769d5b | 737 | if( clus->GetM02() > 0.01 && clus2->GetM02() > 0.01 ) |
a87e069d | 738 | { |
a82b4462 | 739 | Double_t tof2 = clus2->GetTOF()*1.e9; |
649b825d | 740 | fhClusterPairDiffTimeE ->Fill(clus->E(), tof-tof2); |
741 | } | |
742 | } | |
743 | ||
1a83b960 | 744 | Int_t nModule = GetModuleNumber(clus); |
745 | Int_t nCaloCellsPerCluster = clus->GetNCells(); | |
746 | ||
45769d5b | 747 | if(nCaloCellsPerCluster > 1) |
748 | { | |
649b825d | 749 | // check time of cells respect to max energy cell |
750 | ||
e6fec6f5 | 751 | if(fFillAllCellTimeHisto) |
a87e069d | 752 | { |
45769d5b | 753 | // Get some time averages |
754 | Double_t timeAverages[2] = {0.,0.}; | |
755 | CalculateAverageTime(clus, cells, timeAverages); | |
756 | ||
649b825d | 757 | fhClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]); |
649b825d | 758 | fhClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]); |
649b825d | 759 | } |
760 | ||
dbba06ca | 761 | for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++) |
762 | { | |
649b825d | 763 | Int_t absId = clus->GetCellsAbsId()[ipos]; |
45769d5b | 764 | if( absId == absIdMax || cells->GetCellAmplitude(absIdMax) < 0.01 ) continue; |
649b825d | 765 | |
766 | Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax); | |
767 | fhClusterMaxCellCloseCellRatio->Fill(clus->E(),frac); | |
768 | fhClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId)); | |
769 | ||
e6fec6f5 | 770 | if(fFillAllCellTimeHisto) |
dbba06ca | 771 | { |
649b825d | 772 | Double_t time = cells->GetCellTime(absId); |
dbba06ca | 773 | GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
649b825d | 774 | |
775 | Float_t diff = (tmax-time*1.0e9); | |
776 | fhCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff); | |
777 | if(TMath::Abs(TMath::Abs(diff) > 100) && clus->E() > 1 ) fhCellIdCellLargeTimeSpread->Fill(absId); | |
778 | } | |
779 | ||
780 | }// fill cell-cluster histogram loop | |
781 | ||
782 | }//check time and energy of cells respect to max energy cell if cluster of more than 1 cell | |
783 | ||
649b825d | 784 | // Get vertex for photon momentum calculation and event selection |
785 | Double_t v[3] = {0,0,0}; //vertex ; | |
1a83b960 | 786 | //GetReader()->GetVertex(v); // |
649b825d | 787 | |
788 | TLorentzVector mom ; | |
1a83b960 | 789 | clus->GetMomentum(mom,v); |
649b825d | 790 | |
791 | Float_t e = mom.E(); | |
792 | Float_t pt = mom.Pt(); | |
793 | Float_t eta = mom.Eta(); | |
794 | Float_t phi = mom.Phi(); | |
795 | if(phi < 0) phi +=TMath::TwoPi(); | |
796 | ||
797 | if(GetDebug() > 0) { | |
798 | printf("AliAnaCalorimeterQA::ClusterHistograms() - cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f \n",e,pt,eta,phi*TMath::RadToDeg()); | |
799 | } | |
800 | ||
801 | fhE ->Fill(e); | |
802 | if(nModule >=0 && nModule < fNModules) fhEMod->Fill(e,nModule); | |
45769d5b | 803 | |
804 | fhPt ->Fill(pt); | |
805 | fhPhi ->Fill(phi); | |
806 | fhEta ->Fill(eta); | |
649b825d | 807 | |
808 | if(fFillAllTH3) | |
809 | fhEtaPhiE->Fill(eta,phi,e); | |
810 | ||
811 | //Cells per cluster | |
812 | fhNCellsPerCluster ->Fill(e, nCaloCellsPerCluster); | |
a82b4462 | 813 | |
649b825d | 814 | //Position |
45769d5b | 815 | if(fFillAllPosHisto2) |
816 | { | |
649b825d | 817 | Float_t pos[3] ; |
818 | clus->GetPosition(pos); | |
819 | ||
820 | fhXE ->Fill(pos[0],e); | |
821 | fhYE ->Fill(pos[1],e); | |
822 | fhZE ->Fill(pos[2],e); | |
823 | if(fFillAllTH3) | |
824 | fhXYZ ->Fill(pos[0], pos[1],pos[2]); | |
825 | ||
826 | fhXNCells->Fill(pos[0],nCaloCellsPerCluster); | |
827 | fhYNCells->Fill(pos[1],nCaloCellsPerCluster); | |
828 | fhZNCells->Fill(pos[2],nCaloCellsPerCluster); | |
829 | Float_t rxyz = TMath::Sqrt(pos[0]*pos[0]+pos[1]*pos[1]);//+pos[2]*pos[2]); | |
830 | fhRE ->Fill(rxyz,e); | |
831 | fhRNCells->Fill(rxyz ,nCaloCellsPerCluster); | |
832 | } | |
833 | ||
45769d5b | 834 | if( nModule >= 0 && nModule < fNModules ) fhNCellsPerClusterMod[nModule]->Fill(e, nCaloCellsPerCluster); |
649b825d | 835 | |
836 | } | |
837 | ||
f3138ecf | 838 | //____________________________________________________________________________ |
839 | void AliAnaCalorimeterQA::ClusterLoopHistograms(const TObjArray *caloClusters, | |
840 | AliVCaloCells* cells) | |
649b825d | 841 | { |
842 | // Fill clusters related histograms | |
843 | ||
844 | TLorentzVector mom ; | |
845 | Int_t nLabel = 0 ; | |
846 | Int_t *labels = 0x0; | |
847 | Int_t nCaloClusters = caloClusters->GetEntriesFast() ; | |
848 | Int_t nCaloClustersAccepted = 0 ; | |
849 | Int_t nCaloCellsPerCluster = 0 ; | |
850 | Bool_t matched = kFALSE; | |
851 | Int_t nModule =-1 ; | |
852 | ||
853 | // Get vertex for photon momentum calculation and event selection | |
854 | Double_t v[3] = {0,0,0}; //vertex ; | |
1a83b960 | 855 | //GetReader()->GetVertex(v); |
649b825d | 856 | |
857 | Int_t *nClustersInModule = new Int_t[fNModules]; | |
858 | for(Int_t imod = 0; imod < fNModules; imod++ ) nClustersInModule[imod] = 0; | |
859 | ||
860 | if(GetDebug() > 0) | |
861 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - In %s there are %d clusters \n", fCalorimeter.Data(), nCaloClusters); | |
862 | ||
863 | // Loop over CaloClusters | |
45769d5b | 864 | for(Int_t iclus = 0; iclus < nCaloClusters; iclus++) |
865 | { | |
1a72f6c5 | 866 | if(GetDebug() > 0) |
867 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - cluster: %d/%d, data %d \n", | |
f3138ecf | 868 | iclus+1,nCaloClusters,GetReader()->GetDataType()); |
649b825d | 869 | |
870 | AliVCluster* clus = (AliVCluster*)caloClusters->At(iclus); | |
871 | ||
872 | // Get the fraction of the cluster energy that carries the cell with highest energy and its absId | |
873 | Float_t maxCellFraction = 0.; | |
874 | Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus,maxCellFraction); | |
875 | ||
876 | //Cut on time of clusters | |
877 | Double_t tof = clus->GetTOF()*1.e9; | |
45769d5b | 878 | if( tof < fTimeCutMin || tof > fTimeCutMax ) |
e6fec6f5 | 879 | { |
649b825d | 880 | if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cluster with TOF %f\n",tof); |
881 | continue; | |
882 | } | |
883 | ||
884 | // Get cluster kinematics | |
1a83b960 | 885 | clus->GetMomentum(mom,v); |
649b825d | 886 | |
887 | // Check only certain regions | |
888 | Bool_t in = kTRUE; | |
889 | if(IsFiducialCutOn()) in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ; | |
890 | if(!in) continue; | |
891 | ||
1a83b960 | 892 | // MC labels |
649b825d | 893 | nLabel = clus->GetNLabels(); |
894 | labels = clus->GetLabels(); | |
895 | ||
1a83b960 | 896 | // SuperModule number of cluster |
897 | nModule = GetModuleNumber(clus); | |
898 | ||
649b825d | 899 | // Cells per cluster |
900 | nCaloCellsPerCluster = clus->GetNCells(); | |
901 | ||
902 | // Cluster mathed with track? | |
49b5c49b | 903 | matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(), GetReader()->GetInputEvent()); |
649b825d | 904 | |
649b825d | 905 | //Get time of max cell |
906 | Double_t tmax = cells->GetCellTime(absIdMax); | |
dbba06ca | 907 | GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
649b825d | 908 | tmax*=1.e9; |
909 | ||
1a83b960 | 910 | // Fill histograms related to single cluster |
911 | ||
1a83b960 | 912 | // Fill some histograms before applying the exotic cell / bad map cut |
913 | fhNCellsPerClusterNoCut ->Fill(clus->E(), nCaloCellsPerCluster); | |
914 | if(nModule >=0 && nModule < fNModules) fhNCellsPerClusterModNoCut[nModule]->Fill(clus->E(), nCaloCellsPerCluster); | |
915 | ||
916 | fhClusterMaxCellDiffNoCut->Fill(clus->E(),maxCellFraction); | |
917 | ||
918 | Float_t ampMax = cells->GetCellAmplitude(absIdMax); | |
dbba06ca | 919 | GetCaloUtils()->RecalibrateCellAmplitude(ampMax,fCalorimeter, absIdMax); |
1a83b960 | 920 | |
f1538a5f | 921 | if(fStudyExotic) ExoticHistograms(absIdMax, ampMax, clus, cells); |
922 | ||
649b825d | 923 | //Check bad clusters if requested and rejection was not on |
a82b4462 | 924 | Bool_t goodCluster = IsGoodCluster(absIdMax, cells); |
f1538a5f | 925 | |
2747966a | 926 | Float_t eCrossFrac = 0; |
927 | if(ampMax > 0.01) eCrossFrac = 1-GetECross(absIdMax,cells)/ampMax; | |
649b825d | 928 | |
649b825d | 929 | if(!goodCluster) |
1a83b960 | 930 | { |
649b825d | 931 | BadClusterHistograms(clus, caloClusters, cells, absIdMax, |
45769d5b | 932 | maxCellFraction, eCrossFrac, tmax); |
1a83b960 | 933 | continue; |
934 | } | |
649b825d | 935 | |
936 | ClusterHistograms(clus, caloClusters, cells, absIdMax, | |
45769d5b | 937 | maxCellFraction, eCrossFrac, tmax); |
649b825d | 938 | |
939 | nCaloClustersAccepted++; | |
49214ef9 | 940 | nModule = GetModuleNumber(clus); |
2747966a | 941 | if(nModule >=0 && nModule < fNModules) |
942 | { | |
649b825d | 943 | if (fCalorimeter=="EMCAL" && mom.E() > 2*fEMCALCellAmpMin) nClustersInModule[nModule]++; |
944 | else if(fCalorimeter=="PHOS" && mom.E() > 2*fPHOSCellAmpMin ) nClustersInModule[nModule]++; | |
945 | } | |
1a83b960 | 946 | |
649b825d | 947 | // Cluster weights |
948 | if(fStudyWeight) WeightHistograms(clus, cells); | |
949 | ||
950 | // Cells in cluster position | |
951 | if(fFillAllPosHisto) CellInClusterPositionHistograms(clus); | |
952 | ||
953 | // Fill histograms related to single cluster, mc vs data | |
954 | Int_t mcOK = kFALSE; | |
955 | Int_t pdg = -1; | |
956 | if(IsDataMC() && nLabel > 0 && labels) | |
957 | mcOK = ClusterMCHistograms(mom, matched, labels, nLabel, pdg); | |
008693e5 | 958 | |
649b825d | 959 | // Matched clusters with tracks, also do some MC comparison, needs input from ClusterMCHistograms |
960 | if( matched && fFillAllTMHisto) | |
961 | ClusterMatchedWithTrackHistograms(clus,mom,mcOK,pdg); | |
962 | ||
963 | // Invariant mass | |
d07278cf | 964 | // Try to reduce background with a mild shower shape cut and no more than 1 maxima |
965 | // in cluster and remove low energy clusters | |
966 | if(fFillAllPi0Histo && nCaloClusters > 1 && nCaloCellsPerCluster > 1 && | |
967 | GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1 && | |
45769d5b | 968 | clus->GetM02() < 0.5 && clus->E() > 0.5) |
a82b4462 | 969 | InvariantMassHistograms(iclus, mom, nModule, caloClusters,cells); |
649b825d | 970 | |
971 | }//cluster loop | |
972 | ||
973 | // Number of clusters histograms | |
974 | if(nCaloClustersAccepted > 0) fhNClusters->Fill(nCaloClustersAccepted); | |
975 | ||
976 | // Number of clusters per module | |
2747966a | 977 | for(Int_t imod = 0; imod < fNModules; imod++ ) |
978 | { | |
649b825d | 979 | if(GetDebug() > 1) |
980 | printf("AliAnaCalorimeterQA::ClusterLoopHistograms() - module %d calo %s clusters %d\n", imod, fCalorimeter.Data(), nClustersInModule[imod]); | |
981 | fhNClustersMod->Fill(nClustersInModule[imod],imod); | |
982 | } | |
983 | ||
984 | delete [] nClustersInModule; | |
985 | ||
986 | } | |
987 | ||
b94e038e | 988 | //__________________________________________________________________________________________ |
989 | Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(TLorentzVector mom, Bool_t matched, | |
990 | const Int_t * labels, Int_t nLabels, Int_t & pdg ) | |
649b825d | 991 | { |
992 | ||
993 | //Fill histograms only possible when simulation | |
994 | ||
2747966a | 995 | if(!labels || nLabels<=0) |
996 | { | |
42d47cb7 | 997 | if(GetDebug() > 1) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Strange, labels array %p, n labels %d \n", labels,nLabels); |
998 | return kFALSE; | |
999 | } | |
1000 | ||
2747966a | 1001 | if(GetDebug() > 1) |
1002 | { | |
42d47cb7 | 1003 | printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Primaries: nlabels %d\n",nLabels); |
649b825d | 1004 | } |
1005 | ||
1006 | Float_t e = mom.E(); | |
1007 | Float_t eta = mom.Eta(); | |
1008 | Float_t phi = mom.Phi(); | |
1009 | if(phi < 0) phi +=TMath::TwoPi(); | |
1010 | ||
1011 | AliAODMCParticle * aodprimary = 0x0; | |
1012 | TParticle * primary = 0x0; | |
1013 | ||
1014 | //Play with the MC stack if available | |
1015 | Int_t label = labels[0]; | |
1016 | ||
2747966a | 1017 | if(label < 0) |
1018 | { | |
008693e5 | 1019 | if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** bad label ***: label %d \n", label); |
649b825d | 1020 | return kFALSE; |
1021 | } | |
1022 | ||
45769d5b | 1023 | Int_t pdg0 =-1; Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1; |
1024 | Float_t vxMC = 0; Float_t vyMC = 0; | |
1025 | Float_t eMC = 0; //Float_t ptMC= 0; | |
1026 | Float_t phiMC = 0; Float_t etaMC = 0; | |
1027 | Int_t charge = 0; | |
649b825d | 1028 | |
1029 | //Check the origin. | |
2644ead9 | 1030 | Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader()); |
649b825d | 1031 | |
d07278cf | 1032 | if ( GetReader()->ReadStack() && |
1033 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)) | |
1034 | { //it MC stack and known tag | |
649b825d | 1035 | |
d07278cf | 1036 | if( label >= GetMCStack()->GetNtrack()) |
1037 | { | |
008693e5 | 1038 | if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** large label ***: label %d, n tracks %d \n", label, GetMCStack()->GetNtrack()); |
649b825d | 1039 | return kFALSE; |
1040 | } | |
1041 | ||
1042 | primary = GetMCStack()->Particle(label); | |
1043 | iMother = label; | |
1044 | pdg0 = TMath::Abs(primary->GetPdgCode()); | |
1045 | pdg = pdg0; | |
1046 | status = primary->GetStatusCode(); | |
1047 | vxMC = primary->Vx(); | |
1048 | vyMC = primary->Vy(); | |
1049 | iParent = primary->GetFirstMother(); | |
1050 | ||
d07278cf | 1051 | if(GetDebug() > 1 ) |
1052 | { | |
008693e5 | 1053 | printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Cluster most contributing mother: \n"); |
649b825d | 1054 | printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg0, primary->GetName(),status, iParent); |
1055 | } | |
1056 | ||
1057 | //Get final particle, no conversion products | |
d07278cf | 1058 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)) |
1059 | { | |
649b825d | 1060 | //Get the parent |
1061 | primary = GetMCStack()->Particle(iParent); | |
1062 | pdg = TMath::Abs(primary->GetPdgCode()); | |
008693e5 | 1063 | |
1064 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Converted cluster!. Find before conversion: \n"); | |
1065 | ||
d07278cf | 1066 | while((pdg == 22 || pdg == 11) && status != 1) |
1067 | { | |
008693e5 | 1068 | Int_t iMotherOrg = iMother; |
649b825d | 1069 | iMother = iParent; |
1070 | primary = GetMCStack()->Particle(iMother); | |
1071 | status = primary->GetStatusCode(); | |
649b825d | 1072 | pdg = TMath::Abs(primary->GetPdgCode()); |
008693e5 | 1073 | iParent = primary->GetFirstMother(); |
1074 | ||
1075 | // If gone too back and non stable, assign the decay photon/electron | |
1076 | // there are other possible decays, ignore them for the moment | |
1077 | if(pdg==111 || pdg==221) | |
1078 | { | |
1079 | primary = GetMCStack()->Particle(iMotherOrg); | |
1080 | break; | |
1081 | } | |
1082 | ||
1083 | if( iParent < 0 ) | |
1084 | { | |
1085 | iParent = iMother; | |
008693e5 | 1086 | break; |
1087 | } | |
1088 | ||
649b825d | 1089 | if(GetDebug() > 1 )printf("\t pdg %d, index %d, %s, status %d \n",pdg, iMother, primary->GetName(),status); |
1090 | } | |
008693e5 | 1091 | |
d07278cf | 1092 | if(GetDebug() > 1 ) |
1093 | { | |
649b825d | 1094 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n"); |
1095 | printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg, primary->GetName(), status, iParent); | |
1096 | } | |
1097 | ||
1098 | } | |
1099 | ||
1100 | //Overlapped pi0 (or eta, there will be very few), get the meson | |
1101 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) || | |
d07278cf | 1102 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)) |
1103 | { | |
649b825d | 1104 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: \n"); |
008693e5 | 1105 | |
d07278cf | 1106 | while(pdg != 111 && pdg != 221) |
008693e5 | 1107 | { |
1108 | //printf("iMother %d, pdg %d, iParent %d, pdg %d\n",iMother,pdg,iParent,GetMCStack()->Particle(iParent)->GetPdgCode()); | |
649b825d | 1109 | iMother = iParent; |
1110 | primary = GetMCStack()->Particle(iMother); | |
1111 | status = primary->GetStatusCode(); | |
649b825d | 1112 | pdg = TMath::Abs(primary->GetPdgCode()); |
008693e5 | 1113 | iParent = primary->GetFirstMother(); |
1114 | ||
1115 | if( iParent < 0 )break; | |
1116 | ||
649b825d | 1117 | if(GetDebug() > 1 ) printf("\t pdg %d, %s, index %d\n",pdg, primary->GetName(),iMother); |
008693e5 | 1118 | |
d07278cf | 1119 | if(iMother==-1) |
1120 | { | |
649b825d | 1121 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n"); |
1122 | //break; | |
1123 | } | |
1124 | } | |
008693e5 | 1125 | |
649b825d | 1126 | if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n", |
1127 | primary->GetName(),iMother); | |
1128 | } | |
1129 | ||
1130 | eMC = primary->Energy(); | |
ecdde216 | 1131 | //ptMC = primary->Pt(); |
649b825d | 1132 | phiMC = primary->Phi(); |
1133 | etaMC = primary->Eta(); | |
1134 | pdg = TMath::Abs(primary->GetPdgCode()); | |
1135 | charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge(); | |
1136 | ||
1137 | } | |
d07278cf | 1138 | else if( GetReader()->ReadAODMCParticles() && |
1139 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)) | |
1140 | {//it MC AOD and known tag | |
649b825d | 1141 | //Get the list of MC particles |
2644ead9 | 1142 | if(!GetReader()->GetAODMCParticles()) |
649b825d | 1143 | AliFatal("MCParticles not available!"); |
1144 | ||
2644ead9 | 1145 | aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(label); |
649b825d | 1146 | iMother = label; |
1147 | pdg0 = TMath::Abs(aodprimary->GetPdgCode()); | |
1148 | pdg = pdg0; | |
1149 | status = aodprimary->IsPrimary(); | |
1150 | vxMC = aodprimary->Xv(); | |
1151 | vyMC = aodprimary->Yv(); | |
1152 | iParent = aodprimary->GetMother(); | |
1153 | ||
45769d5b | 1154 | if( GetDebug() > 1 ) |
d07278cf | 1155 | { |
649b825d | 1156 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Cluster most contributing mother: \n"); |
1157 | printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d, parent %d \n", | |
1158 | iMother, pdg0, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary(), iParent); | |
1159 | } | |
1160 | ||
1161 | //Get final particle, no conversion products | |
45769d5b | 1162 | if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ) |
008693e5 | 1163 | { |
45769d5b | 1164 | if( GetDebug() > 1 ) |
649b825d | 1165 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n"); |
1166 | //Get the parent | |
2644ead9 | 1167 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iParent); |
649b825d | 1168 | pdg = TMath::Abs(aodprimary->GetPdgCode()); |
d07278cf | 1169 | while ((pdg == 22 || pdg == 11) && !aodprimary->IsPhysicalPrimary()) |
1170 | { | |
008693e5 | 1171 | Int_t iMotherOrg = iMother; |
649b825d | 1172 | iMother = iParent; |
2644ead9 | 1173 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother); |
649b825d | 1174 | status = aodprimary->IsPrimary(); |
1175 | iParent = aodprimary->GetMother(); | |
1176 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
008693e5 | 1177 | |
1178 | // If gone too back and non stable, assign the decay photon/electron | |
1179 | // there are other possible decays, ignore them for the moment | |
45769d5b | 1180 | if( pdg == 111 || pdg == 221 ) |
008693e5 | 1181 | { |
2644ead9 | 1182 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMotherOrg); |
008693e5 | 1183 | break; |
1184 | } | |
1185 | ||
45769d5b | 1186 | if( iParent < 0 ) |
008693e5 | 1187 | { |
1188 | iParent = iMother; | |
1189 | break; | |
1190 | } | |
1191 | ||
45769d5b | 1192 | if( GetDebug() > 1 ) |
649b825d | 1193 | printf("\t pdg %d, index %d, Primary? %d, Physical Primary? %d \n", |
1194 | pdg, iMother, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()); | |
1195 | } | |
1196 | ||
45769d5b | 1197 | if( GetDebug() > 1 ) |
d07278cf | 1198 | { |
649b825d | 1199 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n"); |
1200 | printf("\t Mother label %d, pdg %d, parent %d, Primary? %d, Physical Primary? %d \n", | |
1201 | iMother, pdg, iParent, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()); | |
1202 | } | |
649b825d | 1203 | } |
1204 | ||
1205 | //Overlapped pi0 (or eta, there will be very few), get the meson | |
1206 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) || | |
2747966a | 1207 | GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)) |
1208 | { | |
649b825d | 1209 | if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: PDG %d, mom %d \n",pdg, iMother); |
45769d5b | 1210 | |
008693e5 | 1211 | while(pdg != 111 && pdg != 221) |
1212 | { | |
649b825d | 1213 | iMother = iParent; |
2644ead9 | 1214 | aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother); |
649b825d | 1215 | status = aodprimary->IsPrimary(); |
1216 | iParent = aodprimary->GetMother(); | |
1217 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
008693e5 | 1218 | |
45769d5b | 1219 | if( iParent < 0 ) break; |
649b825d | 1220 | |
45769d5b | 1221 | if( GetDebug() > 1 ) printf("\t pdg %d, index %d\n",pdg, iMother); |
649b825d | 1222 | |
2747966a | 1223 | if(iMother==-1) |
1224 | { | |
649b825d | 1225 | printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n"); |
1226 | //break; | |
1227 | } | |
1228 | } | |
1229 | ||
1230 | if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n", | |
1231 | aodprimary->GetName(),iMother); | |
1232 | } | |
1233 | ||
1234 | status = aodprimary->IsPrimary(); | |
1235 | eMC = aodprimary->E(); | |
ecdde216 | 1236 | //ptMC = aodprimary->Pt(); |
649b825d | 1237 | phiMC = aodprimary->Phi(); |
1238 | etaMC = aodprimary->Eta(); | |
1239 | pdg = TMath::Abs(aodprimary->GetPdgCode()); | |
1240 | charge = aodprimary->Charge(); | |
1241 | ||
1242 | } | |
1243 | ||
1244 | //Float_t vz = primary->Vz(); | |
1245 | Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC); | |
45769d5b | 1246 | if( ( pdg == 22 || TMath::Abs(pdg) == 11 ) && status != 1 ) |
2747966a | 1247 | { |
649b825d | 1248 | fhEMVxyz ->Fill(vxMC,vyMC);//,vz); |
1249 | fhEMR ->Fill(e,rVMC); | |
1250 | } | |
1251 | ||
1252 | //printf("reco e %f, pt %f, phi %f, eta %f \n", e, pt, phi, eta); | |
1253 | //printf("prim e %f, pt %f, phi %f, eta %f \n", eMC,ptMC,phiMC ,etaMC ); | |
1254 | //printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r); | |
1255 | ||
1256 | //Overlapped pi0 (or eta, there will be very few) | |
2747966a | 1257 | if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0)) |
1258 | { | |
c5693f62 | 1259 | fhRecoMCE [kmcPi0][matched] ->Fill(e,eMC); |
1260 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcPi0][(matched)]->Fill(eta,etaMC); | |
1261 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcPi0][(matched)]->Fill(phi,phiMC); | |
1262 | if(eMC > 0) fhRecoMCRatioE [kmcPi0][(matched)]->Fill(e,e/eMC); | |
1263 | fhRecoMCDeltaE [kmcPi0][(matched)]->Fill(e,eMC-e); | |
1264 | fhRecoMCDeltaPhi[kmcPi0][(matched)]->Fill(e,phiMC-phi); | |
1265 | fhRecoMCDeltaEta[kmcPi0][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1266 | }//Overlapped pizero decay |
2747966a | 1267 | else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)) |
1268 | { | |
c5693f62 | 1269 | fhRecoMCE [kmcEta][(matched)] ->Fill(e,eMC); |
1270 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcEta][(matched)]->Fill(eta,etaMC); | |
1271 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcEta][(matched)]->Fill(phi,phiMC); | |
1272 | if(eMC > 0) fhRecoMCRatioE [kmcEta][(matched)]->Fill(e,e/eMC); | |
1273 | fhRecoMCDeltaE [kmcEta][(matched)]->Fill(e,eMC-e); | |
1274 | fhRecoMCDeltaPhi[kmcEta][(matched)]->Fill(e,phiMC-phi); | |
1275 | fhRecoMCDeltaEta[kmcEta][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1276 | }//Overlapped eta decay |
008693e5 | 1277 | else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && |
1278 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)) | |
2747966a | 1279 | { |
c5693f62 | 1280 | fhRecoMCE [kmcPhoton][(matched)] ->Fill(e,eMC); |
1281 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcPhoton][(matched)]->Fill(eta,etaMC); | |
1282 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcPhoton][(matched)]->Fill(phi,phiMC); | |
1283 | if(eMC > 0) fhRecoMCRatioE [kmcPhoton][(matched)]->Fill(e,e/eMC); | |
008693e5 | 1284 | |
c5693f62 | 1285 | fhRecoMCDeltaE [kmcPhoton][(matched)]->Fill(e,eMC-e); |
1286 | fhRecoMCDeltaPhi[kmcPhoton][(matched)]->Fill(e,phiMC-phi); | |
1287 | fhRecoMCDeltaEta[kmcPhoton][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1288 | }//photon |
008693e5 | 1289 | else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) && |
1290 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)) | |
2747966a | 1291 | { |
c5693f62 | 1292 | fhRecoMCE [kmcElectron][(matched)] ->Fill(e,eMC); |
1293 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcElectron][(matched)]->Fill(eta,etaMC); | |
1294 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcElectron][(matched)]->Fill(phi,phiMC); | |
1295 | if(eMC > 0) fhRecoMCRatioE [kmcElectron][(matched)]->Fill(e,e/eMC); | |
1296 | fhRecoMCDeltaE [kmcElectron][(matched)]->Fill(e,eMC-e); | |
1297 | fhRecoMCDeltaPhi[kmcElectron][(matched)]->Fill(e,phiMC-phi); | |
1298 | fhRecoMCDeltaEta[kmcElectron][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1299 | fhEMVxyz ->Fill(vxMC,vyMC);//,vz); |
1300 | fhEMR ->Fill(e,rVMC); | |
1301 | } | |
2747966a | 1302 | else if(charge == 0) |
1303 | { | |
c5693f62 | 1304 | fhRecoMCE [kmcNeHadron][(matched)] ->Fill(e,eMC); |
1305 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcNeHadron][(matched)]->Fill(eta,etaMC); | |
1306 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcNeHadron][(matched)]->Fill(phi,phiMC); | |
1307 | if(eMC > 0) fhRecoMCRatioE [kmcNeHadron][(matched)]->Fill(e,e/eMC); | |
1308 | fhRecoMCDeltaE [kmcNeHadron][(matched)]->Fill(e,eMC-e); | |
1309 | fhRecoMCDeltaPhi[kmcNeHadron][(matched)]->Fill(e,phiMC-phi); | |
1310 | fhRecoMCDeltaEta[kmcNeHadron][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1311 | fhHaVxyz ->Fill(vxMC,vyMC);//,vz); |
1312 | fhHaR ->Fill(e,rVMC); | |
1313 | } | |
2747966a | 1314 | else if(charge!=0) |
1315 | { | |
c5693f62 | 1316 | fhRecoMCE [kmcChHadron][(matched)] ->Fill(e,eMC); |
1317 | if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcChHadron][(matched)]->Fill(eta,etaMC); | |
1318 | if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcChHadron][(matched)]->Fill(phi,phiMC); | |
1319 | if(eMC > 0) fhRecoMCRatioE [kmcChHadron][(matched)]->Fill(e,e/eMC); | |
1320 | fhRecoMCDeltaE [kmcChHadron][(matched)]->Fill(e,eMC-e); | |
1321 | fhRecoMCDeltaPhi[kmcChHadron][(matched)]->Fill(e,phiMC-phi); | |
1322 | fhRecoMCDeltaEta[kmcChHadron][(matched)]->Fill(e,etaMC-eta); | |
649b825d | 1323 | fhHaVxyz ->Fill(vxMC,vyMC);//,vz); |
1324 | fhHaR ->Fill(e,rVMC); | |
1325 | } | |
1326 | ||
45769d5b | 1327 | if( primary || aodprimary ) return kTRUE ; |
1328 | else return kFALSE; | |
649b825d | 1329 | |
1330 | } | |
1331 | ||
1332 | //________________________________________________________________________________________________ | |
1333 | void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, TLorentzVector mom, | |
b94e038e | 1334 | Bool_t okPrimary, Int_t pdg) |
649b825d | 1335 | { |
1336 | //Histograms for clusters matched with tracks | |
42d47cb7 | 1337 | |
649b825d | 1338 | Float_t e = mom.E(); |
1339 | Float_t pt = mom.Pt(); | |
1340 | Float_t eta = mom.Eta(); | |
1341 | Float_t phi = mom.Phi(); | |
1342 | if(phi < 0) phi +=TMath::TwoPi(); | |
45769d5b | 1343 | |
1344 | fhECharged ->Fill(e); | |
1345 | fhPtCharged ->Fill(pt); | |
1346 | fhPhiCharged ->Fill(phi); | |
1347 | fhEtaCharged ->Fill(eta); | |
a82b4462 | 1348 | |
42d47cb7 | 1349 | //Study the track and matched cluster if track exists. |
1350 | ||
4bfeae64 | 1351 | AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent()); |
649b825d | 1352 | |
1353 | if(!track) return ; | |
649b825d | 1354 | |
a87e069d | 1355 | Double_t tpt = track->Pt(); |
1356 | Double_t tmom = track->P(); | |
1357 | Double_t dedx = track->GetTPCsignal(); | |
1358 | Int_t nITS = track->GetNcls(0); | |
1359 | Int_t nTPC = track->GetNcls(1); | |
653aed3c | 1360 | Bool_t positive = kFALSE; |
1361 | if(track) positive = (track->Charge()>0); | |
a87e069d | 1362 | |
1363 | // Residuals | |
1364 | Float_t deta = clus->GetTrackDz(); | |
1365 | Float_t dphi = clus->GetTrackDx(); | |
1366 | Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta); | |
1367 | ||
653aed3c | 1368 | if(TMath::Abs(dphi) < 999) |
1369 | { | |
1370 | fhTrackMatchedDEta->Fill(e,deta); | |
1371 | fhTrackMatchedDPhi->Fill(e,dphi); | |
1372 | if(e > 0.5) fhTrackMatchedDEtaDPhi->Fill(deta,dphi); | |
1373 | ||
1374 | if(track && positive) | |
1375 | { | |
653aed3c | 1376 | fhTrackMatchedDEtaPos->Fill(e,deta); |
1377 | fhTrackMatchedDPhiPos->Fill(e,dphi); | |
1378 | if(e > 0.5) fhTrackMatchedDEtaDPhiPos->Fill(deta,dphi); | |
1379 | } | |
1380 | } | |
a87e069d | 1381 | |
653aed3c | 1382 | Double_t eOverP = e/tmom; |
d55bb5e1 | 1383 | fh1EOverP->Fill(tpt, eOverP); |
653aed3c | 1384 | if(dR < 0.02) |
1385 | { | |
a054a582 | 1386 | fh1EOverPR02->Fill(tpt,eOverP); |
1387 | if(dedx > 60 && dedx < 100) fh1EleEOverP->Fill(tpt,eOverP); | |
1388 | } | |
a87e069d | 1389 | |
1390 | fh2dR->Fill(e,dR); | |
1391 | fh2MatchdEdx->Fill(tmom,dedx); | |
1392 | ||
1393 | if(IsDataMC() && okPrimary) | |
1394 | { | |
1395 | Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge(); | |
649b825d | 1396 | |
a87e069d | 1397 | if(TMath::Abs(pdg) == 11) |
1398 | { | |
d55bb5e1 | 1399 | fhMCEle1EOverP->Fill(tpt,eOverP); |
a87e069d | 1400 | fhMCEle1dR->Fill(dR); |
1401 | fhMCEle2MatchdEdx->Fill(tmom,dedx); | |
653aed3c | 1402 | if(dR < 0.02) |
1403 | { | |
1404 | fhMCEle1EOverPR02->Fill(tpt,eOverP); | |
1405 | if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt,eOverP); | |
a054a582 | 1406 | } |
a87e069d | 1407 | } |
1408 | else if(charge!=0) | |
1409 | { | |
d55bb5e1 | 1410 | fhMCChHad1EOverP->Fill(tpt,eOverP); |
a87e069d | 1411 | fhMCChHad1dR->Fill(dR); |
1412 | fhMCChHad2MatchdEdx->Fill(tmom,dedx); | |
653aed3c | 1413 | if(dR < 0.02) |
1414 | { | |
1415 | fhMCChHad1EOverPR02->Fill(tpt,eOverP); | |
1416 | if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt,eOverP); | |
a054a582 | 1417 | } |
a87e069d | 1418 | } |
1419 | else if(charge == 0) | |
1420 | { | |
d55bb5e1 | 1421 | fhMCNeutral1EOverP->Fill(tpt,eOverP); |
a87e069d | 1422 | fhMCNeutral1dR->Fill(dR); |
1423 | fhMCNeutral2MatchdEdx->Fill(tmom,dedx); | |
653aed3c | 1424 | if(dR < 0.02) |
1425 | { | |
1426 | fhMCNeutral1EOverPR02->Fill(tpt,eOverP); | |
1427 | if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt,eOverP); | |
a054a582 | 1428 | } |
649b825d | 1429 | } |
a87e069d | 1430 | }//DataMC |
1431 | ||
45769d5b | 1432 | if(dR < 0.02 && eOverP > 0.6 && eOverP < 1.2 |
a87e069d | 1433 | && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20) |
1434 | { | |
1435 | fh2EledEdx->Fill(tmom,dedx); | |
649b825d | 1436 | } |
a87e069d | 1437 | |
649b825d | 1438 | } |
1439 | ||
1440 | //___________________________________ | |
1441 | void AliAnaCalorimeterQA::Correlate() | |
1442 | { | |
1443 | // Correlate information from PHOS and EMCAL and with V0 and track multiplicity | |
1444 | ||
1445 | //Clusters | |
1446 | TObjArray * caloClustersEMCAL = GetEMCALClusters(); | |
1447 | TObjArray * caloClustersPHOS = GetPHOSClusters(); | |
1448 | ||
1449 | Int_t nclEMCAL = caloClustersEMCAL->GetEntriesFast(); | |
1450 | Int_t nclPHOS = caloClustersPHOS ->GetEntriesFast(); | |
1451 | ||
653aed3c | 1452 | Float_t cen = GetEventCentrality(); |
1453 | Float_t ep = GetEventPlaneAngle(); | |
1454 | ||
649b825d | 1455 | Float_t sumClusterEnergyEMCAL = 0; |
1456 | Float_t sumClusterEnergyPHOS = 0; | |
1457 | Int_t iclus = 0; | |
1458 | for(iclus = 0 ; iclus < caloClustersEMCAL->GetEntriesFast() ; iclus++) | |
1459 | sumClusterEnergyEMCAL += ((AliVCluster*)caloClustersEMCAL->At(iclus))->E(); | |
1460 | for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++) | |
1461 | sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E(); | |
1462 | ||
649b825d | 1463 | //Cells |
1464 | ||
1465 | AliVCaloCells * cellsEMCAL = GetEMCALCells(); | |
1466 | AliVCaloCells * cellsPHOS = GetPHOSCells(); | |
1467 | ||
1468 | Int_t ncellsEMCAL = cellsEMCAL->GetNumberOfCells(); | |
1469 | Int_t ncellsPHOS = cellsPHOS ->GetNumberOfCells(); | |
1470 | ||
1471 | Float_t sumCellEnergyEMCAL = 0; | |
1472 | Float_t sumCellEnergyPHOS = 0; | |
1473 | Int_t icell = 0; | |
1474 | for(icell = 0 ; icell < cellsEMCAL->GetNumberOfCells() ; icell++) | |
1475 | sumCellEnergyEMCAL += cellsEMCAL->GetAmplitude(icell); | |
1476 | for(icell = 0 ; icell < cellsPHOS->GetNumberOfCells(); icell++) | |
1477 | sumCellEnergyPHOS += cellsPHOS->GetAmplitude(icell); | |
1478 | ||
1479 | ||
1480 | //Fill Histograms | |
1481 | fhCaloCorrNClusters->Fill(nclEMCAL,nclPHOS); | |
1482 | fhCaloCorrEClusters->Fill(sumClusterEnergyEMCAL,sumClusterEnergyPHOS); | |
1483 | fhCaloCorrNCells ->Fill(ncellsEMCAL,ncellsPHOS); | |
1484 | fhCaloCorrECells ->Fill(sumCellEnergyEMCAL,sumCellEnergyPHOS); | |
1485 | ||
1486 | Int_t v0S = GetV0Signal(0)+GetV0Signal(1); | |
1487 | Int_t v0M = GetV0Multiplicity(0)+GetV0Multiplicity(1); | |
1488 | Int_t trM = GetTrackMultiplicity(); | |
653aed3c | 1489 | if(fCalorimeter=="PHOS") |
1490 | { | |
649b825d | 1491 | fhCaloV0MCorrNClusters ->Fill(v0M,nclPHOS); |
1492 | fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyPHOS); | |
1493 | fhCaloV0MCorrNCells ->Fill(v0M,ncellsPHOS); | |
1494 | fhCaloV0MCorrECells ->Fill(v0M,sumCellEnergyPHOS); | |
1495 | ||
1496 | fhCaloV0SCorrNClusters ->Fill(v0S,nclPHOS); | |
1497 | fhCaloV0SCorrEClusters ->Fill(v0S,sumClusterEnergyPHOS); | |
1498 | fhCaloV0SCorrNCells ->Fill(v0S,ncellsPHOS); | |
1499 | fhCaloV0SCorrECells ->Fill(v0S,sumCellEnergyPHOS); | |
1500 | ||
1501 | fhCaloTrackMCorrNClusters->Fill(trM,nclPHOS); | |
1502 | fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyPHOS); | |
1503 | fhCaloTrackMCorrNCells ->Fill(trM,ncellsPHOS); | |
1504 | fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyPHOS); | |
653aed3c | 1505 | |
1506 | fhCaloCenNClusters ->Fill(cen,nclPHOS); | |
1507 | fhCaloCenEClusters ->Fill(cen,sumClusterEnergyPHOS); | |
1508 | fhCaloCenNCells ->Fill(cen,ncellsPHOS); | |
1509 | fhCaloCenECells ->Fill(cen,sumCellEnergyPHOS); | |
1510 | ||
1511 | fhCaloEvPNClusters ->Fill(ep ,nclPHOS); | |
1512 | fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyPHOS); | |
1513 | fhCaloEvPNCells ->Fill(ep ,ncellsPHOS); | |
1514 | fhCaloEvPECells ->Fill(ep ,sumCellEnergyPHOS); | |
649b825d | 1515 | } |
653aed3c | 1516 | else |
1517 | { | |
649b825d | 1518 | fhCaloV0MCorrNClusters ->Fill(v0M,nclEMCAL); |
1519 | fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyEMCAL); | |
1520 | fhCaloV0MCorrNCells ->Fill(v0M,ncellsEMCAL); | |
1521 | fhCaloV0MCorrECells ->Fill(v0M,sumCellEnergyEMCAL); | |
1522 | ||
1523 | fhCaloV0SCorrNClusters ->Fill(v0S,nclEMCAL); | |
1524 | fhCaloV0SCorrEClusters ->Fill(v0S,sumClusterEnergyEMCAL); | |
1525 | fhCaloV0SCorrNCells ->Fill(v0S,ncellsEMCAL); | |
1526 | fhCaloV0SCorrECells ->Fill(v0S,sumCellEnergyEMCAL); | |
1527 | ||
1528 | fhCaloTrackMCorrNClusters->Fill(trM,nclEMCAL); | |
1529 | fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyEMCAL); | |
1530 | fhCaloTrackMCorrNCells ->Fill(trM,ncellsEMCAL); | |
1531 | fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyEMCAL); | |
653aed3c | 1532 | |
1533 | fhCaloCenNClusters ->Fill(cen,nclEMCAL); | |
1534 | fhCaloCenEClusters ->Fill(cen,sumClusterEnergyEMCAL); | |
1535 | fhCaloCenNCells ->Fill(cen,ncellsEMCAL); | |
1536 | fhCaloCenECells ->Fill(cen,sumCellEnergyEMCAL); | |
1537 | ||
1538 | fhCaloEvPNClusters ->Fill(ep ,nclEMCAL); | |
1539 | fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyEMCAL); | |
1540 | fhCaloEvPNCells ->Fill(ep ,ncellsEMCAL); | |
1541 | fhCaloEvPECells ->Fill(ep ,sumCellEnergyEMCAL); | |
649b825d | 1542 | } |
1543 | ||
1544 | if(GetDebug() > 0 ) | |
1545 | { | |
1546 | printf("AliAnaCalorimeterQA::Correlate(): \n"); | |
1547 | printf("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", | |
1548 | ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL); | |
1549 | printf("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", | |
1550 | ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS); | |
1551 | printf("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d \n", v0S,v0M,trM); | |
653aed3c | 1552 | printf("\t centrality : %f, Event plane angle %f \n", cen,ep); |
649b825d | 1553 | } |
1554 | ||
1555 | } | |
1556 | ||
1557 | //__________________________________________________ | |
1558 | TObjString * AliAnaCalorimeterQA::GetAnalysisCuts() | |
1559 | { | |
1560 | //Save parameters used for analysis | |
1561 | TString parList ; //this will be list of parameters used for this analysis. | |
1562 | const Int_t buffersize = 255; | |
1563 | char onePar[buffersize] ; | |
1564 | ||
1565 | snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---\n") ; | |
1566 | parList+=onePar ; | |
1567 | snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ; | |
1568 | parList+=onePar ; | |
1569 | snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns \n",fTimeCutMin, fTimeCutMax) ; | |
1570 | parList+=onePar ; | |
1571 | snprintf(onePar,buffersize,"PHOS Cell Amplitude > %2.2f GeV, EMCAL Cell Amplitude > %2.2f GeV \n",fPHOSCellAmpMin, fEMCALCellAmpMin) ; | |
1572 | parList+=onePar ; | |
1573 | //Get parameters set in base class. | |
1574 | //parList += GetBaseParametersList() ; | |
1575 | ||
1576 | //Get parameters set in FiducialCut class (not available yet) | |
1577 | //parlist += GetFidCut()->GetFidCutParametersList() | |
1578 | ||
1579 | return new TObjString(parList) ; | |
1580 | } | |
1581 | ||
b94e038e | 1582 | //_________________________________________________________________________________ |
1583 | void AliAnaCalorimeterQA::ExoticHistograms(Int_t absIdMax, Float_t ampMax, | |
f1538a5f | 1584 | AliVCluster *clus, AliVCaloCells* cells) |
1585 | { | |
1586 | // Calculate weights | |
1587 | ||
1588 | if(ampMax < 0.01) | |
1589 | { | |
1590 | printf("AliAnaCalorimeterQA::ExoticHistograms()- Low amplitude energy %f\n",ampMax); | |
1591 | return; | |
1592 | } | |
1593 | ||
cc11121e | 1594 | Float_t l0 = clus->GetM02(); |
765206a5 | 1595 | Float_t l1 = clus->GetM20(); |
cc11121e | 1596 | Float_t en = clus->E(); |
1597 | Int_t nc = clus->GetNCells(); | |
765206a5 | 1598 | Double_t tmax = clus->GetTOF()*1.e9; // recalibrated elsewhere |
1599 | ||
1600 | Float_t eCrossFrac = 1-GetECross(absIdMax,cells, 10000000)/ampMax; | |
1601 | ||
1602 | if(en > 5) | |
1603 | { | |
1604 | fhExoL0ECross->Fill(eCrossFrac,l0); | |
1605 | fhExoL1ECross->Fill(eCrossFrac,l1); | |
1606 | } | |
f1538a5f | 1607 | |
1608 | for(Int_t ie = 0; ie < fExoNECrossCuts; ie++) | |
1609 | { | |
1610 | for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++) | |
1611 | { | |
765206a5 | 1612 | eCrossFrac = 1-GetECross(absIdMax,cells, fExoDTimeCuts[idt])/ampMax; |
f1538a5f | 1613 | |
1614 | if(eCrossFrac > fExoECrossCuts[ie]) | |
1615 | { | |
1616 | //Exotic | |
1617 | fhExoL0 [ie][idt]->Fill(en,l0 ); | |
765206a5 | 1618 | fhExoL1 [ie][idt]->Fill(en,l1 ); |
1619 | fhExoTime [ie][idt]->Fill(en,tmax); | |
1620 | ||
1621 | if(en > 5) | |
1622 | { | |
1623 | fhExoL0NCell[ie][idt]->Fill(nc,l0); | |
1624 | fhExoL1NCell[ie][idt]->Fill(nc,l1); | |
1625 | } | |
f1538a5f | 1626 | |
1627 | // Diff time, do for one cut in e cross | |
1628 | if(ie == 0) | |
1629 | { | |
1630 | for (Int_t icell = 0; icell < clus->GetNCells(); icell++) | |
1631 | { | |
1632 | Int_t absId = clus->GetCellsAbsId()[icell]; | |
1633 | Double_t time = cells->GetCellTime(absId); | |
1634 | GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); | |
1635 | ||
1636 | Float_t diff = (tmax-time)*1e9; | |
1637 | fhExoDTime[idt]->Fill(en, diff); | |
1638 | } | |
1639 | } | |
1640 | } | |
1641 | else | |
1642 | { | |
1643 | fhExoECross[ie][idt]->Fill(en,eCrossFrac); | |
cc11121e | 1644 | fhExoNCell [ie][idt]->Fill(en,nc); |
f1538a5f | 1645 | } |
1646 | } // D time cut loop | |
1647 | } // e cross cut loop | |
1648 | } | |
1649 | ||
649b825d | 1650 | //____________________________________________________ |
1651 | TList * AliAnaCalorimeterQA::GetCreateOutputObjects() | |
1652 | { | |
1653 | // Create histograms to be saved in output file and | |
1654 | // store them in outputContainer | |
1655 | ||
1656 | TList * outputContainer = new TList() ; | |
1657 | outputContainer->SetName("QAHistos") ; | |
1658 | ||
9f48b3f0 | 1659 | // Init the number of modules, set in the class AliCalorimeterUtils |
1660 | fNModules = GetCaloUtils()->GetNumberOfSuperModulesUsed(); | |
1661 | if(fCalorimeter=="PHOS" && fNModules > 4) fNModules = 4; | |
1662 | ||
649b825d | 1663 | //Histograms |
745913ae | 1664 | Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); |
1665 | Int_t nfineptbins = GetHistogramRanges()->GetHistoFinePtBins(); Float_t ptfinemax = GetHistogramRanges()->GetHistoFinePtMax(); Float_t ptfinemin = GetHistogramRanges()->GetHistoFinePtMin(); | |
1666 | Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin(); | |
1667 | Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); | |
1668 | Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins(); Float_t massmax = GetHistogramRanges()->GetHistoMassMax(); Float_t massmin = GetHistogramRanges()->GetHistoMassMin(); | |
1669 | Int_t nasymbins = GetHistogramRanges()->GetHistoAsymmetryBins(); Float_t asymmax = GetHistogramRanges()->GetHistoAsymmetryMax(); Float_t asymmin = GetHistogramRanges()->GetHistoAsymmetryMin(); | |
ec58c056 | 1670 | Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t eOverPmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t eOverPmin = GetHistogramRanges()->GetHistoPOverEMin(); |
745913ae | 1671 | Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins(); Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax(); Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin(); |
1672 | Int_t ndRbins = GetHistogramRanges()->GetHistodRBins(); Float_t dRmax = GetHistogramRanges()->GetHistodRMax(); Float_t dRmin = GetHistogramRanges()->GetHistodRMin(); | |
1673 | Int_t ntimebins = GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin(); | |
1674 | Int_t nclbins = GetHistogramRanges()->GetHistoNClustersBins(); Int_t nclmax = GetHistogramRanges()->GetHistoNClustersMax(); Int_t nclmin = GetHistogramRanges()->GetHistoNClustersMin(); | |
1675 | Int_t ncebins = GetHistogramRanges()->GetHistoNCellsBins(); Int_t ncemax = GetHistogramRanges()->GetHistoNCellsMax(); Int_t ncemin = GetHistogramRanges()->GetHistoNCellsMin(); | |
1676 | Int_t nceclbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nceclmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nceclmin = GetHistogramRanges()->GetHistoNClusterCellMin(); | |
1677 | Int_t nvdistbins = GetHistogramRanges()->GetHistoVertexDistBins(); Float_t vdistmax = GetHistogramRanges()->GetHistoVertexDistMax(); Float_t vdistmin = GetHistogramRanges()->GetHistoVertexDistMin(); | |
1678 | Int_t rbins = GetHistogramRanges()->GetHistoRBins(); Float_t rmax = GetHistogramRanges()->GetHistoRMax(); Float_t rmin = GetHistogramRanges()->GetHistoRMin(); | |
1679 | Int_t xbins = GetHistogramRanges()->GetHistoXBins(); Float_t xmax = GetHistogramRanges()->GetHistoXMax(); Float_t xmin = GetHistogramRanges()->GetHistoXMin(); | |
1680 | Int_t ybins = GetHistogramRanges()->GetHistoYBins(); Float_t ymax = GetHistogramRanges()->GetHistoYMax(); Float_t ymin = GetHistogramRanges()->GetHistoYMin(); | |
1681 | Int_t zbins = GetHistogramRanges()->GetHistoZBins(); Float_t zmax = GetHistogramRanges()->GetHistoZMax(); Float_t zmin = GetHistogramRanges()->GetHistoZMin(); | |
1682 | Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin(); | |
1683 | Int_t tdbins = GetHistogramRanges()->GetHistoDiffTimeBins() ; Float_t tdmax = GetHistogramRanges()->GetHistoDiffTimeMax(); Float_t tdmin = GetHistogramRanges()->GetHistoDiffTimeMin(); | |
1684 | ||
1685 | Int_t nv0sbins = GetHistogramRanges()->GetHistoV0SignalBins(); Int_t nv0smax = GetHistogramRanges()->GetHistoV0SignalMax(); Int_t nv0smin = GetHistogramRanges()->GetHistoV0SignalMin(); | |
1686 | Int_t nv0mbins = GetHistogramRanges()->GetHistoV0MultiplicityBins(); Int_t nv0mmax = GetHistogramRanges()->GetHistoV0MultiplicityMax(); Int_t nv0mmin = GetHistogramRanges()->GetHistoV0MultiplicityMin(); | |
1687 | Int_t ntrmbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t ntrmmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t ntrmmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); | |
649b825d | 1688 | |
1689 | //EMCAL | |
1690 | fNMaxCols = 48; | |
1691 | fNMaxRows = 24; | |
1692 | fNRCU = 2 ; | |
1693 | //PHOS | |
f1538a5f | 1694 | if(fCalorimeter=="PHOS") |
1695 | { | |
649b825d | 1696 | fNMaxCols = 56; |
1697 | fNMaxRows = 64; | |
1698 | fNRCU = 4 ; | |
1699 | } | |
1700 | ||
1701 | fhE = new TH1F ("hE","E reconstructed clusters ", nptbins*5,ptmin,ptmax*5); | |
1702 | fhE->SetXTitle("E (GeV)"); | |
1703 | outputContainer->Add(fhE); | |
1704 | ||
45769d5b | 1705 | fhPt = new TH1F ("hPt","p_{T} reconstructed clusters", nptbins,ptmin,ptmax); |
1706 | fhPt->SetXTitle("p_{T} (GeV/c)"); | |
1707 | outputContainer->Add(fhPt); | |
1708 | ||
1709 | fhPhi = new TH1F ("hPhi","#phi reconstructed clusters ",nphibins,phimin,phimax); | |
1710 | fhPhi->SetXTitle("#phi (rad)"); | |
1711 | outputContainer->Add(fhPhi); | |
1712 | ||
1713 | fhEta = new TH1F ("hEta","#eta reconstructed clusters ",netabins,etamin,etamax); | |
1714 | fhEta->SetXTitle("#eta "); | |
1715 | outputContainer->Add(fhEta); | |
1716 | ||
649b825d | 1717 | |
f1538a5f | 1718 | if(fFillAllTH3) |
1719 | { | |
649b825d | 1720 | fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #phi vs energy, reconstructed clusters", |
1721 | netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); | |
1722 | fhEtaPhiE->SetXTitle("#eta "); | |
1723 | fhEtaPhiE->SetYTitle("#phi (rad)"); | |
1724 | fhEtaPhiE->SetZTitle("E (GeV) "); | |
1725 | outputContainer->Add(fhEtaPhiE); | |
1726 | } | |
1727 | ||
1728 | fhClusterTimeEnergy = new TH2F ("hClusterTimeEnergy","energy vs TOF, reconstructed clusters", | |
1729 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1730 | fhClusterTimeEnergy->SetXTitle("E (GeV) "); | |
1731 | fhClusterTimeEnergy->SetYTitle("TOF (ns)"); | |
1732 | outputContainer->Add(fhClusterTimeEnergy); | |
1733 | ||
1734 | fhClusterPairDiffTimeE = new TH2F("hClusterPairDiffTimeE","cluster pair time difference vs E, only good clusters", | |
1735 | nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); | |
1736 | fhClusterPairDiffTimeE->SetXTitle("E_{cluster} (GeV)"); | |
1737 | fhClusterPairDiffTimeE->SetYTitle("#Delta t (ns)"); | |
1738 | outputContainer->Add(fhClusterPairDiffTimeE); | |
1739 | ||
1740 | fhLambda0 = new TH2F ("hLambda0","shower shape, #lambda^{2}_{0} vs E", | |
1741 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
1742 | fhLambda0->SetXTitle("E_{cluster}"); | |
1743 | fhLambda0->SetYTitle("#lambda^{2}_{0}"); | |
1744 | outputContainer->Add(fhLambda0); | |
1745 | ||
1746 | fhLambda1 = new TH2F ("hLambda1","shower shape, #lambda^{2}_{1} vs E for bad cluster ", | |
1747 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
1748 | fhLambda1->SetXTitle("E_{cluster}"); | |
1749 | fhLambda1->SetYTitle("#lambda^{2}_{1}"); | |
1750 | outputContainer->Add(fhLambda1); | |
1751 | ||
1752 | fhDispersion = new TH2F ("hDispersion","shower shape, Dispersion^{2} vs E for bad cluster ", | |
1753 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
1754 | fhDispersion->SetXTitle("E_{cluster}"); | |
1755 | fhDispersion->SetYTitle("Dispersion"); | |
1756 | outputContainer->Add(fhDispersion); | |
1757 | ||
1758 | fhClusterMaxCellCloseCellRatio = new TH2F ("hClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell, reconstructed clusters", | |
1759 | nptbins,ptmin,ptmax, 100,0,1.); | |
1760 | fhClusterMaxCellCloseCellRatio->SetXTitle("E_{cluster} (GeV) "); | |
1761 | fhClusterMaxCellCloseCellRatio->SetYTitle("E_{cell i}/E_{cell max}"); | |
1762 | outputContainer->Add(fhClusterMaxCellCloseCellRatio); | |
1763 | ||
1764 | fhClusterMaxCellCloseCellDiff = new TH2F ("hClusterMaxCellCloseCellDiff","energy vs ratio of max cell / neighbour cell, reconstructed clusters", | |
1765 | nptbins,ptmin,ptmax, 500,0,100.); | |
1766 | fhClusterMaxCellCloseCellDiff->SetXTitle("E_{cluster} (GeV) "); | |
1767 | fhClusterMaxCellCloseCellDiff->SetYTitle("E_{cell max}-E_{cell i} (GeV)"); | |
1768 | outputContainer->Add(fhClusterMaxCellCloseCellDiff); | |
1769 | ||
1770 | fhClusterMaxCellDiff = new TH2F ("hClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters", | |
1771 | nptbins,ptmin,ptmax, 500,0,1.); | |
1772 | fhClusterMaxCellDiff->SetXTitle("E_{cluster} (GeV) "); | |
1773 | fhClusterMaxCellDiff->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
1774 | outputContainer->Add(fhClusterMaxCellDiff); | |
1775 | ||
1776 | fhClusterMaxCellDiffNoCut = new TH2F ("hClusterMaxCellDiffNoCut","energy vs difference of cluster energy - max cell energy / cluster energy", | |
1777 | nptbins,ptmin,ptmax, 500,0,1.); | |
1778 | fhClusterMaxCellDiffNoCut->SetXTitle("E_{cluster} (GeV) "); | |
1779 | fhClusterMaxCellDiffNoCut->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}"); | |
1780 | outputContainer->Add(fhClusterMaxCellDiffNoCut); | |
1781 | ||
1a72f6c5 | 1782 | fhClusterMaxCellECross = new TH2F ("hClusterMaxCellECross","1 - Energy in cross around max energy cell / max energy cell vs cluster energy, good clusters", |
1783 | nptbins,ptmin,ptmax, 400,-1,1.); | |
1784 | fhClusterMaxCellECross->SetXTitle("E_{cluster} (GeV) "); | |
1785 | fhClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}"); | |
1786 | outputContainer->Add(fhClusterMaxCellECross); | |
1787 | ||
f1538a5f | 1788 | fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut", |
1789 | nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); | |
1790 | fhNCellsPerClusterNoCut->SetXTitle("E (GeV)"); | |
1791 | fhNCellsPerClusterNoCut->SetYTitle("n cells"); | |
1792 | outputContainer->Add(fhNCellsPerClusterNoCut); | |
1793 | ||
1794 | fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); | |
1795 | fhNCellsPerCluster->SetXTitle("E (GeV)"); | |
1796 | fhNCellsPerCluster->SetYTitle("n cells"); | |
1797 | outputContainer->Add(fhNCellsPerCluster); | |
1798 | ||
1799 | fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax); | |
1800 | fhNClusters->SetXTitle("number of clusters"); | |
1801 | outputContainer->Add(fhNClusters); | |
1802 | ||
1a83b960 | 1803 | if(fStudyBadClusters) |
1804 | { | |
649b825d | 1805 | fhBadClusterEnergy = new TH1F ("hBadClusterEnergy","Bad cluster energy", nptbins,ptmin,ptmax); |
1806 | fhBadClusterEnergy->SetXTitle("E_{cluster} (GeV) "); | |
1807 | outputContainer->Add(fhBadClusterEnergy); | |
1808 | ||
1809 | fhBadClusterMaxCellCloseCellRatio = new TH2F ("hBadClusterMaxCellCloseCellRatio","energy vs ratio of max cell / neighbour cell constributing cell, reconstructed bad clusters", | |
1810 | nptbins,ptmin,ptmax, 100,0,1.); | |
1811 | fhBadClusterMaxCellCloseCellRatio->SetXTitle("E_{cluster} (GeV) "); | |
1812 | fhBadClusterMaxCellCloseCellRatio->SetYTitle("ratio"); | |
1813 | outputContainer->Add(fhBadClusterMaxCellCloseCellRatio); | |
1814 | ||
1815 | fhBadClusterMaxCellCloseCellDiff = new TH2F ("hBadClusterMaxCellCloseCellDiff","energy vs ratio of max cell - neighbour cell constributing cell, reconstructed bad clusters", | |
1816 | nptbins,ptmin,ptmax, 500,0,100); | |
1817 | fhBadClusterMaxCellCloseCellDiff->SetXTitle("E_{cluster} (GeV) "); | |
1818 | fhBadClusterMaxCellCloseCellDiff->SetYTitle("E_{cell max} - E_{cell i} (GeV)"); | |
1819 | outputContainer->Add(fhBadClusterMaxCellCloseCellDiff); | |
1820 | ||
1821 | fhBadClusterMaxCellDiff = new TH2F ("hBadClusterMaxCellDiff","energy vs difference of cluster energy - max cell energy / cluster energy for bad clusters", | |
1822 | nptbins,ptmin,ptmax, 500,0,1.); | |
1823 | fhBadClusterMaxCellDiff->SetXTitle("E_{cluster} (GeV) "); | |
1824 | fhBadClusterMaxCellDiff->SetYTitle("(E_{cluster} - E_{cell max}) / E_{cluster}"); | |
1825 | outputContainer->Add(fhBadClusterMaxCellDiff); | |
1826 | ||
1827 | fhBadClusterTimeEnergy = new TH2F ("hBadClusterTimeEnergy","energy vs TOF of reconstructed bad clusters", | |
1828 | nptbins,ptmin,ptmax, ntimebins,timemin,timemax); | |
1829 | fhBadClusterTimeEnergy->SetXTitle("E_{cluster} (GeV) "); | |
1830 | fhBadClusterTimeEnergy->SetYTitle("TOF (ns)"); | |
1831 | outputContainer->Add(fhBadClusterTimeEnergy); | |
1832 | ||
1833 | fhBadClusterPairDiffTimeE = new TH2F("hBadClusterPairDiffTimeE","cluster pair time difference (bad - good) vs E from bad cluster",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); | |
1834 | fhBadClusterPairDiffTimeE->SetXTitle("E_{bad cluster} (GeV)"); | |
1835 | fhBadClusterPairDiffTimeE->SetYTitle("#Delta t (ns)"); | |
1836 | outputContainer->Add(fhBadClusterPairDiffTimeE); | |
1837 | ||
1a72f6c5 | 1838 | fhBadClusterMaxCellECross = new TH2F ("hBadClusterMaxCellECross","1 - Energy in cross around max energy cell / max energy cell vs cluster energy, bad clusters", |
1839 | nptbins,ptmin,ptmax, 400,-1,1.); | |
1840 | fhBadClusterMaxCellECross->SetXTitle("E_{cluster} (GeV) "); | |
1841 | fhBadClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}"); | |
1842 | outputContainer->Add(fhBadClusterMaxCellECross); | |
1843 | ||
e6fec6f5 | 1844 | if(fFillAllCellTimeHisto) |
1845 | { | |
649b825d | 1846 | fhBadCellTimeSpreadRespectToCellMax = new TH2F ("hBadCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); |
1847 | fhBadCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)"); | |
1848 | fhBadCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max - i} (ns)"); | |
1849 | outputContainer->Add(fhBadCellTimeSpreadRespectToCellMax); | |
1850 | ||
1851 | fhBadClusterMaxCellDiffAverageTime = new TH2F ("hBadClusterMaxCellDiffAverageTime","t_{cell max}-t_{average} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); | |
1852 | fhBadClusterMaxCellDiffAverageTime->SetXTitle("E (GeV)"); | |
1853 | fhBadClusterMaxCellDiffAverageTime->SetYTitle("#Delta t_{cell max - average} (ns)"); | |
1854 | outputContainer->Add(fhBadClusterMaxCellDiffAverageTime); | |
a82b4462 | 1855 | |
649b825d | 1856 | fhBadClusterMaxCellDiffWeightedTime = new TH2F ("hBadClusterMaxCellDiffWeightedTime","t_{cell max}-t_{weighted} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); |
1857 | fhBadClusterMaxCellDiffWeightedTime->SetXTitle("E (GeV)"); | |
1858 | fhBadClusterMaxCellDiffWeightedTime->SetYTitle("#Delta t_{cell max - weighted} (ns)"); | |
1859 | outputContainer->Add(fhBadClusterMaxCellDiffWeightedTime); | |
1860 | ||
649b825d | 1861 | } |
1862 | ||
1863 | } | |
1864 | ||
f1538a5f | 1865 | if(fStudyExotic) |
1866 | { | |
765206a5 | 1867 | fhExoL0ECross = new TH2F("hExoL0_ECross", |
1868 | "#lambda^{2}_{0} vs 1-E_{+}/E_{max} for E > 5 GeV", | |
e49010f3 | 1869 | 400,0,1,ssbins,ssmin,ssmax); |
cdacd584 | 1870 | fhExoL0ECross ->SetXTitle("1-E_{+}/E_{cell max}"); |
1871 | fhExoL0ECross ->SetYTitle("#lambda^{2}_{0}"); | |
765206a5 | 1872 | outputContainer->Add(fhExoL0ECross) ; |
1873 | ||
1874 | fhExoL1ECross = new TH2F("hExoL1_ECross", | |
1875 | "#lambda^{2}_{1} vs 1-E_{+}/E_{max} for E > 5 GeV", | |
e49010f3 | 1876 | 400,0,1,ssbins,ssmin,ssmax); |
cdacd584 | 1877 | fhExoL1ECross ->SetXTitle("1-E_{+}/E_{cell max}"); |
1878 | fhExoL1ECross ->SetYTitle("#lambda^{2}_{1}"); | |
765206a5 | 1879 | outputContainer->Add(fhExoL1ECross) ; |
1880 | ||
f1538a5f | 1881 | for(Int_t ie = 0; ie <fExoNECrossCuts; ie++) |
1882 | { | |
1883 | ||
1884 | fhExoDTime[ie] = new TH2F(Form("hExoDTime_ECross%d",ie), | |
1885 | Form("#Delta time = t_{max}-t_{cells} vs E_{cluster} for exotic, 1-E_{+}/E_{max} < %2.2f",fExoECrossCuts[ie]), | |
1886 | nptbins,ptmin,ptmax,tdbins,tdmin,tdmax); | |
1887 | fhExoDTime[ie] ->SetYTitle("#Delta t (ns)"); | |
1888 | fhExoDTime[ie] ->SetXTitle("E (GeV)"); | |
1889 | outputContainer->Add(fhExoDTime[ie]) ; | |
1890 | ||
1891 | for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++) | |
1892 | { | |
1893 | fhExoNCell[ie][idt] = new TH2F(Form("hExoNCell_ECross%d_DT%d",ie,idt), | |
1894 | Form("N cells per cluster vs E cluster, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1895 | nptbins,ptmin,ptmax,nceclbins,nceclmin,nceclmax); | |
1896 | fhExoNCell[ie][idt] ->SetYTitle("N cells"); | |
1897 | fhExoNCell[ie][idt] ->SetXTitle("E (GeV)"); | |
1898 | outputContainer->Add(fhExoNCell[ie][idt]) ; | |
1899 | ||
1900 | fhExoL0 [ie][idt] = new TH2F(Form("hExoL0_ECross%d_DT%d",ie,idt), | |
765206a5 | 1901 | Form("#lambda^{2}_{0} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), |
f1538a5f | 1902 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
1903 | fhExoL0 [ie][idt] ->SetYTitle("#lambda^{2}_{0}"); | |
1904 | fhExoL0 [ie][idt] ->SetXTitle("E (GeV)"); | |
1905 | outputContainer->Add(fhExoL0[ie][idt]) ; | |
765206a5 | 1906 | |
1907 | fhExoL1 [ie][idt] = new TH2F(Form("hExoL1_ECross%d_DT%d",ie,idt), | |
1908 | Form("#lambda^{2}_{1} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1909 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
1910 | fhExoL1 [ie][idt] ->SetYTitle("#lambda^{2}_{1}"); | |
1911 | fhExoL1 [ie][idt] ->SetXTitle("E (GeV)"); | |
1912 | outputContainer->Add(fhExoL1[ie][idt]) ; | |
f1538a5f | 1913 | |
1914 | fhExoECross[ie][idt] = new TH2F(Form("hExoECross_ECross%d_DT%d",ie,idt), | |
1915 | Form("E cross for cells vs E cell, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1916 | nptbins,ptmin,ptmax,400,0,1); | |
1917 | fhExoECross[ie][idt] ->SetYTitle("1-E_{+}/E_{cell max}"); | |
1918 | fhExoECross[ie][idt] ->SetXTitle("E_{cell} (GeV)"); | |
1919 | outputContainer->Add(fhExoECross[ie][idt]) ; | |
1920 | ||
1921 | fhExoTime [ie][idt] = new TH2F(Form("hExoTime_ECross%d_DT%d",ie,idt), | |
1922 | Form("Time of cluster (max cell) vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1923 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
1924 | fhExoTime [ie][idt] ->SetYTitle("time_{max} (ns)"); | |
1925 | fhExoTime [ie][idt] ->SetXTitle("E (GeV)"); | |
1926 | outputContainer->Add(fhExoTime[ie][idt]) ; | |
1927 | ||
765206a5 | 1928 | fhExoL0NCell[ie][idt] = new TH2F(Form("hExoL0_NCell%d_DT%d",ie,idt), |
1929 | Form("#lambda^{2}_{0} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1930 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
1931 | fhExoL0NCell[ie][idt] ->SetYTitle("N cells"); | |
1932 | fhExoL0NCell[ie][idt] ->SetXTitle("#lambda^{2}_{0}"); | |
1933 | outputContainer->Add(fhExoL0NCell[ie][idt]) ; | |
1934 | ||
1935 | fhExoL1NCell[ie][idt] = new TH2F(Form("hExoL1_NCell%d_DT%d",ie,idt), | |
1936 | Form("#lambda^{2}_{1} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), | |
1937 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
1938 | fhExoL1NCell[ie][idt] ->SetYTitle("N cells"); | |
1939 | fhExoL1NCell[ie][idt] ->SetXTitle("#lambda^{2}_{1}"); | |
1940 | outputContainer->Add(fhExoL1NCell[ie][idt]) ; | |
1941 | ||
f1538a5f | 1942 | } |
1943 | } | |
1944 | } | |
1945 | ||
649b825d | 1946 | // Cluster size in terms of cells |
f1538a5f | 1947 | if(fStudyClustersAsymmetry) |
1948 | { | |
649b825d | 1949 | fhDeltaIEtaDeltaIPhiE0[0] = new TH2F ("hDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3", |
1950 | 50,0,50,50,0,50); | |
1951 | fhDeltaIEtaDeltaIPhiE0[0]->SetXTitle("#Delta Column"); | |
1952 | fhDeltaIEtaDeltaIPhiE0[0]->SetYTitle("#Delta Row"); | |
1953 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE0[0]); | |
1954 | ||
1955 | fhDeltaIEtaDeltaIPhiE2[0] = new TH2F ("hDeltaIEtaDeltaIPhiE2"," Cluster size in columns vs rows for 2 <E < 6 GeV, n cells > 3", | |
1956 | 50,0,50,50,0,50); | |
1957 | fhDeltaIEtaDeltaIPhiE2[0]->SetXTitle("#Delta Column"); | |
1958 | fhDeltaIEtaDeltaIPhiE2[0]->SetYTitle("#Delta Row"); | |
1959 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE2[0]); | |
1960 | ||
1961 | fhDeltaIEtaDeltaIPhiE6[0] = new TH2F ("hDeltaIEtaDeltaIPhiE6"," Cluster size in columns vs rows for E > 6 GeV, n cells > 3", | |
1962 | 50,0,50,50,0,50); | |
1963 | fhDeltaIEtaDeltaIPhiE6[0]->SetXTitle("#Delta Column"); | |
1964 | fhDeltaIEtaDeltaIPhiE6[0]->SetYTitle("#Delta Row"); | |
1965 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE6[0]); | |
1966 | ||
1967 | fhDeltaIA[0] = new TH2F ("hDeltaIA"," Cluster *asymmetry* in cell units vs E", | |
1968 | nptbins,ptmin,ptmax,21,-1.05,1.05); | |
1969 | fhDeltaIA[0]->SetXTitle("E_{cluster}"); | |
1970 | fhDeltaIA[0]->SetYTitle("A_{cell in cluster}"); | |
1971 | outputContainer->Add(fhDeltaIA[0]); | |
1972 | ||
1973 | fhDeltaIAL0[0] = new TH2F ("hDeltaIAL0"," Cluster *asymmetry* in cell units vs #lambda^{2}_{0}", | |
1974 | ssbins,ssmin,ssmax,21,-1.05,1.05); | |
1975 | fhDeltaIAL0[0]->SetXTitle("#lambda^{2}_{0}"); | |
1976 | fhDeltaIAL0[0]->SetYTitle("A_{cell in cluster}"); | |
1977 | outputContainer->Add(fhDeltaIAL0[0]); | |
1978 | ||
1979 | fhDeltaIAL1[0] = new TH2F ("hDeltaIAL1"," Cluster *asymmetry* in cell units vs #lambda^{2}_{1}", | |
1980 | ssbins,ssmin,ssmax,21,-1.05,1.05); | |
1981 | fhDeltaIAL1[0]->SetXTitle("#lambda^{2}_{1}"); | |
1982 | fhDeltaIAL1[0]->SetYTitle("A_{cell in cluster}"); | |
1983 | outputContainer->Add(fhDeltaIAL1[0]); | |
1984 | ||
1985 | fhDeltaIANCells[0] = new TH2F ("hDeltaIANCells"," Cluster *asymmetry* in cell units vs N cells in cluster", | |
1986 | nceclbins,nceclmin,nceclmax,21,-1.05,1.05); | |
1987 | fhDeltaIANCells[0]->SetXTitle("N_{cell in cluster}"); | |
1988 | fhDeltaIANCells[0]->SetYTitle("A_{cell in cluster}"); | |
1989 | outputContainer->Add(fhDeltaIANCells[0]); | |
1990 | ||
1991 | ||
1992 | fhDeltaIEtaDeltaIPhiE0[1] = new TH2F ("hDeltaIEtaDeltaIPhiE0Charged"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3, matched with track", | |
1993 | 50,0,50,50,0,50); | |
1994 | fhDeltaIEtaDeltaIPhiE0[1]->SetXTitle("#Delta Column"); | |
1995 | fhDeltaIEtaDeltaIPhiE0[1]->SetYTitle("#Delta Row"); | |
1996 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE0[1]); | |
1997 | ||
1998 | fhDeltaIEtaDeltaIPhiE2[1] = new TH2F ("hDeltaIEtaDeltaIPhiE2Charged"," Cluster size in columns vs rows for 2 <E < 6 GeV, n cells > 3, matched with track", | |
1999 | 50,0,50,50,0,50); | |
2000 | fhDeltaIEtaDeltaIPhiE2[1]->SetXTitle("#Delta Column"); | |
2001 | fhDeltaIEtaDeltaIPhiE2[1]->SetYTitle("#Delta Row"); | |
2002 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE2[1]); | |
2003 | ||
2004 | fhDeltaIEtaDeltaIPhiE6[1] = new TH2F ("hDeltaIEtaDeltaIPhiE6Charged"," Cluster size in columns vs rows for E > 6 GeV, n cells > 3, matched with track", | |
2005 | 50,0,50,50,0,50); | |
2006 | fhDeltaIEtaDeltaIPhiE6[1]->SetXTitle("#Delta Column"); | |
2007 | fhDeltaIEtaDeltaIPhiE6[1]->SetYTitle("#Delta Row"); | |
2008 | outputContainer->Add(fhDeltaIEtaDeltaIPhiE6[1]); | |
2009 | ||
2010 | fhDeltaIA[1] = new TH2F ("hDeltaIACharged"," Cluster *asymmetry* in cell units vs E, matched with track", | |
2011 | nptbins,ptmin,ptmax,21,-1.05,1.05); | |
2012 | fhDeltaIA[1]->SetXTitle("E_{cluster}"); | |
2013 | fhDeltaIA[1]->SetYTitle("A_{cell in cluster}"); | |
2014 | outputContainer->Add(fhDeltaIA[1]); | |
2015 | ||
2016 | fhDeltaIAL0[1] = new TH2F ("hDeltaIAL0Charged"," Cluster *asymmetry* in cell units vs #lambda^{2}_{0}, matched with track", | |
2017 | ssbins,ssmin,ssmax,21,-1.05,1.05); | |
2018 | fhDeltaIAL0[1]->SetXTitle("#lambda^{2}_{0}"); | |
2019 | fhDeltaIAL0[1]->SetYTitle("A_{cell in cluster}"); | |
2020 | outputContainer->Add(fhDeltaIAL0[1]); | |
2021 | ||
2022 | fhDeltaIAL1[1] = new TH2F ("hDeltaIAL1Charged"," Cluster *asymmetry* in cell units vs #lambda^{2}_{1}, matched with track", | |
2023 | ssbins,ssmin,ssmax,21,-1.05,1.05); | |
2024 | fhDeltaIAL1[1]->SetXTitle("#lambda^{2}_{1}"); | |
2025 | fhDeltaIAL1[1]->SetYTitle("A_{cell in cluster}"); | |
2026 | outputContainer->Add(fhDeltaIAL1[1]); | |
2027 | ||
2028 | fhDeltaIANCells[1] = new TH2F ("hDeltaIANCellsCharged"," Cluster *asymmetry* in cell units vs N cells in cluster, matched with track", | |
2029 | nceclbins,nceclmin,nceclmax,21,-1.05,1.05); | |
2030 | fhDeltaIANCells[1]->SetXTitle("N_{cell in cluster}"); | |
2031 | fhDeltaIANCells[1]->SetYTitle("A_{cell in cluster}"); | |
2032 | outputContainer->Add(fhDeltaIANCells[1]); | |
2033 | ||
2034 | if(IsDataMC()){ | |
2035 | TString particle[]={"Photon","Electron","Conversion","Hadron"}; | |
2036 | for (Int_t iPart = 0; iPart < 4; iPart++) { | |
2037 | ||
2038 | fhDeltaIAMC[iPart] = new TH2F (Form("hDeltaIA_MC%s",particle[iPart].Data()),Form(" Cluster *asymmetry* in cell units vs E, from %s",particle[iPart].Data()), | |
2039 | nptbins,ptmin,ptmax,21,-1.05,1.05); | |
2040 | fhDeltaIAMC[iPart]->SetXTitle("E_{cluster}"); | |
2041 | fhDeltaIAMC[iPart]->SetYTitle("A_{cell in cluster}"); | |
2042 | outputContainer->Add(fhDeltaIAMC[iPart]); | |
2043 | } | |
2044 | } | |
f1538a5f | 2045 | |
1a83b960 | 2046 | if(fStudyBadClusters) |
2047 | { | |
2048 | fhBadClusterDeltaIEtaDeltaIPhiE0 = new TH2F ("hBadClusterDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3", | |
2049 | 50,0,50,50,0,50); | |
2050 | fhBadClusterDeltaIEtaDeltaIPhiE0->SetXTitle("#Delta Column"); | |
2051 | fhBadClusterDeltaIEtaDeltaIPhiE0->SetYTitle("#Delta Row"); | |
2052 | outputContainer->Add(fhBadClusterDeltaIEtaDeltaIPhiE0); | |
2053 | ||
2054 | fhBadClusterDeltaIEtaDeltaIPhiE2 = new TH2F ("hBadClusterDeltaIEtaDeltaIPhiE2"," Cluster size in columns vs rows for 2 <E < 6 GeV, n cells > 3", | |
2055 | 50,0,50,50,0,50); | |
2056 | fhBadClusterDeltaIEtaDeltaIPhiE2->SetXTitle("#Delta Column"); | |
2057 | fhBadClusterDeltaIEtaDeltaIPhiE2->SetYTitle("#Delta Row"); | |
2058 | outputContainer->Add(fhBadClusterDeltaIEtaDeltaIPhiE2); | |
2059 | ||
2060 | fhBadClusterDeltaIEtaDeltaIPhiE6 = new TH2F ("hBadClusterDeltaIEtaDeltaIPhiE6"," Cluster size in columns vs rows for E > 6 GeV, n cells > 3", | |
2061 | 50,0,50,50,0,50); | |
2062 | fhBadClusterDeltaIEtaDeltaIPhiE6->SetXTitle("#Delta Column"); | |
2063 | fhBadClusterDeltaIEtaDeltaIPhiE6->SetYTitle("#Delta Row"); | |
2064 | outputContainer->Add(fhBadClusterDeltaIEtaDeltaIPhiE6); | |
2065 | ||
2066 | fhBadClusterDeltaIA = new TH2F ("hBadClusterDeltaIA"," Cluster *asymmetry* in cell units vs E", | |
2067 | nptbins,ptmin,ptmax,21,-1.05,1.05); | |
2068 | fhBadClusterDeltaIA->SetXTitle("E_{cluster}"); | |
2069 | fhBadClusterDeltaIA->SetYTitle("A_{cell in cluster}"); | |
2070 | outputContainer->Add(fhBadClusterDeltaIA); | |
2071 | } | |
649b825d | 2072 | } |
2073 | ||
f1538a5f | 2074 | if(fStudyWeight) |
2075 | { | |
649b825d | 2076 | fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy", |
2077 | nptbins,ptmin,ptmax, 100,0,1.); | |
2078 | fhECellClusterRatio->SetXTitle("E_{cluster} (GeV) "); | |
2079 | fhECellClusterRatio->SetYTitle("E_{cell i}/E_{cluster}"); | |
2080 | outputContainer->Add(fhECellClusterRatio); | |
2081 | ||
2082 | fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy", | |
1a72f6c5 | 2083 | nptbins,ptmin,ptmax, 100,-10,0); |
649b825d | 2084 | fhECellClusterLogRatio->SetXTitle("E_{cluster} (GeV) "); |
1a72f6c5 | 2085 | fhECellClusterLogRatio->SetYTitle("Log(E_{cell i}/E_{cluster})"); |
649b825d | 2086 | outputContainer->Add(fhECellClusterLogRatio); |
2087 | ||
2088 | fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy", | |
2089 | nptbins,ptmin,ptmax, 100,0,1.); | |
2090 | fhEMaxCellClusterRatio->SetXTitle("E_{cluster} (GeV) "); | |
2091 | fhEMaxCellClusterRatio->SetYTitle("E_{max cell}/E_{cluster}"); | |
2092 | outputContainer->Add(fhEMaxCellClusterRatio); | |
2093 | ||
2094 | fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy", | |
1a72f6c5 | 2095 | nptbins,ptmin,ptmax, 100,-10,0); |
649b825d | 2096 | fhEMaxCellClusterLogRatio->SetXTitle("E_{cluster} (GeV) "); |
1a72f6c5 | 2097 | fhEMaxCellClusterLogRatio->SetYTitle("Log (E_{max cell}/E_{cluster})"); |
649b825d | 2098 | outputContainer->Add(fhEMaxCellClusterLogRatio); |
2099 | ||
1a72f6c5 | 2100 | for(Int_t iw = 0; iw < 14; iw++){ |
2101 | fhLambda0ForW0[iw] = new TH2F (Form("hLambda0ForW0%d",iw),Form("shower shape, #lambda^{2}_{0} vs E, w0 = %1.1f",1+0.5*iw), | |
649b825d | 2102 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
2103 | fhLambda0ForW0[iw]->SetXTitle("E_{cluster}"); | |
2104 | fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}"); | |
2105 | outputContainer->Add(fhLambda0ForW0[iw]); | |
2106 | ||
1a72f6c5 | 2107 | // fhLambda1ForW0[iw] = new TH2F (Form("hLambda1ForW0%d",iw),Form("shower shape, #lambda^{2}_{1} vs E, w0 = %1.1f",1+0.5*iw), |
2108 | // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2109 | // fhLambda1ForW0[iw]->SetXTitle("E_{cluster}"); | |
2110 | // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}"); | |
2111 | // outputContainer->Add(fhLambda1ForW0[iw]); | |
649b825d | 2112 | |
2113 | if(IsDataMC()){ | |
2114 | TString mcnames[] = {"Photon", "Electron","Conversion","Pi0","Hadron"}; | |
2115 | for(Int_t imc = 0; imc < 5; imc++){ | |
2116 | fhLambda0ForW0MC[iw][imc] = new TH2F (Form("hLambda0ForW0%d_MC%s",iw,mcnames[imc].Data()), | |
1a72f6c5 | 2117 | Form("shower shape, #lambda^{2}_{0} vs E, w0 = %1.1f, for MC %s",1+0.5*iw,mcnames[imc].Data()), |
649b825d | 2118 | nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); |
2119 | fhLambda0ForW0MC[iw][imc]->SetXTitle("E_{cluster}"); | |
2120 | fhLambda0ForW0MC[iw][imc]->SetYTitle("#lambda^{2}_{0}"); | |
2121 | outputContainer->Add(fhLambda0ForW0MC[iw][imc]); | |
2122 | ||
1a72f6c5 | 2123 | // fhLambda1ForW0MC[iw][imc] = new TH2F (Form("hLambda1ForW0%d_MC%s",iw,mcnames[imc].Data()), |
2124 | // Form("shower shape, #lambda^{2}_{1} vs E, w0 = %1.1f, for MC %s",1+0.5*iw,mcnames[imc].Data()), | |
2125 | // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); | |
2126 | // fhLambda1ForW0MC[iw][imc]->SetXTitle("E_{cluster}"); | |
2127 | // fhLambda1ForW0MC[iw][imc]->SetYTitle("#lambda^{2}_{1}"); | |
2128 | // outputContainer->Add(fhLambda1ForW0MC[iw][imc]); | |
649b825d | 2129 | } |
2130 | } | |
f1538a5f | 2131 | } |
649b825d | 2132 | } |
2133 | ||
2134 | //Track Matching | |
f1538a5f | 2135 | if(fFillAllTMHisto) |
2136 | { | |
653aed3c | 2137 | Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins(); |
2138 | Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax(); | |
2139 | Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin(); | |
2140 | Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins(); | |
2141 | Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax(); | |
2142 | Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin(); | |
2143 | ||
2144 | fhTrackMatchedDEta = new TH2F("hTrackMatchedDEta","d#eta of cluster-track vs cluster energy", | |
2145 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2146 | fhTrackMatchedDEta->SetYTitle("d#eta"); | |
2147 | fhTrackMatchedDEta->SetXTitle("E_{cluster} (GeV)"); | |
2148 | ||
2149 | fhTrackMatchedDPhi = new TH2F("hTrackMatchedDPhi","d#phi of cluster-track vs cluster energy", | |
2150 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2151 | fhTrackMatchedDPhi->SetYTitle("d#phi (rad)"); | |
2152 | fhTrackMatchedDPhi->SetXTitle("E_{cluster} (GeV)"); | |
2153 | ||
2154 | fhTrackMatchedDEtaDPhi = new TH2F("hTrackMatchedDEtaDPhi","d#eta vs d#phi of cluster-track vs cluster energy", | |
2155 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
2156 | fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)"); | |
2157 | fhTrackMatchedDEtaDPhi->SetXTitle("d#eta"); | |
2158 | ||
2159 | fhTrackMatchedDEtaPos = new TH2F("hTrackMatchedDEtaPos","d#eta of cluster-track vs cluster energy", | |
2160 | nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); | |
2161 | fhTrackMatchedDEtaPos->SetYTitle("d#eta"); | |
2162 | fhTrackMatchedDEtaPos->SetXTitle("E_{cluster} (GeV)"); | |
2163 | ||
2164 | fhTrackMatchedDPhiPos = new TH2F("hTrackMatchedDPhiPos","d#phi of cluster-track vs cluster energy", | |
2165 | nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); | |
2166 | fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)"); | |
2167 | fhTrackMatchedDPhiPos->SetXTitle("E_{cluster} (GeV)"); | |
2168 | ||
2169 | fhTrackMatchedDEtaDPhiPos = new TH2F("hTrackMatchedDEtaDPhiPos","d#eta vs d#phi of cluster-track vs cluster energy", | |
2170 | nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); | |
2171 | fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)"); | |
2172 | fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta"); | |
2173 | ||
2174 | outputContainer->Add(fhTrackMatchedDEta) ; | |
2175 | outputContainer->Add(fhTrackMatchedDPhi) ; | |
2176 | outputContainer->Add(fhTrackMatchedDEtaDPhi) ; | |
2177 | outputContainer->Add(fhTrackMatchedDEtaPos) ; | |
2178 | outputContainer->Add(fhTrackMatchedDPhiPos) ; | |
2179 | outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ; | |
2180 | ||
45769d5b | 2181 | fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax); |
2182 | fhECharged->SetXTitle("E (GeV)"); | |
2183 | outputContainer->Add(fhECharged); | |
2184 | ||
2185 | fhPtCharged = new TH1F ("hPtCharged","p_{T} reconstructed clusters, matched with track", nptbins,ptmin,ptmax); | |
2186 | fhPtCharged->SetXTitle("p_{T} (GeV/c)"); | |
2187 | outputContainer->Add(fhPtCharged); | |
2188 | ||
2189 | fhPhiCharged = new TH1F ("hPhiCharged","#phi reconstructed clusters, matched with track",nphibins,phimin,phimax); | |
2190 | fhPhiCharged->SetXTitle("#phi (rad)"); | |
2191 | outputContainer->Add(fhPhiCharged); | |
2192 | ||
2193 | fhEtaCharged = new TH1F ("hEtaCharged","#eta reconstructed clusters, matched with track",netabins,etamin,etamax); | |
2194 | fhEtaCharged->SetXTitle("#eta "); | |
2195 | outputContainer->Add(fhEtaCharged); | |
2196 | ||
2197 | if(fFillAllTH3) | |
f1538a5f | 2198 | { |
3748ffb5 | 2199 | fhEtaPhiECharged = new TH3F ("hEtaPhiECharged","#eta vs #phi, reconstructed clusters, matched with track", |
521636d2 | 2200 | netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); |
3748ffb5 | 2201 | fhEtaPhiECharged->SetXTitle("#eta "); |
2202 | fhEtaPhiECharged->SetYTitle("#phi "); | |
2203 | fhEtaPhiECharged->SetZTitle("E (GeV) "); | |
2204 | outputContainer->Add(fhEtaPhiECharged); | |
2205 | } | |
55c05f8c | 2206 | |
ec58c056 | 2207 | fh1EOverP = new TH2F("h1EOverP","TRACK matches E/p",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2208 | fh1EOverP->SetYTitle("E/p"); |
2209 | fh1EOverP->SetXTitle("p_{T} (GeV/c)"); | |
2210 | outputContainer->Add(fh1EOverP); | |
3bfc4732 | 2211 | |
a87e069d | 2212 | fh2dR = new TH2F("h2dR","TRACK matches dR",nptbins,ptmin,ptmax,ndRbins,dRmin,dRmax); |
2213 | fh2dR->SetXTitle("#Delta R (rad)"); | |
2214 | fh2dR->SetXTitle("E cluster (GeV)"); | |
2215 | outputContainer->Add(fh2dR) ; | |
3bfc4732 | 2216 | |
2217 | fh2MatchdEdx = new TH2F("h2MatchdEdx","dE/dx vs. p for all matches",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); | |
2218 | fh2MatchdEdx->SetXTitle("p (GeV/c)"); | |
2219 | fh2MatchdEdx->SetYTitle("<dE/dx>"); | |
2220 | outputContainer->Add(fh2MatchdEdx); | |
2221 | ||
2222 | fh2EledEdx = new TH2F("h2EledEdx","dE/dx vs. p for electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); | |
2223 | fh2EledEdx->SetXTitle("p (GeV/c)"); | |
2224 | fh2EledEdx->SetYTitle("<dE/dx>"); | |
2225 | outputContainer->Add(fh2EledEdx) ; | |
2226 | ||
ec58c056 | 2227 | fh1EOverPR02 = new TH2F("h1EOverPR02","TRACK matches E/p, all",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2228 | fh1EOverPR02->SetYTitle("E/p"); |
2229 | fh1EOverPR02->SetXTitle("p_{T} (GeV/c)"); | |
2230 | outputContainer->Add(fh1EOverPR02); | |
a054a582 | 2231 | |
2232 | fh1EleEOverP = new TH2F("h1EleEOverP","Electron candidates E/p (60<dEdx<100)",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); | |
2233 | fh1EleEOverP->SetYTitle("E/p"); | |
2234 | fh1EleEOverP->SetXTitle("p_{T} (GeV/c)"); | |
2235 | outputContainer->Add(fh1EleEOverP); | |
55c05f8c | 2236 | } |
2237 | ||
f1538a5f | 2238 | if(fFillAllPi0Histo) |
2239 | { | |
9e9f04cb | 2240 | fhIM = new TH2F ("hIM","Cluster pairs Invariant mass vs reconstructed pair energy, ncell > 1",nptbins,ptmin,ptmax,nmassbins,massmin,massmax); |
55c05f8c | 2241 | fhIM->SetXTitle("p_{T, cluster pairs} (GeV) "); |
2242 | fhIM->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); | |
2243 | outputContainer->Add(fhIM); | |
a6f26052 | 2244 | |
55c05f8c | 2245 | fhAsym = new TH2F ("hAssym","Cluster pairs Asymmetry vs reconstructed pair energy",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax); |
2246 | fhAsym->SetXTitle("p_{T, cluster pairs} (GeV) "); | |
2247 | fhAsym->SetYTitle("Asymmetry"); | |
2248 | outputContainer->Add(fhAsym); | |
a6f26052 | 2249 | } |
649b825d | 2250 | |
c8fe2783 | 2251 | |
f1538a5f | 2252 | if(fFillAllPosHisto2) |
2253 | { | |
2254 | if(fFillAllTH3) | |
2255 | { | |
55c05f8c | 2256 | fhXYZ = new TH3F ("hXYZ","Cluster: x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax); |
2257 | fhXYZ->SetXTitle("x (cm)"); | |
2258 | fhXYZ->SetYTitle("y (cm)"); | |
2259 | fhXYZ->SetZTitle("z (cm) "); | |
2260 | outputContainer->Add(fhXYZ); | |
2261 | } | |
2262 | ||
35c71d5c | 2263 | fhXNCells = new TH2F ("hXNCells","Cluster X position vs N Cells per Cluster",xbins,xmin,xmax,nceclbins,nceclmin,nceclmax); |
55c05f8c | 2264 | fhXNCells->SetXTitle("x (cm)"); |
2265 | fhXNCells->SetYTitle("N cells per cluster"); | |
2266 | outputContainer->Add(fhXNCells); | |
2267 | ||
35c71d5c | 2268 | fhZNCells = new TH2F ("hZNCells","Cluster Z position vs N Cells per Cluster",zbins,zmin,zmax,nceclbins,nceclmin,nceclmax); |
55c05f8c | 2269 | fhZNCells->SetXTitle("z (cm)"); |
2270 | fhZNCells->SetYTitle("N cells per cluster"); | |
2271 | outputContainer->Add(fhZNCells); | |
2272 | ||
2273 | fhXE = new TH2F ("hXE","Cluster X position vs cluster energy",xbins,xmin,xmax,nptbins,ptmin,ptmax); | |
2274 | fhXE->SetXTitle("x (cm)"); | |
2275 | fhXE->SetYTitle("E (GeV)"); | |
2276 | outputContainer->Add(fhXE); | |
2277 | ||
2278 | fhZE = new TH2F ("hZE","Cluster Z position vs cluster energy",zbins,zmin,zmax,nptbins,ptmin,ptmax); | |
2279 | fhZE->SetXTitle("z (cm)"); | |
2280 | fhZE->SetYTitle("E (GeV)"); | |
2281 | outputContainer->Add(fhZE); | |
2282 | ||
35c71d5c | 2283 | fhRNCells = new TH2F ("hRNCells","Cluster R position vs N Cells per Cluster",rbins,rmin,rmax,nceclbins,nceclmin,nceclmax); |
55c05f8c | 2284 | fhRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); |
2285 | fhRNCells->SetYTitle("N cells per cluster"); | |
2286 | outputContainer->Add(fhRNCells); | |
2287 | ||
2288 | ||
35c71d5c | 2289 | fhYNCells = new TH2F ("hYNCells","Cluster Y position vs N Cells per Cluster",ybins,ymin,ymax,nceclbins,nceclmin,nceclmax); |
55c05f8c | 2290 | fhYNCells->SetXTitle("y (cm)"); |
2291 | fhYNCells->SetYTitle("N cells per cluster"); | |
2292 | outputContainer->Add(fhYNCells); | |
2293 | ||
2294 | fhRE = new TH2F ("hRE","Cluster R position vs cluster energy",rbins,rmin,rmax,nptbins,ptmin,ptmax); | |
2295 | fhRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
2296 | fhRE->SetYTitle("E (GeV)"); | |
2297 | outputContainer->Add(fhRE); | |
2298 | ||
2299 | fhYE = new TH2F ("hYE","Cluster Y position vs cluster energy",ybins,ymin,ymax,nptbins,ptmin,ptmax); | |
2300 | fhYE->SetXTitle("y (cm)"); | |
2301 | fhYE->SetYTitle("E (GeV)"); | |
2302 | outputContainer->Add(fhYE); | |
2303 | } | |
f1538a5f | 2304 | |
2305 | if(fFillAllPosHisto) | |
2306 | { | |
a6f26052 | 2307 | fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax); |
2308 | fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
2309 | fhRCellE->SetYTitle("E (GeV)"); | |
2310 | outputContainer->Add(fhRCellE); | |
2311 | ||
2312 | fhXCellE = new TH2F ("hXCellE","Cell X position vs cell energy",xbins,xmin,xmax,nptbins,ptmin,ptmax); | |
2313 | fhXCellE->SetXTitle("x (cm)"); | |
2314 | fhXCellE->SetYTitle("E (GeV)"); | |
2315 | outputContainer->Add(fhXCellE); | |
2316 | ||
2317 | fhYCellE = new TH2F ("hYCellE","Cell Y position vs cell energy",ybins,ymin,ymax,nptbins,ptmin,ptmax); | |
2318 | fhYCellE->SetXTitle("y (cm)"); | |
2319 | fhYCellE->SetYTitle("E (GeV)"); | |
2320 | outputContainer->Add(fhYCellE); | |
2321 | ||
2322 | fhZCellE = new TH2F ("hZCellE","Cell Z position vs cell energy",zbins,zmin,zmax,nptbins,ptmin,ptmax); | |
2323 | fhZCellE->SetXTitle("z (cm)"); | |
2324 | fhZCellE->SetYTitle("E (GeV)"); | |
2325 | outputContainer->Add(fhZCellE); | |
2326 | ||
2327 | fhXYZCell = new TH3F ("hXYZCell","Cell : x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax); | |
2328 | fhXYZCell->SetXTitle("x (cm)"); | |
2329 | fhXYZCell->SetYTitle("y (cm)"); | |
2330 | fhXYZCell->SetZTitle("z (cm)"); | |
2331 | outputContainer->Add(fhXYZCell); | |
2332 | ||
2333 | ||
2334 | Float_t dx = TMath::Abs(xmin)+TMath::Abs(xmax); | |
2335 | Float_t dy = TMath::Abs(ymin)+TMath::Abs(ymax); | |
2336 | Float_t dz = TMath::Abs(zmin)+TMath::Abs(zmax); | |
2337 | Float_t dr = TMath::Abs(rmin)+TMath::Abs(rmax); | |
2338 | ||
35c71d5c | 2339 | fhDeltaCellClusterRNCells = new TH2F ("hDeltaCellClusterRNCells","Cluster-Cell R position vs N Cells per Cluster",rbins*2,-dr,dr,nceclbins,nceclmin,nceclmax); |
a6f26052 | 2340 | fhDeltaCellClusterRNCells->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); |
2341 | fhDeltaCellClusterRNCells->SetYTitle("N cells per cluster"); | |
2342 | outputContainer->Add(fhDeltaCellClusterRNCells); | |
2343 | ||
35c71d5c | 2344 | fhDeltaCellClusterXNCells = new TH2F ("hDeltaCellClusterXNCells","Cluster-Cell X position vs N Cells per Cluster",xbins*2,-dx,dx,nceclbins,nceclmin,nceclmax); |
a6f26052 | 2345 | fhDeltaCellClusterXNCells->SetXTitle("x (cm)"); |
2346 | fhDeltaCellClusterXNCells->SetYTitle("N cells per cluster"); | |
2347 | outputContainer->Add(fhDeltaCellClusterXNCells); | |
2348 | ||
35c71d5c | 2349 | fhDeltaCellClusterYNCells = new TH2F ("hDeltaCellClusterYNCells","Cluster-Cell Y position vs N Cells per Cluster",ybins*2,-dy,dy,nceclbins,nceclmin,nceclmax); |
a6f26052 | 2350 | fhDeltaCellClusterYNCells->SetXTitle("y (cm)"); |
2351 | fhDeltaCellClusterYNCells->SetYTitle("N cells per cluster"); | |
2352 | outputContainer->Add(fhDeltaCellClusterYNCells); | |
2353 | ||
35c71d5c | 2354 | fhDeltaCellClusterZNCells = new TH2F ("hDeltaCellClusterZNCells","Cluster-Cell Z position vs N Cells per Cluster",zbins*2,-dz,dz,nceclbins,nceclmin,nceclmax); |
a6f26052 | 2355 | fhDeltaCellClusterZNCells->SetXTitle("z (cm)"); |
2356 | fhDeltaCellClusterZNCells->SetYTitle("N cells per cluster"); | |
2357 | outputContainer->Add(fhDeltaCellClusterZNCells); | |
2358 | ||
2359 | fhDeltaCellClusterRE = new TH2F ("hDeltaCellClusterRE","Cluster-Cell R position vs cluster energy",rbins*2,-dr,dr,nptbins,ptmin,ptmax); | |
2360 | fhDeltaCellClusterRE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); | |
2361 | fhDeltaCellClusterRE->SetYTitle("E (GeV)"); | |
2362 | outputContainer->Add(fhDeltaCellClusterRE); | |
2363 | ||
2364 | fhDeltaCellClusterXE = new TH2F ("hDeltaCellClusterXE","Cluster-Cell X position vs cluster energy",xbins*2,-dx,dx,nptbins,ptmin,ptmax); | |
2365 | fhDeltaCellClusterXE->SetXTitle("x (cm)"); | |
2366 | fhDeltaCellClusterXE->SetYTitle("E (GeV)"); | |
2367 | outputContainer->Add(fhDeltaCellClusterXE); | |
2368 | ||
2369 | fhDeltaCellClusterYE = new TH2F ("hDeltaCellClusterYE","Cluster-Cell Y position vs cluster energy",ybins*2,-dy,dy,nptbins,ptmin,ptmax); | |
2370 | fhDeltaCellClusterYE->SetXTitle("y (cm)"); | |
2371 | fhDeltaCellClusterYE->SetYTitle("E (GeV)"); | |
2372 | outputContainer->Add(fhDeltaCellClusterYE); | |
2373 | ||
2374 | fhDeltaCellClusterZE = new TH2F ("hDeltaCellClusterZE","Cluster-Cell Z position vs cluster energy",zbins*2,-dz,dz,nptbins,ptmin,ptmax); | |
2375 | fhDeltaCellClusterZE->SetXTitle("z (cm)"); | |
2376 | fhDeltaCellClusterZE->SetYTitle("E (GeV)"); | |
2377 | outputContainer->Add(fhDeltaCellClusterZE); | |
2378 | ||
2379 | fhEtaPhiAmp = new TH3F ("hEtaPhiAmp","Cell #eta vs cell #phi vs cell energy",netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); | |
2380 | fhEtaPhiAmp->SetXTitle("#eta "); | |
2381 | fhEtaPhiAmp->SetYTitle("#phi (rad)"); | |
2382 | fhEtaPhiAmp->SetZTitle("E (GeV) "); | |
2383 | outputContainer->Add(fhEtaPhiAmp); | |
2384 | ||
2302a644 | 2385 | } |
c8fe2783 | 2386 | |
a6f26052 | 2387 | //Calo cells |
e3300002 | 2388 | fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin+0.5,ncemax); |
2302a644 | 2389 | fhNCells->SetXTitle("n cells"); |
2390 | outputContainer->Add(fhNCells); | |
2391 | ||
2392 | fhAmplitude = new TH1F ("hAmplitude","Cell Energy", nptbins*2,ptmin,ptmax); | |
2393 | fhAmplitude->SetXTitle("Cell Energy (GeV)"); | |
2394 | outputContainer->Add(fhAmplitude); | |
2395 | ||
35c71d5c | 2396 | fhAmpId = new TH2F ("hAmpId","Cell Energy", nfineptbins,ptfinemin,ptfinemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules); |
2302a644 | 2397 | fhAmpId->SetXTitle("Cell Energy (GeV)"); |
2398 | outputContainer->Add(fhAmpId); | |
2399 | ||
e6fec6f5 | 2400 | if(fFillAllCellTimeHisto) |
2401 | { | |
649b825d | 2402 | fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax); |
924e319f | 2403 | fhCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)"); |
2404 | fhCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max-i} (ns)"); | |
2302a644 | 2405 | outputContainer->Add(fhCellTimeSpreadRespectToCellMax); |
2406 | ||
649b825d | 2407 | fhClusterMaxCellDiffAverageTime = new TH2F ("hClusterMaxCellDiffAverageTime","t_{cell max}-t_{average} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); |
9e9f04cb | 2408 | fhClusterMaxCellDiffAverageTime->SetXTitle("E (GeV)"); |
2409 | fhClusterMaxCellDiffAverageTime->SetYTitle("#Delta t_{cell max - average} (ns)"); | |
2410 | outputContainer->Add(fhClusterMaxCellDiffAverageTime); | |
a82b4462 | 2411 | |
649b825d | 2412 | fhClusterMaxCellDiffWeightedTime = new TH2F ("hClusterMaxCellDiffWeightedTime","t_{cell max}-t_{weighted} per cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); |
2413 | fhClusterMaxCellDiffWeightedTime->SetXTitle("E (GeV)"); | |
2414 | fhClusterMaxCellDiffWeightedTime->SetYTitle("#Delta t_{cell max - weighted} (ns)"); | |
2415 | outputContainer->Add(fhClusterMaxCellDiffWeightedTime); | |
35c71d5c | 2416 | |
924e319f | 2417 | fhCellIdCellLargeTimeSpread= new TH1F ("hCellIdCellLargeTimeSpread","Cells with time 100 ns larger than cell max in cluster ", |
35c71d5c | 2418 | fNMaxCols*fNMaxRows*fNModules,0,fNMaxCols*fNMaxRows*fNModules); |
2302a644 | 2419 | fhCellIdCellLargeTimeSpread->SetXTitle("Absolute Cell Id"); |
2420 | outputContainer->Add(fhCellIdCellLargeTimeSpread); | |
521636d2 | 2421 | |
2302a644 | 2422 | fhTime = new TH1F ("hTime","Cell Time",ntimebins,timemin,timemax); |
2423 | fhTime->SetXTitle("Cell Time (ns)"); | |
2424 | outputContainer->Add(fhTime); | |
2425 | ||
1a72f6c5 | 2426 | fhTimeVz = new TH2F ("hTimeVz","Cell Time vs vertex, amplitude > 0.5 GeV",100, 0, 50,ntimebins,timemin,timemax); |
2427 | fhTimeVz->SetXTitle("|v_{z}| (cm)"); | |
2428 | fhTimeVz->SetYTitle("Cell Time (ns)"); | |
2429 | outputContainer->Add(fhTimeVz); | |
2430 | ||
35c71d5c | 2431 | fhTimeId = new TH2F ("hTimeId","Cell Time vs Absolute Id", |
2432 | ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules); | |
2302a644 | 2433 | fhTimeId->SetXTitle("Cell Time (ns)"); |
2434 | fhTimeId->SetYTitle("Cell Absolute Id"); | |
2435 | outputContainer->Add(fhTimeId); | |
2436 | ||
2437 | fhTimeAmp = new TH2F ("hTimeAmp","Cell Time vs Cell Energy",nptbins*2,ptmin,ptmax,ntimebins,timemin,timemax); | |
2438 | fhTimeAmp->SetYTitle("Cell Time (ns)"); | |
2439 | fhTimeAmp->SetXTitle("Cell Energy (GeV)"); | |
2440 | outputContainer->Add(fhTimeAmp); | |
2441 | ||
2302a644 | 2442 | } |
06f1b12a | 2443 | |
2444 | fhCellECross = new TH2F ("hCellECross","1 - Energy in cross around cell / cell energy", | |
2445 | nptbins,ptmin,ptmax, 400,-1,1.); | |
2446 | fhCellECross->SetXTitle("E_{cell} (GeV) "); | |
2447 | fhCellECross->SetYTitle("1- E_{cross}/E_{cell}"); | |
2448 | outputContainer->Add(fhCellECross); | |
2449 | ||
1a72f6c5 | 2450 | |
f1538a5f | 2451 | if(fCorrelate) |
2452 | { | |
798a9b04 | 2453 | //PHOS vs EMCAL |
35c71d5c | 2454 | fhCaloCorrNClusters = new TH2F ("hCaloCorrNClusters","# clusters in EMCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax); |
2302a644 | 2455 | fhCaloCorrNClusters->SetXTitle("number of clusters in EMCAL"); |
2456 | fhCaloCorrNClusters->SetYTitle("number of clusters in PHOS"); | |
2457 | outputContainer->Add(fhCaloCorrNClusters); | |
2458 | ||
653aed3c | 2459 | fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2); |
2302a644 | 2460 | fhCaloCorrEClusters->SetXTitle("#Sigma E of clusters in EMCAL (GeV)"); |
2461 | fhCaloCorrEClusters->SetYTitle("#Sigma E of clusters in PHOS (GeV)"); | |
2462 | outputContainer->Add(fhCaloCorrEClusters); | |
2463 | ||
35c71d5c | 2464 | fhCaloCorrNCells = new TH2F ("hCaloCorrNCells","# Cells in EMCAL vs PHOS", ncebins,ncemin,ncemax, ncebins,ncemin,ncemax); |
649b825d | 2465 | fhCaloCorrNCells->SetXTitle("number of Cells in EMCAL"); |
2466 | fhCaloCorrNCells->SetYTitle("number of Cells in PHOS"); | |
2467 | outputContainer->Add(fhCaloCorrNCells); | |
2302a644 | 2468 | |
653aed3c | 2469 | fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4); |
649b825d | 2470 | fhCaloCorrECells->SetXTitle("#Sigma E of Cells in EMCAL (GeV)"); |
2471 | fhCaloCorrECells->SetYTitle("#Sigma E of Cells in PHOS (GeV)"); | |
2472 | outputContainer->Add(fhCaloCorrECells); | |
2302a644 | 2473 | |
649b825d | 2474 | //Calorimeter VS V0 signal |
2475 | fhCaloV0SCorrNClusters = new TH2F ("hCaloV0SNClusters",Form("# clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nclbins,nclmin,nclmax); | |
2476 | fhCaloV0SCorrNClusters->SetXTitle("V0 signal"); | |
2477 | fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); | |
2478 | outputContainer->Add(fhCaloV0SCorrNClusters); | |
2302a644 | 2479 | |
653aed3c | 2480 | fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2); |
649b825d | 2481 | fhCaloV0SCorrEClusters->SetXTitle("V0 signal"); |
2482 | fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); | |
2483 | outputContainer->Add(fhCaloV0SCorrEClusters); | |
2302a644 | 2484 | |
649b825d | 2485 | fhCaloV0SCorrNCells = new TH2F ("hCaloV0SNCells",Form("# Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax, ncebins,ncemin,ncemax); |
2486 | fhCaloV0SCorrNCells->SetXTitle("V0 signal"); | |
2487 | fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); | |
2488 | outputContainer->Add(fhCaloV0SCorrNCells); | |
3bfc4732 | 2489 | |
653aed3c | 2490 | fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2); |
649b825d | 2491 | fhCaloV0SCorrECells->SetXTitle("V0 signal"); |
2492 | fhCaloV0SCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); | |
2493 | outputContainer->Add(fhCaloV0SCorrECells); | |
3bfc4732 | 2494 | |
649b825d | 2495 | //Calorimeter VS V0 multiplicity |
2496 | fhCaloV0MCorrNClusters = new TH2F ("hCaloV0MNClusters",Form("# clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nclbins,nclmin,nclmax); | |
2497 | fhCaloV0MCorrNClusters->SetXTitle("V0 signal"); | |
2498 | fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); | |
2499 | outputContainer->Add(fhCaloV0MCorrNClusters); | |
3bfc4732 | 2500 | |
653aed3c | 2501 | fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2); |
649b825d | 2502 | fhCaloV0MCorrEClusters->SetXTitle("V0 signal"); |
2503 | fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); | |
2504 | outputContainer->Add(fhCaloV0MCorrEClusters); | |
3bfc4732 | 2505 | |
649b825d | 2506 | fhCaloV0MCorrNCells = new TH2F ("hCaloV0MNCells",Form("# Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax, ncebins,ncemin,ncemax); |
2507 | fhCaloV0MCorrNCells->SetXTitle("V0 signal"); | |
2508 | fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); | |
2509 | outputContainer->Add(fhCaloV0MCorrNCells); | |
3bfc4732 | 2510 | |
653aed3c | 2511 | fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2); |
649b825d | 2512 | fhCaloV0MCorrECells->SetXTitle("V0 signal"); |
2513 | fhCaloV0MCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); | |
2514 | outputContainer->Add(fhCaloV0MCorrECells); | |
3bfc4732 | 2515 | |
649b825d | 2516 | //Calorimeter VS Track multiplicity |
2517 | fhCaloTrackMCorrNClusters = new TH2F ("hCaloTrackMNClusters",Form("# clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nclbins,nclmin,nclmax); | |
2518 | fhCaloTrackMCorrNClusters->SetXTitle("# tracks"); | |
2519 | fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); | |
2520 | outputContainer->Add(fhCaloTrackMCorrNClusters); | |
3bfc4732 | 2521 | |
653aed3c | 2522 | fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2); |
649b825d | 2523 | fhCaloTrackMCorrEClusters->SetXTitle("# tracks"); |
2524 | fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); | |
2525 | outputContainer->Add(fhCaloTrackMCorrEClusters); | |
3bfc4732 | 2526 | |
649b825d | 2527 | fhCaloTrackMCorrNCells = new TH2F ("hCaloTrackMNCells",Form("# Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax, ncebins,ncemin,ncemax); |
2528 | fhCaloTrackMCorrNCells->SetXTitle("# tracks"); | |
2529 | fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); | |
2530 | outputContainer->Add(fhCaloTrackMCorrNCells); | |
3bfc4732 | 2531 | |
653aed3c | 2532 | fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2); |
649b825d | 2533 | fhCaloTrackMCorrECells->SetXTitle("# tracks"); |
2534 | fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); | |
2535 | outputContainer->Add(fhCaloTrackMCorrECells); | |
3bfc4732 | 2536 | |
653aed3c | 2537 | fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax); |
2538 | fhCaloCenNClusters->SetYTitle("number of clusters in calorimeter"); | |
2539 | fhCaloCenNClusters->SetXTitle("Centrality"); | |
2540 | outputContainer->Add(fhCaloCenNClusters); | |
2541 | ||
2542 | fhCaloCenEClusters = new TH2F ("hCaloCenEClusters","summed energy of clusters in calorimeter vs centrality",100,0,100,nptbins,ptmin,ptmax*2); | |
2543 | fhCaloCenEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)"); | |
2544 | fhCaloCenEClusters->SetXTitle("Centrality"); | |
2545 | outputContainer->Add(fhCaloCenEClusters); | |
2546 | ||
2547 | fhCaloCenNCells = new TH2F ("hCaloCenNCells","# Cells in calorimeter vs centrality",100,0,100,ncebins,ncemin,ncemax); | |
2548 | fhCaloCenNCells->SetYTitle("number of Cells in calorimeter"); | |
2549 | fhCaloCenNCells->SetXTitle("Centrality"); | |
2550 | outputContainer->Add(fhCaloCenNCells); | |
2551 | ||
2552 | fhCaloCenECells = new TH2F ("hCaloCenECells","summed energy of Cells in calorimeter vs centrality",100,0,100,nptbins*2,ptmin,ptmax*4); | |
2553 | fhCaloCenECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)"); | |
2554 | fhCaloCenECells->SetXTitle("Centrality"); | |
2555 | outputContainer->Add(fhCaloCenECells); | |
2556 | ||
2557 | fhCaloEvPNClusters = new TH2F ("hCaloEvPNClusters","# clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nclbins,nclmin,nclmax); | |
2558 | fhCaloEvPNClusters->SetYTitle("number of clusters in calorimeter"); | |
2559 | fhCaloEvPNClusters->SetXTitle("Event plane angle (rad)"); | |
2560 | outputContainer->Add(fhCaloEvPNClusters); | |
2561 | ||
2562 | fhCaloEvPEClusters = new TH2F ("hCaloEvPEClusters","summed energy of clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins,ptmin,ptmax*2); | |
2563 | fhCaloEvPEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)"); | |
2564 | fhCaloEvPEClusters->SetXTitle("Event plane angle (rad)"); | |
2565 | outputContainer->Add(fhCaloEvPEClusters); | |
2566 | ||
2567 | fhCaloEvPNCells = new TH2F ("hCaloEvPNCells","# Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),ncebins,ncemin,ncemax); | |
2568 | fhCaloEvPNCells->SetYTitle("number of Cells in calorimeter"); | |
2569 | fhCaloEvPNCells->SetXTitle("Event plane angle (rad)"); | |
2570 | outputContainer->Add(fhCaloEvPNCells); | |
2571 | ||
2572 | fhCaloEvPECells = new TH2F ("hCaloEvPECells","summed energy of Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins*2,ptmin,ptmax*4); | |
2573 | fhCaloEvPECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)"); | |
2574 | fhCaloEvPECells->SetXTitle("Event plane angle (rad)"); | |
2575 | outputContainer->Add(fhCaloEvPECells); | |
2576 | ||
3bfc4732 | 2577 | |
649b825d | 2578 | }//correlate calorimeters |
c8fe2783 | 2579 | |
649b825d | 2580 | //Module histograms |
9725fd2a | 2581 | |
649b825d | 2582 | fhEMod = new TH2F ("hE_Mod","Cluster reconstructed Energy in each present Module",nptbins,ptmin,ptmax,fNModules,0,fNModules); |
2583 | fhEMod->SetXTitle("E (GeV)"); | |
2584 | fhEMod->SetYTitle("Module"); | |
2585 | outputContainer->Add(fhEMod); | |
c8fe2783 | 2586 | |
649b825d | 2587 | fhAmpMod = new TH2F ("hAmp_Mod","Cell energy in each present Module",nptbins,ptmin,ptmax,fNModules,0,fNModules); |
2588 | fhAmpMod->SetXTitle("E (GeV)"); | |
2589 | fhAmpMod->SetYTitle("Module"); | |
2590 | outputContainer->Add(fhAmpMod); | |
3bfc4732 | 2591 | |
e6fec6f5 | 2592 | if(fFillAllCellTimeHisto) |
2593 | { | |
0fb69ade | 2594 | fhTimeMod = new TH2F ("hTime_Mod","Cell time in each present Module",ntimebins,timemin,timemax,fNModules,0,fNModules); |
2595 | fhTimeMod->SetXTitle("t (ns)"); | |
2596 | fhTimeMod->SetYTitle("Module"); | |
2597 | outputContainer->Add(fhTimeMod); | |
2598 | } | |
3bfc4732 | 2599 | |
e3300002 | 2600 | fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin+0.5,nclmax,fNModules,0,fNModules); |
649b825d | 2601 | fhNClustersMod->SetXTitle("number of clusters"); |
2602 | fhNClustersMod->SetYTitle("Module"); | |
2603 | outputContainer->Add(fhNClustersMod); | |
2302a644 | 2604 | |
e3300002 | 2605 | fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin+0.5,ncemax,fNModules,0,fNModules); |
649b825d | 2606 | fhNCellsMod->SetXTitle("n cells"); |
2607 | fhNCellsMod->SetYTitle("Module"); | |
2608 | outputContainer->Add(fhNCellsMod); | |
17708df9 | 2609 | |
649b825d | 2610 | Int_t colmaxs = fNMaxCols; |
2611 | Int_t rowmaxs = fNMaxRows; | |
e6fec6f5 | 2612 | if(fCalorimeter=="EMCAL") |
2613 | { | |
649b825d | 2614 | colmaxs=2*fNMaxCols; |
2615 | rowmaxs=Int_t(fNModules/2)*fNMaxRows; | |
2616 | } | |
e6fec6f5 | 2617 | else |
2618 | { | |
649b825d | 2619 | rowmaxs=fNModules*fNMaxRows; |
2302a644 | 2620 | } |
3bfc4732 | 2621 | |
649b825d | 2622 | fhGridCells = new TH2F ("hGridCells",Form("Entries in grid of cells"), |
2623 | colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5); | |
2624 | fhGridCells->SetYTitle("row (phi direction)"); | |
2625 | fhGridCells->SetXTitle("column (eta direction)"); | |
2626 | outputContainer->Add(fhGridCells); | |
3bfc4732 | 2627 | |
649b825d | 2628 | fhGridCellsE = new TH2F ("hGridCellsE","Accumulated energy in grid of cells", |
2629 | colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5); | |
2630 | fhGridCellsE->SetYTitle("row (phi direction)"); | |
2631 | fhGridCellsE->SetXTitle("column (eta direction)"); | |
2632 | outputContainer->Add(fhGridCellsE); | |
3bfc4732 | 2633 | |
e6fec6f5 | 2634 | if(fFillAllCellTimeHisto) |
2635 | { | |
0fb69ade | 2636 | fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells", |
2637 | colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5); | |
2638 | fhGridCellsTime->SetYTitle("row (phi direction)"); | |
2639 | fhGridCellsTime->SetXTitle("column (eta direction)"); | |
2640 | outputContainer->Add(fhGridCellsTime); | |
2641 | } | |
3bfc4732 | 2642 | |
e6fec6f5 | 2643 | fhNCellsPerClusterMod = new TH2F*[fNModules]; |
649b825d | 2644 | fhNCellsPerClusterModNoCut = new TH2F*[fNModules]; |
e6fec6f5 | 2645 | fhIMMod = new TH2F*[fNModules]; |
2646 | if(fFillAllCellTimeHisto) fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; | |
0fb69ade | 2647 | |
e6fec6f5 | 2648 | for(Int_t imod = 0; imod < fNModules; imod++) |
2649 | { | |
649b825d | 2650 | fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod), |
2651 | Form("# cells per cluster vs cluster energy in Module %d",imod), | |
2652 | nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); | |
2653 | fhNCellsPerClusterMod[imod]->SetXTitle("E (GeV)"); | |
2654 | fhNCellsPerClusterMod[imod]->SetYTitle("n cells"); | |
2655 | outputContainer->Add(fhNCellsPerClusterMod[imod]); | |
3bfc4732 | 2656 | |
649b825d | 2657 | fhNCellsPerClusterModNoCut[imod] = new TH2F (Form("hNCellsPerClusterNoCut_Mod%d",imod), |
2658 | Form("# cells per cluster vs cluster energy in Module %d, no cut",imod), | |
2659 | nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); | |
2660 | fhNCellsPerClusterModNoCut[imod]->SetXTitle("E (GeV)"); | |
2661 | fhNCellsPerClusterModNoCut[imod]->SetYTitle("n cells"); | |
2662 | outputContainer->Add(fhNCellsPerClusterModNoCut[imod]); | |
3bfc4732 | 2663 | |
e6fec6f5 | 2664 | if(fFillAllCellTimeHisto) |
2665 | { | |
2666 | for(Int_t ircu = 0; ircu < fNRCU; ircu++) | |
2667 | { | |
649b825d | 2668 | fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu), |
2669 | Form("Cell Energy vs Cell Time in Module %d, RCU %d ",imod,ircu), | |
2670 | nptbins,ptmin,ptmax,ntimebins,timemin,timemax); | |
2671 | fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetXTitle("E (GeV)"); | |
2672 | fhTimeAmpPerRCU[imod*fNRCU+ircu]->SetYTitle("time (ns)"); | |
2673 | outputContainer->Add(fhTimeAmpPerRCU[imod*fNRCU+ircu]); | |
3bfc4732 | 2674 | |
649b825d | 2675 | } |
3bfc4732 | 2676 | } |
2677 | ||
e6fec6f5 | 2678 | if(fFillAllPi0Histo) |
2679 | { | |
649b825d | 2680 | fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod), |
2681 | Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d, n cell > 1",imod), | |
2682 | nptbins,ptmin,ptmax,nmassbins,massmin,massmax); | |
2683 | fhIMMod[imod]->SetXTitle("p_{T, cluster pairs} (GeV) "); | |
2684 | fhIMMod[imod]->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); | |
2685 | outputContainer->Add(fhIMMod[imod]); | |
3bfc4732 | 2686 | |
649b825d | 2687 | } |
2688 | } | |
2689 | ||
a82b4462 | 2690 | // Monte Carlo Histograms |
649b825d | 2691 | |
2692 | TString particleName[] = { "Photon", "Pi0", "Eta", "Electron", "NeutralHadron", "ChargedHadron" }; | |
2693 | ||
f1538a5f | 2694 | if(IsDataMC()) |
2695 | { | |
2696 | for(Int_t iPart = 0; iPart < 6; iPart++) | |
2697 | { | |
2698 | for(Int_t iCh = 0; iCh < 2; iCh++) | |
2699 | { | |
649b825d | 2700 | fhRecoMCRatioE[iPart][iCh] = new TH2F (Form("hRecoMCRatioE_%s_Match%d",particleName[iPart].Data(),iCh), |
3fa37dff | 2701 | Form("Reconstructed/Generated E, %s, Matched %d",particleName[iPart].Data(),iCh), |
649b825d | 2702 | nptbins, ptmin, ptmax, 200,0,2); |
3fa37dff | 2703 | fhRecoMCRatioE[iPart][iCh]->SetYTitle("E_{reconstructed}/E_{generated}"); |
2704 | fhRecoMCRatioE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); | |
649b825d | 2705 | outputContainer->Add(fhRecoMCRatioE[iPart][iCh]); |
3bfc4732 | 2706 | |
3bfc4732 | 2707 | |
649b825d | 2708 | fhRecoMCDeltaE[iPart][iCh] = new TH2F (Form("hRecoMCDeltaE_%s_Match%d",particleName[iPart].Data(),iCh), |
3fa37dff | 2709 | Form("Generated - Reconstructed E, %s, Matched %d",particleName[iPart].Data(),iCh), |
649b825d | 2710 | nptbins, ptmin, ptmax, nptbins*2,-ptmax,ptmax); |
3fa37dff | 2711 | fhRecoMCDeltaE[iPart][iCh]->SetYTitle("#Delta E (GeV)"); |
2712 | fhRecoMCDeltaE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); | |
649b825d | 2713 | outputContainer->Add(fhRecoMCDeltaE[iPart][iCh]); |
3bfc4732 | 2714 | |
649b825d | 2715 | fhRecoMCDeltaPhi[iPart][iCh] = new TH2F (Form("hRecoMCDeltaPhi_%s_Match%d",particleName[iPart].Data(),iCh), |
3fa37dff | 2716 | Form("Generated - Reconstructed #phi, %s, Matched %d",particleName[iPart].Data(),iCh), |
649b825d | 2717 | nptbins, ptmin, ptmax, nphibins*2,-phimax,phimax); |
3fa37dff | 2718 | fhRecoMCDeltaPhi[iPart][iCh]->SetYTitle("#Delta #phi (rad)"); |
2719 | fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); | |
649b825d | 2720 | outputContainer->Add(fhRecoMCDeltaPhi[iPart][iCh]); |
3bfc4732 | 2721 | |
649b825d | 2722 | fhRecoMCDeltaEta[iPart][iCh] = new TH2F (Form("hRecoMCDeltaEta_%s_Match%d",particleName[iPart].Data(),iCh), |
3fa37dff | 2723 | Form("Generated - Reconstructed #eta, %s, Matched %d",particleName[iPart].Data(),iCh), |
649b825d | 2724 | nptbins, ptmin, ptmax,netabins*2,-etamax,etamax); |
3fa37dff | 2725 | fhRecoMCDeltaEta[iPart][iCh]->SetYTitle("#Delta #eta "); |
2726 | fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); | |
649b825d | 2727 | outputContainer->Add(fhRecoMCDeltaEta[iPart][iCh]); |
e1e62b89 | 2728 | |
649b825d | 2729 | fhRecoMCE[iPart][iCh] = new TH2F (Form("hRecoMCE_%s_Match%d",particleName[iPart].Data(),iCh), |
2730 | Form("E distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh), | |
2731 | nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); | |
2732 | fhRecoMCE[iPart][iCh]->SetXTitle("E_{rec} (GeV)"); | |
2733 | fhRecoMCE[iPart][iCh]->SetYTitle("E_{gen} (GeV)"); | |
2734 | outputContainer->Add(fhRecoMCE[iPart][iCh]); | |
3bfc4732 | 2735 | |
649b825d | 2736 | fhRecoMCPhi[iPart][iCh] = new TH2F (Form("hRecoMCPhi_%s_Match%d",particleName[iPart].Data(),iCh), |
2737 | Form("#phi distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh), | |
2738 | nphibins,phimin,phimax, nphibins,phimin,phimax); | |
3fa37dff | 2739 | fhRecoMCPhi[iPart][iCh]->SetXTitle("#phi_{reconstructed} (rad)"); |
2740 | fhRecoMCPhi[iPart][iCh]->SetYTitle("#phi_{generated} (rad)"); | |
649b825d | 2741 | outputContainer->Add(fhRecoMCPhi[iPart][iCh]); |
e1e62b89 | 2742 | |
649b825d | 2743 | fhRecoMCEta[iPart][iCh] = new TH2F (Form("hRecoMCEta_%s_Match%d",particleName[iPart].Data(),iCh), |
2744 | Form("#eta distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh), | |
2745 | netabins,etamin,etamax,netabins,etamin,etamax); | |
3fa37dff | 2746 | fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{reconstructed} "); |
2747 | fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{generated} "); | |
649b825d | 2748 | outputContainer->Add(fhRecoMCEta[iPart][iCh]); |
3bfc4732 | 2749 | } |
649b825d | 2750 | } |
c8fe2783 | 2751 | |
649b825d | 2752 | //Pure MC |
f1538a5f | 2753 | for(Int_t iPart = 0; iPart < 4; iPart++) |
2754 | { | |
649b825d | 2755 | fhGenMCE[iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) , |
2756 | Form("p_{T} of generated %s",particleName[iPart].Data()), | |
2757 | nptbins,ptmin,ptmax); | |
2758 | fhGenMCEtaPhi[iPart] = new TH2F(Form("hGenMCEtaPhi_%s",particleName[iPart].Data()), | |
2759 | Form("Y vs #phi of generated %s",particleName[iPart].Data()), | |
2760 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
2761 | ||
2762 | fhGenMCE[iPart] ->SetXTitle("p_{T} (GeV/c)"); | |
2763 | fhGenMCEtaPhi[iPart]->SetXTitle("#eta"); | |
2764 | fhGenMCEtaPhi[iPart]->SetYTitle("#phi (rad)"); | |
3bfc4732 | 2765 | |
649b825d | 2766 | outputContainer->Add(fhGenMCE[iPart]); |
2767 | outputContainer->Add(fhGenMCEtaPhi[iPart]); | |
521636d2 | 2768 | |
521636d2 | 2769 | |
649b825d | 2770 | fhGenMCAccE[iPart] = new TH1F(Form("hGenMCAccE_%s",particleName[iPart].Data()) , |
2771 | Form("p_{T} of generated %s",particleName[iPart].Data()), | |
2772 | nptbins,ptmin,ptmax); | |
2773 | fhGenMCAccEtaPhi[iPart] = new TH2F(Form("hGenMCAccEtaPhi_%s",particleName[iPart].Data()), | |
2774 | Form("Y vs #phi of generated %s",particleName[iPart].Data()), | |
2775 | netabins,etamin,etamax,nphibins,phimin,phimax); | |
2776 | ||
2777 | fhGenMCAccE[iPart] ->SetXTitle("p_{T} (GeV/c)"); | |
2778 | fhGenMCAccEtaPhi[iPart]->SetXTitle("#eta"); | |
2779 | fhGenMCAccEtaPhi[iPart]->SetYTitle("#phi (rad)"); | |
2780 | ||
2781 | outputContainer->Add(fhGenMCAccE[iPart]); | |
2782 | outputContainer->Add(fhGenMCAccEtaPhi[iPart]); | |
2783 | ||
2784 | } | |
f5036bcb | 2785 | |
649b825d | 2786 | //Vertex of generated particles |
2787 | ||
2788 | fhEMVxyz = new TH2F ("hEMVxyz","Production vertex of reconstructed ElectroMagnetic particles",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500); | |
2789 | fhEMVxyz->SetXTitle("v_{x}"); | |
2790 | fhEMVxyz->SetYTitle("v_{y}"); | |
2791 | //fhEMVxyz->SetZTitle("v_{z}"); | |
2792 | outputContainer->Add(fhEMVxyz); | |
2793 | ||
2794 | fhHaVxyz = new TH2F ("hHaVxyz","Production vertex of reconstructed hadrons",nvdistbins,vdistmin,vdistmax,nvdistbins,vdistmin,vdistmax);//,100,0,500); | |
2795 | fhHaVxyz->SetXTitle("v_{x}"); | |
2796 | fhHaVxyz->SetYTitle("v_{y}"); | |
2797 | //fhHaVxyz->SetZTitle("v_{z}"); | |
2798 | outputContainer->Add(fhHaVxyz); | |
2799 | ||
2800 | fhEMR = new TH2F ("hEMR","Distance to production vertex of reconstructed ElectroMagnetic particles vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax); | |
2801 | fhEMR->SetXTitle("E (GeV)"); | |
2802 | fhEMR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})"); | |
2803 | outputContainer->Add(fhEMR); | |
2804 | ||
2805 | fhHaR = new TH2F ("hHaR","Distance to production vertex of reconstructed Hadrons vs E rec",nptbins,ptmin,ptmax,nvdistbins,vdistmin,vdistmax); | |
2806 | fhHaR->SetXTitle("E (GeV)"); | |
2807 | fhHaR->SetYTitle("TMath::Sqrt(v_{x}^{2}+v_{y}^{2})"); | |
2808 | outputContainer->Add(fhHaR); | |
2809 | ||
2810 | ||
2811 | //Track Matching | |
2812 | ||
ec58c056 | 2813 | fhMCEle1EOverP = new TH2F("hMCEle1EOverP","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2814 | fhMCEle1EOverP->SetYTitle("E/p"); |
2815 | fhMCEle1EOverP->SetXTitle("p_{T} (GeV/c)"); | |
2816 | outputContainer->Add(fhMCEle1EOverP); | |
649b825d | 2817 | |
2818 | fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax); | |
2819 | fhMCEle1dR->SetXTitle("#Delta R (rad)"); | |
2820 | outputContainer->Add(fhMCEle1dR) ; | |
2821 | ||
2822 | fhMCEle2MatchdEdx = new TH2F("hMCEle2MatchdEdx","dE/dx vs. p for all matches, MC electrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); | |
2823 | fhMCEle2MatchdEdx->SetXTitle("p (GeV/c)"); | |
2824 | fhMCEle2MatchdEdx->SetYTitle("<dE/dx>"); | |
2825 | outputContainer->Add(fhMCEle2MatchdEdx); | |
2826 | ||
ec58c056 | 2827 | fhMCChHad1EOverP = new TH2F("hMCChHad1EOverP","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2828 | fhMCChHad1EOverP->SetYTitle("E/p"); |
2829 | fhMCChHad1EOverP->SetXTitle("p_{T} (GeV/c)"); | |
2830 | outputContainer->Add(fhMCChHad1EOverP); | |
649b825d | 2831 | |
2832 | fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax); | |
2833 | fhMCChHad1dR->SetXTitle("#Delta R (rad)"); | |
2834 | outputContainer->Add(fhMCChHad1dR) ; | |
2835 | ||
2836 | fhMCChHad2MatchdEdx = new TH2F("hMCChHad2MatchdEdx","dE/dx vs. p for all matches, MC charged hadrons",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); | |
2837 | fhMCChHad2MatchdEdx->SetXTitle("p (GeV/c)"); | |
2838 | fhMCChHad2MatchdEdx->SetYTitle("<dE/dx>"); | |
2839 | outputContainer->Add(fhMCChHad2MatchdEdx); | |
2840 | ||
ec58c056 | 2841 | fhMCNeutral1EOverP = new TH2F("hMCNeutral1EOverP","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2842 | fhMCNeutral1EOverP->SetYTitle("E/p"); |
2843 | fhMCNeutral1EOverP->SetXTitle("p_{T} (GeV/c)"); | |
2844 | outputContainer->Add(fhMCNeutral1EOverP); | |
649b825d | 2845 | |
2846 | fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax); | |
2847 | fhMCNeutral1dR->SetXTitle("#Delta R (rad)"); | |
2848 | outputContainer->Add(fhMCNeutral1dR) ; | |
2849 | ||
2850 | fhMCNeutral2MatchdEdx = new TH2F("hMCNeutral2MatchdEdx","dE/dx vs. p for all matches, MC neutrals",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax); | |
2851 | fhMCNeutral2MatchdEdx->SetXTitle("p (GeV/c)"); | |
2852 | fhMCNeutral2MatchdEdx->SetYTitle("<dE/dx>"); | |
2853 | outputContainer->Add(fhMCNeutral2MatchdEdx); | |
2854 | ||
ec58c056 | 2855 | fhMCEle1EOverPR02 = new TH2F("hMCEle1EOverPR02","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2856 | fhMCEle1EOverPR02->SetYTitle("E/p"); |
2857 | fhMCEle1EOverPR02->SetXTitle("p_{T} (GeV/c)"); | |
2858 | outputContainer->Add(fhMCEle1EOverPR02); | |
649b825d | 2859 | |
ec58c056 | 2860 | fhMCChHad1EOverPR02 = new TH2F("hMCChHad1EOverPR02","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2861 | fhMCChHad1EOverPR02->SetYTitle("E/p"); |
2862 | fhMCChHad1EOverPR02->SetXTitle("p_{T} (GeV/c)"); | |
2863 | outputContainer->Add(fhMCChHad1EOverPR02); | |
f5036bcb | 2864 | |
ec58c056 | 2865 | fhMCNeutral1EOverPR02 = new TH2F("hMCNeutral1EOverPR02","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); |
d55bb5e1 | 2866 | fhMCNeutral1EOverPR02->SetYTitle("E/p"); |
2867 | fhMCNeutral1EOverPR02->SetXTitle("p_{T} (GeV/c)"); | |
2868 | outputContainer->Add(fhMCNeutral1EOverPR02); | |
7206b21b | 2869 | |
2870 | fhMCEle1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60<dEdx<100), MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); | |
2871 | fhMCEle1EleEOverP->SetYTitle("E/p"); | |
2872 | fhMCEle1EleEOverP->SetXTitle("p_{T} (GeV/c)"); | |
2873 | outputContainer->Add(fhMCEle1EleEOverP); | |
2874 | ||
2875 | fhMCChHad1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60<dEdx<100), MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); | |
2876 | fhMCChHad1EleEOverP->SetYTitle("E/p"); | |
2877 | fhMCChHad1EleEOverP->SetXTitle("p_{T} (GeV/c)"); | |
2878 | outputContainer->Add(fhMCChHad1EleEOverP); | |
2879 | ||
2880 | fhMCNeutral1EleEOverP = new TH2F("hMCNeutral1EleEOverP","Electron candidates E/p (60<dEdx<100), MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); | |
2881 | fhMCNeutral1EleEOverP->SetYTitle("E/p"); | |
2882 | fhMCNeutral1EleEOverP->SetXTitle("p_{T} (GeV/c)"); | |
2883 | outputContainer->Add(fhMCNeutral1EleEOverP); | |
2884 | ||
521636d2 | 2885 | } |
f5036bcb | 2886 | |
649b825d | 2887 | // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++) |
2888 | // printf("i=%d, name= %s\n",i,outputContainer->At(i)->GetName()); | |
521636d2 | 2889 | |
649b825d | 2890 | return outputContainer; |
902aa95c | 2891 | } |
2892 | ||
b94e038e | 2893 | //______________________________________________________________________________________ |
2894 | Float_t AliAnaCalorimeterQA::GetECross(Int_t absID, AliVCaloCells* cells, Float_t dtcut) | |
1a72f6c5 | 2895 | { |
2896 | // Get energy in cross axis around maximum cell, for EMCAL only | |
2897 | ||
06f1b12a | 2898 | Int_t icol =-1, irow=-1,iRCU = -1; |
2899 | Int_t imod = GetModuleNumberCellIndexes(absID, fCalorimeter, icol, irow, iRCU); | |
e3300002 | 2900 | |
57d8227a | 2901 | if(fCalorimeter=="EMCAL") |
2902 | { | |
06f1b12a | 2903 | //Get close cells index, energy and time, not in corners |
e3300002 | 2904 | |
2905 | Int_t absID1 = -1; | |
2906 | Int_t absID2 = -1; | |
2907 | ||
2908 | if( irow < AliEMCALGeoParams::fgkEMCALRows-1) absID1 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow+1, icol); | |
2909 | if( irow > 0 ) absID2 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow-1, icol); | |
2747966a | 2910 | |
2911 | // In case of cell in eta = 0 border, depending on SM shift the cross cell index | |
2912 | Int_t absID3 = -1; | |
2913 | Int_t absID4 = -1; | |
2914 | ||
2915 | if ( icol == AliEMCALGeoParams::fgkEMCALCols - 1 && !(imod%2) ) | |
2916 | { | |
e3300002 | 2917 | absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod+1, irow, 0); |
2918 | absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol-1); | |
2747966a | 2919 | } |
2920 | else if( icol == 0 && imod%2 ) | |
2921 | { | |
e3300002 | 2922 | absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol+1); |
2923 | absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod-1, irow, AliEMCALGeoParams::fgkEMCALCols-1); | |
2747966a | 2924 | } |
2925 | else | |
2926 | { | |
e3300002 | 2927 | if( icol < AliEMCALGeoParams::fgkEMCALCols-1 ) |
2928 | absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1); | |
2929 | if( icol > 0 ) | |
2930 | absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1); | |
2747966a | 2931 | } |
06f1b12a | 2932 | |
2933 | //Recalibrate cell energy if needed | |
2934 | //Float_t ecell = cells->GetCellAmplitude(absID); | |
dbba06ca | 2935 | //GetCaloUtils()->RecalibrateCellAmplitude(ecell,fCalorimeter, absID); |
06f1b12a | 2936 | Double_t tcell = cells->GetCellTime(absID); |
dbba06ca | 2937 | GetCaloUtils()->RecalibrateCellTime(tcell, fCalorimeter, absID,GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
06f1b12a | 2938 | |
2939 | Float_t ecell1 = 0, ecell2 = 0, ecell3 = 0, ecell4 = 0; | |
2940 | Double_t tcell1 = 0, tcell2 = 0, tcell3 = 0, tcell4 = 0; | |
2941 | ||
45769d5b | 2942 | if(absID1 > 0 ) |
2747966a | 2943 | { |
06f1b12a | 2944 | ecell1 = cells->GetCellAmplitude(absID1); |
dbba06ca | 2945 | GetCaloUtils()->RecalibrateCellAmplitude(ecell1, fCalorimeter, absID1); |
06f1b12a | 2946 | tcell1 = cells->GetCellTime(absID1); |
dbba06ca | 2947 | GetCaloUtils()->RecalibrateCellTime (tcell1, fCalorimeter, absID1,GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
06f1b12a | 2948 | } |
45769d5b | 2949 | if(absID2 > 0 ) |
2747966a | 2950 | { |
06f1b12a | 2951 | ecell2 = cells->GetCellAmplitude(absID2); |
dbba06ca | 2952 | GetCaloUtils()->RecalibrateCellAmplitude(ecell2, fCalorimeter, absID2); |
06f1b12a | 2953 | tcell2 = cells->GetCellTime(absID2); |
dbba06ca | 2954 | GetCaloUtils()->RecalibrateCellTime (tcell2, fCalorimeter, absID2, GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
06f1b12a | 2955 | } |
45769d5b | 2956 | if(absID3 > 0 ) |
2747966a | 2957 | { |
06f1b12a | 2958 | ecell3 = cells->GetCellAmplitude(absID3); |
dbba06ca | 2959 | GetCaloUtils()->RecalibrateCellAmplitude(ecell3, fCalorimeter, absID3); |
06f1b12a | 2960 | tcell3 = cells->GetCellTime(absID3); |
dbba06ca | 2961 | GetCaloUtils()->RecalibrateCellTime (tcell3, fCalorimeter, absID3, GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
06f1b12a | 2962 | } |
45769d5b | 2963 | if(absID4 > 0 ) |
2747966a | 2964 | { |
06f1b12a | 2965 | ecell4 = cells->GetCellAmplitude(absID4); |
dbba06ca | 2966 | GetCaloUtils()->RecalibrateCellAmplitude(ecell4, fCalorimeter, absID4); |
06f1b12a | 2967 | tcell4 = cells->GetCellTime(absID4); |
dbba06ca | 2968 | GetCaloUtils()->RecalibrateCellTime (tcell4, fCalorimeter, absID4, GetReader()->GetInputEvent()->GetBunchCrossNumber()); |
06f1b12a | 2969 | } |
f1538a5f | 2970 | |
2971 | if(TMath::Abs(tcell-tcell1)*1.e9 > dtcut) ecell1 = 0 ; | |
2972 | if(TMath::Abs(tcell-tcell2)*1.e9 > dtcut) ecell2 = 0 ; | |
2973 | if(TMath::Abs(tcell-tcell3)*1.e9 > dtcut) ecell3 = 0 ; | |
2974 | if(TMath::Abs(tcell-tcell4)*1.e9 > dtcut) ecell4 = 0 ; | |
06f1b12a | 2975 | |
2976 | return ecell1+ecell2+ecell3+ecell4; | |
1a72f6c5 | 2977 | } |
57d8227a | 2978 | else //PHOS |
2979 | { | |
06f1b12a | 2980 | |
2981 | Int_t absId1 = -1, absId2 = -1, absId3 = -1, absId4 = -1; | |
2982 | ||
2983 | Int_t relId1[] = { imod+1, 0, irow+1, icol }; | |
2984 | Int_t relId2[] = { imod+1, 0, irow-1, icol }; | |
2985 | Int_t relId3[] = { imod+1, 0, irow , icol+1 }; | |
2986 | Int_t relId4[] = { imod+1, 0, irow , icol-1 }; | |
2987 | ||
2988 | GetCaloUtils()->GetPHOSGeometry()->RelToAbsNumbering(relId1, absId1); | |
2989 | GetCaloUtils()->GetPHOSGeometry()->RelToAbsNumbering(relId2, absId2); | |
2990 | GetCaloUtils()->GetPHOSGeometry()->RelToAbsNumbering(relId3, absId3); | |
2991 | GetCaloUtils()->GetPHOSGeometry()->RelToAbsNumbering(relId4, absId4); | |
2992 | ||
2993 | Float_t ecell1 = 0, ecell2 = 0, ecell3 = 0, ecell4 = 0; | |
2994 | ||
2995 | if(absId1 > 0 ) ecell1 = cells->GetCellAmplitude(absId1); | |
2996 | if(absId2 > 0 ) ecell2 = cells->GetCellAmplitude(absId2); | |
2997 | if(absId3 > 0 ) ecell3 = cells->GetCellAmplitude(absId3); | |
2998 | if(absId4 > 0 ) ecell4 = cells->GetCellAmplitude(absId4); | |
2999 | ||
3000 | return ecell1+ecell2+ecell3+ecell4; | |
3001 | ||
1a72f6c5 | 3002 | } |
3003 | ||
1a72f6c5 | 3004 | } |
3005 | ||
c5693f62 | 3006 | //__________________________________________________________________________________________________ |
b94e038e | 3007 | void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, TLorentzVector mom, |
3008 | Int_t nModule, const TObjArray* caloClusters, | |
a82b4462 | 3009 | AliVCaloCells * cells) |
649b825d | 3010 | { |
3011 | // Fill Invariant mass histograms | |
c8fe2783 | 3012 | |
649b825d | 3013 | if(GetDebug()>1) printf("AliAnaCalorimeterQA::InvariantMassHistograms() - Start \n"); |
3748ffb5 | 3014 | |
649b825d | 3015 | //Get vertex for photon momentum calculation and event selection |
3016 | Double_t v[3] = {0,0,0}; //vertex ; | |
1a83b960 | 3017 | //GetReader()->GetVertex(v); |
a6f26052 | 3018 | |
649b825d | 3019 | Int_t nModule2 = -1; |
3020 | TLorentzVector mom2 ; | |
3021 | Int_t nCaloClusters = caloClusters->GetEntriesFast(); | |
a6f26052 | 3022 | |
d07278cf | 3023 | for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++) |
3024 | { | |
649b825d | 3025 | AliVCluster* clus2 = (AliVCluster*)caloClusters->At(jclus); |
a82b4462 | 3026 | |
3027 | Float_t maxCellFraction = 0.; | |
45769d5b | 3028 | Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2, maxCellFraction); |
55c05f8c | 3029 | |
d07278cf | 3030 | // Try to rediuce background with a mild shower shape cut and no more than 1 maxima |
3031 | // in cluster and remove low energy clusters | |
3032 | if( clus2->GetNCells() <= 1 || !IsGoodCluster(absIdMax,cells) || | |
3033 | GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1 || | |
45769d5b | 3034 | clus2->GetM02() > 0.5 || clus2->E() < 0.5 ) continue; |
c8fe2783 | 3035 | |
649b825d | 3036 | //Get cluster kinematics |
3037 | clus2->GetMomentum(mom2,v); | |
c8fe2783 | 3038 | |
649b825d | 3039 | //Check only certain regions |
3040 | Bool_t in2 = kTRUE; | |
3041 | if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(mom2,fCalorimeter) ; | |
3042 | if(!in2) continue; | |
2302a644 | 3043 | |
649b825d | 3044 | //Get module of cluster |
3045 | nModule2 = GetModuleNumber(clus2); | |
c8fe2783 | 3046 | |
649b825d | 3047 | //Fill histograms |
c8fe2783 | 3048 | |
649b825d | 3049 | //All modules |
3050 | fhIM ->Fill((mom+mom2).Pt(),(mom+mom2).M()); | |
49214ef9 | 3051 | |
649b825d | 3052 | //Single module |
45769d5b | 3053 | if(nModule == nModule2 && nModule >= 0 && nModule < fNModules) |
649b825d | 3054 | fhIMMod[nModule]->Fill((mom+mom2).Pt(),(mom+mom2).M()); |
d07278cf | 3055 | |
c8fe2783 | 3056 | |
649b825d | 3057 | //Asymetry histograms |
3058 | fhAsym->Fill((mom+mom2).Pt(),TMath::Abs((mom.E()-mom2.E())/(mom.E()+mom2.E()))); | |
3059 | ||
3060 | }// 2nd cluster loop | |
3061 | ||
3062 | } | |
3063 | ||
3064 | //______________________________ | |
3065 | void AliAnaCalorimeterQA::Init() | |
3066 | { | |
3067 | //Check if the data or settings are ok | |
c8fe2783 | 3068 | |
649b825d | 3069 | if(fCalorimeter != "PHOS" && fCalorimeter !="EMCAL") |
3070 | AliFatal(Form("Wrong calorimeter name <%s>", fCalorimeter.Data())); | |
521636d2 | 3071 | |
b6002a83 | 3072 | //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC) |
3073 | // AliFatal("Analysis of reconstructed data, MC reader not aplicable"); | |
649b825d | 3074 | |
3075 | } | |
3bfc4732 | 3076 | |
649b825d | 3077 | //________________________________________ |
3078 | void AliAnaCalorimeterQA::InitParameters() | |
3079 | { | |
3080 | //Initialize the parameters of the analysis. | |
3081 | AddToHistogramsName("AnaCaloQA_"); | |
3082 | ||
3083 | fCalorimeter = "EMCAL"; //or PHOS | |
9f48b3f0 | 3084 | fNModules = 22; // set maximum to maximum number of EMCAL modules |
649b825d | 3085 | fNRCU = 2; // set maximum number of RCU in EMCAL per SM |
e6fec6f5 | 3086 | fTimeCutMin = -9999999; |
3087 | fTimeCutMax = 9999999; | |
649b825d | 3088 | fEMCALCellAmpMin = 0.2; |
3089 | fPHOSCellAmpMin = 0.2; | |
c8fe2783 | 3090 | |
f1538a5f | 3091 | // Exotic studies |
3092 | fExoNECrossCuts = 10 ; | |
3093 | fExoNDTimeCuts = 4 ; | |
3094 | ||
3095 | fExoDTimeCuts [0] = 1.e4 ; fExoDTimeCuts [1] = 50.0 ; fExoDTimeCuts [2] = 25.0 ; fExoDTimeCuts [3] = 10.0 ; | |
3096 | fExoECrossCuts[0] = 0.80 ; fExoECrossCuts[1] = 0.85 ; fExoECrossCuts[2] = 0.90 ; fExoECrossCuts[3] = 0.92 ; fExoECrossCuts[4] = 0.94 ; | |
3097 | fExoECrossCuts[5] = 0.95 ; fExoECrossCuts[6] = 0.96 ; fExoECrossCuts[7] = 0.97 ; fExoECrossCuts[8] = 0.98 ; fExoECrossCuts[9] = 0.99 ; | |
3098 | ||
649b825d | 3099 | } |
c8fe2783 | 3100 | |
b94e038e | 3101 | //_____________________________________________________________________________ |
3102 | Bool_t AliAnaCalorimeterQA::IsGoodCluster(Int_t absIdMax, AliVCaloCells* cells) | |
649b825d | 3103 | { |
3104 | //Identify cluster as exotic or not | |
3105 | ||
06f1b12a | 3106 | if(!fStudyBadClusters) return kTRUE; |
a82b4462 | 3107 | |
2747966a | 3108 | if(fCalorimeter=="EMCAL") |
3109 | { | |
06f1b12a | 3110 | if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster()) |
2747966a | 3111 | { |
06f1b12a | 3112 | return !( GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(absIdMax,cells,(GetReader()->GetInputEvent())->GetBunchCrossNumber()) ); |
2747966a | 3113 | } |
3114 | else | |
3115 | { | |
06f1b12a | 3116 | return kTRUE; |
2747966a | 3117 | } |
649b825d | 3118 | } |
06f1b12a | 3119 | else // PHOS |
3120 | { | |
1a83b960 | 3121 | Float_t ampMax = cells->GetCellAmplitude(absIdMax); |
dbba06ca | 3122 | GetCaloUtils()->RecalibrateCellAmplitude(ampMax, fCalorimeter, absIdMax); |
2747966a | 3123 | |
3124 | if(ampMax < 0.01) return kFALSE; | |
3125 | ||
1a83b960 | 3126 | if(1-GetECross(absIdMax,cells)/ampMax > 0.95) return kFALSE; |
3127 | else return kTRUE; | |
06f1b12a | 3128 | } |
3129 | ||
649b825d | 3130 | } |
17708df9 | 3131 | |
a82b4462 | 3132 | //_________________________________________________________ |
649b825d | 3133 | void AliAnaCalorimeterQA::Print(const Option_t * opt) const |
3134 | { | |
3135 | //Print some relevant parameters set for the analysis | |
3136 | if(! opt) | |
3137 | return; | |
521636d2 | 3138 | |
649b825d | 3139 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ; |
745913ae | 3140 | AliAnaCaloTrackCorrBaseClass::Print(" "); |
2302a644 | 3141 | |
649b825d | 3142 | printf("Select Calorimeter %s \n",fCalorimeter.Data()); |
3143 | printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax); | |
3144 | printf("EMCAL Min Amplitude : %2.1f GeV/c\n", fEMCALCellAmpMin) ; | |
3145 | printf("PHOS Min Amplitude : %2.1f GeV/c\n", fPHOSCellAmpMin) ; | |
c8fe2783 | 3146 | |
649b825d | 3147 | } |
3148 | ||
649b825d | 3149 | //_____________________________________________________ |
3150 | void AliAnaCalorimeterQA::MakeAnalysisFillHistograms() | |
3151 | { | |
3152 | //Fill Calorimeter QA histograms | |
c8fe2783 | 3153 | |
649b825d | 3154 | //Play with the MC stack if available |
3155 | if(IsDataMC()) MCHistograms(); | |
798a9b04 | 3156 | |
649b825d | 3157 | //Get List with CaloClusters |
3158 | TObjArray * caloClusters = NULL; | |
3159 | if (fCalorimeter == "PHOS") caloClusters = GetPHOSClusters(); | |
3160 | else if (fCalorimeter == "EMCAL") caloClusters = GetEMCALClusters(); | |
3161 | else | |
3162 | AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END\n", fCalorimeter.Data())); | |
798a9b04 | 3163 | |
649b825d | 3164 | // Do not do anything if there are no clusters |
3165 | if(caloClusters->GetEntriesFast() == 0) return; | |
521636d2 | 3166 | |
649b825d | 3167 | //Get List with CaloCells |
3168 | AliVCaloCells * cells = 0x0; | |
3169 | if(fCalorimeter == "PHOS") cells = GetPHOSCells(); | |
3170 | else cells = GetEMCALCells(); | |
798a9b04 | 3171 | |
45769d5b | 3172 | if(!caloClusters || !cells) |
3173 | { | |
649b825d | 3174 | AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available\n")); |
3175 | return; // trick coverity | |
c8fe2783 | 3176 | } |
649b825d | 3177 | |
1a72f6c5 | 3178 | //printf("QA: N cells %d, N clusters %d \n",cells->GetNumberOfCells(),caloClusters->GetEntriesFast()); |
3179 | ||
649b825d | 3180 | // Correlate Calorimeters and V0 and track Multiplicity |
3181 | if(fCorrelate) Correlate(); | |
3182 | ||
3183 | // Clusters | |
3184 | ClusterLoopHistograms(caloClusters,cells); | |
3185 | ||
3186 | // Cells | |
3187 | CellHistograms(cells); | |
3188 | ||
3189 | if(GetDebug() > 0) | |
3190 | printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - End \n"); | |
3191 | ||
a0bb4dc0 | 3192 | } |
3193 | ||
649b825d | 3194 | //______________________________________ |
3195 | void AliAnaCalorimeterQA::MCHistograms() | |
3196 | { | |
3197 | //Get the MC arrays and do some checks before filling MC histograms | |
9e9f04cb | 3198 | |
649b825d | 3199 | TLorentzVector mom ; |
3200 | ||
45769d5b | 3201 | if(GetReader()->ReadStack()) |
3202 | { | |
649b825d | 3203 | if(!GetMCStack()) |
3204 | AliFatal("Stack not available, is the MC handler called?\n"); | |
9e9f04cb | 3205 | |
649b825d | 3206 | //Fill some pure MC histograms, only primaries. |
2747966a | 3207 | for(Int_t i=0 ; i<GetMCStack()->GetNprimary(); i++) |
3208 | {//Only primary particles, for all MC transport put GetNtrack() | |
649b825d | 3209 | TParticle *primary = GetMCStack()->Particle(i) ; |
9e9f04cb | 3210 | |
649b825d | 3211 | if (primary->GetStatusCode() > 11) continue; //Working for PYTHIA and simple generators, check for HERWIG |
3212 | primary->Momentum(mom); | |
3213 | MCHistograms(mom,TMath::Abs(primary->GetPdgCode())); | |
3214 | } //primary loop | |
45769d5b | 3215 | } // ESD |
3216 | else if(GetReader()->ReadAODMCParticles()) | |
3217 | { | |
2644ead9 | 3218 | if(!GetReader()->GetAODMCParticles()) |
649b825d | 3219 | AliFatal("AODMCParticles not available!"); |
3220 | ||
3221 | //Fill some pure MC histograms, only primaries. | |
2644ead9 | 3222 | for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles())->GetEntriesFast(); i++) |
2747966a | 3223 | { |
2644ead9 | 3224 | AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(i) ; |
9e9f04cb | 3225 | |
649b825d | 3226 | if (!aodprimary->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons |
9e9f04cb | 3227 | |
649b825d | 3228 | mom.SetPxPyPzE(aodprimary->Px(),aodprimary->Py(),aodprimary->Pz(),aodprimary->E()); |
3229 | MCHistograms(mom,TMath::Abs(aodprimary->GetPdgCode())); | |
3230 | } //primary loop | |
45769d5b | 3231 | } // AOD |
649b825d | 3232 | } |
17708df9 | 3233 | |
649b825d | 3234 | //_______________________________________________________________________________ |
b94e038e | 3235 | void AliAnaCalorimeterQA::MCHistograms(TLorentzVector mom, Int_t pdg) |
649b825d | 3236 | { |
a6f26052 | 3237 | //Fill pure monte carlo related histograms |
4865e325 | 3238 | |
2302a644 | 3239 | Float_t eMC = mom.E(); |
2302a644 | 3240 | Float_t phiMC = mom.Phi(); |
3241 | if(phiMC < 0) | |
3242 | phiMC += TMath::TwoPi(); | |
3243 | Float_t etaMC = mom.Eta(); | |
3244 | ||
3245 | if (TMath::Abs(etaMC) > 1) return; | |
3246 | ||
35c71d5c | 3247 | Bool_t in = kFALSE; |
3248 | ||
3249 | //Rough stimate of acceptance for pi0, Eta and electrons | |
2747966a | 3250 | if(fCalorimeter == "PHOS") |
3251 | { | |
35c71d5c | 3252 | if(GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter)) |
3253 | in = kTRUE ; | |
3254 | if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),in); | |
3255 | ||
3256 | } | |
2747966a | 3257 | else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()) |
3258 | { | |
3259 | if(GetEMCALGeometry()) | |
3260 | { | |
35c71d5c | 3261 | Int_t absID=0; |
3262 | GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(mom.Eta(),mom.Phi(),absID); | |
3263 | ||
3264 | if( absID >= 0) | |
3265 | in = kTRUE; | |
3266 | ||
3267 | if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s Real acceptance? %d\n",fCalorimeter.Data(),in); | |
3268 | } | |
2747966a | 3269 | else |
3270 | { | |
35c71d5c | 3271 | if(GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter)) |
3272 | in = kTRUE ; | |
3273 | if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),in); | |
3274 | } | |
3275 | } | |
2302a644 | 3276 | |
2747966a | 3277 | if (pdg==22) |
3278 | { | |
c5693f62 | 3279 | fhGenMCE[kmcPhoton] ->Fill(eMC); |
3280 | if(eMC > 0.5) fhGenMCEtaPhi[kmcPhoton]->Fill(etaMC,phiMC); | |
2747966a | 3281 | if(in) |
3282 | { | |
c5693f62 | 3283 | fhGenMCAccE[kmcPhoton] ->Fill(eMC); |
3284 | if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPhoton]->Fill(etaMC,phiMC); | |
2302a644 | 3285 | } |
3286 | } | |
2747966a | 3287 | else if (pdg==111) |
3288 | { | |
c5693f62 | 3289 | fhGenMCE[kmcPi0] ->Fill(eMC); |
3290 | if(eMC > 0.5) fhGenMCEtaPhi[kmcPi0]->Fill(etaMC,phiMC); | |
2747966a | 3291 | if(in) |
3292 | { | |
c5693f62 | 3293 | fhGenMCAccE[kmcPi0] ->Fill(eMC); |
3294 | if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPi0]->Fill(etaMC,phiMC); | |
2302a644 | 3295 | } |
3296 | } | |
2747966a | 3297 | else if (pdg==221) |
3298 | { | |
c5693f62 | 3299 | fhGenMCE[kmcEta] ->Fill(eMC); |
3300 | if(eMC > 0.5) fhGenMCEtaPhi[kmcEta]->Fill(etaMC,phiMC); | |
2747966a | 3301 | if(in) |
3302 | { | |
c5693f62 | 3303 | fhGenMCAccE[kmcEta] ->Fill(eMC); |
3304 | if(eMC > 0.5) fhGenMCAccEtaPhi[kmcEta]->Fill(etaMC,phiMC); | |
35c71d5c | 3305 | } |
2302a644 | 3306 | } |
2747966a | 3307 | else if (TMath::Abs(pdg)==11) |
3308 | { | |
c5693f62 | 3309 | fhGenMCE[kmcElectron] ->Fill(eMC); |
3310 | if(eMC > 0.5) fhGenMCEtaPhi[kmcElectron]->Fill(etaMC,phiMC); | |
2747966a | 3311 | if(in) |
3312 | { | |
c5693f62 | 3313 | fhGenMCAccE[kmcElectron] ->Fill(eMC); |
3314 | if(eMC > 0.5) fhGenMCAccEtaPhi[kmcElectron]->Fill(etaMC,phiMC); | |
35c71d5c | 3315 | } |
2302a644 | 3316 | } |
902aa95c | 3317 | } |
c8fe2783 | 3318 | |
649b825d | 3319 | //_________________________________________________________________________________ |
3320 | void AliAnaCalorimeterQA::WeightHistograms(AliVCluster *clus, AliVCaloCells* cells) | |
3321 | { | |
3322 | // Calculate weights | |
3323 | ||
3324 | // First recalculate energy in case non linearity was applied | |
3325 | Float_t energy = 0; | |
3326 | Float_t ampMax = 0; | |
2747966a | 3327 | for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) |
3328 | { | |
649b825d | 3329 | Int_t id = clus->GetCellsAbsId()[ipos]; |
3330 | ||
3331 | //Recalibrate cell energy if needed | |
3332 | Float_t amp = cells->GetCellAmplitude(id); | |
dbba06ca | 3333 | GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id); |
649b825d | 3334 | |
3335 | energy += amp; | |
3336 | ||
3337 | if(amp> ampMax) | |
3338 | ampMax = amp; | |
3339 | ||
3340 | } // energy loop | |
3341 | ||
2747966a | 3342 | if(energy <=0 ) |
3343 | { | |
649b825d | 3344 | printf("AliAnaCalorimeterQA::WeightHistograms()- Wrong calculated energy %f\n",energy); |
3345 | return; | |
3346 | } | |
3347 | ||
3348 | fhEMaxCellClusterRatio ->Fill(energy,ampMax/energy); | |
3349 | fhEMaxCellClusterLogRatio->Fill(energy,TMath::Log(ampMax/energy)); | |
3350 | ||
3351 | //Get the ratio and log ratio to all cells in cluster | |
2747966a | 3352 | for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) |
3353 | { | |
649b825d | 3354 | Int_t id = clus->GetCellsAbsId()[ipos]; |
3355 | ||
3356 | //Recalibrate cell energy if needed | |
3357 | Float_t amp = cells->GetCellAmplitude(id); | |
dbba06ca | 3358 | GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id); |
649b825d | 3359 | |
3360 | fhECellClusterRatio ->Fill(energy,amp/energy); | |
3361 | fhECellClusterLogRatio->Fill(energy,TMath::Log(amp/energy)); | |
3362 | } | |
3363 | ||
3364 | //Recalculate shower shape for different W0 | |
2747966a | 3365 | if(fCalorimeter=="EMCAL") |
3366 | { | |
649b825d | 3367 | Float_t l0org = clus->GetM02(); |
3368 | Float_t l1org = clus->GetM20(); | |
3369 | Float_t dorg = clus->GetDispersion(); | |
3370 | ||
45769d5b | 3371 | for(Int_t iw = 0; iw < 14; iw++) |
3372 | { | |
1a72f6c5 | 3373 | GetCaloUtils()->GetEMCALRecoUtils()->SetW0(1+iw*0.5); |
649b825d | 3374 | GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), cells, clus); |
3375 | ||
3376 | fhLambda0ForW0[iw]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3377 | //fhLambda1ForW0[iw]->Fill(energy,clus->GetM20()); |
649b825d | 3378 | |
45769d5b | 3379 | if(IsDataMC()) |
3380 | { | |
2644ead9 | 3381 | Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader()); |
649b825d | 3382 | |
45769d5b | 3383 | if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && |
649b825d | 3384 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) && |
3385 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) && | |
3386 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
3387 | fhLambda0ForW0MC[iw][0]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3388 | //fhLambda1ForW0MC[iw][0]->Fill(energy,clus->GetM20()); |
649b825d | 3389 | } // Pure Photon |
3390 | else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) && | |
3391 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
3392 | fhLambda0ForW0MC[iw][1]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3393 | //fhLambda1ForW0MC[iw][1]->Fill(energy,clus->GetM20()); |
649b825d | 3394 | } // Electron |
3395 | else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) ){ | |
3396 | fhLambda0ForW0MC[iw][2]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3397 | //fhLambda1ForW0MC[iw][2]->Fill(energy,clus->GetM20()); |
649b825d | 3398 | } // Conversion |
3399 | else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ){ | |
3400 | fhLambda0ForW0MC[iw][3]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3401 | //fhLambda1ForW0MC[iw][3]->Fill(energy,clus->GetM20()); |
649b825d | 3402 | }// Pi0 |
3403 | else if(!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) && | |
3404 | !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) ){ | |
3405 | fhLambda0ForW0MC[iw][4]->Fill(energy,clus->GetM02()); | |
1a72f6c5 | 3406 | //fhLambda1ForW0MC[iw][4]->Fill(energy,clus->GetM20()); |
649b825d | 3407 | }// Hadron |
3408 | ||
3409 | }// Is MC | |
3410 | } // w0 loop | |
3411 | ||
3412 | // Set the original values back | |
3413 | clus->SetM02(l0org); | |
3414 | clus->SetM20(l1org); | |
3415 | clus->SetDispersion(dorg); | |
3416 | ||
3417 | }// EMCAL | |
3418 | ||
3419 | } | |
3420 | ||
3421 | ||
3422 |