24 #include "AliAnalysisManager.h"
25 #include "AliInputEventHandler.h"
26 #include "AliMCEventHandler.h"
27 #include "AliAODHandler.h"
31 #include "AliMCEvent.h"
34 #include "TObjString.h"
35 #include "AliAODEvent.h"
36 #include "AliESDEvent.h"
37 #include "AliCentrality.h"
42 #include "AliAODMCParticle.h"
43 #include "AliAODMCHeader.h"
45 #include "AliPHOSGeoUtils.h"
46 #include "AliTrackerBase.h"
47 #include "AliVCaloCells.h"
48 #include "AliVCluster.h"
49 #include "AliTender.h"
50 #include "AliTenderSupply.h"
51 #include "AliEMCALTenderSupply.h"
53 #include "AliPHOSTenderSupply.h"
54 #include "AliPHOSTenderTask.h"
55 #include "AliOADBContainer.h"
56 #include "AliESDtrackCuts.h"
75 "DistanceToBadChannel",
92 AliAnalysisCuts(name,title),
95 fCaloTrackMatcher(NULL),
98 fEMCALInitialized(kFALSE),
100 fPHOSInitialized(kFALSE),
102 fEMCALBadChannelsMap(NULL),
103 fPHOSBadChannelsMap(NULL),
105 fNMaxEMCalModules(12),
107 fHistoModifyAcc(NULL),
108 fDoLightOutput(kFALSE),
110 fIsCurrentClusterAcceptedBeforeTM(kFALSE),
111 fV0ReaderName(
"V0ReaderV1"),
112 fCaloTrackMatcherName(
"CaloTrackMatcher_1"),
124 fMinDistanceToBadChannel(0),
125 fUseDistanceToBadChannel(0),
127 fMinTimeDiff(-10e10),
129 fMaxDistTrackToClusterEta(0),
130 fMinDistTrackToClusterPhi(0),
131 fMaxDistTrackToClusterPhi(0),
132 fUseDistTrackToCluster(0),
133 fUsePtDepTrackToCluster(0),
136 fExtendedMatchAndQA(0),
137 fExoticEnergyFracCluster(0),
138 fExoticMinEnergyCell(1),
139 fUseExoticCluster(0),
140 fDoExoticsQA(kFALSE),
143 fLocMaxCutEDiff(0.03),
155 fMaxDispersion(1000),
162 fSwitchNonLinearity(0),
163 fUseNonLinearity(kFALSE),
165 fVectorMatchedClusterIDs(0),
169 fHistAcceptanceCuts(NULL),
170 fHistClusterIdentificationCuts(NULL),
171 fHistClusterEtavsPhiBeforeAcc(NULL),
172 fHistClusterEtavsPhiAfterAcc(NULL),
173 fHistClusterEtavsPhiAfterQA(NULL),
174 fHistClusterTimevsEBeforeQA(NULL),
175 fHistClusterTimevsEAfterQA(NULL),
176 fHistEnergyOfClusterBeforeNL(NULL),
177 fHistEnergyOfClusterAfterNL(NULL),
178 fHistEnergyOfClusterBeforeQA(NULL),
179 fHistEnergyOfClusterAfterQA(NULL),
180 fHistNCellsBeforeQA(NULL),
181 fHistNCellsAfterQA(NULL),
182 fHistM02BeforeQA(NULL),
183 fHistM02AfterQA(NULL),
184 fHistM20BeforeQA(NULL),
185 fHistM20AfterQA(NULL),
186 fHistDispersionBeforeQA(NULL),
187 fHistDispersionAfterQA(NULL),
188 fHistNLMBeforeQA(NULL),
189 fHistNLMAfterQA(NULL),
190 fHistNLMVsNCellsAfterQA(NULL),
191 fHistNLMVsEAfterQA(NULL),
193 fHistClusterEnergyvsMod(NULL),
194 fHistNCellsBigger100MeVvsMod(NULL),
195 fHistNCellsBigger1500MeVvsMod(NULL),
196 fHistEnergyOfModvsMod(NULL),
197 fHistClusterEnergyvsNCells(NULL),
198 fHistCellEnergyvsCellID(NULL),
199 fHistCellTimevsCellID(NULL),
200 fHistClusterEM02BeforeQA(NULL),
201 fHistClusterEM02AfterQA(NULL),
202 fHistClusterIncludedCellsBeforeQA(NULL),
203 fHistClusterIncludedCellsAfterQA(NULL),
204 fHistClusterEnergyFracCellsBeforeQA(NULL),
205 fHistClusterEnergyFracCellsAfterQA(NULL),
206 fHistClusterIncludedCellsTimingAfterQA(NULL),
207 fHistClusterIncludedCellsTimingEnergyAfterQA(NULL),
208 fHistClusterDistanceInTimeCut(NULL),
209 fHistClusterDistanceOutTimeCut(NULL),
210 fHistClusterDistance1DInTimeCut(NULL),
211 fHistClusterRBeforeQA(NULL),
212 fHistClusterRAfterQA(NULL),
213 fHistClusterdEtadPhiBeforeQA(NULL),
214 fHistClusterdEtadPhiAfterQA(NULL),
215 fHistDistanceTrackToClusterBeforeQA(NULL),
216 fHistDistanceTrackToClusterAfterQA(NULL),
217 fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
218 fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
219 fHistClusterdEtadPhiPosTracksAfterQA(NULL),
220 fHistClusterdEtadPhiNegTracksAfterQA(NULL),
221 fHistClusterdEtadPhiPosTracksP_000_075BeforeQA(NULL),
222 fHistClusterdEtadPhiPosTracksP_075_125BeforeQA(NULL),
223 fHistClusterdEtadPhiPosTracksP_125_999BeforeQA(NULL),
224 fHistClusterdEtadPhiNegTracksP_000_075BeforeQA(NULL),
225 fHistClusterdEtadPhiNegTracksP_075_125BeforeQA(NULL),
226 fHistClusterdEtadPhiNegTracksP_125_999BeforeQA(NULL),
227 fHistClusterdEtadPtBeforeQA(NULL),
228 fHistClusterdEtadPtAfterQA(NULL),
229 fHistClusterdEtadPtTrueMatched(NULL),
230 fHistClusterdPhidPtPosTracksBeforeQA(NULL),
231 fHistClusterdPhidPtNegTracksBeforeQA(NULL),
232 fHistClusterdPhidPtAfterQA(NULL),
233 fHistClusterdPhidPtPosTracksTrueMatched(NULL),
234 fHistClusterdPhidPtNegTracksTrueMatched(NULL),
235 fHistClusterM20M02BeforeQA(NULL),
236 fHistClusterM20M02AfterQA(NULL),
237 fHistClusterEtavsPhiExotics(NULL),
238 fHistClusterEM02Exotics(NULL),
239 fHistClusterEnergyvsNCellsExotics(NULL),
240 fHistClusterEEstarExotics(NULL),
241 fHistClusterTMEffiInput(NULL),
242 fHistClusterEvsTrackECharged(NULL),
243 fHistClusterEvsTrackEChargedLead(NULL),
244 fHistClusterEvsTrackENeutral(NULL),
245 fHistClusterEvsTrackENeutralSubCharged(NULL),
246 fHistClusterEvsTrackEGamma(NULL),
247 fHistClusterEvsTrackEGammaSubCharged(NULL),
248 fHistClusterEvsTrackEConv(NULL),
249 fHistClusterENMatchesNeutral(NULL),
250 fHistClusterENMatchesCharged(NULL),
251 fHistClusterEvsTrackEPrimaryButNoElec(NULL),
252 fHistClusterEvsTrackSumEPrimaryButNoElec(NULL),
264 AliAnalysisCuts(ref),
267 fCaloTrackMatcher(NULL),
269 fEMCALRecUtils(NULL),
270 fEMCALInitialized(kFALSE),
272 fPHOSInitialized(kFALSE),
274 fEMCALBadChannelsMap(NULL),
275 fPHOSBadChannelsMap(NULL),
277 fNMaxEMCalModules(ref.fNMaxEMCalModules),
278 fNMaxPHOSModules(ref.fNMaxPHOSModules),
279 fHistoModifyAcc(NULL),
280 fDoLightOutput(ref.fDoLightOutput),
282 fIsCurrentClusterAcceptedBeforeTM(kFALSE),
283 fV0ReaderName(ref.fV0ReaderName),
284 fCaloTrackMatcherName(ref.fCaloTrackMatcherName),
285 fPeriodName(ref.fPeriodName),
286 fCurrentMC(ref.fCurrentMC),
287 fClusterType(ref.fClusterType),
288 fMinEtaCut(ref.fMinEtaCut),
289 fMinEtaInnerEdge(ref.fMinEtaInnerEdge),
290 fMaxEtaCut(ref.fMaxEtaCut),
291 fMaxEtaInnerEdge(ref.fMaxEtaInnerEdge),
292 fUseEtaCut(ref.fUseEtaCut),
293 fMinPhiCut(ref.fMinPhiCut),
294 fMaxPhiCut(ref.fMaxPhiCut),
295 fUsePhiCut(ref.fUsePhiCut),
296 fMinDistanceToBadChannel(ref.fMinDistanceToBadChannel),
297 fUseDistanceToBadChannel(ref.fUseDistanceToBadChannel),
298 fMaxTimeDiff(ref.fMaxTimeDiff),
299 fMinTimeDiff(ref.fMinTimeDiff),
300 fUseTimeDiff(ref.fUseTimeDiff),
301 fMaxDistTrackToClusterEta(ref.fMaxDistTrackToClusterEta),
302 fMinDistTrackToClusterPhi(ref.fMinDistTrackToClusterPhi),
303 fMaxDistTrackToClusterPhi(ref.fMaxDistTrackToClusterPhi),
304 fUseDistTrackToCluster(ref.fUseDistTrackToCluster),
305 fUsePtDepTrackToCluster(ref.fUsePtDepTrackToCluster),
306 fFuncPtDepEta(ref.fFuncPtDepEta),
307 fFuncPtDepPhi(ref.fFuncPtDepPhi),
308 fExtendedMatchAndQA(ref.fExtendedMatchAndQA),
309 fExoticEnergyFracCluster(ref.fExoticEnergyFracCluster),
310 fExoticMinEnergyCell(ref.fExoticMinEnergyCell),
311 fUseExoticCluster(ref.fUseExoticCluster),
312 fDoExoticsQA(ref.fDoExoticsQA),
313 fMinEnergy(ref.fMinEnergy),
314 fSeedEnergy(ref.fSeedEnergy),
315 fLocMaxCutEDiff(ref.fLocMaxCutEDiff),
316 fUseMinEnergy(ref.fUseMinEnergy),
317 fMinNCells(ref.fMinNCells),
318 fUseNCells(ref.fUseNCells),
319 fMaxM02(ref.fMaxM02),
320 fMinM02(ref.fMinM02),
321 fUseM02(ref.fUseM02),
322 fMaxM02CutNr(ref.fMaxM02CutNr),
323 fMinM02CutNr(ref.fMinM02CutNr),
324 fMaxM20(ref.fMaxM20),
325 fMinM20(ref.fMinM20),
326 fUseM20(ref.fUseDispersion),
327 fMaxDispersion(ref.fMaxDispersion),
328 fUseDispersion(ref.fUseDispersion),
329 fMinNLM(ref.fMinNLM),
330 fMaxNLM(ref.fMaxNLM),
331 fUseNLM(ref.fUseNLM),
332 fNonLinearity1(ref.fNonLinearity1),
333 fNonLinearity2(ref.fNonLinearity2),
334 fSwitchNonLinearity(ref.fSwitchNonLinearity),
335 fUseNonLinearity(ref.fUseNonLinearity),
336 fIsPureCalo(ref.fIsPureCalo),
337 fVectorMatchedClusterIDs(0),
341 fHistAcceptanceCuts(NULL),
342 fHistClusterIdentificationCuts(NULL),
343 fHistClusterEtavsPhiBeforeAcc(NULL),
344 fHistClusterEtavsPhiAfterAcc(NULL),
345 fHistClusterEtavsPhiAfterQA(NULL),
346 fHistClusterTimevsEBeforeQA(NULL),
347 fHistClusterTimevsEAfterQA(NULL),
348 fHistEnergyOfClusterBeforeNL(NULL),
349 fHistEnergyOfClusterAfterNL(NULL),
350 fHistEnergyOfClusterBeforeQA(NULL),
351 fHistEnergyOfClusterAfterQA(NULL),
352 fHistNCellsBeforeQA(NULL),
353 fHistNCellsAfterQA(NULL),
354 fHistM02BeforeQA(NULL),
355 fHistM02AfterQA(NULL),
356 fHistM20BeforeQA(NULL),
357 fHistM20AfterQA(NULL),
358 fHistDispersionBeforeQA(NULL),
359 fHistDispersionAfterQA(NULL),
360 fHistNLMBeforeQA(NULL),
361 fHistNLMAfterQA(NULL),
363 fHistNLMVsNCellsAfterQA(NULL),
364 fHistNLMVsEAfterQA(NULL),
365 fHistClusterEnergyvsMod(NULL),
366 fHistNCellsBigger100MeVvsMod(NULL),
367 fHistNCellsBigger1500MeVvsMod(NULL),
368 fHistEnergyOfModvsMod(NULL),
369 fHistClusterEnergyvsNCells(NULL),
370 fHistCellEnergyvsCellID(NULL),
371 fHistCellTimevsCellID(NULL),
372 fHistClusterEM02BeforeQA(NULL),
373 fHistClusterEM02AfterQA(NULL),
374 fHistClusterIncludedCellsBeforeQA(NULL),
375 fHistClusterIncludedCellsAfterQA(NULL),
376 fHistClusterEnergyFracCellsBeforeQA(NULL),
377 fHistClusterEnergyFracCellsAfterQA(NULL),
378 fHistClusterIncludedCellsTimingAfterQA(NULL),
379 fHistClusterIncludedCellsTimingEnergyAfterQA(NULL),
380 fHistClusterDistanceInTimeCut(NULL),
381 fHistClusterDistanceOutTimeCut(NULL),
382 fHistClusterDistance1DInTimeCut(NULL),
383 fHistClusterRBeforeQA(NULL),
384 fHistClusterRAfterQA(NULL),
385 fHistClusterdEtadPhiBeforeQA(NULL),
386 fHistClusterdEtadPhiAfterQA(NULL),
387 fHistDistanceTrackToClusterBeforeQA(NULL),
388 fHistDistanceTrackToClusterAfterQA(NULL),
389 fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
390 fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
391 fHistClusterdEtadPhiPosTracksAfterQA(NULL),
392 fHistClusterdEtadPhiNegTracksAfterQA(NULL),
393 fHistClusterdEtadPhiPosTracksP_000_075BeforeQA(NULL),
394 fHistClusterdEtadPhiPosTracksP_075_125BeforeQA(NULL),
395 fHistClusterdEtadPhiPosTracksP_125_999BeforeQA(NULL),
396 fHistClusterdEtadPhiNegTracksP_000_075BeforeQA(NULL),
397 fHistClusterdEtadPhiNegTracksP_075_125BeforeQA(NULL),
398 fHistClusterdEtadPhiNegTracksP_125_999BeforeQA(NULL),
399 fHistClusterdEtadPtBeforeQA(NULL),
400 fHistClusterdEtadPtAfterQA(NULL),
401 fHistClusterdEtadPtTrueMatched(NULL),
402 fHistClusterdPhidPtPosTracksBeforeQA(NULL),
403 fHistClusterdPhidPtNegTracksBeforeQA(NULL),
404 fHistClusterdPhidPtAfterQA(NULL),
405 fHistClusterdPhidPtPosTracksTrueMatched(NULL),
406 fHistClusterdPhidPtNegTracksTrueMatched(NULL),
407 fHistClusterM20M02BeforeQA(NULL),
408 fHistClusterM20M02AfterQA(NULL),
409 fHistClusterEtavsPhiExotics(NULL),
410 fHistClusterEM02Exotics(NULL),
411 fHistClusterEnergyvsNCellsExotics(NULL),
412 fHistClusterEEstarExotics(NULL),
413 fHistClusterTMEffiInput(NULL),
414 fHistClusterEvsTrackECharged(NULL),
415 fHistClusterEvsTrackEChargedLead(NULL),
416 fHistClusterEvsTrackENeutral(NULL),
417 fHistClusterEvsTrackENeutralSubCharged(NULL),
418 fHistClusterEvsTrackEGamma(NULL),
419 fHistClusterEvsTrackEGammaSubCharged(NULL),
420 fHistClusterEvsTrackEConv(NULL),
421 fHistClusterENMatchesNeutral(NULL),
422 fHistClusterENMatchesCharged(NULL),
423 fHistClusterEvsTrackEPrimaryButNoElec(NULL),
424 fHistClusterEvsTrackSumEPrimaryButNoElec(NULL),
425 fNMaxDCalModules(ref.fNMaxDCalModules),
426 fgkDCALCols(ref.fgkDCALCols)
456 TH1::AddDirectory(kFALSE);
485 Int_t nBinsClusterEFine = 400;
486 Int_t nBinsClusterECoarse = 100;
489 Int_t nBinsCellECoarse = 150;
492 Int_t nBinsModuleECoarse = 400;
532 const Int_t nEmcalEtaBins = 96;
533 const Int_t nEmcalPhiBins = 124;
534 Float_t EmcalEtaBins[nEmcalEtaBins+1] = {-0.66687,-0.653,-0.63913,-0.62526,-0.61139,-0.59752,-0.58365,-0.56978,-0.55591,-0.54204,-0.52817,-0.5143,-0.50043,-0.48656,-0.47269,-0.45882,-0.44495,-0.43108,-0.41721,-0.40334,-0.38947,-0.3756,-0.36173,-0.34786,-0.33399,-0.32012,-0.30625,-0.29238,-0.27851,-0.26464,-0.25077,-0.2369,-0.22303,-0.20916,-0.19529,-0.18142,-0.16755,-0.15368,-0.13981,-0.12594,-0.11207,-0.0982,-0.08433,-0.07046,-0.05659,-0.04272,-0.02885,-0.01498,-0.00111,0.01276,0.02663,0.0405,0.05437,0.06824,0.08211,0.09598,0.10985,0.12372,0.13759,0.15146,0.16533,0.1792,0.19307,0.20694,0.22081,0.23468,0.24855,0.26242,0.27629,0.29016,0.30403,0.3179,0.33177,0.34564,0.35951,0.37338,0.38725,0.40112,0.41499,0.42886,0.44273,0.4566,0.47047,0.48434,0.49821,0.51208,0.52595,0.53982,0.55369,0.56756,0.58143,0.5953,0.60917,0.62304,0.63691,0.65078,0.66465};
535 Float_t EmcalPhiBins[nEmcalPhiBins+1] = {1.408,1.4215,1.435,1.4485,1.462,1.4755,1.489,1.5025,1.516,1.5295,1.543,1.5565,1.57,1.5835,1.597,1.6105,1.624,1.6375,1.651,1.6645,1.678,1.6915,1.705,1.7185,1.732,1.758,1.7715,1.785,1.7985,1.812,1.8255,1.839,1.8525,1.866,1.8795,1.893,1.9065,1.92,1.9335,1.947,1.9605,1.974,1.9875,2.001,2.0145,2.028,2.0415,2.055,2.0685,2.082,2.108,2.1215,2.135,2.1485,2.162,2.1755,2.189,2.2025,2.216,2.2295,2.243,2.2565,2.27,2.2835,2.297,2.3105,2.324,2.3375,2.351,2.3645,2.378,2.3915,2.405,2.4185,2.432,2.456,2.4695,2.483,2.4965,2.51,2.5235,2.537,2.5505,2.564,2.5775,2.591,2.6045,2.618,2.6315,2.645,2.6585,2.672,2.6855,2.699,2.7125,2.726,2.7395,2.753,2.7665,2.78,2.804,2.8175,2.831,2.8445,2.858,2.8715,2.885,2.8985,2.912,2.9255,2.939,2.9525,2.966,2.9795,2.993,3.0065,3.02,3.0335,3.047,3.0605,3.074,3.0875,3.101,3.1145,3.128};
546 const Int_t nPhosEtaBins = 56;
547 const Int_t nPhosPhiBins = 256;
548 const Float_t PhosEtaRange[2] = {-0.16, 0.16};
549 const Float_t PhosPhiRange[2] = {4.355, 5.6};
560 const Int_t nDcalEtaBins = 96;
561 const Int_t nDcalPhiBins = 124;
579 }
else{AliError(Form(
"Cluster Type is not EMCAL nor PHOS nor all: %i",
fClusterType));}
690 fBadChannels =
new TProfile(
"EMCal - Bad Channels",
"EMCal - Bad Channels",nMaxCellsEMCAL,0,nMaxCellsEMCAL);
694 fBadChannels =
new TProfile(
"PHOS - Bad Channels",
"PHOS - Bad Channels",nMaxCellsPHOS,0,nMaxCellsPHOS);
697 Int_t nStartCellDCAL = 12288;
699 fBadChannels =
new TProfile(
"DCAL - Bad Channels",
"DCAL - Bad Channels",nMaxCellsDCAL,nStartCellDCAL,nStartCellDCAL+nMaxCellsDCAL);
750 nBinsClusterECoarse, minClusterELog, maxClusterELog, 200, -500, 500);
755 nBinsCellECoarse, minCellELog, maxCellELog, 200, -500, 500);
806 nBinsClusterECoarse, minClusterELog, maxClusterELog, 200, -500, 500);
811 nBinsCellECoarse, minCellELog, maxCellELog, 200, -500, 500);
817 Int_t nModulesStart = 12;
818 Int_t nCellsStart = 12288;
875 const Int_t nEtaBins = 300;
876 const Int_t nPhiBins = 300;
877 const Float_t EtaRange[2] = {-0.3, 0.3};
878 const Float_t PhiRange[2] = {-0.3, 0.3};
902 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
905 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
908 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
911 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
914 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
917 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
920 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
923 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
926 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
929 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
932 nBinsModuleECoarse, minClusterELog, maxClusterELog);
936 nBinsModuleECoarse, minClusterELog, maxClusterELog);
940 2*nPhiBins, 2*PhiRange[0], 2*PhiRange[1], nBinsModuleECoarse, minClusterELog, maxClusterELog);
944 2*nPhiBins, 2*PhiRange[0], 2*PhiRange[1], nBinsModuleECoarse, minClusterELog, maxClusterELog);
948 nBinsModuleECoarse, minClusterELog, maxClusterELog);
954 nBinsModuleECoarse, minClusterELog, maxClusterELog);
958 nBinsModuleECoarse, minClusterELog, maxClusterELog);
962 nBinsModuleECoarse, minClusterELog, maxClusterELog);
1033 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1040 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1047 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1054 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1061 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1068 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1075 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1083 nBinsClusterEFine, minClusterELog, maxClusterELog, 20, -0.5, 19.5);
1089 nBinsClusterEFine, minClusterELog, maxClusterELog, 20, -0.5, 19.5);
1096 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1103 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1128 const Int_t nEmcalEtaBins = 96;
1129 const Int_t nEmcalPhiBins = 124;
1130 Float_t EmcalEtaBins[nEmcalEtaBins+1] = {-0.66687,-0.653,-0.63913,-0.62526,-0.61139,-0.59752,-0.58365,-0.56978,-0.55591,-0.54204,-0.52817,-0.5143,-0.50043,-0.48656,-0.47269,-0.45882,-0.44495,-0.43108,-0.41721,-0.40334,-0.38947,-0.3756,-0.36173,-0.34786,-0.33399,-0.32012,-0.30625,-0.29238,-0.27851,-0.26464,-0.25077,-0.2369,-0.22303,-0.20916,-0.19529,-0.18142,-0.16755,-0.15368,-0.13981,-0.12594,-0.11207,-0.0982,-0.08433,-0.07046,-0.05659,-0.04272,-0.02885,-0.01498,-0.00111,0.01276,0.02663,0.0405,0.05437,0.06824,0.08211,0.09598,0.10985,0.12372,0.13759,0.15146,0.16533,0.1792,0.19307,0.20694,0.22081,0.23468,0.24855,0.26242,0.27629,0.29016,0.30403,0.3179,0.33177,0.34564,0.35951,0.37338,0.38725,0.40112,0.41499,0.42886,0.44273,0.4566,0.47047,0.48434,0.49821,0.51208,0.52595,0.53982,0.55369,0.56756,0.58143,0.5953,0.60917,0.62304,0.63691,0.65078,0.66465};
1131 Float_t EmcalPhiBins[nEmcalPhiBins+1] = {1.408,1.4215,1.435,1.4485,1.462,1.4755,1.489,1.5025,1.516,1.5295,1.543,1.5565,1.57,1.5835,1.597,1.6105,1.624,1.6375,1.651,1.6645,1.678,1.6915,1.705,1.7185,1.732,1.758,1.7715,1.785,1.7985,1.812,1.8255,1.839,1.8525,1.866,1.8795,1.893,1.9065,1.92,1.9335,1.947,1.9605,1.974,1.9875,2.001,2.0145,2.028,2.0415,2.055,2.0685,2.082,2.108,2.1215,2.135,2.1485,2.162,2.1755,2.189,2.2025,2.216,2.2295,2.243,2.2565,2.27,2.2835,2.297,2.3105,2.324,2.3375,2.351,2.3645,2.378,2.3915,2.405,2.4185,2.432,2.456,2.4695,2.483,2.4965,2.51,2.5235,2.537,2.5505,2.564,2.5775,2.591,2.6045,2.618,2.6315,2.645,2.6585,2.672,2.6855,2.699,2.7125,2.726,2.7395,2.753,2.7665,2.78,2.804,2.8175,2.831,2.8445,2.858,2.8715,2.885,2.8985,2.912,2.9255,2.939,2.9525,2.966,2.9795,2.993,3.0065,3.02,3.0335,3.047,3.0605,3.074,3.0875,3.101,3.1145,3.128};
1136 const Int_t nPhosEtaBins = 56;
1137 const Int_t nPhosPhiBins = 192;
1138 const Float_t PhosEtaRange[2] = {-0.16, 0.16};
1139 const Float_t PhosPhiRange[2] = {4.5, 5.6};
1145 const Int_t nDcalEtaBins = 96;
1146 const Int_t nDcalPhiBins = 124;
1158 nBinsClusterECoarse, minClusterELog, maxClusterELog);
1173 TH1::AddDirectory(kTRUE);
1181 AliTender* alitender=0x0;
1184 if(event->IsA()==AliESDEvent::Class())
1185 alitender = (AliTender*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"AliTender");
1186 else if( event->IsA()==AliAODEvent::Class())
1187 emcaltender = (
AliEmcalTenderTask*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"AliEmcalTenderTask");
1190 TIter next(alitender->GetSupplies());
1191 AliTenderSupply *supply;
1192 while ((supply=(AliTenderSupply*)next()))
if(supply->IsA()==AliEMCALTenderSupply::Class())
break;
1193 fEMCALRecUtils = ((AliEMCALTenderSupply*)supply)->GetRecoUtils();
1195 }
else if(emcaltender){
1201 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1202 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
1210 Int_t nMinCellsDCAL = 12288;
1212 Int_t nMaxCells = 0;
1213 Int_t nMinCells = 0;
1215 nMaxCells = nMaxCellsEMCAL;
1218 nMaxCells = nMaxCellsDCAL;
1219 nMinCells = nMinCellsDCAL;
1223 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
1226 for(
Int_t iCell=nMinCells;iCell<nMaxCells;iCell++){
1227 fGeomEMCAL->GetCellIndex(iCell,imod,iTower,iIphi,iIeta);
1229 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
1244 fGeomPHOS = AliPHOSGeometry::GetInstance();
1245 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
1250 AliPHOSTenderTask* aliphostender = (AliPHOSTenderTask*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"PHOSTenderTask");
1251 AliPHOSTenderSupply *PHOSSupply =((AliPHOSTenderSupply*) aliphostender->GetPHOSTenderSupply()) ;
1254 AliError(Form(
"Can not find PHOSTenderSupply in run %d. No bad channel map could be found for QA!\n",event->GetRunNumber())) ;
1257 AliInfo(
"Setting PHOS bad map from PHOSSupply \n") ;
1258 for(
Int_t mod=0;mod<nModules;mod++){
1259 TH2I * h = (TH2I*)PHOSSupply->GetPHOSBadChannelStatusMap(mod);
1262 AliInfo(Form(
"using bad map for module %d with nch=%f\n",mod,h->Integral()));
1270 for(
Int_t iCell=0;iCell<nMaxCellsPHOS;iCell++){
1271 fGeomPHOS->AbsToRelNumbering(iCell,relid);
1273 if(relid[1]!=0) AliFatal(
"PHOS CPV in PHOS cell array?");
1296 if(!mcEvent)
return kFALSE;
1297 if(!particle)
return kFALSE;
1299 if (particle->GetPdgCode() == 22){
1305 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 22){
1317 if(!mcEvent)
return kFALSE;
1318 if(!particle)
return kFALSE;
1320 if (TMath::Abs(particle->GetPdgCode()) == 11){
1326 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 11){
1338 if(!aodmcArray)
return kFALSE;
1339 if(!particle)
return kFALSE;
1341 if (TMath::Abs(particle->GetPdgCode()) == 11){
1346 if(particle->GetMother() >-1 && (
static_cast<AliAODMCParticle*
>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 11){
1358 if(!aodmcArray)
return kFALSE;
1359 if(!particle)
return kFALSE;
1361 if (particle->GetPdgCode() == 22){
1365 if(particle->GetMother() > -1 && (
static_cast<AliAODMCParticle*
>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 22){
1389 cluster->GetPosition(clusPos);
1390 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
1391 Double_t etaCluster = clusterVector.Eta();
1392 Double_t phiCluster = clusterVector.Phi();
1393 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
1411 AliVCaloCells* cells = NULL;
1413 if(cluster->IsEMCAL()){
1414 cells =
event->GetEMCALCells();
1415 }
else if(cluster->IsPHOS()){
1416 cells =
event->GetPHOSCells();
1419 Int_t nCellCluster = cluster->GetNCells();
1420 for(
Int_t iCell=0;iCell<nCellCluster;iCell++){
1443 Bool_t failedM02 = kFALSE;
1451 if( nLM < fMinNLM || nLM >
fMaxNLM )
1470 if ( !( failed || failedM02 ) ){
1503 if( nLM < fMinNLM || nLM >
fMaxNLM ) {
1512 if( cluster->GetM02()<
fMinM02 || cluster->GetM02() >
fMaxM02 ) {
1527 if( cluster->GetM20()<
fMinM20 || cluster->GetM20() >
fMaxM20 ) {
1552 AliError(
"Task needs AOD or ESD event, returning");
1568 Int_t classification = -1;
1569 Long_t leadMCLabel = -1;
1571 leadMCLabel = ((AliESDCaloCluster*)cluster)->GetLabel();
1573 leadMCLabel = ((AliAODCaloCluster*)cluster)->GetLabel();
1579 if (classification == 5 )
1581 if (classification == 7 )
1583 if (classification == 4)
1585 if (classification == 6)
1587 if (classification == 0 || classification == 1)
1589 if (classification == 1)
1591 if (classification == 2 || classification == 3)
1593 if ( classification == 3)
1596 Int_t nlabelsMatchedTracks = 0;
1602 if (classification < 4 && classification > -1)
1616 if (classification == 5 )
1618 if (classification == 4)
1620 if (classification == 0 || classification == 1)
1622 if ( classification == 1)
1624 if (classification == 2 || classification == 3)
1626 if ( classification == 3)
1628 if ( classification == 7)
1630 if ( classification == 6)
1633 vector<Int_t> labelsMatchedTracks;
1644 Bool_t foundLead = kFALSE;
1647 for (
Int_t i = 0; i < (
Int_t)labelsMatchedTracks.size(); i++){
1648 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(labelsMatchedTracks.at(i)));
1649 eSum += currTrack->E();
1650 if (ptMax < currTrack->Pt()){
1651 ptMax = currTrack->Pt();
1652 eMax = currTrack->E();
1655 if (classification == 4 || classification == 5 || classification == 6 || classification == 7){
1656 Long_t mcLabelTrack = -1;
1658 mcLabelTrack = TMath::Abs(((AliESDtrack*)currTrack)->GetLabel());
1660 mcLabelTrack = TMath::Abs(((AliAODTrack*)currTrack)->GetLabel());
1661 if (mcLabelTrack!= -1 && mcLabelTrack == leadMCLabel){
1663 eLead = currTrack->E();
1668 if (classification == 5 || classification == 7 || classification == 6){
1670 if (classification == 5 || classification == 7){
1676 if (classification == 5)
1678 if (classification == 7)
1680 if (classification == 6)
1685 if (classification == 4){
1690 if (classification == 0 )
1692 if (classification == 1)
1694 if (classification == 2)
1696 if (classification == 3)
1699 labelsMatchedTracks.clear();
1728 Int_t nCellCluster = cluster->GetNCells();
1729 for(
Int_t iCell=0;iCell<nCellCluster;iCell++){
1730 Int_t cellID = cluster->GetCellAbsId(iCell);
1731 Double_t cellAmp = cells->GetCellAmplitude(cellID);
1732 Double_t cellTime = cells->GetCellTime(cellID);
1746 if(cluster->IsEMCAL()){
1747 Int_t iSuperModule = -1;
1748 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1749 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
1753 }
else if(cluster->IsPHOS()){
1754 Int_t relId[4] = {0,0,0,0};
1755 fGeomPHOS = AliPHOSGeometry::GetInstance();
1756 if(!
fGeomPHOS){ AliFatal(
"PHOS geometry not initialized!");}
1773 AliVCaloCells* cells = 0x0;
1776 Int_t* nCellsBigger100MeV;
1777 Int_t* nCellsBigger1500MeV;
1783 Int_t nModulesStart = 0;
1785 cells =
event->GetEMCALCells();
1786 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1787 if(!
fGeomEMCAL) AliFatal(
"EMCal geometry not initialized!");
1789 nModules =
fGeomEMCAL->GetNumberOfSuperModules();
1790 if(
fClusterType == 3) {nModules = 8; nModulesStart = 12;}
1792 cells =
event->GetPHOSCells();
1793 fGeomPHOS = AliPHOSGeometry::GetInstance();
1794 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
1797 AliError(Form(
"fExtendedMatchAndQA(%i):FillHistogramsExtendedMatchAndQA() not (yet) defined for cluster type (%i)",
fExtendedMatchAndQA,
fClusterType));
1800 nCellsBigger100MeV =
new Int_t[nModules];
1801 nCellsBigger1500MeV =
new Int_t[nModules];
1802 EnergyOfMod =
new Double_t[nModules];
1804 for(
Int_t iModule=0;iModule<nModules;iModule++){nCellsBigger100MeV[iModule]=0;nCellsBigger1500MeV[iModule]=0;EnergyOfMod[iModule]=0;}
1806 for(
Int_t iCell=0;iCell<cells->GetNumberOfCells();iCell++){
1811 Int_t cellMCLabel=0;
1814 cells->GetCell(iCell,cellNumber,cellAmplitude,cellTime,cellMCLabel,cellEFrac);
1815 if(
fClusterType == 3 && cellNumber < 12288){
continue;}
1817 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
1821 Bool_t doBadCell = kTRUE;
1823 nMod =
fGeomEMCAL->GetSuperModuleNumber(cellNumber);
1824 fGeomEMCAL->GetCellIndex(cellNumber,imod,iTower,iIphi,iIeta);
1826 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
1828 fGeomPHOS->AbsToRelNumbering(cellNumber,relid);
1829 if(relid[1]!=0) AliFatal(
"PHOS CPV in PHOS cell array?");
1841 if(iBadCell > 0)
continue;
1843 if(cellAmplitude > 0.1) nCellsBigger100MeV[nMod-nModulesStart]++;
1844 if(cellAmplitude > 1.5) nCellsBigger1500MeV[nMod-nModulesStart]++;
1845 if(cellAmplitude > 0.05) EnergyOfMod[nMod-nModulesStart]+=cellAmplitude;
1853 for(
Int_t iModule=0;iModule<nModules;iModule++){
1859 delete[] nCellsBigger100MeV;nCellsBigger100MeV=0x0;
1860 delete[] nCellsBigger1500MeV;nCellsBigger1500MeV=0x0;
1861 delete[] EnergyOfMod;EnergyOfMod=0x0;
1864 Int_t nclus =
event->GetNumberOfCaloClusters();
1865 AliVCluster* cluster = 0x0;
1866 AliVCluster* clusterMatched = 0x0;
1867 for(
Int_t iClus=0; iClus<nclus ; iClus++){
1868 if(event->IsA()==AliESDEvent::Class()) cluster =
new AliESDCaloCluster(*(AliESDCaloCluster*)
event->GetCaloCluster(iClus));
1869 else if(event->IsA()==AliAODEvent::Class()) cluster =
new AliAODCaloCluster(*(AliAODCaloCluster*)
event->GetCaloCluster(iClus));
1872 if(
fClusterType == 2 && cluster->GetType() !=AliVCluster::kPHOSNeutral){
delete cluster;
continue;}
1875 cluster->GetPosition(clusPos);
1876 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
1877 Double_t etaCluster = clusterVector.Eta();
1878 Double_t phiCluster = clusterVector.Phi();
1879 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
1883 if (
fUseEtaCut && (etaCluster < fMinEtaCut || etaCluster >
fMaxEtaCut)){
delete cluster;
continue;}
1885 if (
fUsePhiCut && (phiCluster < fMinPhiCut || phiCluster >
fMaxPhiCut)){
delete cluster;
continue;}
1891 if (
fUseNLM && (nLM < fMinNLM || nLM >
fMaxNLM)){
delete cluster;
continue;}
1892 if (
fUseM02 == 1 && (cluster->GetM02() <
fMinM02 || cluster->GetM02() >
fMaxM02)){
delete cluster;
continue;}
1894 if (
fUseM20 && (cluster->GetM20() <
fMinM20 || cluster->GetM20() >
fMaxM20)){
delete cluster;
continue;}
1897 if (!(isMC>0) && (cluster->GetTOF() <
fMinTimeDiff || cluster->GetTOF() >
fMaxTimeDiff)){
delete cluster;
continue;}
1899 Int_t largestCellicol = -1, largestCellirow = -1;
1901 if(largestCellID==-1) AliFatal(
"FillHistogramsExtendedQA: FindLargestCellInCluster found cluster with NCells<1?");
1903 if(largestCelliMod < 0) AliFatal(
"FillHistogramsExtendedQA: GetModuleNumberAndCellPosition found SM with ID<0?");
1905 for(
Int_t iClus2=iClus+1; iClus2<nclus; iClus2++){
1906 if(event->IsA()==AliESDEvent::Class()) clusterMatched =
new AliESDCaloCluster(*(AliESDCaloCluster*)
event->GetCaloCluster(iClus2));
1907 else if(event->IsA()==AliAODEvent::Class()) clusterMatched =
new AliAODCaloCluster(*(AliAODCaloCluster*)
event->GetCaloCluster(iClus2));
1910 if(
fClusterType == 2 && clusterMatched->GetType() !=AliVCluster::kPHOSNeutral){
delete clusterMatched;
continue;}
1913 clusterMatched->GetPosition(clusPos2);
1914 TVector3 clusterMatchedVector(clusPos2[0],clusPos2[1],clusPos2[2]);
1915 Double_t etaclusterMatched = clusterMatchedVector.Eta();
1916 Double_t phiclusterMatched = clusterMatchedVector.Phi();
1917 if (phiclusterMatched < 0) phiclusterMatched += 2*TMath::Pi();
1921 if (
fUseEtaCut && (etaclusterMatched < fMinEtaCut || etaclusterMatched > fMaxEtaCut)){
delete clusterMatched;
continue;}
1922 if (
fUseEtaCut &&
fClusterType == 3 && etaclusterMatched < fMaxEtaInnerEdge && etaclusterMatched > fMinEtaInnerEdge ) {
delete clusterMatched;
continue;}
1923 if (
fUsePhiCut && (phiclusterMatched < fMinPhiCut || phiclusterMatched > fMaxPhiCut)){
delete clusterMatched;
continue;}
1928 if (
fUseNCells && (clusterMatched->GetNCells() <
fMinNCells)){
delete clusterMatched;
continue;}
1929 if (
fUseNLM && (nLMMatched < fMinNLM || nLMMatched > fMaxNLM)){
delete clusterMatched;
continue;}
1930 if (
fUseM02 == 1 && (clusterMatched->GetM02() <
fMinM02 || clusterMatched->GetM02() >
fMaxM02)){
delete clusterMatched;
continue;}
1932 if (
fUseM20 && (clusterMatched->GetM20() <
fMinM20 || clusterMatched->GetM20() >
fMaxM20)){
delete clusterMatched;
continue;}
1937 Int_t matched_largestCellicol = -1, matched_largestCellirow = -1;
1939 if(matched_largestCellID==-1) AliFatal(
"FillHistogramsExtendedQA: FindLargestCellInCluster found cluster with NCells<1?");
1941 if(matched_largestCelliMod < 0) AliFatal(
"FillHistogramsExtendedQA: GetModuleNumberAndCellPosition found SM with ID<0?");
1947 Int_t rowdiff = -100;
1948 Int_t coldiff = -100;
1949 Bool_t calculatedDiff = kFALSE;
1951 Int_t ClusID = largestCelliMod/2;
1952 Int_t matchClusID = matched_largestCelliMod/2;
1954 if( matched_largestCelliMod == largestCelliMod){
1955 rowdiff = largestCellirow - matched_largestCellirow;
1956 coldiff = largestCellicol - matched_largestCellicol;
1957 calculatedDiff = kTRUE;
1958 }
else if( TMath::Abs(matched_largestCelliMod - largestCelliMod) == 1 && (ClusID == matchClusID) ){
1959 if(matched_largestCelliMod%2){
1960 matched_largestCelliMod -= 1;
1961 matched_largestCellicol += AliEMCALGeoParams::fgkEMCALCols;
1963 matched_largestCelliMod += 1;
1964 matched_largestCellicol -= AliEMCALGeoParams::fgkEMCALCols;
1967 if( matched_largestCelliMod == largestCelliMod ){
1968 rowdiff = largestCellirow - matched_largestCellirow;
1969 coldiff = largestCellicol - matched_largestCellicol;
1970 calculatedDiff = kTRUE;
1977 if( calculatedDiff ){
1978 Float_t dist1D = TMath::Sqrt(TMath::Power(etaCluster-etaclusterMatched,2)+TMath::Power(phiCluster-phiclusterMatched,2));
1990 delete clusterMatched;
2005 const Int_t nc = cluster->GetNCells();
2007 Int_t absCellIdList[nc];
2018 const Int_t nCells = cluster->GetNCells();
2019 AliVCaloCells* cells = NULL;
2022 cells =
event->GetEMCALCells();
2024 cells =
event->GetPHOSCells();
2030 Int_t iCellMax = -1;
2032 if (nCells < 2)
return idMax;
2033 for (
Int_t iCell = 1;iCell < nCells;iCell++){
2034 if (cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell])> eMax){
2035 eMax = cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell]);
2036 idMax = cluster->GetCellsAbsId()[iCell];
2042 for (
Int_t iCell = 1;iCell < nCells;iCell++){
2043 if (iCell == iCellMax)
continue;
2044 if (cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell])> eMax){
2045 eMax = cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell]);
2046 idMax2 = cluster->GetCellsAbsId()[iCell];
2056 const Int_t nCells = cluster->GetNCells();
2057 AliVCaloCells* cells = NULL;
2060 cells =
event->GetEMCALCells();
2062 cells =
event->GetPHOSCells();
2068 if (nCells < 1)
return idMax;
2069 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2070 Int_t cellAbsID = cluster->GetCellsAbsId()[iCell];
2071 if (cells->GetCellAmplitude(cellAbsID)> eMax){
2072 eMax = cells->GetCellAmplitude(cellAbsID);
2087 Int_t absCellId1 = -1;
2088 Int_t absCellId2 = -1;
2089 const Int_t nCells = cluster->GetNCells();
2090 AliVCaloCells* cells = NULL;
2093 cells =
event->GetEMCALCells();
2095 cells =
event->GetPHOSCells();
2101 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2102 absCellIdList[iCell] = cluster->GetCellsAbsId()[iCell];
2106 if (cells->GetCellAmplitude(absCellIdList[iCell])> eMax){
2107 eMax = cells->GetCellAmplitude(absCellIdList[iCell]);
2108 idMax = absCellIdList[iCell];
2113 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2115 if (absCellIdList[iCell] >= 0){
2117 absCellId1 = cluster->GetCellsAbsId()[iCell];
2118 Float_t en1 = cells->GetCellAmplitude(absCellId1);
2121 for (
Int_t iCellN = 0;iCellN < nCells;iCellN++){
2123 if (absCellIdList[iCell] == -1)
continue;
2125 absCellId2 = cluster->GetCellsAbsId()[iCellN];
2128 if (absCellId2 == -1)
continue;
2129 if (absCellId1 == absCellId2)
continue;
2132 Float_t en2 = cells->GetCellAmplitude(absCellId2);
2140 absCellIdList[iCellN] = -1;
2142 absCellIdList[iCell] = -1;
2144 absCellIdList[iCell] = -1;
2146 absCellIdList[iCellN] = -1;
2154 Int_t nMaximaNew = 0;
2155 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2157 if (absCellIdList[iCell] > -1){
2158 Float_t en = cells->GetCellAmplitude(absCellIdList[iCell]);
2161 absCellIdList[nMaximaNew] = absCellIdList[iCell];
2162 maxEList[nMaximaNew] = en;
2169 if (nMaximaNew == 0){
2172 absCellIdList[0] = idMax;
2183 Bool_t areNeighbours = kFALSE ;
2185 Int_t irow1 = -1, icol1 = -1;
2186 Int_t irow2 = -1, icol2 = -1;
2188 Int_t rowdiff = 0, coldiff = 0;
2194 if (nSupMod1== -1 || nSupMod2 == -1)
return areNeighbours;
2199 if(nSupMod1%2) icol1+=AliEMCALGeoParams::fgkEMCALCols;
2200 else icol2+=AliEMCALGeoParams::fgkEMCALCols;
2203 rowdiff = TMath::Abs( irow1 - irow2 ) ;
2204 coldiff = TMath::Abs( icol1 - icol2 ) ;
2207 if ((coldiff + rowdiff == 1 ))
2208 areNeighbours = kTRUE ;
2210 return areNeighbours;
2220 fGeomEMCAL = AliEMCALGeometry::GetInstance();
2221 if(!
fGeomEMCAL) AliFatal(
"EMCal geometry not initialized!");
2223 fGeomPHOS = AliPHOSGeometry::GetInstance();
2224 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
2227 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
2229 fGeomEMCAL->GetCellIndex(absCellId,imod,iTower,iIphi,iIeta);
2230 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
2233 fGeomPHOS->AbsToRelNumbering(absCellId,relId);
2247 AliVCluster* cluster,
2250 AliAODCaloCluster* cluster1,
2251 AliAODCaloCluster* cluster2){
2253 const Int_t ncells = cluster->GetNCells();
2254 Int_t absCellIdList[ncells];
2256 AliVCaloCells* cells = NULL;
2258 cells =
event->GetEMCALCells();
2260 cells =
event->GetPHOSCells();
2266 for(
Int_t iCell = 0;iCell < ncells;iCell++ ) {
2267 absCellIdList[iCell] = cluster->GetCellsAbsId()[iCell];
2268 Float_t ec = cells->GetCellAmplitude(absCellIdList[iCell]);
2279 absCellIdList1[0] = absCellId1 ;
2280 fracList1 [0] = 1. ;
2282 Float_t ecell1 = cells->GetCellAmplitude(absCellId1);
2286 absCellIdList2[0] = absCellId2 ;
2287 fracList2 [0] = 1. ;
2289 Float_t ecell2 = cells->GetCellAmplitude(absCellId2);
2294 Float_t eRemain = (eCluster-ecell1-ecell2)/2;
2295 Float_t shareFraction1 = (ecell1+eRemain)/eCluster;
2296 Float_t shareFraction2 = (ecell2+eRemain)/eCluster;
2300 for(
Int_t iCell = 0;iCell < ncells;iCell++){
2302 Int_t absId = absCellIdList[iCell];
2303 if ( absId==absCellId1 || absId==absCellId2 || absId < 0 )
continue;
2305 Float_t ecell = cells->GetCellAmplitude(absId);
2307 absCellIdList1[ncells1] = absId;
2309 fracList1[ncells1] = shareFraction1;
2310 e1 += ecell*shareFraction1;
2312 fracList1[ncells1] = 1.;
2319 absCellIdList2[ncells2]= absId;
2322 fracList2[ncells2] = shareFraction2;
2323 e2 += ecell*shareFraction2;
2325 fracList2[ncells2] = 1.;
2336 cluster1->SetNCells(ncells1);
2337 cluster2->SetNCells(ncells2);
2339 cluster1->SetCellsAbsId(absCellIdList1);
2340 cluster2->SetCellsAbsId(absCellIdList2);
2342 cluster1->SetCellsAmplitudeFraction(fracList1);
2343 cluster2->SetCellsAmplitudeFraction(fracList2);
2370 if(largestCellID==-1) AliFatal(
"CheckDistanceToBadChannel: FindLargestCellInCluster found cluster with NCells<1?");
2372 Int_t largestCellicol = -1, largestCellirow = -1;
2373 Int_t rowdiff = 0, coldiff = 0;
2376 if(largestCelliMod < 0) AliFatal(
"CheckDistanceToBadChannel: GetModuleNumberAndCellPosition found SM with ID<0?");
2378 Int_t nMinRows = 0, nMaxRows = 0;
2379 Int_t nMinCols = 0, nMaxCols = 0;
2381 Bool_t checkNextSM = kFALSE;
2384 nMinRows = largestCellirow - distanceForLoop;
2385 nMaxRows = largestCellirow + distanceForLoop;
2386 if(nMinRows < 0) nMinRows = 0;
2387 if(nMaxRows > AliEMCALGeoParams::fgkEMCALRows) nMaxRows = AliEMCALGeoParams::fgkEMCALRows;
2389 nMinCols = largestCellicol - distanceForLoop;
2390 nMaxCols = largestCellicol + distanceForLoop;
2392 if(largestCelliMod%2){
2395 checkNextSM = kTRUE;
2397 if(nMaxCols > AliEMCALGeoParams::fgkEMCALCols) nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2399 if(nMinCols < 0) nMinCols = 0;
2400 if(nMaxCols > AliEMCALGeoParams::fgkEMCALCols){
2401 nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2402 checkNextSM = kTRUE;
2406 nMinRows = largestCellirow - distanceForLoop;
2407 nMaxRows = largestCellirow + distanceForLoop;
2408 if(nMinRows < 0) nMinRows = 0;
2409 if(nMaxRows > AliEMCALGeoParams::fgkEMCALCols) nMaxRows = AliEMCALGeoParams::fgkEMCALCols;
2411 nMinCols = largestCellicol - distanceForLoop;
2412 nMaxCols = largestCellicol + distanceForLoop;
2413 if(nMinCols < 0) nMinCols = 0;
2426 for (
Int_t irow = nMinRows;irow < nMaxRows;irow++)
2428 for (
Int_t icol = nMinCols;icol < nMaxCols;icol++)
2430 if(irow == largestCellirow && icol == largestCellicol)
continue;
2439 if(iBadCell==0)
continue;
2441 rowdiff = TMath::Abs( largestCellirow - irow ) ;
2442 coldiff = TMath::Abs( largestCellicol - icol ) ;
2458 if(largestCelliMod%2){
2459 nMinCols = largestCellicol - distanceForLoop + AliEMCALGeoParams::fgkEMCALCols;
2460 nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2462 largestCelliMod -= 1;
2463 largestCellicol += AliEMCALGeoParams::fgkEMCALCols;
2466 nMaxCols = largestCellicol + distanceForLoop - AliEMCALGeoParams::fgkEMCALCols;
2468 largestCelliMod += 1;
2469 largestCellicol -= AliEMCALGeoParams::fgkEMCALCols;
2477 for (
Int_t irow = nMinRows;irow < nMaxRows;irow++)
2479 for (
Int_t icol = nMinCols;icol < nMaxCols;icol++)
2482 if(
fClusterType == 1 && largestCelliMod<fEMCALBadChannelsMap->GetEntries()){
2488 if(iBadCell==0)
continue;
2490 rowdiff = TMath::Abs( largestCellirow - irow ) ;
2491 coldiff = TMath::Abs( largestCellicol - icol ) ;
2521 cluster->GetPosition(clusPos);
2522 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
2523 Double_t etaCluster = clusterVector.Eta();
2524 Double_t phiCluster = clusterVector.Phi();
2525 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
2577 cluster->GetPosition(clusPos);
2578 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
2579 Double_t etaCluster = clusterVector.Eta();
2580 Double_t phiCluster = clusterVector.Phi();
2581 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
2594 if (phiCluster < fMinPhiCut || phiCluster >
fMaxPhiCut){
2636 AliError(
"Task needs AOD or ESD event, returning");
2641 if(!cluster->IsEMCAL() && !cluster->IsPHOS()){AliError(
"Cluster is neither EMCAL nor PHOS, returning");
return kFALSE;}
2643 Float_t clusterPosition[3] = {0,0,0};
2644 cluster->GetPosition(clusterPosition);
2645 Double_t clusterR = TMath::Sqrt( clusterPosition[0]*clusterPosition[0] + clusterPosition[1]*clusterPosition[1] );
2651 for (
Int_t i = 0;i < 2;i++){
2653 AliVTrack *inTrack = 0x0;
2655 if(tracklabel > event->GetNumberOfTracks() )
continue;
2656 inTrack = esdev->GetTrack(tracklabel);
2659 inTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(tracklabel));
2661 for(
Int_t ii=0;ii<
event->GetNumberOfTracks();ii++) {
2662 inTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(ii));
2664 if(inTrack->GetID() == tracklabel) {
2676 Float_t dR2 = dPhi*dPhi + dEta*dEta;
2683 if(inTrack->Charge() > 0) {
2699 Int_t clusterMCLabel = cluster->GetLabel();
2700 Int_t convPhotonDaughterLabel = -1;
2701 if(inTrack->Charge() > 0) convPhotonDaughterLabel = convPhoton->
GetMCLabelPositive();
2703 if( (convPhotonDaughterLabel != -1) && (clusterMCLabel != -1) && (convPhotonDaughterLabel == clusterMCLabel)){
2712 Bool_t match_dPhi = kFALSE;
2717 if( TMath::Abs(dEta) <
fFuncPtDepEta->Eval(inTrack->Pt())) match_dEta = kTRUE;
2718 else match_dEta = kFALSE;
2720 if( TMath::Abs(dPhi) <
fFuncPtDepPhi->Eval(inTrack->Pt())) match_dPhi = kTRUE;
2721 else match_dPhi = kFALSE;
2724 if(match_dEta && match_dPhi){
2757 Int_t nClus =
event->GetNumberOfCaloClusters();
2761 fGeomEMCAL = AliEMCALGeometry::GetInstance();
2762 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
2765 fGeomPHOS = AliPHOSGeometry::GetInstance();
2766 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
2775 AliError(
"Task needs AOD or ESD event, returning");
2781 AliESDtrackCuts *EsdTrackCuts = 0x0;
2782 if(!isEMCalOnly && esdev){
2784 Int_t runNumber =
event->GetRunNumber();
2786 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2787 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2789 }
else if (runNumber>=209122){
2792 EsdTrackCuts =
new AliESDtrackCuts();
2793 EsdTrackCuts->AliESDtrackCuts::SetMinNCrossedRowsTPC(70);
2794 EsdTrackCuts->AliESDtrackCuts::SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
2795 EsdTrackCuts->AliESDtrackCuts::SetCutOutDistortedRegionsTPC(kTRUE);
2796 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2PerClusterTPC(4);
2797 EsdTrackCuts->AliESDtrackCuts::SetAcceptKinkDaughters(kFALSE);
2798 EsdTrackCuts->AliESDtrackCuts::SetRequireTPCRefit(kTRUE);
2800 EsdTrackCuts->AliESDtrackCuts::SetRequireITSRefit(kTRUE);
2801 EsdTrackCuts->AliESDtrackCuts::SetClusterRequirementITS(AliESDtrackCuts::kSPD,
2802 AliESDtrackCuts::kAny);
2803 EsdTrackCuts->AliESDtrackCuts::SetMaxDCAToVertexXYPtDep(
"0.0105+0.0350/pt^1.1");
2804 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2TPCConstrainedGlobal(36);
2805 EsdTrackCuts->AliESDtrackCuts::SetMaxDCAToVertexZ(2);
2806 EsdTrackCuts->AliESDtrackCuts::SetDCAToVertex2D(kFALSE);
2807 EsdTrackCuts->AliESDtrackCuts::SetRequireSigmaToVertex(kFALSE);
2808 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2PerClusterITS(36);
2811 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2813 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2814 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2815 EsdTrackCuts->SetPtRange(0.15);
2820 for (
Int_t itr=0;itr<
event->GetNumberOfTracks();itr++){
2821 AliExternalTrackParam *trackParam = 0;
2822 AliVTrack *inTrack = 0x0;
2824 inTrack = esdev->GetTrack(itr);
2825 if(!inTrack)
continue;
2826 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(inTrack);
2828 if(!EsdTrackCuts->AcceptTrack(esdt))
continue;
2831 const AliExternalTrackParam *in = esdt->GetInnerParam();
2832 if (!in){AliDebug(2,
"Could not get InnerParam of Track, continue");
continue;}
2833 trackParam =
new AliExternalTrackParam(*in);
2835 inTrack =
dynamic_cast<AliVTrack*
>(aodev->GetTrack(itr));
2836 if(!inTrack)
continue;
2837 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(inTrack);
2839 if(!aodt->IsHybridGlobalConstrainedGlobal())
continue;
2840 if(TMath::Abs(aodt->Eta())>0.8)
continue;
2841 if(aodt->Pt()<0.15)
continue;
2846 Float_t clsPos[3] = {0.,0.,0.};
2847 for(
Int_t iclus=0;iclus < nClus;iclus++){
2848 AliVCluster* cluster =
event->GetCaloCluster(iclus);
2849 if (!cluster)
continue;
2852 cluster->GetPosition(clsPos);
2853 Float_t clusterR = TMath::Sqrt( clsPos[0]*clsPos[0] + clsPos[1]*clsPos[1] );
2854 Float_t dR2 = dPhi*dPhi + dEta*dEta;
2864 if(inTrack->Charge() > 0) {
2883 Bool_t match_dPhi = kFALSE;
2888 if( TMath::Abs(dEta) <
fFuncPtDepEta->Eval(inTrack->Pt())) match_dEta = kTRUE;
2889 else match_dEta = kFALSE;
2891 if( TMath::Abs(dPhi) <
fFuncPtDepPhi->Eval(inTrack->Pt())) match_dPhi = kTRUE;
2892 else match_dPhi = kFALSE;
2895 if(match_dEta && match_dPhi){
2903 }
else if(isEMCalOnly){
2920 delete EsdTrackCuts;
2929 vector<Int_t>::iterator it;
2952 AliInfo(Form(
"Set CaloCut Number: %s",analysisCutSelection.Data()));
2953 if(analysisCutSelection.Length()!=
kNCuts) {
2954 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
2957 if(!analysisCutSelection.IsAlnum()){
2958 AliError(
"Cut selection is not alphanumeric");
2962 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
2963 analysisCutSelectionLowerCase.ToLower();
2964 const char *cutSelection = analysisCutSelectionLowerCase.Data();
2965 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
2990 }
else return kFALSE;
2997 }
else return kFALSE;
3004 }
else return kFALSE;
3011 }
else return kFALSE;
3018 }
else return kFALSE;
3025 }
else return kFALSE;
3032 }
else return kFALSE;
3039 }
else return kFALSE;
3046 }
else return kFALSE;
3053 }
else return kFALSE;
3060 }
else return kFALSE;
3067 }
else return kFALSE;
3074 }
else return kFALSE;
3081 }
else return kFALSE;
3088 }
else return kFALSE;
3095 }
else return kFALSE;
3102 }
else return kFALSE;
3109 }
else return kFALSE;
3116 }
else return kFALSE;
3119 AliError(
"Cut id out of range");
3123 AliError(
"Cut id %d not recognized");
3140 printf(
"\nCluster cutnumber \n");
3142 printf(
"%d",
fCuts[ic]);
3147 printf(
"Acceptance cuts: \n");
3148 if (
fClusterType == 0) printf(
"\tall calorimeter clusters are used\n");
3149 if (
fClusterType == 1) printf(
"\tEMCAL calorimeter clusters are used\n");
3150 if (
fClusterType == 2) printf(
"\tPHOS calorimeter clusters are used\n");
3151 if (
fClusterType == 3) printf(
"\tDCAL calorimeter clusters are used\n");
3156 printf(
"Cluster Quality cuts: \n");
3168 printf(
"NonLinearity Correction: \n");
3173 else printf(
"\t No NonLinearity Correction on AnalysisTask level has been chosen\n");
3185 switch(clusterType){
3199 AliError(Form(
"ClusterTypeCut not defined %d",clusterType));
3248 AliError(Form(
"MinEta Cut not defined %d",minEta));
3297 AliError(Form(
"MaxEta Cut not defined %d",maxEta));
3337 AliError(Form(
"MinPhi Cut not defined %d",minPhi));
3377 AliError(Form(
"Max Phi Cut not defined %d",maxPhi));
3386 switch(distanceToBadChannel){
3424 AliError(Form(
"minimum distance to bad channel Cut not defined %d",distanceToBadChannel));
3495 AliError(Form(
"Timing Cut not defined %d",timing));
3506 switch(trackMatching){
3553 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3556 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3562 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3565 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3571 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3574 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3580 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3583 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3589 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3592 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3598 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3601 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3606 AliError(Form(
"Track Matching Cut not defined %d",trackMatching));
3612 switch(trackMatching){
3640 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3643 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3649 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3652 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3658 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3661 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3666 AliError(Form(
"Track Matching Cut not defined %d",trackMatching));
3728 AliError(Form(
"Exotic cell Cut not defined %d",exoticCell));
3789 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3831 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3883 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3925 AliError(Form(
"Min N cells Cut not defined %d",minNCells));
4092 AliError(Form(
"Max M02 Cut not defined %d",maxM02));
4105 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.0955, 1.86e-3, 9.91 );
4107 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.524, 5.59e-3, 21.9 );
4113 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.0, 1.86e-3, 9.91 );
4115 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.424, 5.59e-3, 21.9 );
4121 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.2, 1.86e-3, 9.91 );
4123 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.624, 5.59e-3, 21.9 );
4129 if( (0.27 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.4)
return 0.4;
4130 else return (0.27 + 0.0072 * TMath::Power(clusEnergy,2));
4132 if( (0.31 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4133 else return (0.31 + 0.0072 * TMath::Power(clusEnergy,2));
4135 if( (0.36 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4136 else return (0.36 + 0.0072 * TMath::Power(clusEnergy,2));
4138 if( (0.37 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4139 else return (0.37 + 0.0072 * TMath::Power(clusEnergy,2));
4141 if( (0.30 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4142 else return (0.30 + 0.0072 * TMath::Power(clusEnergy,2));
4144 if( (0.35 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4145 else return (0.35 + 0.0072 * TMath::Power(clusEnergy,2));
4147 if( (0.25 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.39)
return 0.39;
4148 else return (0.25 + 0.0072 * TMath::Power(clusEnergy,2));
4150 if( (0.27 + 0.0092 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4151 else return (0.27 + 0.0092 * TMath::Power(clusEnergy,2));
4153 if( (0.32 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4154 else return (0.32 + 0.0072 * TMath::Power(clusEnergy,2));
4156 if( (0.32 + 0.0152 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4157 else return (0.32 + 0.0152 * TMath::Power(clusEnergy,2));
4159 if( (0.32 + 0.0238 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4160 else return (0.32 + 0.0238 * TMath::Power(clusEnergy,2));
4162 if( (0.27 + 0.0092 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4163 else return (0.27 + 0.0092 * TMath::Power(clusEnergy,2));
4165 if( (0.32 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4166 else return (0.32 + 0.0072 * TMath::Power(clusEnergy,2));
4168 if( (0.34 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4169 else return (0.34 + 0.0072 * TMath::Power(clusEnergy,2));
4171 if( (0.25 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4172 else return (0.25 + 0.0072 * TMath::Power(clusEnergy,2));
4174 if( (0.32 + 0.0238 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4175 else return (0.32 + 0.0238 * TMath::Power(clusEnergy,2));
4178 AliError(Form(
"Max M02 for merged cluster Cut not defined %d",maxM02));
4191 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.3)
4192 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4196 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.27)
4197 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4201 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.25)
4202 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4206 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0.1, 0., 0. ) > 0.27)
4207 return FunctionM02(clusEnergy, 2.135, -0.245, 0.1, 0., 0. );
4211 if (
FunctionM02(clusEnergy, 2.135, -0.245, -0.1, 0., 0. ) > 0.27)
4212 return FunctionM02(clusEnergy, 2.135, -0.245, -0.1, 0., 0. );
4231 AliError(Form(
"Min M02 for merged cluster Cut not defined %d",minM02));
4266 AliError(Form(
"Min M02 not defined %d",minM02));
4285 AliError(Form(
"Max M20 Cut not defined %d",maxM20));
4304 AliError(Form(
"Min M20 Cut not defined %d",minM20));
4323 AliError(Form(
"Maximum Dispersion Cut not defined %d",dispersion));
4350 AliError(Form(
"NLM Cut not defined %d",nlm));
4359 if( nl1 >= 0 && nl1 <=9){
4363 AliError(Form(
"NonLinearity Correction (part1) not defined %d",nl1));
4372 if( nl2 >= 0 && nl2 <=9){
4379 AliError(Form(
"NonLinearity Correction (part2) not defined %d",nl2));
4391 AliInfo(
"Cluster pointer null!");
4398 if (energy < 0.05) {
4400 AliInfo(Form(
"Too Low Cluster energy!, E = %f < 0.05 GeV",energy));
4404 if (energy < 0.01) {
4406 AliInfo(Form(
"Too Low Cluster energy!, E = %f < 0.01 GeV",energy));
4413 if( V0Reader == NULL ){
4414 AliFatal(Form(
"No V0Reader called '%s' could be found within AliCaloPhotonCuts::ApplyNonLinearity",
fV0ReaderName.Data()));
4420 printf(
"AliCaloPhotonCuts:Period name has been set to %s, period-enum: %o\n",
fPeriodName.Data(),
fCurrentMC ) ;
4424 Bool_t fPeriodNameAvailable = kTRUE;
4513 energy /=
FunctionNL_kSDM(energy, 0.96874*0.991*0.9958*0.999, -3.76064, -0.193181);
4557 energy /=
FunctionNL_kSDM(energy, 0.974525*0.986*0.999, -4.00247, -0.453046) ;
4575 energy /= 0.9870110951;
4580 energy /= 0.9908118231;
4585 energy /= 0.9872826260;
4586 energy /= 0.9930726691;
4588 }
else fPeriodNameAvailable = kFALSE;
4627 energy /=
FunctionNL_kSDM(energy, 0.962095*0.9991*0.9993, -3.63967, -0.747825) ;
4646 }
else fPeriodNameAvailable = kFALSE;
4671 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.04979, 1.3, 0.0967998, 219.381, 63.1604, 1.011);
4672 if(isMC == 0) energy *=
FunctionNL_kSDM(energy, 0.9846, -3.319, -2.033);
4679 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.04123, 1.045, 0.0967998, 219.381, 63.1604, 1.014);
4680 if(isMC == 0) energy *=
FunctionNL_kSDM(energy, 0.9807*0.995*0.9970, -3.377, -0.8535);
4682 else fPeriodNameAvailable = kFALSE;
4691 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.06539, 1.121, 0.0967998, 219.381, 63.1604, 1.011);
4692 if(isMC == 0) energy *=
FunctionNL_kSDM(2.0*energy, 0.9676, -3.216, -0.6828);