1 // Configuration macro for analysis of isolated photon spectra
2 // Author : Gustavo Conesa; Marie Germain.
4 TString kAnaIsoPhotonName = "";
5 AliAnalysisTaskCaloTrackCorrelation *AddTaskIsoPhoton(const Float_t cone = 0.4,
6 const Float_t pth = 5.,
7 const Bool_t leading = kTRUE,
8 const Bool_t timecut = kFALSE,
9 const TString calorimeter = "EMCAL",
10 const Bool_t simu = kFALSE,
11 const Bool_t exotic = kTRUE,
12 const Bool_t nonlin = kFALSE,
13 const TString trigger = "EMC7",
14 const Bool_t tm = kTRUE,
15 const Int_t minCen = -1,
16 const Int_t maxCen = -1,
17 const Float_t deltaphicut = 0.03,
18 const Float_t deltaetacut = 0.02,
19 const Int_t disttobad = 0,
20 const Int_t nlmMax = 2,
21 const Bool_t qaan = kFALSE,
22 const Bool_t primvtx = kTRUE,
23 const Bool_t notrackcut = kTRUE,
24 const Int_t debug = -1,
25 const Bool_t print = kFALSE
28 // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
30 printf("AddTaskIsoPhoton() - Settings: cone %2.2f, pth %2.2f, timeCut On %d, NLM max cut %d, calorimeter %s, simu %d, exotic %d, non lin %d, trigger %s, TM %d, qa %d, debug %d, centrality %d-%d\n",
31 cone, pth, timecut , nlmMax, calorimeter.Data(),simu, exotic, nonlin, trigger.Data(), tm, qaan, debug, minCen, maxCen );
33 // Get the pointer to the existing analysis manager via the static access method.
35 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
38 ::Error("AddTask", "No analysis manager to connect to.");
42 // Check the analysis type using the event handlers connected to the analysis manager.
44 if (!mgr->GetInputEventHandler())
46 ::Error("AddTask", "This task requires an input event handler");
50 // Make sure the B field is enabled for track selection, some cuts need it
51 ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
53 Bool_t useKinematics = kFALSE;
54 useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
56 // Name for containers
58 kAnaIsoPhotonName = Form("%s_Trig%s_TM%d_%1.3f_dB%d_R%1.1f_Pt%1.1f",calorimeter.Data(), trigger.Data(),tm,deltaphicut,disttobad,cone,pth);
60 if(maxCen>=0) kAnaIsoPhotonName+=Form("Cen%d_%d",minCen,maxCen);
62 printf("<<<< NAME: %s >>>>>\n",kAnaIsoPhotonName.Data());
64 // #### Configure analysis ####
66 AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
68 //maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
70 // General frame setting and configuration
71 maker->SetReader (ConfigureReader (mgr->GetInputEventHandler()->GetDataType(),useKinematics,simu,
72 calorimeter,nonlin, timecut, primvtx, notrackcut,minCen, maxCen, debug,print));
73 maker->SetCaloUtils(ConfigureCaloUtils(nonlin,exotic,simu,timecut,debug,print));
75 // Analysis tasks setting and configuration
76 Int_t n = 0;//Analysis number, order is important
79 Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
80 // Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ;
81 Int_t thresType = AliIsolationCut::kSumPtIC ;
84 maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,deltaphicut,deltaetacut,disttobad,nlmMax,simu,debug,print), n++); // Photon cluster selection
87 maker->AddAnalysis(ConfigureIsolationAnalysis(calorimeter,"Photon", partInCone,thresType,cone, pth,tm,leading,kFALSE,simu,debug,print), n++); // Photon isolation
89 // QA histograms on clusters or tracks
92 maker->AddAnalysis(ConfigureQAAnalysis(calorimeter,simu,debug,print),n++);
93 maker->AddAnalysis(ConfigureChargedAnalysis(simu,debug), n++); // charged tracks plots
96 maker->SetAnaDebug(debug) ;
97 maker->SwitchOnHistogramsMaker() ;
98 maker->SwitchOnAODsMaker() ;
100 if(print) maker->Print("");
102 maker->SwitchOffDataControlHistograms();
104 printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
108 AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kAnaIsoPhotonName.Data()));
109 task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
110 task->SetDebugLevel(debug);
111 task->SetBranches("ESD:AliESDRun.,AliESDHeader");
112 task->SetAnalysisMaker(maker);
117 TString outputfile = AliAnalysisManager::GetCommonFileName();
119 AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaIsoPhotonName, TList::Class(),
120 AliAnalysisManager::kOutputContainer,
121 Form("%s",outputfile.Data()));
123 AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaIsoPhotonName.Data()), TList::Class(),
124 AliAnalysisManager::kParamContainer,
125 "AnalysisParameters.root");
127 // Create ONLY the output containers for the data produced by the task.
128 // Get and connect other common input/output containers via the manager as below
129 //==============================================================================
130 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
131 // AOD output slot will be used in a different way in future
132 mgr->ConnectOutput (task, 1, cout_pc);
133 mgr->ConnectOutput (task, 2, cout_cuts);
135 // Set the trigger selection
136 UInt_t mask = SetTriggerMaskFromName(trigger);
137 task->SelectCollisionCandidates(mask);
142 //____________________________________
143 AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD", Bool_t useKinematics = kFALSE, Bool_t simu = kFALSE,
144 TString calorimeter = "EMCAL", Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
145 Bool_t primvtx = kFALSE, Bool_t notrackcut = kFALSE, Float_t minCen = -1,
146 Float_t maxCen = -1, Int_t debug = -1, Bool_t print = kFALSE)
148 // Init reader settings: event selection, basic cluster track cuts, etc
152 if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
155 cout<<"********* ACCESS KINE? "<<useKinematics<< endl;
157 AliCaloTrackReader * reader = 0;
158 if (inputDataType=="AOD") reader = new AliCaloTrackAODReader();
159 else if(inputDataType=="ESD") reader = new AliCaloTrackESDReader();
160 else printf("AliCaloTrackReader::ConfigureReader() - Data not known inputData=%s\n",inputDataType.Data());
162 reader->SetDebug(debug);//10 for lots of messages
164 reader->SwitchOffTriggerPatchMatching();
165 reader->SwitchOffBadTriggerEventsRemoval();
167 reader->SwitchOffWriteDeltaAOD() ;
172 if(inputDataType == "ESD")
174 reader->SwitchOnStack();
175 reader->SwitchOffAODMCParticles();
177 else if(inputDataType == "AOD")
179 reader->SwitchOffStack();
180 reader->SwitchOnAODMCParticles();
184 //------------------------
185 // Detector input filling
186 //------------------------
188 //Min cluster/track E
189 reader->SetEMCALEMin(0.3);
190 reader->SetEMCALEMax(1000);
191 reader->SetPHOSEMin(0.3);
192 reader->SetPHOSEMax(1000);
193 reader->SetCTSPtMin(0.2);
194 reader->SetCTSPtMax(1000);
199 reader->SwitchOffUseTrackTimeCut();
200 reader->SwitchOffUseParametrizedTimeCut();
201 reader->SwitchOffUseEMCALTimeCut();
202 reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
206 reader->SwitchOffUseParametrizedTimeCut();
210 printf("Set time cut \n");
211 reader->SwitchOnUseEMCALTimeCut();
213 reader->SetEMCALTimeCut(-30.,30.); // default is -25ns-20ns
217 printf("Off time cuts time cut \n");
218 reader->SwitchOffUseEMCALTimeCut();
220 reader->SetEMCALTimeCut(-1.e6,1.e6);
224 reader->SwitchOffFiducialCut();
225 reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
228 reader->SwitchOnCTS();
231 reader->SwitchOffRecalculateVertexBC();
232 reader->SwitchOffVertexBCEventSelection();
234 reader->SwitchOffUseTrackTimeCut();
235 reader->SetTrackTimeCut(0,50);
237 reader->SwitchOffUseTrackDCACut();
238 //reader->SetTrackDCACut(0,0.0105);
239 //reader->SetTrackDCACut(1,0.035);
240 //reader->SetTrackDCACut(2,1.1);
242 if(inputDataType=="ESD")
244 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
245 //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
246 //reader->SetTrackCuts(esdTrackCuts);
247 //reader->SwitchOnConstrainTrackToVertex();
252 AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
253 reader->SetTrackCuts(esdTrackCuts);
254 AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
255 reader->SetTrackComplementaryCuts(esdTrackCuts2);
260 // AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
261 // reader->SetTrackCuts(esdTrackCuts);
262 // AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
263 // reader->SetTrackComplementaryCuts(esdTrackCuts2);
266 else if(inputDataType=="AOD")
268 //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
269 reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
270 reader->SetTrackStatus(AliVTrack::kITSrefit);
271 //reader->SwitchOnTrackHitSPDSelection(); // Check that the track has at least a hit on the SPD, not much sense to use for hybrid or TPC only tracks
276 reader->SwitchOffClusterRecalculation();
280 if(!nonlin) reader->SwitchOffClusterELinearityCorrection();
281 else reader->SwitchOnClusterELinearityCorrection();
283 if(calorimeter == "EMCAL") {
284 reader->SwitchOnEMCALCells();
285 reader->SwitchOnEMCAL();
287 if(calorimeter == "PHOS") { // Should be on if QA is activated with correlation on
288 reader->SwitchOffPHOSCells();
289 reader->SwitchOffPHOS();
296 //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
298 // reader->RejectFastClusterEvents() ;
300 reader->SwitchOnEventTriggerAtSE();
302 reader->SetZvertexCut(10.); // Open cut
304 reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
306 reader->SwitchOffPrimaryVertexSelection();
308 reader->SwitchOnRejectNoTrackEvents();
310 reader->SwitchOffRejectNoTrackEvents();
312 reader->SwitchOffPileUpEventRejection(); // remove pileup
313 reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
318 reader->SetCentralityClass("V0M");
319 reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
320 reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
322 // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
323 reader->SetEventPlaneMethod("V0");
326 if(print) reader->Print("");
332 //_______________________________________
333 AliCalorimeterUtils* ConfigureCaloUtils(Bool_t nonlin = kTRUE, Bool_t exotic = kTRUE ,Bool_t simu = kFALSE, Bool_t timecut = kFALSE, Int_t debug = -1, Bool_t print = kFALSE)
336 AliCalorimeterUtils *cu = new AliCalorimeterUtils;
339 // Remove clusters close to borders, at least max energy cell is 1 cell away
340 cu->SetNumberOfCellsFromEMCALBorder(0);//this was originally set to one
341 cu->SetNumberOfCellsFromPHOSBorder(2);
343 cu->SwitchOffRecalculateClusterTrackMatching();
345 cu->SwitchOffBadChannelsRemoval() ;
350 cu->SwitchOnLoadOwnEMCALGeometryMatrices();
352 /* AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
354 cu->SwitchOffRecalibration();
355 cu->SwitchOffRunDepCorrection();
357 gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
358 ConfigureEMCALRecoUtils(recou,
364 kFALSE); // time calib
365 if(timecut) recou->SetExoticCellDiffTimeCut(50.);
369 printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
370 cu->SwitchOnCorrectClusterLinearity();
373 printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
374 printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
376 cu->SetNumberOfSuperModulesUsed(10);
378 if(print) cu->Print("");
384 //_____________________________________
385 AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL", Bool_t tm = kFALSE, Float_t deltaphicut = 0.02, Float_t deltaetacut = 0.03,Int_t disttobad=0,Int_t nlmMax = 2, Bool_t simu = kFALSE, Int_t debug = -1, Bool_t print = kFALSE)
388 AliAnaPhoton *ana = new AliAnaPhoton();
389 ana->SetDebug(debug); //10 for lots of messages
391 // cluster selection cuts
393 ana->SwitchOffFiducialCut();
395 ana->SetCalorimeter(calorimeter);
397 if(calorimeter == "PHOS")
399 ana->SetNCellCut(2);// At least 3 cells
401 ana->SetMinDistanceToBadChannel(2, 4, 5);
402 ana->SetTimeCut(-1e10,1e10); // open cut
406 ana->SetNCellCut(1);// At least 2 cells
407 ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
408 ana->SetMaxEnergy(1000);
409 // ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
410 // restrict to less than 100 ns when time calibration is on
411 ana->SetMinDistanceToBadChannel(disttobad, 4, 6);
413 // NLM cut, used in all, exclude clusters with more than 2 maxima
414 // Not needed if M02 cut is already strong or clusterizer V2
415 ana->SetNLMCut(1, nlmMax) ;
420 ana->SwitchOnTrackMatchRejection() ;
421 ana->SwitchOffTMHistoFill() ;
425 ana->SwitchOffTrackMatchRejection() ;
426 ana->SwitchOnTMHistoFill() ;
429 //PID cuts (shower shape)
430 ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
431 AliCaloPID* caloPID = ana->GetCaloPID();
432 //Not used in bayesian
435 caloPID->SetEMCALLambda0CutMax(1000.);
436 caloPID->SetEMCALLambda0CutMin(0.);
438 // caloPID->SetEMCALDEtaCut(0.025);
439 // caloPID->SetEMCALDPhiCut(0.030);
440 caloPID->SetEMCALDEtaCut(deltaetacut);
441 caloPID->SetEMCALDPhiCut(deltaphicut);
443 ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
444 if(!simu) ana->SwitchOnFillPileUpHistograms();
446 // Input / output delta AOD settings
448 ana->SetOutputAODName(Form("Photon%s",kAnaIsoPhotonName.Data()));
449 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
451 //Set Histograms name tag, bins and ranges
453 ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
454 SetHistoRangeAndNBins(ana->GetHistogramRanges(), calorimeter); // see method below
456 // Number of particle type MC histograms
457 ana->FillNOriginHistograms(20);
458 ana->FillNPrimaryHistograms(20);
460 ConfigureMC(ana,simu);
462 if(print) ana->Print("");
468 //____________________________________________________________________________________________________
469 AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL", TString particle="Photon",
470 Int_t partInCone = AliIsolationCut::kOnlyCharged,
471 Int_t thresType = AliIsolationCut::kSumPtFracIC,
475 Bool_t leading = kTRUE,
476 Bool_t multi = kFALSE, Bool_t simu = kFALSE,
477 Int_t debug = -1, Bool_t print = kFALSE)
480 AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
481 ana->SetDebug(debug);
483 ana->SwitchOnFiducialCut();
484 //Avoid borders of EMCal
485 if(calorimeter=="EMCAL")
487 //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
488 ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.27, 103, 157) ;
493 // Input / output delta AOD settings
495 ana->SetInputAODName(Form("%s%s",particle.Data(),kAnaIsoPhotonName.Data()));
496 ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kAnaIsoPhotonName.Data()));
498 ana->SetCalorimeter(calorimeter);
500 if(!tm) ana->SwitchOnTMHistoFill();
501 else ana->SwitchOffTMHistoFill();
502 // ana->SwitchOnTMHistoFill();
504 // ana->SwitchOffSSHistoFill();
505 // if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
506 ana->SwitchOnSSHistoFill();
507 if(leading) ana->SwitchOnLeadingOnly();
508 else ana->SwitchOffLeadingOnly();
509 if(!simu) ana->SwitchOnFillPileUpHistograms();
511 //Do settings for main isolation cut class
512 AliIsolationCut * ic = ana->GetIsolationCut();
515 printf("\t *** Set: R = %2.2f, Threshold %2.2f, Method %d, Neutral/Charged option %d ***\n",cone,pth,thresType,partInCone);
519 ic->SetConeSize(cone);
521 ic->SetPtFraction (0.1);
522 ic->SetPtThreshold (pth);
523 ic->SetSumPtThreshold(pth);
525 ic->SetParticleTypeInCone(partInCone);
527 ic->SetICMethod(thresType);
530 //Do or not do isolation with previously produced AODs.
531 //No effect if use of SwitchOnSeveralIsolation()
532 ana->SwitchOffReIsolation();
537 ic->SetConeSize(1.); // Take all for first iteration
538 ic->SetPtThreshold(100);// Take all for first iteration
539 ana->SwitchOnSeveralIsolation() ;
540 ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),tm));
543 ana->SetNPtThresFrac(4);
544 ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
545 ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
546 ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
547 ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
548 ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
550 ana->SwitchOffTMHistoFill();
551 ana->SwitchOffSSHistoFill();
554 ana->SwitchOffSeveralIsolation() ;
556 AliCaloPID* caloPID = ana->GetCaloPID();
557 caloPID->SetEMCALDEtaCut(0.02);
558 caloPID->SetEMCALDPhiCut(0.030);
560 //Set Histograms name tag, bins and ranges
562 if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),tm));
563 else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),tm));
565 SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
567 if(particle=="Hadron" || particle.Contains("CTS"))
569 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
570 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
573 ConfigureMC(ana,simu);
575 if(print) ic ->Print("");
576 if(print) ana->Print("");
583 //________________________________________
584 AliAnaCalorimeterQA* ConfigureQAAnalysis(TString calorimeter = "EMCAL", Bool_t simu = kFALSE, Int_t debug = -1, Bool_t print = kFALSE)
587 AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
588 ana->SetDebug(debug); //10 for lots of messages
589 ana->SetCalorimeter(calorimeter);
591 ana->SetTimeCut(-1e10,1e10); // Open time cut
592 ana->SwitchOffCorrelation();
594 // Study exotic clusters PHOS and EMCAL
595 ana->SwitchOffStudyBadClusters() ;
598 ana->SwitchOffFiducialCut();
599 ana->SwitchOffFillAllTH3Histogram();
600 ana->SwitchOffFillAllPositionHistogram();
601 ana->SwitchOffFillAllPositionHistogram2();
602 ana->SwitchOffStudyBadClusters();
603 ana->SwitchOffStudyClustersAsymmetry();
604 ana->SwitchOffStudyWeight();
605 ana->SwitchOnFillAllTrackMatchingHistogram();
606 ana->SwitchOnFillAllCellTimeHisto() ;
609 ana->AddToHistogramsName("QA_"); //Begining of histograms name
610 SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
612 ConfigureMC(ana,simu);
614 if(print) ana->Print("");
620 //___________________________________________________________________________________
621 AliAnaChargedParticles* ConfigureChargedAnalysis(Bool_t simulation, Int_t debugLevel)
624 AliAnaChargedParticles *ana = new AliAnaChargedParticles();
625 ana->SetDebug(debugLevel); //10 for lots of messages
630 ana->SwitchOnFiducialCut();
631 ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
633 ana->SwitchOffFillVertexBC0Histograms() ;
634 //if(!simulation) ana->SwitchOnFillPileUpHistograms();
636 // Input / output delta AOD settings
638 ana->SetOutputAODName(Form("Hadron%s",kAnaIsoPhotonName.Data()));
639 ana->SetOutputAODClassName("AliAODPWG4Particle");
640 ana->SetInputAODName(Form("Hadron%s",kAnaIsoPhotonName.Data()));
642 //Set Histograms name tag, bins and ranges
644 ana->AddToHistogramsName("AnaHadrons_");
645 SetHistoRangeAndNBins(ana->GetHistogramRanges(),""); // see method below
647 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
648 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
650 if(debugLevel > 0) ana->Print("");
656 //________________________________________________________
657 void ConfigureMC(AliAnaCaloTrackCorrBaseClass* ana, Bool_t simu = kFALSE)
659 if(simu) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
660 else ana->SwitchOffDataMC() ;
662 //Set here generator name, default pythia
663 //ana->GetMCAnalysisUtils()->SetMCGenerator("");
666 //________________________________________________________
667 void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges, TString calorimeter = "EMCAL")
669 // Set common bins for all analysis and MC histograms filling
671 histoRanges->SetHistoPtRangeAndNBins(-0.25, 99.75, 200) ; // Energy and pt histograms
673 if(calorimeter=="EMCAL")
676 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
677 histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
678 histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
680 histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
684 histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
685 histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
688 histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
690 // Invariant mass histoRangeslysis
691 histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
692 histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
694 // check if time calibration is on
695 histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
696 histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
698 // track-cluster residuals
699 histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
700 histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
701 histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
703 // QA, electron, charged
704 histoRanges->SetHistoPOverERangeAndNBins(0, 2.5 ,500);
705 histoRanges->SetHistodEdxRangeAndNBins (0.,250.0,500);
708 histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
709 histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
710 histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
711 histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
712 histoRanges->SetHistoZRangeAndNBins(-400,400,200);
713 histoRanges->SetHistoRRangeAndNBins(400,450,25);
714 histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
715 histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
716 histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
719 histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
720 histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
724 //_____________________________
725 UInt_t SetTriggerMaskFromName(TString trigger)
729 printf("CaloTrackCorr trigger EMC7\n");
730 return AliVEvent::kEMC7;
732 else if (trigger=="INT7")
734 printf("CaloTrackCorr trigger INT7\n");
735 return AliVEvent::kINT7;
737 else if(trigger=="EMC1")
739 printf("CaloTrackCorr trigger EMC1\n");
740 return AliVEvent::kEMC1;
742 else if(trigger=="MB")
744 printf("CaloTrackCorr trigger MB\n");
745 return AliVEvent::kMB;
747 else if(trigger=="PHOS")
749 printf("CaloTrackCorr trigger PHOS\n");
750 return AliVEvent::kPHI7;
752 else if(trigger=="PHOSPb")
754 printf("CaloTrackCorr trigger PHOSPb\n");
755 return AliVEvent::kPHOSPb;
757 else if(trigger=="AnyINT")
759 printf("CaloTrackCorr trigger AnyINT\n");
760 return AliVEvent::kAnyINT;
762 else if(trigger=="INT")
764 printf("CaloTrackCorr trigger AnyINT\n");
765 return AliVEvent::kAny;
767 else if(trigger=="EMCEGA")
769 printf("CaloTrackCorr trigger EMC Gamma\n");
770 return AliVEvent::kEMCEGA;
772 else if(trigger=="EMCEJE")
774 printf("CaloTrackCorr trigger EMC Jet\n");
775 return AliVEvent::kEMCEJE;
777 else if(trigger=="Central")
779 printf("CaloTrackCorr trigger Central\n");
780 return (AliVEvent::kCentral | AliVEvent::kMB);
782 else if(trigger=="CentralEGA")
784 printf("CaloTrackCorr trigger Central+EMCEGA\n");
785 return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
787 else if(trigger=="SemiCentral")
789 printf("CaloTrackCorr trigger SemiCentral\n");
790 return (AliVEvent::kSemiCentral | AliVEvent::kMB);
792 else if(trigger=="SemiOrCentral")
794 printf("CaloTrackCorr trigger SemiCentral Or Central\n");
795 return (AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kMB);