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 timecut = kFALSE,
8 const TString calorimeter = "EMCAL",
9 const Bool_t simu = kFALSE,
10 const Bool_t exotic = kTRUE,
11 const Bool_t nonlin = kFALSE,
12 const TString trigger = "EMC7",
13 const Bool_t tm = kTRUE,
14 const Int_t minCen = -1,
15 const Int_t maxCen = -1,
16 const Float_t deltaphicut = 0.03,
17 const Float_t deltaetacut = 0.02,
18 const Int_t disttobad = 0,
19 const Int_t nlmMax = 2,
20 const Bool_t qaan = kFALSE,
21 const Int_t debug = -1,
22 const Bool_t print = kFALSE
25 // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
27 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",
28 cone, pth, timecut , nlmMax, calorimeter.Data(),simu, exotic, nonlin, trigger.Data(), tm, qaan, debug, minCen, maxCen );
30 // Get the pointer to the existing analysis manager via the static access method.
32 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
35 ::Error("AddTask", "No analysis manager to connect to.");
39 // Check the analysis type using the event handlers connected to the analysis manager.
41 if (!mgr->GetInputEventHandler())
43 ::Error("AddTask", "This task requires an input event handler");
47 // Make sure the B field is enabled for track selection, some cuts need it
48 ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
50 Bool_t useKinematics = kFALSE;
51 useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
53 // Name for containers
55 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);
57 if(maxCen>=0) kAnaIsoPhotonName+=Form("Cen%d_%d",minCen,maxCen);
59 printf("<<<< NAME: %s >>>>>\n",kAnaIsoPhotonName.Data());
61 // #### Configure analysis ####
63 AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
65 //maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
67 // General frame setting and configuration
68 maker->SetReader (ConfigureReader (mgr->GetInputEventHandler()->GetDataType(),useKinematics,simu,
69 calorimeter,nonlin, timecut,minCen, maxCen, debug,print));
70 maker->SetCaloUtils(ConfigureCaloUtils(nonlin,exotic,simu,timecut,debug,print));
72 // Analysis tasks setting and configuration
73 Int_t n = 0;//Analysis number, order is important
76 Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
77 // Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ;
78 Int_t thresType = AliIsolationCut::kSumPtIC ;
81 maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,deltaphicut,deltaetacut,disttobad,nlmMax,simu,debug,print), n++); // Photon cluster selection
84 maker->AddAnalysis(ConfigureIsolationAnalysis(calorimeter,"Photon", partInCone,thresType,cone, pth,tm,kFALSE,simu,debug,print), n++); // Photon isolation
86 // QA histograms on clusters or tracks
89 maker->AddAnalysis(ConfigureQAAnalysis(calorimeter,simu,debug,print),n++);
90 maker->AddAnalysis(ConfigureChargedAnalysis(simu,debug), n++); // charged tracks plots
93 maker->SetAnaDebug(debug) ;
94 maker->SwitchOnHistogramsMaker() ;
95 maker->SwitchOnAODsMaker() ;
97 if(print) maker->Print("");
99 maker->SwitchOffDataControlHistograms();
101 printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
105 AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kAnaIsoPhotonName.Data()));
106 task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
107 task->SetDebugLevel(debug);
108 task->SetBranches("ESD:AliESDRun.,AliESDHeader");
109 task->SetAnalysisMaker(maker);
114 TString outputfile = AliAnalysisManager::GetCommonFileName();
116 AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaIsoPhotonName, TList::Class(),
117 AliAnalysisManager::kOutputContainer,
118 Form("%s",outputfile.Data()));
120 AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaIsoPhotonName.Data()), TList::Class(),
121 AliAnalysisManager::kParamContainer,
122 "AnalysisParameters.root");
124 // Create ONLY the output containers for the data produced by the task.
125 // Get and connect other common input/output containers via the manager as below
126 //==============================================================================
127 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
128 // AOD output slot will be used in a different way in future
129 mgr->ConnectOutput (task, 1, cout_pc);
130 mgr->ConnectOutput (task, 2, cout_cuts);
132 // Set the trigger selection
133 UInt_t mask = SetTriggerMaskFromName(trigger);
134 task->SelectCollisionCandidates(mask);
139 //____________________________________
140 AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD", Bool_t useKinematics = kFALSE, Bool_t simu = kFALSE,
141 TString calorimeter = "EMCAL", Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
142 Float_t minCen = -1, Float_t maxCen = -1,
143 Int_t debug = -1, Bool_t print = kFALSE)
145 // Init reader settings: event selection, basic cluster track cuts, etc
149 if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
152 cout<<"********* ACCESS KINE? "<<useKinematics<< endl;
154 AliCaloTrackReader * reader = 0;
155 if (inputDataType=="AOD") reader = new AliCaloTrackAODReader();
156 else if(inputDataType=="ESD") reader = new AliCaloTrackESDReader();
157 else printf("AliCaloTrackReader::ConfigureReader() - Data not known inputData=%s\n",inputDataType.Data());
159 reader->SetDebug(debug);//10 for lots of messages
161 reader->SwitchOffTriggerPatchMatching();
162 reader->SwitchOffBadTriggerEventsRemoval();
164 reader->SwitchOffWriteDeltaAOD() ;
169 if(inputDataType == "ESD")
171 reader->SwitchOnStack();
172 reader->SwitchOffAODMCParticles();
174 else if(inputDataType == "AOD")
176 reader->SwitchOffStack();
177 reader->SwitchOnAODMCParticles();
181 //------------------------
182 // Detector input filling
183 //------------------------
185 //Min cluster/track E
186 reader->SetEMCALEMin(0.3);
187 reader->SetEMCALEMax(1000);
188 reader->SetPHOSEMin(0.3);
189 reader->SetPHOSEMax(1000);
190 reader->SetCTSPtMin(0.2);
191 reader->SetCTSPtMax(1000);
196 reader->SwitchOffUseTrackTimeCut();
197 reader->SwitchOffUseParametrizedTimeCut();
198 reader->SwitchOffUseEMCALTimeCut();
199 reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
203 reader->SwitchOffUseParametrizedTimeCut();
207 printf("Set time cut \n");
208 reader->SwitchOnUseEMCALTimeCut();
210 reader->SetEMCALTimeCut(-30.,30.); // default is -25ns-20ns
214 printf("Off time cuts time cut \n");
215 reader->SwitchOffUseEMCALTimeCut();
217 reader->SetEMCALTimeCut(-1.e6,1.e6);
221 reader->SwitchOffFiducialCut();
222 reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
225 reader->SwitchOnCTS();
228 reader->SwitchOffRecalculateVertexBC();
229 reader->SwitchOffVertexBCEventSelection();
231 reader->SwitchOffUseTrackTimeCut();
232 reader->SetTrackTimeCut(0,50);
234 reader->SwitchOffUseTrackDCACut();
235 //reader->SetTrackDCACut(0,0.0105);
236 //reader->SetTrackDCACut(1,0.035);
237 //reader->SetTrackDCACut(2,1.1);
239 if(inputDataType=="ESD")
241 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
242 //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
243 //reader->SetTrackCuts(esdTrackCuts);
244 //reader->SwitchOnConstrainTrackToVertex();
249 AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
250 reader->SetTrackCuts(esdTrackCuts);
251 AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
252 reader->SetTrackComplementaryCuts(esdTrackCuts2);
257 // AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
258 // reader->SetTrackCuts(esdTrackCuts);
259 // AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
260 // reader->SetTrackComplementaryCuts(esdTrackCuts2);
263 else if(inputDataType=="AOD")
265 //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
266 reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
267 reader->SetTrackStatus(AliVTrack::kITSrefit);
268 //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
273 reader->SwitchOffClusterRecalculation();
277 if(!nonlin) reader->SwitchOffClusterELinearityCorrection();
278 else reader->SwitchOnClusterELinearityCorrection();
280 if(calorimeter == "EMCAL") {
281 reader->SwitchOnEMCALCells();
282 reader->SwitchOnEMCAL();
284 if(calorimeter == "PHOS") { // Should be on if QA is activated with correlation on
285 reader->SwitchOffPHOSCells();
286 reader->SwitchOffPHOS();
293 //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
295 // reader->RejectFastClusterEvents() ;
297 reader->SwitchOnEventTriggerAtSE();
299 reader->SetZvertexCut(10.); // Open cut
300 reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
301 reader->SwitchOnRejectNoTrackEvents();
303 reader->SwitchOffPileUpEventRejection(); // remove pileup
304 reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
309 reader->SetCentralityClass("V0M");
310 reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
311 reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
313 // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
314 reader->SetEventPlaneMethod("V0");
317 if(print) reader->Print("");
323 //_______________________________________
324 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)
327 AliCalorimeterUtils *cu = new AliCalorimeterUtils;
330 // Remove clusters close to borders, at least max energy cell is 1 cell away
331 cu->SetNumberOfCellsFromEMCALBorder(1);
332 cu->SetNumberOfCellsFromPHOSBorder(2);
334 cu->SwitchOffRecalculateClusterTrackMatching();
336 cu->SwitchOffBadChannelsRemoval() ;
341 cu->SwitchOnLoadOwnEMCALGeometryMatrices();
343 /* AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
345 cu->SwitchOffRecalibration();
346 cu->SwitchOffRunDepCorrection();
348 gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
349 ConfigureEMCALRecoUtils(recou,
355 kFALSE); // time calib
356 if(timecut) recou->SetExoticCellDiffTimeCut(50.);
360 printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
361 cu->SwitchOnCorrectClusterLinearity();
364 printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
365 printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
367 cu->SetNumberOfSuperModulesUsed(10);
369 if(print) cu->Print("");
375 //_____________________________________
376 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)
379 AliAnaPhoton *ana = new AliAnaPhoton();
380 ana->SetDebug(debug); //10 for lots of messages
382 // cluster selection cuts
384 ana->SwitchOffFiducialCut();
386 ana->SetCalorimeter(calorimeter);
388 if(calorimeter == "PHOS")
390 ana->SetNCellCut(2);// At least 3 cells
392 ana->SetMinDistanceToBadChannel(2, 4, 5);
393 ana->SetTimeCut(-1e10,1e10); // open cut
397 ana->SetNCellCut(1);// At least 2 cells
398 ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
399 ana->SetMaxEnergy(1000);
400 // ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
401 // restrict to less than 100 ns when time calibration is on
402 ana->SetMinDistanceToBadChannel(disttobad, 4, 6);
404 // NLM cut, used in all, exclude clusters with more than 2 maxima
405 // Not needed if M02 cut is already strong or clusterizer V2
406 ana->SetNLMCut(1, nlmMax) ;
411 ana->SwitchOnTrackMatchRejection() ;
412 ana->SwitchOffTMHistoFill() ;
416 ana->SwitchOffTrackMatchRejection() ;
417 ana->SwitchOnTMHistoFill() ;
420 //PID cuts (shower shape)
421 ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
422 AliCaloPID* caloPID = ana->GetCaloPID();
423 //Not used in bayesian
426 caloPID->SetEMCALLambda0CutMax(10.);
427 caloPID->SetEMCALLambda0CutMin(0.10);
429 // caloPID->SetEMCALDEtaCut(0.025);
430 // caloPID->SetEMCALDPhiCut(0.030);
431 caloPID->SetEMCALDEtaCut(deltaetacut);
432 caloPID->SetEMCALDPhiCut(deltaphicut);
434 ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
435 if(!simu) ana->SwitchOnFillPileUpHistograms();
437 // Input / output delta AOD settings
439 ana->SetOutputAODName(Form("Photon%s",kAnaIsoPhotonName.Data()));
440 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
442 //Set Histograms name tag, bins and ranges
444 ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
445 SetHistoRangeAndNBins(ana->GetHistogramRanges(), calorimeter); // see method below
447 // Number of particle type MC histograms
448 ana->FillNOriginHistograms(20);
449 ana->FillNPrimaryHistograms(20);
451 ConfigureMC(ana,simu);
453 if(print) ana->Print("");
459 //____________________________________________________________________________________________________
460 AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL", TString particle="Photon",
461 Int_t partInCone = AliIsolationCut::kOnlyCharged,
462 Int_t thresType = AliIsolationCut::kSumPtFracIC,
466 Bool_t multi = kFALSE, Bool_t simu = kFALSE,
467 Int_t debug = -1, Bool_t print = kFALSE)
470 AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
471 ana->SetDebug(debug);
473 ana->SwitchOnFiducialCut();
474 //Avoid borders of EMCal
475 if(calorimeter=="EMCAL")
477 //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
478 ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.27, 103, 157) ;
483 // Input / output delta AOD settings
485 ana->SetInputAODName(Form("%s%s",particle.Data(),kAnaIsoPhotonName.Data()));
486 ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kAnaIsoPhotonName.Data()));
488 ana->SetCalorimeter(calorimeter);
490 if(!tm) ana->SwitchOnTMHistoFill();
491 else ana->SwitchOffTMHistoFill();
492 // ana->SwitchOnTMHistoFill();
494 // ana->SwitchOffSSHistoFill();
495 // if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
496 ana->SwitchOnSSHistoFill();
497 if(!simu) ana->SwitchOnFillPileUpHistograms();
499 //Do settings for main isolation cut class
500 AliIsolationCut * ic = ana->GetIsolationCut();
503 printf("\t *** Set: R = %2.2f, Threshold %2.2f, Method %d, Neutral/Charged option %d ***\n",cone,pth,thresType,partInCone);
507 ic->SetConeSize(cone);
509 ic->SetPtFraction (0.1);
510 ic->SetPtThreshold (pth);
511 ic->SetSumPtThreshold(pth);
513 ic->SetParticleTypeInCone(partInCone);
515 ic->SetICMethod(thresType);
518 //Do or not do isolation with previously produced AODs.
519 //No effect if use of SwitchOnSeveralIsolation()
520 ana->SwitchOffReIsolation();
525 ic->SetConeSize(1.); // Take all for first iteration
526 ic->SetPtThreshold(100);// Take all for first iteration
527 ana->SwitchOnSeveralIsolation() ;
528 ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),tm));
531 ana->SetNPtThresFrac(4);
532 ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
533 ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
534 ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
535 ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
536 ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
538 ana->SwitchOffTMHistoFill();
539 ana->SwitchOffSSHistoFill();
542 ana->SwitchOffSeveralIsolation() ;
544 AliCaloPID* caloPID = ana->GetCaloPID();
545 caloPID->SetEMCALDEtaCut(0.02);
546 caloPID->SetEMCALDPhiCut(0.030);
548 //Set Histograms name tag, bins and ranges
550 if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),tm));
551 else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),tm));
553 SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
555 ana->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
556 ana->SetHistoPtSumRangeAndNBins (0, 100, 250);
558 if(particle=="Hadron" || particle.Contains("CTS"))
560 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
561 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
564 ConfigureMC(ana,simu);
566 if(print) ic ->Print("");
567 if(print) ana->Print("");
574 //________________________________________
575 AliAnaCalorimeterQA* ConfigureQAAnalysis(TString calorimeter = "EMCAL", Bool_t simu = kFALSE, Int_t debug = -1, Bool_t print = kFALSE)
578 AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
579 ana->SetDebug(debug); //10 for lots of messages
580 ana->SetCalorimeter(calorimeter);
582 ana->SetTimeCut(-1e10,1e10); // Open time cut
583 ana->SwitchOffCorrelation();
585 // Study exotic clusters PHOS and EMCAL
586 ana->SwitchOffStudyBadClusters() ;
589 ana->SwitchOffFiducialCut();
590 ana->SwitchOffFillAllTH3Histogram();
591 ana->SwitchOffFillAllPositionHistogram();
592 ana->SwitchOffFillAllPositionHistogram2();
593 ana->SwitchOffStudyBadClusters();
594 ana->SwitchOffStudyClustersAsymmetry();
595 ana->SwitchOffStudyWeight();
596 ana->SwitchOnFillAllTrackMatchingHistogram();
597 ana->SwitchOnFillAllCellTimeHisto() ;
600 ana->AddToHistogramsName("QA_"); //Begining of histograms name
601 SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
603 ConfigureMC(ana,simu);
605 if(print) ana->Print("");
611 //___________________________________________________________________________________
612 AliAnaChargedParticles* ConfigureChargedAnalysis(Bool_t simulation, Int_t debugLevel)
615 AliAnaChargedParticles *ana = new AliAnaChargedParticles();
616 ana->SetDebug(debugLevel); //10 for lots of messages
621 ana->SwitchOnFiducialCut();
622 ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
624 ana->SwitchOffFillVertexBC0Histograms() ;
625 //if(!simulation) ana->SwitchOnFillPileUpHistograms();
627 // Input / output delta AOD settings
629 ana->SetOutputAODName(Form("Hadron%s",kAnaIsoPhotonName.Data()));
630 ana->SetOutputAODClassName("AliAODPWG4Particle");
631 ana->SetInputAODName(Form("Hadron%s",kAnaIsoPhotonName.Data()));
633 //Set Histograms name tag, bins and ranges
635 ana->AddToHistogramsName("AnaHadrons_");
636 SetHistoRangeAndNBins(ana->GetHistogramRanges(),""); // see method below
638 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
639 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
641 if(debugLevel > 0) ana->Print("");
647 //________________________________________________________
648 void ConfigureMC(AliAnaCaloTrackCorrBaseClass* ana, Bool_t simu = kFALSE)
650 if(simu) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
651 else ana->SwitchOffDataMC() ;
653 //Set here generator name, default pythia
654 //ana->GetMCAnalysisUtils()->SetMCGenerator("");
657 //________________________________________________________
658 void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges, TString calorimeter = "EMCAL")
660 // Set common bins for all analysis and MC histograms filling
662 histoRanges->SetHistoPtRangeAndNBins(-0.25, 99.75, 200) ; // Energy and pt histograms
664 if(calorimeter=="EMCAL")
667 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
668 histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
669 histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
671 histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
675 histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
676 histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
679 histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
681 // Invariant mass histoRangeslysis
682 histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
683 histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
685 // check if time calibration is on
686 histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
687 histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
689 // track-cluster residuals
690 histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
691 histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
692 histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
694 // QA, electron, charged
695 histoRanges->SetHistoPOverERangeAndNBins(0, 2.5 ,500);
696 histoRanges->SetHistodEdxRangeAndNBins (0.,250.0,500);
699 histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
700 histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
701 histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
702 histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
703 histoRanges->SetHistoZRangeAndNBins(-400,400,200);
704 histoRanges->SetHistoRRangeAndNBins(400,450,25);
705 histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
706 histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
707 histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
711 //_____________________________
712 UInt_t SetTriggerMaskFromName(TString trigger)
716 printf("CaloTrackCorr trigger EMC7\n");
717 return AliVEvent::kEMC7;
719 else if (trigger=="INT7")
721 printf("CaloTrackCorr trigger INT7\n");
722 return AliVEvent::kINT7;
724 else if(trigger=="EMC1")
726 printf("CaloTrackCorr trigger EMC1\n");
727 return AliVEvent::kEMC1;
729 else if(trigger=="MB")
731 printf("CaloTrackCorr trigger MB\n");
732 return AliVEvent::kMB;
734 else if(trigger=="PHOS")
736 printf("CaloTrackCorr trigger PHOS\n");
737 return AliVEvent::kPHI7;
739 else if(trigger=="PHOSPb")
741 printf("CaloTrackCorr trigger PHOSPb\n");
742 return AliVEvent::kPHOSPb;
744 else if(trigger=="AnyINT")
746 printf("CaloTrackCorr trigger AnyINT\n");
747 return AliVEvent::kAnyINT;
749 else if(trigger=="INT")
751 printf("CaloTrackCorr trigger AnyINT\n");
752 return AliVEvent::kAny;
754 else if(trigger=="EMCEGA")
756 printf("CaloTrackCorr trigger EMC Gamma\n");
757 return AliVEvent::kEMCEGA;
759 else if(trigger=="EMCEJE")
761 printf("CaloTrackCorr trigger EMC Jet\n");
762 return AliVEvent::kEMCEJE;
764 else if(trigger=="Central")
766 printf("CaloTrackCorr trigger Central\n");
767 return (AliVEvent::kCentral | AliVEvent::kMB);
769 else if(trigger=="CentralEGA")
771 printf("CaloTrackCorr trigger Central+EMCEGA\n");
772 return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
774 else if(trigger=="SemiCentral")
776 printf("CaloTrackCorr trigger SemiCentral\n");
777 return (AliVEvent::kSemiCentral | AliVEvent::kMB);
779 else if(trigger=="SemiOrCentral")
781 printf("CaloTrackCorr trigger SemiCentral Or Central\n");
782 return (AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kMB);