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"),
122 fMinDistanceToBadChannel(0),
123 fUseDistanceToBadChannel(0),
125 fMinTimeDiff(-10e10),
127 fMaxDistTrackToClusterEta(0),
128 fMinDistTrackToClusterPhi(0),
129 fMaxDistTrackToClusterPhi(0),
130 fUseDistTrackToCluster(0),
131 fUsePtDepTrackToCluster(0),
134 fExtendedMatchAndQA(0),
135 fExoticEnergyFracCluster(0),
136 fExoticMinEnergyCell(1),
137 fUseExoticCluster(0),
138 fDoExoticsQA(kFALSE),
141 fLocMaxCutEDiff(0.03),
153 fMaxDispersion(1000),
160 fSwitchNonLinearity(0),
161 fUseNonLinearity(kFALSE),
163 fVectorMatchedClusterIDs(0),
167 fHistAcceptanceCuts(NULL),
168 fHistClusterIdentificationCuts(NULL),
169 fHistClusterEtavsPhiBeforeAcc(NULL),
170 fHistClusterEtavsPhiAfterAcc(NULL),
171 fHistClusterEtavsPhiAfterQA(NULL),
172 fHistClusterTimevsEBeforeQA(NULL),
173 fHistClusterTimevsEAfterQA(NULL),
174 fHistEnergyOfClusterBeforeNL(NULL),
175 fHistEnergyOfClusterAfterNL(NULL),
176 fHistEnergyOfClusterBeforeQA(NULL),
177 fHistEnergyOfClusterAfterQA(NULL),
178 fHistNCellsBeforeQA(NULL),
179 fHistNCellsAfterQA(NULL),
180 fHistM02BeforeQA(NULL),
181 fHistM02AfterQA(NULL),
182 fHistM20BeforeQA(NULL),
183 fHistM20AfterQA(NULL),
184 fHistDispersionBeforeQA(NULL),
185 fHistDispersionAfterQA(NULL),
186 fHistNLMBeforeQA(NULL),
187 fHistNLMAfterQA(NULL),
188 fHistNLMVsNCellsAfterQA(NULL),
189 fHistNLMVsEAfterQA(NULL),
191 fHistClusterEnergyvsMod(NULL),
192 fHistNCellsBigger100MeVvsMod(NULL),
193 fHistNCellsBigger1500MeVvsMod(NULL),
194 fHistEnergyOfModvsMod(NULL),
195 fHistClusterEnergyvsNCells(NULL),
196 fHistCellEnergyvsCellID(NULL),
197 fHistCellTimevsCellID(NULL),
198 fHistClusterEM02BeforeQA(NULL),
199 fHistClusterEM02AfterQA(NULL),
200 fHistClusterIncludedCellsBeforeQA(NULL),
201 fHistClusterIncludedCellsAfterQA(NULL),
202 fHistClusterEnergyFracCellsBeforeQA(NULL),
203 fHistClusterEnergyFracCellsAfterQA(NULL),
204 fHistClusterIncludedCellsTimingAfterQA(NULL),
205 fHistClusterIncludedCellsTimingEnergyAfterQA(NULL),
206 fHistClusterDistanceInTimeCut(NULL),
207 fHistClusterDistanceOutTimeCut(NULL),
208 fHistClusterDistance1DInTimeCut(NULL),
209 fHistClusterRBeforeQA(NULL),
210 fHistClusterRAfterQA(NULL),
211 fHistClusterdEtadPhiBeforeQA(NULL),
212 fHistClusterdEtadPhiAfterQA(NULL),
213 fHistDistanceTrackToClusterBeforeQA(NULL),
214 fHistDistanceTrackToClusterAfterQA(NULL),
215 fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
216 fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
217 fHistClusterdEtadPhiPosTracksAfterQA(NULL),
218 fHistClusterdEtadPhiNegTracksAfterQA(NULL),
219 fHistClusterdEtadPhiPosTracksP_000_075BeforeQA(NULL),
220 fHistClusterdEtadPhiPosTracksP_075_125BeforeQA(NULL),
221 fHistClusterdEtadPhiPosTracksP_125_999BeforeQA(NULL),
222 fHistClusterdEtadPhiNegTracksP_000_075BeforeQA(NULL),
223 fHistClusterdEtadPhiNegTracksP_075_125BeforeQA(NULL),
224 fHistClusterdEtadPhiNegTracksP_125_999BeforeQA(NULL),
225 fHistClusterdEtadPtBeforeQA(NULL),
226 fHistClusterdEtadPtAfterQA(NULL),
227 fHistClusterdEtadPtTrueMatched(NULL),
228 fHistClusterdPhidPtPosTracksBeforeQA(NULL),
229 fHistClusterdPhidPtNegTracksBeforeQA(NULL),
230 fHistClusterdPhidPtAfterQA(NULL),
231 fHistClusterdPhidPtPosTracksTrueMatched(NULL),
232 fHistClusterdPhidPtNegTracksTrueMatched(NULL),
233 fHistClusterM20M02BeforeQA(NULL),
234 fHistClusterM20M02AfterQA(NULL),
235 fHistClusterEtavsPhiExotics(NULL),
236 fHistClusterEM02Exotics(NULL),
237 fHistClusterEnergyvsNCellsExotics(NULL),
238 fHistClusterEEstarExotics(NULL),
239 fHistClusterTMEffiInput(NULL),
240 fHistClusterEvsTrackECharged(NULL),
241 fHistClusterEvsTrackEChargedLead(NULL),
242 fHistClusterEvsTrackENeutral(NULL),
243 fHistClusterEvsTrackENeutralSubCharged(NULL),
244 fHistClusterEvsTrackEGamma(NULL),
245 fHistClusterEvsTrackEGammaSubCharged(NULL),
246 fHistClusterEvsTrackEConv(NULL),
247 fHistClusterENMatchesNeutral(NULL),
248 fHistClusterENMatchesCharged(NULL),
249 fHistClusterEvsTrackEPrimaryButNoElec(NULL),
250 fHistClusterEvsTrackSumEPrimaryButNoElec(NULL),
262 AliAnalysisCuts(ref),
265 fCaloTrackMatcher(NULL),
267 fEMCALRecUtils(NULL),
268 fEMCALInitialized(kFALSE),
270 fPHOSInitialized(kFALSE),
272 fEMCALBadChannelsMap(NULL),
273 fPHOSBadChannelsMap(NULL),
275 fNMaxEMCalModules(ref.fNMaxEMCalModules),
276 fNMaxPHOSModules(ref.fNMaxPHOSModules),
277 fHistoModifyAcc(NULL),
278 fDoLightOutput(ref.fDoLightOutput),
280 fIsCurrentClusterAcceptedBeforeTM(kFALSE),
281 fV0ReaderName(ref.fV0ReaderName),
282 fCaloTrackMatcherName(ref.fCaloTrackMatcherName),
283 fPeriodName(ref.fPeriodName),
284 fCurrentMC(ref.fCurrentMC),
285 fClusterType(ref.fClusterType),
286 fMinEtaCut(ref.fMinEtaCut),
287 fMaxEtaCut(ref.fMaxEtaCut),
288 fUseEtaCut(ref.fUseEtaCut),
289 fMinPhiCut(ref.fMinPhiCut),
290 fMaxPhiCut(ref.fMaxPhiCut),
291 fUsePhiCut(ref.fUsePhiCut),
292 fMinDistanceToBadChannel(ref.fMinDistanceToBadChannel),
293 fUseDistanceToBadChannel(ref.fUseDistanceToBadChannel),
294 fMaxTimeDiff(ref.fMaxTimeDiff),
295 fMinTimeDiff(ref.fMinTimeDiff),
296 fUseTimeDiff(ref.fUseTimeDiff),
297 fMaxDistTrackToClusterEta(ref.fMaxDistTrackToClusterEta),
298 fMinDistTrackToClusterPhi(ref.fMinDistTrackToClusterPhi),
299 fMaxDistTrackToClusterPhi(ref.fMaxDistTrackToClusterPhi),
300 fUseDistTrackToCluster(ref.fUseDistTrackToCluster),
301 fUsePtDepTrackToCluster(ref.fUsePtDepTrackToCluster),
302 fFuncPtDepEta(ref.fFuncPtDepEta),
303 fFuncPtDepPhi(ref.fFuncPtDepPhi),
304 fExtendedMatchAndQA(ref.fExtendedMatchAndQA),
305 fExoticEnergyFracCluster(ref.fExoticEnergyFracCluster),
306 fExoticMinEnergyCell(ref.fExoticMinEnergyCell),
307 fUseExoticCluster(ref.fUseExoticCluster),
308 fDoExoticsQA(ref.fDoExoticsQA),
309 fMinEnergy(ref.fMinEnergy),
310 fSeedEnergy(ref.fSeedEnergy),
311 fLocMaxCutEDiff(ref.fLocMaxCutEDiff),
312 fUseMinEnergy(ref.fUseMinEnergy),
313 fMinNCells(ref.fMinNCells),
314 fUseNCells(ref.fUseNCells),
315 fMaxM02(ref.fMaxM02),
316 fMinM02(ref.fMinM02),
317 fUseM02(ref.fUseM02),
318 fMaxM02CutNr(ref.fMaxM02CutNr),
319 fMinM02CutNr(ref.fMinM02CutNr),
320 fMaxM20(ref.fMaxM20),
321 fMinM20(ref.fMinM20),
322 fUseM20(ref.fUseDispersion),
323 fMaxDispersion(ref.fMaxDispersion),
324 fUseDispersion(ref.fUseDispersion),
325 fMinNLM(ref.fMinNLM),
326 fMaxNLM(ref.fMaxNLM),
327 fUseNLM(ref.fUseNLM),
328 fNonLinearity1(ref.fNonLinearity1),
329 fNonLinearity2(ref.fNonLinearity2),
330 fSwitchNonLinearity(ref.fSwitchNonLinearity),
331 fUseNonLinearity(ref.fUseNonLinearity),
332 fIsPureCalo(ref.fIsPureCalo),
333 fVectorMatchedClusterIDs(0),
337 fHistAcceptanceCuts(NULL),
338 fHistClusterIdentificationCuts(NULL),
339 fHistClusterEtavsPhiBeforeAcc(NULL),
340 fHistClusterEtavsPhiAfterAcc(NULL),
341 fHistClusterEtavsPhiAfterQA(NULL),
342 fHistClusterTimevsEBeforeQA(NULL),
343 fHistClusterTimevsEAfterQA(NULL),
344 fHistEnergyOfClusterBeforeNL(NULL),
345 fHistEnergyOfClusterAfterNL(NULL),
346 fHistEnergyOfClusterBeforeQA(NULL),
347 fHistEnergyOfClusterAfterQA(NULL),
348 fHistNCellsBeforeQA(NULL),
349 fHistNCellsAfterQA(NULL),
350 fHistM02BeforeQA(NULL),
351 fHistM02AfterQA(NULL),
352 fHistM20BeforeQA(NULL),
353 fHistM20AfterQA(NULL),
354 fHistDispersionBeforeQA(NULL),
355 fHistDispersionAfterQA(NULL),
356 fHistNLMBeforeQA(NULL),
357 fHistNLMAfterQA(NULL),
359 fHistNLMVsNCellsAfterQA(NULL),
360 fHistNLMVsEAfterQA(NULL),
361 fHistClusterEnergyvsMod(NULL),
362 fHistNCellsBigger100MeVvsMod(NULL),
363 fHistNCellsBigger1500MeVvsMod(NULL),
364 fHistEnergyOfModvsMod(NULL),
365 fHistClusterEnergyvsNCells(NULL),
366 fHistCellEnergyvsCellID(NULL),
367 fHistCellTimevsCellID(NULL),
368 fHistClusterEM02BeforeQA(NULL),
369 fHistClusterEM02AfterQA(NULL),
370 fHistClusterIncludedCellsBeforeQA(NULL),
371 fHistClusterIncludedCellsAfterQA(NULL),
372 fHistClusterEnergyFracCellsBeforeQA(NULL),
373 fHistClusterEnergyFracCellsAfterQA(NULL),
374 fHistClusterIncludedCellsTimingAfterQA(NULL),
375 fHistClusterIncludedCellsTimingEnergyAfterQA(NULL),
376 fHistClusterDistanceInTimeCut(NULL),
377 fHistClusterDistanceOutTimeCut(NULL),
378 fHistClusterDistance1DInTimeCut(NULL),
379 fHistClusterRBeforeQA(NULL),
380 fHistClusterRAfterQA(NULL),
381 fHistClusterdEtadPhiBeforeQA(NULL),
382 fHistClusterdEtadPhiAfterQA(NULL),
383 fHistDistanceTrackToClusterBeforeQA(NULL),
384 fHistDistanceTrackToClusterAfterQA(NULL),
385 fHistClusterdEtadPhiPosTracksBeforeQA(NULL),
386 fHistClusterdEtadPhiNegTracksBeforeQA(NULL),
387 fHistClusterdEtadPhiPosTracksAfterQA(NULL),
388 fHistClusterdEtadPhiNegTracksAfterQA(NULL),
389 fHistClusterdEtadPhiPosTracksP_000_075BeforeQA(NULL),
390 fHistClusterdEtadPhiPosTracksP_075_125BeforeQA(NULL),
391 fHistClusterdEtadPhiPosTracksP_125_999BeforeQA(NULL),
392 fHistClusterdEtadPhiNegTracksP_000_075BeforeQA(NULL),
393 fHistClusterdEtadPhiNegTracksP_075_125BeforeQA(NULL),
394 fHistClusterdEtadPhiNegTracksP_125_999BeforeQA(NULL),
395 fHistClusterdEtadPtBeforeQA(NULL),
396 fHistClusterdEtadPtAfterQA(NULL),
397 fHistClusterdEtadPtTrueMatched(NULL),
398 fHistClusterdPhidPtPosTracksBeforeQA(NULL),
399 fHistClusterdPhidPtNegTracksBeforeQA(NULL),
400 fHistClusterdPhidPtAfterQA(NULL),
401 fHistClusterdPhidPtPosTracksTrueMatched(NULL),
402 fHistClusterdPhidPtNegTracksTrueMatched(NULL),
403 fHistClusterM20M02BeforeQA(NULL),
404 fHistClusterM20M02AfterQA(NULL),
405 fHistClusterEtavsPhiExotics(NULL),
406 fHistClusterEM02Exotics(NULL),
407 fHistClusterEnergyvsNCellsExotics(NULL),
408 fHistClusterEEstarExotics(NULL),
409 fHistClusterTMEffiInput(NULL),
410 fHistClusterEvsTrackECharged(NULL),
411 fHistClusterEvsTrackEChargedLead(NULL),
412 fHistClusterEvsTrackENeutral(NULL),
413 fHistClusterEvsTrackENeutralSubCharged(NULL),
414 fHistClusterEvsTrackEGamma(NULL),
415 fHistClusterEvsTrackEGammaSubCharged(NULL),
416 fHistClusterEvsTrackEConv(NULL),
417 fHistClusterENMatchesNeutral(NULL),
418 fHistClusterENMatchesCharged(NULL),
419 fHistClusterEvsTrackEPrimaryButNoElec(NULL),
420 fHistClusterEvsTrackSumEPrimaryButNoElec(NULL),
421 fNMaxDCalModules(ref.fNMaxDCalModules),
422 fgkDCALCols(ref.fgkDCALCols)
452 TH1::AddDirectory(kFALSE);
481 Int_t nBinsClusterEFine = 400;
482 Int_t nBinsClusterECoarse = 100;
485 Int_t nBinsCellECoarse = 100;
488 Int_t nBinsModuleECoarse = 400;
528 const Int_t nEmcalEtaBins = 96;
529 const Int_t nEmcalPhiBins = 124;
530 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};
531 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};
542 const Int_t nPhosEtaBins = 56;
543 const Int_t nPhosPhiBins = 256;
544 const Float_t PhosEtaRange[2] = {-0.16, 0.16};
545 const Float_t PhosPhiRange[2] = {4.355, 5.6};
556 const Int_t nDcalEtaBins = 96;
557 const Int_t nDcalPhiBins = 124;
575 }
else{AliError(Form(
"Cluster Type is not EMCAL nor PHOS nor all: %i",
fClusterType));}
686 fBadChannels =
new TProfile(
"EMCal - Bad Channels",
"EMCal - Bad Channels",nMaxCellsEMCAL,0,nMaxCellsEMCAL);
690 fBadChannels =
new TProfile(
"PHOS - Bad Channels",
"PHOS - Bad Channels",nMaxCellsPHOS,0,nMaxCellsPHOS);
693 Int_t nStartCellDCAL = 12288;
695 fBadChannels =
new TProfile(
"DCAL - Bad Channels",
"DCAL - Bad Channels",nMaxCellsDCAL,nStartCellDCAL,nStartCellDCAL+nMaxCellsDCAL);
746 nBinsClusterECoarse, minClusterELog, maxClusterELog, 200, -500, 500);
751 nBinsCellECoarse, minCellELog, maxCellELog, 200, -500, 500);
802 nBinsClusterECoarse, minClusterELog, maxClusterELog, 200, -500, 500);
807 nBinsCellECoarse, minCellELog, maxCellELog, 200, -500, 500);
813 Int_t nModulesStart = 12;
814 Int_t nCellsStart = 12288;
871 const Int_t nEtaBins = 300;
872 const Int_t nPhiBins = 300;
873 const Float_t EtaRange[2] = {-0.3, 0.3};
874 const Float_t PhiRange[2] = {-0.3, 0.3};
898 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
901 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
904 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
907 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
910 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
913 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
916 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
919 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
922 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
925 nEtaBins, EtaRange[0], EtaRange[1], nPhiBins, PhiRange[0], PhiRange[1]);
928 nBinsModuleECoarse, minClusterELog, maxClusterELog);
932 nBinsModuleECoarse, minClusterELog, maxClusterELog);
936 2*nPhiBins, 2*PhiRange[0], 2*PhiRange[1], nBinsModuleECoarse, minClusterELog, maxClusterELog);
940 2*nPhiBins, 2*PhiRange[0], 2*PhiRange[1], nBinsModuleECoarse, minClusterELog, maxClusterELog);
944 nBinsModuleECoarse, minClusterELog, maxClusterELog);
950 nBinsModuleECoarse, minClusterELog, maxClusterELog);
954 nBinsModuleECoarse, minClusterELog, maxClusterELog);
958 nBinsModuleECoarse, minClusterELog, maxClusterELog);
1029 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1036 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1043 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1050 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1057 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1064 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1071 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1079 nBinsClusterEFine, minClusterELog, maxClusterELog, 20, -0.5, 19.5);
1085 nBinsClusterEFine, minClusterELog, maxClusterELog, 20, -0.5, 19.5);
1092 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1099 nBinsClusterEFine, minClusterELog, maxClusterELog, nBinsClusterEFine, minClusterELog, maxClusterELog);
1124 const Int_t nEmcalEtaBins = 96;
1125 const Int_t nEmcalPhiBins = 124;
1126 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};
1127 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};
1132 const Int_t nPhosEtaBins = 56;
1133 const Int_t nPhosPhiBins = 192;
1134 const Float_t PhosEtaRange[2] = {-0.16, 0.16};
1135 const Float_t PhosPhiRange[2] = {4.5, 5.6};
1141 const Int_t nDcalEtaBins = 96;
1142 const Int_t nDcalPhiBins = 124;
1154 nBinsClusterECoarse, minClusterELog, maxClusterELog);
1169 TH1::AddDirectory(kTRUE);
1177 AliTender* alitender=0x0;
1180 if(event->IsA()==AliESDEvent::Class())
1181 alitender = (AliTender*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"AliTender");
1182 else if( event->IsA()==AliAODEvent::Class())
1183 emcaltender = (
AliEmcalTenderTask*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"AliEmcalTenderTask");
1186 TIter next(alitender->GetSupplies());
1187 AliTenderSupply *supply;
1188 while ((supply=(AliTenderSupply*)next()))
if(supply->IsA()==AliEMCALTenderSupply::Class())
break;
1189 fEMCALRecUtils = ((AliEMCALTenderSupply*)supply)->GetRecoUtils();
1191 }
else if(emcaltender){
1197 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1198 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
1206 Int_t nMinCellsDCAL = 12288;
1208 Int_t nMaxCells = 0;
1209 Int_t nMinCells = 0;
1211 nMaxCells = nMaxCellsEMCAL;
1214 nMaxCells = nMaxCellsDCAL;
1215 nMinCells = nMinCellsDCAL;
1219 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
1222 for(
Int_t iCell=nMinCells;iCell<nMaxCells;iCell++){
1223 fGeomEMCAL->GetCellIndex(iCell,imod,iTower,iIphi,iIeta);
1225 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
1240 fGeomPHOS = AliPHOSGeometry::GetInstance();
1241 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
1246 AliPHOSTenderTask* aliphostender = (AliPHOSTenderTask*) AliAnalysisManager::GetAnalysisManager()->GetTopTasks()->FindObject(
"PHOSTenderTask");
1247 AliPHOSTenderSupply *PHOSSupply =((AliPHOSTenderSupply*) aliphostender->GetPHOSTenderSupply()) ;
1250 AliError(Form(
"Can not find PHOSTenderSupply in run %d. No bad channel map could be found for QA!\n",event->GetRunNumber())) ;
1253 AliInfo(
"Setting PHOS bad map from PHOSSupply \n") ;
1254 for(
Int_t mod=0;mod<nModules;mod++){
1255 TH2I * h = (TH2I*)PHOSSupply->GetPHOSBadChannelStatusMap(mod);
1258 AliInfo(Form(
"using bad map for module %d with nch=%f\n",mod,h->Integral()));
1266 for(
Int_t iCell=0;iCell<nMaxCellsPHOS;iCell++){
1267 fGeomPHOS->AbsToRelNumbering(iCell,relid);
1269 if(relid[1]!=0) AliFatal(
"PHOS CPV in PHOS cell array?");
1292 if(!mcEvent)
return kFALSE;
1293 if(!particle)
return kFALSE;
1295 if (particle->GetPdgCode() == 22){
1300 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 22){
1312 if(!mcEvent)
return kFALSE;
1313 if(!particle)
return kFALSE;
1315 if (TMath::Abs(particle->GetPdgCode()) == 11){
1320 if(particle->GetMother(0) >-1 && mcEvent->Particle(particle->GetMother(0))->GetPdgCode() == 11){
1332 if(!aodmcArray)
return kFALSE;
1333 if(!particle)
return kFALSE;
1335 if (TMath::Abs(particle->GetPdgCode()) == 11){
1339 if(particle->GetMother() >-1 && (
static_cast<AliAODMCParticle*
>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 11){
1351 if(!aodmcArray)
return kFALSE;
1352 if(!particle)
return kFALSE;
1354 if (particle->GetPdgCode() == 22){
1357 if(particle->GetMother() > -1 && (
static_cast<AliAODMCParticle*
>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 22){
1381 cluster->GetPosition(clusPos);
1382 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
1383 Double_t etaCluster = clusterVector.Eta();
1384 Double_t phiCluster = clusterVector.Phi();
1385 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
1403 AliVCaloCells* cells = NULL;
1405 if(cluster->IsEMCAL()){
1406 cells =
event->GetEMCALCells();
1407 }
else if(cluster->IsPHOS()){
1408 cells =
event->GetPHOSCells();
1411 Int_t nCellCluster = cluster->GetNCells();
1412 for(
Int_t iCell=0;iCell<nCellCluster;iCell++){
1435 Bool_t failedM02 = kFALSE;
1443 if( nLM < fMinNLM || nLM >
fMaxNLM )
1462 if ( !( failed || failedM02 ) ){
1495 if( nLM < fMinNLM || nLM >
fMaxNLM ) {
1504 if( cluster->GetM02()<
fMinM02 || cluster->GetM02() >
fMaxM02 ) {
1519 if( cluster->GetM20()<
fMinM20 || cluster->GetM20() >
fMaxM20 ) {
1544 AliError(
"Task needs AOD or ESD event, returning");
1560 Int_t classification = -1;
1561 Long_t leadMCLabel = -1;
1563 leadMCLabel = ((AliESDCaloCluster*)cluster)->GetLabel();
1565 leadMCLabel = ((AliAODCaloCluster*)cluster)->GetLabel();
1571 if (classification == 5 )
1573 if (classification == 7 )
1575 if (classification == 4)
1577 if (classification == 6)
1579 if (classification == 0 || classification == 1)
1581 if (classification == 1)
1583 if (classification == 2 || classification == 3)
1585 if ( classification == 3)
1588 Int_t nlabelsMatchedTracks = 0;
1594 if (classification < 4 && classification > -1)
1608 if (classification == 5 )
1610 if (classification == 4)
1612 if (classification == 0 || classification == 1)
1614 if ( classification == 1)
1616 if (classification == 2 || classification == 3)
1618 if ( classification == 3)
1620 if ( classification == 7)
1622 if ( classification == 6)
1625 vector<Int_t> labelsMatchedTracks;
1636 Bool_t foundLead = kFALSE;
1639 for (
Int_t i = 0; i < (
Int_t)labelsMatchedTracks.size(); i++){
1640 AliVTrack* currTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(labelsMatchedTracks.at(i)));
1641 eSum += currTrack->E();
1642 if (ptMax < currTrack->Pt()){
1643 ptMax = currTrack->Pt();
1644 eMax = currTrack->E();
1647 if (classification == 4 || classification == 5 || classification == 6 || classification == 7){
1648 Long_t mcLabelTrack = -1;
1650 mcLabelTrack = TMath::Abs(((AliESDtrack*)currTrack)->GetLabel());
1652 mcLabelTrack = TMath::Abs(((AliAODTrack*)currTrack)->GetLabel());
1653 if (mcLabelTrack!= -1 && mcLabelTrack == leadMCLabel){
1655 eLead = currTrack->E();
1660 if (classification == 5 || classification == 7 || classification == 6){
1662 if (classification == 5 || classification == 7){
1668 if (classification == 5)
1670 if (classification == 7)
1672 if (classification == 6)
1677 if (classification == 4){
1682 if (classification == 0 )
1684 if (classification == 1)
1686 if (classification == 2)
1688 if (classification == 3)
1691 labelsMatchedTracks.clear();
1720 Int_t nCellCluster = cluster->GetNCells();
1721 for(
Int_t iCell=0;iCell<nCellCluster;iCell++){
1722 Int_t cellID = cluster->GetCellAbsId(iCell);
1723 Double_t cellAmp = cells->GetCellAmplitude(cellID);
1724 Double_t cellTime = cells->GetCellTime(cellID);
1738 if(cluster->IsEMCAL()){
1739 Int_t iSuperModule = -1;
1740 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1741 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
1745 }
else if(cluster->IsPHOS()){
1746 Int_t relId[4] = {0,0,0,0};
1747 fGeomPHOS = AliPHOSGeometry::GetInstance();
1748 if(!
fGeomPHOS){ AliFatal(
"PHOS geometry not initialized!");}
1765 AliVCaloCells* cells = 0x0;
1768 Int_t* nCellsBigger100MeV;
1769 Int_t* nCellsBigger1500MeV;
1775 Int_t nModulesStart = 0;
1777 cells =
event->GetEMCALCells();
1778 fGeomEMCAL = AliEMCALGeometry::GetInstance();
1779 if(!
fGeomEMCAL) AliFatal(
"EMCal geometry not initialized!");
1781 nModules =
fGeomEMCAL->GetNumberOfSuperModules();
1782 if(
fClusterType == 3) {nModules = 8; nModulesStart = 12;}
1784 cells =
event->GetPHOSCells();
1785 fGeomPHOS = AliPHOSGeometry::GetInstance();
1786 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
1789 AliError(Form(
"fExtendedMatchAndQA(%i):FillHistogramsExtendedMatchAndQA() not (yet) defined for cluster type (%i)",
fExtendedMatchAndQA,
fClusterType));
1792 nCellsBigger100MeV =
new Int_t[nModules];
1793 nCellsBigger1500MeV =
new Int_t[nModules];
1794 EnergyOfMod =
new Double_t[nModules];
1796 for(
Int_t iModule=0;iModule<nModules;iModule++){nCellsBigger100MeV[iModule]=0;nCellsBigger1500MeV[iModule]=0;EnergyOfMod[iModule]=0;}
1798 for(
Int_t iCell=0;iCell<cells->GetNumberOfCells();iCell++){
1803 Int_t cellMCLabel=0;
1806 cells->GetCell(iCell,cellNumber,cellAmplitude,cellTime,cellMCLabel,cellEFrac);
1807 if(
fClusterType == 3 && cellNumber < 12288){
continue;}
1809 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
1813 Bool_t doBadCell = kTRUE;
1815 nMod =
fGeomEMCAL->GetSuperModuleNumber(cellNumber);
1816 fGeomEMCAL->GetCellIndex(cellNumber,imod,iTower,iIphi,iIeta);
1818 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
1820 fGeomPHOS->AbsToRelNumbering(cellNumber,relid);
1821 if(relid[1]!=0) AliFatal(
"PHOS CPV in PHOS cell array?");
1833 if(iBadCell > 0)
continue;
1835 if(cellAmplitude > 0.1) nCellsBigger100MeV[nMod-nModulesStart]++;
1836 if(cellAmplitude > 1.5) nCellsBigger1500MeV[nMod-nModulesStart]++;
1837 if(cellAmplitude > 0.05) EnergyOfMod[nMod-nModulesStart]+=cellAmplitude;
1845 for(
Int_t iModule=0;iModule<nModules;iModule++){
1851 delete[] nCellsBigger100MeV;nCellsBigger100MeV=0x0;
1852 delete[] nCellsBigger1500MeV;nCellsBigger1500MeV=0x0;
1853 delete[] EnergyOfMod;EnergyOfMod=0x0;
1856 Int_t nclus =
event->GetNumberOfCaloClusters();
1857 AliVCluster* cluster = 0x0;
1858 AliVCluster* clusterMatched = 0x0;
1859 for(
Int_t iClus=0; iClus<nclus ; iClus++){
1860 if(event->IsA()==AliESDEvent::Class()) cluster =
new AliESDCaloCluster(*(AliESDCaloCluster*)
event->GetCaloCluster(iClus));
1861 else if(event->IsA()==AliAODEvent::Class()) cluster =
new AliAODCaloCluster(*(AliAODCaloCluster*)
event->GetCaloCluster(iClus));
1864 if(
fClusterType == 2 && cluster->GetType() !=AliVCluster::kPHOSNeutral){
delete cluster;
continue;}
1867 cluster->GetPosition(clusPos);
1868 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
1869 Double_t etaCluster = clusterVector.Eta();
1870 Double_t phiCluster = clusterVector.Phi();
1871 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
1875 if (
fUseEtaCut && (etaCluster < fMinEtaCut || etaCluster >
fMaxEtaCut)){
delete cluster;
continue;}
1876 if (
fUsePhiCut && (phiCluster < fMinPhiCut || phiCluster >
fMaxPhiCut)){
delete cluster;
continue;}
1882 if (
fUseNLM && (nLM < fMinNLM || nLM >
fMaxNLM)){
delete cluster;
continue;}
1883 if (
fUseM02 == 1 && (cluster->GetM02() <
fMinM02 || cluster->GetM02() >
fMaxM02)){
delete cluster;
continue;}
1885 if (
fUseM20 && (cluster->GetM20() <
fMinM20 || cluster->GetM20() >
fMaxM20)){
delete cluster;
continue;}
1888 if (!(isMC>0) && (cluster->GetTOF() <
fMinTimeDiff || cluster->GetTOF() >
fMaxTimeDiff)){
delete cluster;
continue;}
1890 Int_t largestCellicol = -1, largestCellirow = -1;
1892 if(largestCellID==-1) AliFatal(
"FillHistogramsExtendedQA: FindLargestCellInCluster found cluster with NCells<1?");
1894 if(largestCelliMod < 0) AliFatal(
"FillHistogramsExtendedQA: GetModuleNumberAndCellPosition found SM with ID<0?");
1896 for(
Int_t iClus2=iClus+1; iClus2<nclus; iClus2++){
1897 if(event->IsA()==AliESDEvent::Class()) clusterMatched =
new AliESDCaloCluster(*(AliESDCaloCluster*)
event->GetCaloCluster(iClus2));
1898 else if(event->IsA()==AliAODEvent::Class()) clusterMatched =
new AliAODCaloCluster(*(AliAODCaloCluster*)
event->GetCaloCluster(iClus2));
1901 if(
fClusterType == 2 && clusterMatched->GetType() !=AliVCluster::kPHOSNeutral){
delete clusterMatched;
continue;}
1904 clusterMatched->GetPosition(clusPos2);
1905 TVector3 clusterMatchedVector(clusPos2[0],clusPos2[1],clusPos2[2]);
1906 Double_t etaclusterMatched = clusterMatchedVector.Eta();
1907 Double_t phiclusterMatched = clusterMatchedVector.Phi();
1908 if (phiclusterMatched < 0) phiclusterMatched += 2*TMath::Pi();
1912 if (
fUseEtaCut && (etaclusterMatched < fMinEtaCut || etaclusterMatched > fMaxEtaCut)){
delete clusterMatched;
continue;}
1913 if (
fUsePhiCut && (phiclusterMatched < fMinPhiCut || phiclusterMatched > fMaxPhiCut)){
delete clusterMatched;
continue;}
1918 if (
fUseNCells && (clusterMatched->GetNCells() <
fMinNCells)){
delete clusterMatched;
continue;}
1919 if (
fUseNLM && (nLMMatched < fMinNLM || nLMMatched > fMaxNLM)){
delete clusterMatched;
continue;}
1920 if (
fUseM02 == 1 && (clusterMatched->GetM02() <
fMinM02 || clusterMatched->GetM02() >
fMaxM02)){
delete clusterMatched;
continue;}
1922 if (
fUseM20 && (clusterMatched->GetM20() <
fMinM20 || clusterMatched->GetM20() >
fMaxM20)){
delete clusterMatched;
continue;}
1927 Int_t matched_largestCellicol = -1, matched_largestCellirow = -1;
1929 if(matched_largestCellID==-1) AliFatal(
"FillHistogramsExtendedQA: FindLargestCellInCluster found cluster with NCells<1?");
1931 if(matched_largestCelliMod < 0) AliFatal(
"FillHistogramsExtendedQA: GetModuleNumberAndCellPosition found SM with ID<0?");
1937 Int_t rowdiff = -100;
1938 Int_t coldiff = -100;
1939 Bool_t calculatedDiff = kFALSE;
1941 Int_t ClusID = largestCelliMod/2;
1942 Int_t matchClusID = matched_largestCelliMod/2;
1944 if( matched_largestCelliMod == largestCelliMod){
1945 rowdiff = largestCellirow - matched_largestCellirow;
1946 coldiff = largestCellicol - matched_largestCellicol;
1947 calculatedDiff = kTRUE;
1948 }
else if( TMath::Abs(matched_largestCelliMod - largestCelliMod) == 1 && (ClusID == matchClusID) ){
1949 if(matched_largestCelliMod%2){
1950 matched_largestCelliMod -= 1;
1951 matched_largestCellicol += AliEMCALGeoParams::fgkEMCALCols;
1953 matched_largestCelliMod += 1;
1954 matched_largestCellicol -= AliEMCALGeoParams::fgkEMCALCols;
1957 if( matched_largestCelliMod == largestCelliMod ){
1958 rowdiff = largestCellirow - matched_largestCellirow;
1959 coldiff = largestCellicol - matched_largestCellicol;
1960 calculatedDiff = kTRUE;
1967 if( calculatedDiff ){
1968 Float_t dist1D = TMath::Sqrt(TMath::Power(etaCluster-etaclusterMatched,2)+TMath::Power(phiCluster-phiclusterMatched,2));
1980 delete clusterMatched;
1995 const Int_t nc = cluster->GetNCells();
1997 Int_t absCellIdList[nc];
2008 const Int_t nCells = cluster->GetNCells();
2009 AliVCaloCells* cells = NULL;
2012 cells =
event->GetEMCALCells();
2014 cells =
event->GetPHOSCells();
2020 Int_t iCellMax = -1;
2022 if (nCells < 2)
return idMax;
2023 for (
Int_t iCell = 1;iCell < nCells;iCell++){
2024 if (cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell])> eMax){
2025 eMax = cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell]);
2026 idMax = cluster->GetCellsAbsId()[iCell];
2032 for (
Int_t iCell = 1;iCell < nCells;iCell++){
2033 if (iCell == iCellMax)
continue;
2034 if (cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell])> eMax){
2035 eMax = cells->GetCellAmplitude(cluster->GetCellsAbsId()[iCell]);
2036 idMax2 = cluster->GetCellsAbsId()[iCell];
2046 const Int_t nCells = cluster->GetNCells();
2047 AliVCaloCells* cells = NULL;
2050 cells =
event->GetEMCALCells();
2052 cells =
event->GetPHOSCells();
2058 if (nCells < 1)
return idMax;
2059 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2060 Int_t cellAbsID = cluster->GetCellsAbsId()[iCell];
2061 if (cells->GetCellAmplitude(cellAbsID)> eMax){
2062 eMax = cells->GetCellAmplitude(cellAbsID);
2077 Int_t absCellId1 = -1;
2078 Int_t absCellId2 = -1;
2079 const Int_t nCells = cluster->GetNCells();
2080 AliVCaloCells* cells = NULL;
2083 cells =
event->GetEMCALCells();
2085 cells =
event->GetPHOSCells();
2091 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2092 absCellIdList[iCell] = cluster->GetCellsAbsId()[iCell];
2096 if (cells->GetCellAmplitude(absCellIdList[iCell])> eMax){
2097 eMax = cells->GetCellAmplitude(absCellIdList[iCell]);
2098 idMax = absCellIdList[iCell];
2103 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2105 if (absCellIdList[iCell] >= 0){
2107 absCellId1 = cluster->GetCellsAbsId()[iCell];
2108 Float_t en1 = cells->GetCellAmplitude(absCellId1);
2111 for (
Int_t iCellN = 0;iCellN < nCells;iCellN++){
2113 if (absCellIdList[iCell] == -1)
continue;
2115 absCellId2 = cluster->GetCellsAbsId()[iCellN];
2118 if (absCellId2 == -1)
continue;
2119 if (absCellId1 == absCellId2)
continue;
2122 Float_t en2 = cells->GetCellAmplitude(absCellId2);
2130 absCellIdList[iCellN] = -1;
2132 absCellIdList[iCell] = -1;
2134 absCellIdList[iCell] = -1;
2136 absCellIdList[iCellN] = -1;
2144 Int_t nMaximaNew = 0;
2145 for (
Int_t iCell = 0;iCell < nCells;iCell++){
2147 if (absCellIdList[iCell] > -1){
2148 Float_t en = cells->GetCellAmplitude(absCellIdList[iCell]);
2151 absCellIdList[nMaximaNew] = absCellIdList[iCell];
2152 maxEList[nMaximaNew] = en;
2159 if (nMaximaNew == 0){
2162 absCellIdList[0] = idMax;
2173 Bool_t areNeighbours = kFALSE ;
2175 Int_t irow1 = -1, icol1 = -1;
2176 Int_t irow2 = -1, icol2 = -1;
2178 Int_t rowdiff = 0, coldiff = 0;
2184 if (nSupMod1== -1 || nSupMod2 == -1)
return areNeighbours;
2189 if(nSupMod1%2) icol1+=AliEMCALGeoParams::fgkEMCALCols;
2190 else icol2+=AliEMCALGeoParams::fgkEMCALCols;
2193 rowdiff = TMath::Abs( irow1 - irow2 ) ;
2194 coldiff = TMath::Abs( icol1 - icol2 ) ;
2197 if ((coldiff + rowdiff == 1 ))
2198 areNeighbours = kTRUE ;
2200 return areNeighbours;
2210 fGeomEMCAL = AliEMCALGeometry::GetInstance();
2211 if(!
fGeomEMCAL) AliFatal(
"EMCal geometry not initialized!");
2213 fGeomPHOS = AliPHOSGeometry::GetInstance();
2214 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
2217 Int_t imod = -1;
Int_t iTower = -1, iIphi = -1, iIeta = -1;
2219 fGeomEMCAL->GetCellIndex(absCellId,imod,iTower,iIphi,iIeta);
2220 fGeomEMCAL->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi,iIeta,irow,icol);
2223 fGeomPHOS->AbsToRelNumbering(absCellId,relId);
2237 AliVCluster* cluster,
2240 AliAODCaloCluster* cluster1,
2241 AliAODCaloCluster* cluster2){
2243 const Int_t ncells = cluster->GetNCells();
2244 Int_t absCellIdList[ncells];
2246 AliVCaloCells* cells = NULL;
2248 cells =
event->GetEMCALCells();
2250 cells =
event->GetPHOSCells();
2256 for(
Int_t iCell = 0;iCell < ncells;iCell++ ) {
2257 absCellIdList[iCell] = cluster->GetCellsAbsId()[iCell];
2258 Float_t ec = cells->GetCellAmplitude(absCellIdList[iCell]);
2269 absCellIdList1[0] = absCellId1 ;
2270 fracList1 [0] = 1. ;
2272 Float_t ecell1 = cells->GetCellAmplitude(absCellId1);
2276 absCellIdList2[0] = absCellId2 ;
2277 fracList2 [0] = 1. ;
2279 Float_t ecell2 = cells->GetCellAmplitude(absCellId2);
2284 Float_t eRemain = (eCluster-ecell1-ecell2)/2;
2285 Float_t shareFraction1 = (ecell1+eRemain)/eCluster;
2286 Float_t shareFraction2 = (ecell2+eRemain)/eCluster;
2290 for(
Int_t iCell = 0;iCell < ncells;iCell++){
2292 Int_t absId = absCellIdList[iCell];
2293 if ( absId==absCellId1 || absId==absCellId2 || absId < 0 )
continue;
2295 Float_t ecell = cells->GetCellAmplitude(absId);
2297 absCellIdList1[ncells1] = absId;
2299 fracList1[ncells1] = shareFraction1;
2300 e1 += ecell*shareFraction1;
2302 fracList1[ncells1] = 1.;
2309 absCellIdList2[ncells2]= absId;
2312 fracList2[ncells2] = shareFraction2;
2313 e2 += ecell*shareFraction2;
2315 fracList2[ncells2] = 1.;
2326 cluster1->SetNCells(ncells1);
2327 cluster2->SetNCells(ncells2);
2329 cluster1->SetCellsAbsId(absCellIdList1);
2330 cluster2->SetCellsAbsId(absCellIdList2);
2332 cluster1->SetCellsAmplitudeFraction(fracList1);
2333 cluster2->SetCellsAmplitudeFraction(fracList2);
2360 if(largestCellID==-1) AliFatal(
"CheckDistanceToBadChannel: FindLargestCellInCluster found cluster with NCells<1?");
2362 Int_t largestCellicol = -1, largestCellirow = -1;
2363 Int_t rowdiff = 0, coldiff = 0;
2366 if(largestCelliMod < 0) AliFatal(
"CheckDistanceToBadChannel: GetModuleNumberAndCellPosition found SM with ID<0?");
2368 Int_t nMinRows = 0, nMaxRows = 0;
2369 Int_t nMinCols = 0, nMaxCols = 0;
2371 Bool_t checkNextSM = kFALSE;
2374 nMinRows = largestCellirow - distanceForLoop;
2375 nMaxRows = largestCellirow + distanceForLoop;
2376 if(nMinRows < 0) nMinRows = 0;
2377 if(nMaxRows > AliEMCALGeoParams::fgkEMCALRows) nMaxRows = AliEMCALGeoParams::fgkEMCALRows;
2379 nMinCols = largestCellicol - distanceForLoop;
2380 nMaxCols = largestCellicol + distanceForLoop;
2382 if(largestCelliMod%2){
2385 checkNextSM = kTRUE;
2387 if(nMaxCols > AliEMCALGeoParams::fgkEMCALCols) nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2389 if(nMinCols < 0) nMinCols = 0;
2390 if(nMaxCols > AliEMCALGeoParams::fgkEMCALCols){
2391 nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2392 checkNextSM = kTRUE;
2396 nMinRows = largestCellirow - distanceForLoop;
2397 nMaxRows = largestCellirow + distanceForLoop;
2398 if(nMinRows < 0) nMinRows = 0;
2399 if(nMaxRows > AliEMCALGeoParams::fgkEMCALCols) nMaxRows = AliEMCALGeoParams::fgkEMCALCols;
2401 nMinCols = largestCellicol - distanceForLoop;
2402 nMaxCols = largestCellicol + distanceForLoop;
2403 if(nMinCols < 0) nMinCols = 0;
2416 for (
Int_t irow = nMinRows;irow < nMaxRows;irow++)
2418 for (
Int_t icol = nMinCols;icol < nMaxCols;icol++)
2420 if(irow == largestCellirow && icol == largestCellicol)
continue;
2429 if(iBadCell==0)
continue;
2431 rowdiff = TMath::Abs( largestCellirow - irow ) ;
2432 coldiff = TMath::Abs( largestCellicol - icol ) ;
2448 if(largestCelliMod%2){
2449 nMinCols = largestCellicol - distanceForLoop + AliEMCALGeoParams::fgkEMCALCols;
2450 nMaxCols = AliEMCALGeoParams::fgkEMCALCols;
2452 largestCelliMod -= 1;
2453 largestCellicol += AliEMCALGeoParams::fgkEMCALCols;
2456 nMaxCols = largestCellicol + distanceForLoop - AliEMCALGeoParams::fgkEMCALCols;
2458 largestCelliMod += 1;
2459 largestCellicol -= AliEMCALGeoParams::fgkEMCALCols;
2467 for (
Int_t irow = nMinRows;irow < nMaxRows;irow++)
2469 for (
Int_t icol = nMinCols;icol < nMaxCols;icol++)
2472 if(
fClusterType == 1 && largestCelliMod<fEMCALBadChannelsMap->GetEntries()){
2478 if(iBadCell==0)
continue;
2480 rowdiff = TMath::Abs( largestCellirow - irow ) ;
2481 coldiff = TMath::Abs( largestCellicol - icol ) ;
2511 cluster->GetPosition(clusPos);
2512 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
2513 Double_t etaCluster = clusterVector.Eta();
2514 Double_t phiCluster = clusterVector.Phi();
2515 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
2567 cluster->GetPosition(clusPos);
2568 TVector3 clusterVector(clusPos[0],clusPos[1],clusPos[2]);
2569 Double_t etaCluster = clusterVector.Eta();
2570 Double_t phiCluster = clusterVector.Phi();
2571 if (phiCluster < 0) phiCluster += 2*TMath::Pi();
2575 if (etaCluster < fMinEtaCut || etaCluster >
fMaxEtaCut){
2584 if (phiCluster < fMinPhiCut || phiCluster >
fMaxPhiCut){
2626 AliError(
"Task needs AOD or ESD event, returning");
2631 if(!cluster->IsEMCAL() && !cluster->IsPHOS()){AliError(
"Cluster is neither EMCAL nor PHOS, returning");
return kFALSE;}
2633 Float_t clusterPosition[3] = {0,0,0};
2634 cluster->GetPosition(clusterPosition);
2635 Double_t clusterR = TMath::Sqrt( clusterPosition[0]*clusterPosition[0] + clusterPosition[1]*clusterPosition[1] );
2641 for (
Int_t i = 0;i < 2;i++){
2643 AliVTrack *inTrack = 0x0;
2645 if(tracklabel > event->GetNumberOfTracks() )
continue;
2646 inTrack = esdev->GetTrack(tracklabel);
2649 inTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(tracklabel));
2651 for(
Int_t ii=0;ii<
event->GetNumberOfTracks();ii++) {
2652 inTrack =
dynamic_cast<AliVTrack*
>(
event->GetTrack(ii));
2654 if(inTrack->GetID() == tracklabel) {
2666 Float_t dR2 = dPhi*dPhi + dEta*dEta;
2673 if(inTrack->Charge() > 0) {
2689 Int_t clusterMCLabel = cluster->GetLabel();
2690 Int_t convPhotonDaughterLabel = -1;
2691 if(inTrack->Charge() > 0) convPhotonDaughterLabel = convPhoton->
GetMCLabelPositive();
2693 if( (convPhotonDaughterLabel != -1) && (clusterMCLabel != -1) && (convPhotonDaughterLabel == clusterMCLabel)){
2702 Bool_t match_dPhi = kFALSE;
2707 if( TMath::Abs(dEta) <
fFuncPtDepEta->Eval(inTrack->Pt())) match_dEta = kTRUE;
2708 else match_dEta = kFALSE;
2710 if( TMath::Abs(dPhi) <
fFuncPtDepPhi->Eval(inTrack->Pt())) match_dPhi = kTRUE;
2711 else match_dPhi = kFALSE;
2714 if(match_dEta && match_dPhi){
2747 Int_t nClus =
event->GetNumberOfCaloClusters();
2751 fGeomEMCAL = AliEMCALGeometry::GetInstance();
2752 if(!
fGeomEMCAL){ AliFatal(
"EMCal geometry not initialized!");}
2755 fGeomPHOS = AliPHOSGeometry::GetInstance();
2756 if(!
fGeomPHOS) AliFatal(
"PHOS geometry not initialized!");
2765 AliError(
"Task needs AOD or ESD event, returning");
2771 AliESDtrackCuts *EsdTrackCuts = 0x0;
2772 if(!isEMCalOnly && esdev){
2774 Int_t runNumber =
event->GetRunNumber();
2776 if( (runNumber<=146860) || (runNumber>=197470 && runNumber<=197692) || (runNumber>=172440 && runNumber<=193766) ){
2777 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010();
2779 }
else if (runNumber>=209122){
2782 EsdTrackCuts =
new AliESDtrackCuts();
2783 EsdTrackCuts->AliESDtrackCuts::SetMinNCrossedRowsTPC(70);
2784 EsdTrackCuts->AliESDtrackCuts::SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
2785 EsdTrackCuts->AliESDtrackCuts::SetCutOutDistortedRegionsTPC(kTRUE);
2786 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2PerClusterTPC(4);
2787 EsdTrackCuts->AliESDtrackCuts::SetAcceptKinkDaughters(kFALSE);
2788 EsdTrackCuts->AliESDtrackCuts::SetRequireTPCRefit(kTRUE);
2790 EsdTrackCuts->AliESDtrackCuts::SetRequireITSRefit(kTRUE);
2791 EsdTrackCuts->AliESDtrackCuts::SetClusterRequirementITS(AliESDtrackCuts::kSPD,
2792 AliESDtrackCuts::kAny);
2793 EsdTrackCuts->AliESDtrackCuts::SetMaxDCAToVertexXYPtDep(
"0.0105+0.0350/pt^1.1");
2794 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2TPCConstrainedGlobal(36);
2795 EsdTrackCuts->AliESDtrackCuts::SetMaxDCAToVertexZ(2);
2796 EsdTrackCuts->AliESDtrackCuts::SetDCAToVertex2D(kFALSE);
2797 EsdTrackCuts->AliESDtrackCuts::SetRequireSigmaToVertex(kFALSE);
2798 EsdTrackCuts->AliESDtrackCuts::SetMaxChi2PerClusterITS(36);
2801 EsdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();
2803 EsdTrackCuts->SetMaxDCAToVertexZ(2);
2804 EsdTrackCuts->SetEtaRange(-0.8, 0.8);
2805 EsdTrackCuts->SetPtRange(0.15);
2810 for (
Int_t itr=0;itr<
event->GetNumberOfTracks();itr++){
2811 AliExternalTrackParam *trackParam = 0;
2812 AliVTrack *inTrack = 0x0;
2814 inTrack = esdev->GetTrack(itr);
2815 if(!inTrack)
continue;
2816 AliESDtrack *esdt =
dynamic_cast<AliESDtrack*
>(inTrack);
2818 if(!EsdTrackCuts->AcceptTrack(esdt))
continue;
2821 const AliExternalTrackParam *in = esdt->GetInnerParam();
2822 if (!in){AliDebug(2,
"Could not get InnerParam of Track, continue");
continue;}
2823 trackParam =
new AliExternalTrackParam(*in);
2825 inTrack =
dynamic_cast<AliVTrack*
>(aodev->GetTrack(itr));
2826 if(!inTrack)
continue;
2827 AliAODTrack *aodt =
dynamic_cast<AliAODTrack*
>(inTrack);
2829 if(!aodt->IsHybridGlobalConstrainedGlobal())
continue;
2830 if(TMath::Abs(aodt->Eta())>0.8)
continue;
2831 if(aodt->Pt()<0.15)
continue;
2836 Float_t clsPos[3] = {0.,0.,0.};
2837 for(
Int_t iclus=0;iclus < nClus;iclus++){
2838 AliVCluster* cluster =
event->GetCaloCluster(iclus);
2839 if (!cluster)
continue;
2842 cluster->GetPosition(clsPos);
2843 Float_t clusterR = TMath::Sqrt( clsPos[0]*clsPos[0] + clsPos[1]*clsPos[1] );
2844 Float_t dR2 = dPhi*dPhi + dEta*dEta;
2854 if(inTrack->Charge() > 0) {
2873 Bool_t match_dPhi = kFALSE;
2878 if( TMath::Abs(dEta) <
fFuncPtDepEta->Eval(inTrack->Pt())) match_dEta = kTRUE;
2879 else match_dEta = kFALSE;
2881 if( TMath::Abs(dPhi) <
fFuncPtDepPhi->Eval(inTrack->Pt())) match_dPhi = kTRUE;
2882 else match_dPhi = kFALSE;
2885 if(match_dEta && match_dPhi){
2893 }
else if(isEMCalOnly){
2910 delete EsdTrackCuts;
2919 vector<Int_t>::iterator it;
2942 AliInfo(Form(
"Set CaloCut Number: %s",analysisCutSelection.Data()));
2943 if(analysisCutSelection.Length()!=
kNCuts) {
2944 AliError(Form(
"Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(),
kNCuts));
2947 if(!analysisCutSelection.IsAlnum()){
2948 AliError(
"Cut selection is not alphanumeric");
2952 TString analysisCutSelectionLowerCase = Form(
"%s",analysisCutSelection.Data());
2953 analysisCutSelectionLowerCase.ToLower();
2954 const char *cutSelection = analysisCutSelectionLowerCase.Data();
2955 #define ASSIGNARRAY(i) fCuts[i] = ((int)cutSelection[i]>=(int)'a') ? cutSelection[i]-'a'+10 : cutSelection[i]-'0'
2980 }
else return kFALSE;
2987 }
else return kFALSE;
2994 }
else return kFALSE;
3001 }
else return kFALSE;
3008 }
else return kFALSE;
3015 }
else return kFALSE;
3022 }
else return kFALSE;
3029 }
else return kFALSE;
3036 }
else return kFALSE;
3043 }
else return kFALSE;
3050 }
else return kFALSE;
3057 }
else return kFALSE;
3064 }
else return kFALSE;
3071 }
else return kFALSE;
3078 }
else return kFALSE;
3085 }
else return kFALSE;
3092 }
else return kFALSE;
3099 }
else return kFALSE;
3106 }
else return kFALSE;
3109 AliError(
"Cut id out of range");
3113 AliError(
"Cut id %d not recognized");
3130 printf(
"\nCluster cutnumber \n");
3132 printf(
"%d",
fCuts[ic]);
3137 printf(
"Acceptance cuts: \n");
3138 if (
fClusterType == 0) printf(
"\tall calorimeter clusters are used\n");
3139 if (
fClusterType == 1) printf(
"\tEMCAL calorimeter clusters are used\n");
3140 if (
fClusterType == 2) printf(
"\tPHOS calorimeter clusters are used\n");
3141 if (
fClusterType == 3) printf(
"\tDCAL calorimeter clusters are used\n");
3146 printf(
"Cluster Quality cuts: \n");
3158 printf(
"NonLinearity Correction: \n");
3163 else printf(
"\t No NonLinearity Correction on AnalysisTask level has been chosen\n");
3175 switch(clusterType){
3189 AliError(Form(
"ClusterTypeCut not defined %d",clusterType));
3233 AliError(Form(
"MinEta Cut not defined %d",minEta));
3277 AliError(Form(
"MaxEta Cut not defined %d",maxEta));
3317 AliError(Form(
"MinPhi Cut not defined %d",minPhi));
3357 AliError(Form(
"Max Phi Cut not defined %d",maxPhi));
3366 switch(distanceToBadChannel){
3404 AliError(Form(
"minimum distance to bad channel Cut not defined %d",distanceToBadChannel));
3475 AliError(Form(
"Timing Cut not defined %d",timing));
3486 switch(trackMatching){
3533 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3536 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3542 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3545 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3551 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3554 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3560 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3563 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3568 AliError(Form(
"Track Matching Cut not defined %d",trackMatching));
3574 switch(trackMatching){
3602 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3605 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3611 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3614 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3620 fFuncPtDepEta =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3623 fFuncPtDepPhi =
new TF1(
"func",
"[1] + 1 / pow(x + pow(1 / ([0] - [1]), 1 / [2]), [2])");
3628 AliError(Form(
"Track Matching Cut not defined %d",trackMatching));
3690 AliError(Form(
"Exotic cell Cut not defined %d",exoticCell));
3743 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3785 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3833 AliError(Form(
"Minimum Energy Cut not defined %d",minEnergy));
3875 AliError(Form(
"Min N cells Cut not defined %d",minNCells));
3961 AliError(Form(
"Max M02 Cut not defined %d",maxM02));
3974 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.0955, 1.86e-3, 9.91 );
3976 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.524, 5.59e-3, 21.9 );
3982 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.0, 1.86e-3, 9.91 );
3984 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.424, 5.59e-3, 21.9 );
3990 return FunctionM02(clusEnergy, 0.0662, -0.0201, -0.2, 1.86e-3, 9.91 );
3992 return FunctionM02(clusEnergy, 0.353, -0.0264, -0.624, 5.59e-3, 21.9 );
3998 if( (0.27 + 0.0092 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
3999 else return (0.27 + 0.0092 * TMath::Power(clusEnergy,2));
4001 if( (0.32 + 0.0072 * TMath::Power(clusEnergy,2)) >= 0.5)
return 0.5;
4002 else return (0.32 + 0.0072 * TMath::Power(clusEnergy,2));
4004 if( (0.32 + 0.0152 * TMath::Power(clusEnergy,2)) >= 0.7)
return 0.7;
4005 else return (0.32 + 0.0152 * TMath::Power(clusEnergy,2));
4008 AliError(Form(
"Max M02 for merged cluster Cut not defined %d",maxM02));
4021 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.3)
4022 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4026 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.27)
4027 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4031 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. ) > 0.25)
4032 return FunctionM02(clusEnergy, 2.135, -0.245, 0., 0., 0. );
4036 if (
FunctionM02(clusEnergy, 2.135, -0.245, 0.1, 0., 0. ) > 0.27)
4037 return FunctionM02(clusEnergy, 2.135, -0.245, 0.1, 0., 0. );
4041 if (
FunctionM02(clusEnergy, 2.135, -0.245, -0.1, 0., 0. ) > 0.27)
4042 return FunctionM02(clusEnergy, 2.135, -0.245, -0.1, 0., 0. );
4055 AliError(Form(
"Min M02 for merged cluster Cut not defined %d",minM02));
4090 AliError(Form(
"Min M02 not defined %d",minM02));
4109 AliError(Form(
"Max M20 Cut not defined %d",maxM20));
4128 AliError(Form(
"Min M20 Cut not defined %d",minM20));
4147 AliError(Form(
"Maximum Dispersion Cut not defined %d",dispersion));
4174 AliError(Form(
"NLM Cut not defined %d",nlm));
4183 if( nl1 >= 0 && nl1 <=9){
4187 AliError(Form(
"NonLinearity Correction (part1) not defined %d",nl1));
4196 if( nl2 >= 0 && nl2 <=9){
4203 AliError(Form(
"NonLinearity Correction (part2) not defined %d",nl2));
4215 AliInfo(
"Cluster pointer null!");
4222 if (energy < 0.05) {
4224 AliInfo(Form(
"Too Low Cluster energy!, E = %f < 0.05 GeV",energy));
4228 if (energy < 0.01) {
4230 AliInfo(Form(
"Too Low Cluster energy!, E = %f < 0.01 GeV",energy));
4237 if( V0Reader == NULL ){
4238 AliFatal(Form(
"No V0Reader called '%s' could be found within AliCaloPhotonCuts::ApplyNonLinearity",
fV0ReaderName.Data()));
4244 printf(
"AliCaloPhotonCuts:Period name has been set to %s, period-enum: %o\n",
fPeriodName.Data(),
fCurrentMC ) ;
4248 Bool_t fPeriodNameAvailable = kTRUE;
4337 energy /=
FunctionNL_kSDM(energy, 0.96874*0.991*0.9958*0.999, -3.76064, -0.193181);
4381 energy /=
FunctionNL_kSDM(energy, 0.974525*0.986*0.999, -4.00247, -0.453046) ;
4403 }
else fPeriodNameAvailable = kFALSE;
4442 energy /=
FunctionNL_kSDM(energy, 0.962095*0.9991*0.9993, -3.63967, -0.747825) ;
4461 }
else fPeriodNameAvailable = kFALSE;
4486 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.04979, 1.3, 0.0967998, 219.381, 63.1604, 1.011);
4487 if(isMC == 0) energy *=
FunctionNL_kSDM(energy, 0.9846, -3.319, -2.033);
4494 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.04123, 1.045, 0.0967998, 219.381, 63.1604, 1.014);
4495 if(isMC == 0) energy *=
FunctionNL_kSDM(energy, 0.9807*0.995*0.9970, -3.377, -0.8535);
4497 else fPeriodNameAvailable = kFALSE;
4506 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.06539, 1.121, 0.0967998, 219.381, 63.1604, 1.011);
4507 if(isMC == 0) energy *=
FunctionNL_kSDM(2.0*energy, 0.9676, -3.216, -0.6828);
4514 energy *=
FunctionNL_kPi0MC(energy, 1.0, 0.06115, 0.9535, 0.0967998, 219.381, 63.1604, 1.013);
4515 if(isMC == 0) energy *=
FunctionNL_kSDM(2.0*energy, 0.9772*0.995*0.9981, -3.256, -0.4449);
4517 else fPeriodNameAvailable = kFALSE;
4526 energy /= (
FunctionNL_kSDM(energy, 0.945037*1.005, -3.42935, -0.384718));
4528 }
else fPeriodNameAvailable = kFALSE;
4539 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0443938253, -0.0691830812, -0.1247555443, 1.1673716264, -0.1853095466, -0.0848801702) - 0.0055);
4541 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.1716155406, -0.1962930603, -0.0193959829, 1.0336659741, -0.0467778485, -0.4407662248) - 0.0055);
4543 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0166321784, -0.0440799552, -0.2611899222, 1.0636538464, -0.0816662488, -0.2173961316) - 0.007);
4545 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.1100193881, -0.1389194936, -0.0800000242, 1.1673716264, -0.1853095466, -0.0848801702) - 0.017);
4547 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0520183153, -0.0806102847, -0.1450415920, 1.0336724056, -0.0467844121, -0.4406992764) - 0.016);
4550 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0654169768, -0.0935785719, -0.1137883054, 1.1814766150, -0.1980098061, -0.0854569214) - 0.0138);
4552 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0652493513, -0.0929276101, -0.1113762695, 1.1837801885, -0.1999914832, -0.0854569214) - 0.0145);
4554 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0489259285, -0.0759079646, -0.1239772934, 1.1835846739, -0.1998987993, -0.0854186691) - 0.014);
4558 energy /= (
FunctionNL_DPOW(energy, 1.1082846035, -0.1369968318, -0.0800000002, 1.1850179319, -0.1999999950, -0.0863054172) - 0.015);
4565 if(
fClusterType==1) energy /= (
FunctionNL_DExp(energy, 0.9831956962, 1.2383793944, -3.2676359751, 1.0121710221, 0.6588125132, -3.1578818630));
4567 if(
fClusterType==1) energy /= (
FunctionNL_DExp(energy, 0.9912139474, 0.3721971884, -3.6440765835, 1.0141024579, 0.5574244401, -3.1894624833));
4571 energy /= (
FunctionNL_DPOW(energy, 1.1251817141, -0.8420328354, -0.0800008954, 0.9562653194, -0.6683378769, -0.1064755375));
4576 if(
fClusterType==1) energy /= (
FunctionNL_DExp(energy, 0.9842689920, 0.9150246921, -3.6796298486, 1.0113148506, 0.6876891951, -3.1672234730));
4577 if(
fClusterType==3) energy /= (
FunctionNL_DPOW(energy, 1.1343351836,-0.1571288013,-0.0800000607,1.0288066416,-0.0367913727,-0.4995137932));
4578 }
else fPeriodNameAvailable = kFALSE;
4588 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 0.9980625418, -0.0564782662, -0.5, 1.0383412435, -0.0851830429, -0.4999999996) - 0.00175);
4590 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0795372569, -0.1347324732, -0.1630736190, 1.1614181498, -0.199995361, -0.1711378093) - 0.0035);
4592 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0232969083, -0.090409434, -0.3592406513, 1.0383412435, -0.0851830429, -0.4999999996) + 0.0007);
4594 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0106037132, -0.0748250591, -0.4999999996, 1.0383412435, -0.0851830429, -0.4999999996) - 0.014);
4596 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0119417393, -0.0755250741, -0.4999999996, 1.1614181498, -0.1999995361, -0.1711378093) - 0.006);
4599 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.1389201636, -0.1999994717, -0.1622237979, 1.1603460704, -0.1999999989, -0.2194447313) - 0.0025);
4601 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0105301622, -0.0732424689, -0.5000000000, 1.0689250170, -0.1082682369, -0.4388156470) - 0.001);
4603 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 0.9922456908, -0.0551212559, -0.5000000000, 1.0513459039, -0.0894163252, -0.5000000000) + 0.002);
4607 energy /= (
FunctionNL_DPOW(energy, 1.0074002842, -0.0682543971, -0.4509341085, 1.1224162203, -0.1586806096, -0.2458351112) - 0.003) ;
4614 if(
fClusterType==1) energy /= (
FunctionNL_DExp(energy, 0.9747084556, 1.3652950049, -1.7832191813, 1.0039014622, 1.3657547071, -1.7852900827));
4616 if(
fClusterType==1) energy /= (
FunctionNL_DPOW(energy, 1.0193460981, -0.0851635674, -0.4984580141, 1.0588985795, -0.0957023147, -0.4999999998));
4620 energy /= (
FunctionNL_DExp(energy, 0.9762188425, 0.9120374996, -2.3012968797, 1.0049037083, 1.2643533472, -1.8927172439));
4621 energy /= (
FunctionNL_kSDM(energy, 0.983808, -4.25003, -0.0977335)- 0.003);
4624 FunctionNL_DPOW(energy, 1.1288028638,-0.1999998667,-0.1529260679,1.1452841028,-0.1999999982,-0.1791163557);