2 Bool_t kPrint = kFALSE;
3 Bool_t kSimulation = kFALSE;
4 Bool_t kUseKinematics = kFALSE;
5 Bool_t kOutputAOD = kFALSE;
6 Bool_t kEventSelection= kFALSE;
7 Bool_t kExotic = kTRUE;
8 Bool_t kNonLinearity = kFALSE;
10 TString kCollisions = "pp";
11 TString kTrig = "EMC7" ;
12 TString kClusterArray = "";
13 TString kData = "ESD";
14 TString kInputDataType = "ESD";
15 TString kCalorimeter = "EMCAL";
17 Bool_t kRecalTM = kTRUE;
23 Bool_t kCalibE = kTRUE;
24 Bool_t kCalibT = kTRUE;
25 Bool_t kBadMap = kTRUE;
27 AliAnalysisTaskCaloTrackCorrelation *AddTaskShowerShapeStudies(const TString data = "AOD",
28 const TString calorimeter = "EMCAL",
29 const Bool_t simulation = kFALSE,
30 const Bool_t eventsel = kFALSE,
31 const Bool_t exotic = kTRUE,
32 const Bool_t nonlin = kFALSE,
33 TString outputfile = "",
34 const Int_t year = 2011,
35 const TString col = "pp",
36 const TString trigger = "MB",
37 const TString clustersArray = "V1",
38 const Bool_t recaltm = kTRUE,
39 const Bool_t tm = kTRUE,
40 const Int_t minCen = -1,
41 const Int_t maxCen = -1,
42 const Bool_t qaan = kFALSE,
43 const Bool_t calibE = kTRUE,
44 const Bool_t badmap = kTRUE,
45 const Bool_t calibT = kTRUE,
46 const Bool_t outputAOD = kFALSE,
47 const Bool_t printSettings = kFALSE
50 // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
52 kPrint = printSettings;
53 kSimulation = simulation;
57 kNonLinearity = nonlin;
59 kClusterArray = clustersArray;
61 kCalorimeter = calorimeter;
62 kOutputAOD = outputAOD;
67 kEventSelection= eventsel;
73 // Get the pointer to the existing analysis manager via the static access method.
75 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
78 ::Error("AddTask", "No analysis manager to connect to.");
82 // Check the analysis type using the event handlers connected to the analysis manager.
84 if (!mgr->GetInputEventHandler())
86 ::Error("AddTask", "This task requires an input event handler");
90 kInputDataType = "AOD";
91 if(!kData.Contains("delta"))
92 kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
96 kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
97 if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
100 cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
102 // Name for containers
104 kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM);
106 if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
108 printf("<<<< NAME: %s >>>>>\n",kName.Data());
110 // #### Configure analysis ####
112 AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
114 // General frame setting and configuration
115 maker->SetReader (ConfigureReader() );
116 maker->SetCaloUtils(ConfigureCaloUtils());
118 // Analysis tasks setting and configuration
119 Int_t n = 0;//Analysis number, order is important
121 maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
122 maker->AddAnalysis(ConfigureElectronAnalysis(),n++); // Electron cluster selection
123 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, and photon tagging from decay
124 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, and photon tagging from decay
126 if(kCalorimeter=="EMCAL")
128 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, and photon tagging from decay
129 maker->AddAnalysis(ConfigureInClusterIMAnalysis(0.5,100), n++);
132 if(kQA) maker->AddAnalysis(ConfigureQAAnalysis(),n++);
134 maker->SetAnaDebug(kDebug) ;
135 maker->SwitchOnHistogramsMaker() ;
136 if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
137 else maker->SwitchOnAODsMaker() ;
139 if(kPrint) maker->Print("");
141 printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
143 //kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kFALSE);
144 kName = Form("%s_Trig%s_Cl%s",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data());
145 if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
149 AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
150 task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
151 task->SetDebugLevel(kDebug);
152 task->SetBranches("ESD:AliESDRun.,AliESDHeader");
153 task->SetAnalysisMaker(maker);
158 if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
160 AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
161 AliAnalysisManager::kOutputContainer,
162 Form("%s",outputfile.Data()));
164 AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Cuts_%s",kName.Data()), TList::Class(),
165 AliAnalysisManager::kParamContainer,
166 Form("%s",outputfile.Data()));
168 // Create ONLY the output containers for the data produced by the task.
169 // Get and connect other common input/output containers via the manager as below
170 //==============================================================================
171 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
172 // AOD output slot will be used in a different way in future
173 if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
174 mgr->ConnectOutput (task, 1, cout_pc);
175 mgr->ConnectOutput (task, 2, cout_cuts);
180 printf("CaloTrackCorr trigger EMC7\n");
181 task->SelectCollisionCandidates(AliVEvent::kEMC7);
183 else if (kTrig=="INT7")
185 printf("CaloTrackCorr trigger INT7\n");
186 task->SelectCollisionCandidates(AliVEvent::kINT7);
188 else if(kTrig=="EMC1")
190 printf("CaloTrackCorr trigger EMC1\n");
191 task->SelectCollisionCandidates(AliVEvent::kEMC1);
195 printf("CaloTrackCorr trigger MB\n");
196 task->SelectCollisionCandidates(AliVEvent::kMB);
198 else if(kTrig=="PHOS")
200 printf("CaloTrackCorr trigger PHOS\n");
201 task->SelectCollisionCandidates(AliVEvent::kPHI7);
203 else if(kTrig=="PHOSPb")
205 printf("CaloTrackCorr trigger PHOSPb\n");
206 task->SelectCollisionCandidates(AliVEvent::kPHOSPb);
208 else if(kTrig=="AnyINT")
210 printf("CaloTrackCorr trigger AnyINT\n");
211 task->SelectCollisionCandidates(AliVEvent::kAnyINT);
213 else if(kTrig=="INT")
215 printf("CaloTrackCorr trigger AnyINT\n");
216 task->SelectCollisionCandidates(AliVEvent::kAny);
218 else if(kTrig=="EMCEGA")
220 printf("CaloTrackCorr trigger EMC Gamma\n");
221 task->SelectCollisionCandidates(AliVEvent::kEMCEGA);
223 else if(kTrig=="EMCEJE")
225 printf("CaloTrackCorr trigger EMC Jet\n");
226 task->SelectCollisionCandidates(AliVEvent::kEMCEJE);
228 else if(kTrig=="Central")
230 printf("CaloTrackCorr trigger Central\n");
231 task->SelectCollisionCandidates(AliVEvent::kCentral);
233 else if(kTrig=="SemiCentral")
235 printf("CaloTrackCorr trigger SemiCentral\n");
236 task->SelectCollisionCandidates(AliVEvent::kSemiCentral);
242 //____________________________________
243 AliCaloTrackReader * ConfigureReader()
246 AliCaloTrackReader * reader = 0;
247 if (kData.Contains("AOD")) reader = new AliCaloTrackAODReader();
248 else if(kData=="ESD") reader = new AliCaloTrackESDReader();
249 else if(kData=="MC" &&
250 kInputDataType == "ESD") reader = new AliCaloTrackMCReader();
252 reader->SetDebug(kDebug);//10 for lots of messages
255 //reader->SetDeltaAODFileName("");
256 if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
260 if(kInputDataType == "ESD"){
261 reader->SwitchOnStack();
262 reader->SwitchOffAODMCParticles();
264 else if(kInputDataType == "AOD"){
265 reader->SwitchOffStack();
266 reader->SwitchOnAODMCParticles();
270 //------------------------
271 // Detector input filling
272 //------------------------
274 //Min cluster/track E
275 reader->SetEMCALEMin(0.3);
276 reader->SetEMCALEMax(1000);
277 reader->SetPHOSEMin(0.3);
278 reader->SetPHOSEMax(1000);
279 reader->SetCTSPtMin(0.1);
280 reader->SetCTSPtMax(1000);
282 if(!kSimulation && kCalibT) reader->SetEMCALTimeCut(-30,30);
283 else reader->SetEMCALTimeCut(-1000,1000); // Open time cut
285 reader->SwitchOnFiducialCut();
286 reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
288 // Tracks (do not filter tracks for SS studies)
289 reader->SwitchOffCTS();
291 if(kInputDataType=="ESD")
293 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
294 AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
295 reader->SetTrackCuts(esdTrackCuts);
297 else if(kInputDataType=="AOD")
299 reader->SetTrackFilterMask(128); // Filter bit, not mask
304 reader->SetEMCALClusterListName(kClusterArray);
305 if(kClusterArray == "")
307 printf("**************** Standard EMCAL clusters branch analysis **************** \n");
308 reader->SwitchOnClusterRecalculation();
309 // Check in ConfigureCaloUtils that the recalibration and bad map are ON
313 printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
314 reader->SwitchOffClusterRecalculation();
317 if(kCalorimeter == "EMCAL")
319 reader->SwitchOnEMCALCells();
320 reader->SwitchOnEMCAL();
322 if(kCalorimeter == "PHOS")
324 reader->SwitchOnPHOSCells();
325 reader->SwitchOnPHOS();
328 // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
329 if(kData.Contains("delta"))
331 reader->SwitchOffEMCAL();
332 reader->SwitchOffPHOS();
333 reader->SwitchOffEMCALCells();
334 reader->SwitchOffPHOSCells();
341 //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
343 reader->SetZvertexCut(10.);
347 reader->SwitchOnPileUpEventRejection(); // remove pileup by default
348 reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
349 reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
353 reader->SwitchOffPileUpRejection(); // remove pileup by default
354 reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
355 reader->SwitchOffPrimaryVertexSelection(); // and besides primary vertex
358 if(kCollisions=="PbPb")
361 reader->SetCentralityClass("V0M");
362 reader->SetCentralityOpt(10); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
363 reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
365 // Event plane (only used in AliAnaPi0 for the moment)
366 reader->SetEventPlaneMethod("Q");
369 if(kPrint) reader->Print("");
375 //_______________________________________
376 AliCalorimeterUtils* ConfigureCaloUtils()
379 AliCalorimeterUtils *cu = new AliCalorimeterUtils;
380 cu->SetDebug(kDebug);
382 // Remove clusters close to borders, at least max energy cell is 1 cell away
383 cu->SetNumberOfCellsFromEMCALBorder(1);
384 cu->SetNumberOfCellsFromPHOSBorder(2);
386 // Search of local maxima in cluster
387 if(kCollisions=="pp")
389 cu->SetLocalMaximaCutE(0.1);
390 cu->SetLocalMaximaCutEDiff(0.03);
394 cu->SetLocalMaximaCutE(0.2);
395 cu->SetLocalMaximaCutEDiff(0.03);
398 cu->SwitchOffClusterPlot();
400 if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
401 else cu->SwitchOffRecalculateClusterTrackMatching();
403 cu->SwitchOnBadChannelsRemoval() ;
408 cu->SwitchOnLoadOwnEMCALGeometryMatrices();
410 AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
413 cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
416 gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
417 ConfigureEMCALRecoUtils(recou,
427 printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
428 cu->SwitchOnCorrectClusterLinearity();
431 printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
432 printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
435 if(kCalorimeter=="PHOS")
437 if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(3);
438 else cu->SetNumberOfSuperModulesUsed(4);
442 if (kYears == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
443 else if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(10);
444 else cu->SetNumberOfSuperModulesUsed(20);
448 cu->SwitchOffLoadOwnPHOSGeometryMatrices();
450 if(kPrint) cu->Print("");
456 //_____________________________________
457 AliAnaPhoton* ConfigurePhotonAnalysis()
460 AliAnaPhoton *ana = new AliAnaPhoton();
461 ana->SetDebug(kDebug); //10 for lots of messages
463 // cluster selection cuts
465 ana->SwitchOffFiducialCut();
467 ana->SetCalorimeter(kCalorimeter);
469 if(kCalorimeter == "PHOS")
471 ana->SetNCellCut(2);// At least 3 cells
473 ana->SetMinDistanceToBadChannel(2, 4, 5);
474 ana->SetTimeCut(-2000,2000); // open cut
478 ana->SetNCellCut(1);// At least 2 cells
479 ana->SetMinEnergy(0.5); // avoid mip peak at E = 260 MeV
480 ana->SetMaxEnergy(1000);
481 ana->SetTimeCut(-1000,1000); // Open time cut
482 ana->SetMinDistanceToBadChannel(2, 4, 6);
487 ana->SwitchOnTrackMatchRejection() ;
488 ana->SwitchOffTMHistoFill() ;
492 ana->SwitchOffTrackMatchRejection() ;
493 ana->SwitchOnTMHistoFill() ;
496 //PID cuts (shower shape)
497 ana->SwitchOffCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
498 AliCaloPID* caloPID = ana->GetCaloPID();
501 caloPID->SetEMCALLambda0CutMax(0.27);
502 caloPID->SetEMCALLambda0CutMin(0.10);
504 caloPID->SetEMCALDEtaCut(0.025);
505 caloPID->SetEMCALDPhiCut(0.030);
508 caloPID->SetPHOSDispersionCut(2.5);
509 caloPID->SetPHOSRCut(2.);
510 if(kData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
512 ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
514 // Input / output delta AOD settings
516 if(!kData.Contains("delta"))
518 ana->SetOutputAODName(Form("Photon%s",kName.Data()));
519 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
520 //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
522 else ana->SetInputAODName(Form("Photon%s",kName.Data()));
524 //Set Histograms name tag, bins and ranges
526 ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
527 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
529 // Number of particle type MC histograms
530 ana->FillNOriginHistograms(8);
531 ana->FillNPrimaryHistograms(4);
535 if(kPrint) ana->Print("");
541 //________________________________________________________________________________
542 AliAnaElectron* ConfigureElectronAnalysis()
545 AliAnaElectron *ana = new AliAnaElectron();
546 ana->SetDebug(kDebug); //10 for lots of messages
548 ana->SwitchOnFillShowerShapeHistograms();
549 ana->SwitchOffFillWeightHistograms() ;
551 if(kCalorimeter == "PHOS")
553 ana->SetNCellCut(2);// At least 2 cells
555 ana->SetMinDistanceToBadChannel(2, 4, 5);
559 ana->SetNCellCut(1);// At least 2 cells
560 ana->SetMinPt(0.5); // no effect minimum EMCAL cut.
562 ana->SetMinDistanceToBadChannel(2, 4, 6);
563 ana->SetTimeCut(-1000,1000); // Open time cut
566 //Electron selection cuts with tracks
568 ana->SetEOverP(0.85, 1.2);
569 // TO DO, find a more suitable way to set this
572 ana->SetdEdxCut(76, 85);
576 ana->SetdEdxCut(56, 64);
579 ana->SetCalorimeter(kCalorimeter);
581 ana->SwitchOffCaloPID();
583 ana->SwitchOffFiducialCut();
585 if(!kData.Contains("delta"))
587 ana->SetOutputAODName(Form("Electron%s",kName.Data()));
588 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
590 else ana->SetInputAODName(Form("Electron%s",kName.Data()));
592 //Set Histograms name tag, bins and ranges
594 ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
595 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
599 if(kPrint) ana->Print("");
605 //__________________________________________________________________________________________
606 AliAnaInsideClusterInvariantMass* ConfigureInClusterIMAnalysis(Float_t l0min, Float_t l0max)
609 AliAnaInsideClusterInvariantMass *ana = new AliAnaInsideClusterInvariantMass();
610 ana->SetDebug(kDebug); //10 for lots of messages
614 ana->SetMinEnergy(5);
615 ana->SetMaxEnergy(200.);
616 ana->SetMinNCells(3);
617 ana->SetM02Cut(l0min,l0max);
618 ana->SetCalorimeter(kCalorimeter);
620 //ana->AddToHistogramsName(Form("AnaInClusterIM_%1.2f_%1.2f_",l0min,l0max));
621 ana->AddToHistogramsName("AnaInClusterIM_");
623 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
625 AliCaloPID* caloPID = ana->GetCaloPID();
626 caloPID->SetEMCALDEtaCut(0.025);
627 caloPID->SetEMCALDPhiCut(0.030);
628 caloPID->SetClusterSplittingM02Cut(0,100); // Do the selection in the analysis class and not in the PID method to fill SS histograms
630 caloPID->SetPi0MassRange(0.10, 0.18);
631 caloPID->SetEtaMassRange(0.40, 0.60);
632 caloPID->SetPhotonMassRange(0.00, 0.08);
636 if(kPrint) ana->Print("");
642 //_____________________________________________________
643 AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
647 AliAnaPi0EbE *ana = new AliAnaPi0EbE();
648 ana->SetDebug(kDebug);//10 for lots of messages
650 ana->SetAnalysisType(analysis);
652 if(analysis==AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
653 if(analysis==AliAnaPi0EbE::kSSCalo) opt = "SS";
657 if(kCalorimeter=="EMCAL")ana->SetPairTimeCut(15); // More strict than in pi0 inv mass analysis
659 ana->SetCalorimeter(kCalorimeter);
661 // Input / output delta AOD settings
663 ana->SetInputAODName(Form("Photon%s",kName.Data()));
664 if(!kInputDataType.Contains("delta"))
666 ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
667 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
670 ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
672 if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
674 if(analysis!=AliAnaPi0EbE::kSSCalo)
676 AliNeutralMesonSelection *nms = ana->GetNeutralMesonSelection();
677 nms->SetParticle(particle);
678 // Tighten a bit mass cut with respect to default window
679 if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
680 if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
682 nms->SwitchOnAngleSelection();
683 nms->KeepNeutralMesonSelectionHistos(kTRUE);
684 //nms->SetAngleMaxParam(2,0.2);
685 nms->SetHistoERangeAndNBins(0, 20, 80) ;
686 //nms->SetHistoIMRangeAndNBins(0, 1, 400);
689 { // cluster splitting settings
690 ana->SetTimeCut(-1000,1000); // Open time cut
691 AliCaloPID* caloPID = ana->GetCaloPID();
692 caloPID->SetPi0MassRange(0.10, 0.18);
693 caloPID->SetEtaMassRange(0.40, 0.60);
694 caloPID->SetPhotonMassRange(0.00, 0.08);
695 caloPID->SetClusterSplittingM02Cut(0.5,100); // Do the selection in the analysis class and not in the PID method to fill SS histograms
698 ana->SwitchOnSelectedClusterHistoFill(); // Shower shape et al.
699 ana->SwitchOffFillWeightHistograms();
701 if(!kTM) ana->SwitchOnTMHistoFill();
702 else ana->SwitchOffTMHistoFill();
704 //Set Histograms name tag, bins and ranges
706 ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
707 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
711 if(kPrint) ana->Print("");
717 //________________________________________
718 AliAnaCalorimeterQA* ConfigureQAAnalysis()
721 AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
722 ana->SetDebug(kDebug); //10 for lots of messages
723 ana->SetCalorimeter(kCalorimeter);
725 ana->SetTimeCut(-1000,1000); // Open time cut
727 // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
728 ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
730 // correlation between calorimeters, tracks, v0 ...
731 // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
732 if(kCalorimeter=="EMCAL" && kClusterArray=="") ana->SwitchOnCorrelation();
733 else ana->SwitchOffCorrelation();
735 // Study exotic clusters PHOS and EMCAL
736 if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
737 else ana->SwitchOffStudyBadClusters() ;
739 ana->SwitchOffFiducialCut();
740 ana->SwitchOffFillAllTH3Histogram();
741 ana->SwitchOffFillAllPositionHistogram();
742 ana->SwitchOffFillAllPositionHistogram2();
743 if(!kExotic)ana->SwitchOnStudyBadClusters();
744 else ana->SwitchOffStudyBadClusters();
745 ana->SwitchOffStudyClustersAsymmetry();
746 ana->SwitchOffStudyWeight();
747 ana->SwitchOnFillAllTrackMatchingHistogram();
749 ana->AddToHistogramsName("QA_"); //Begining of histograms name
750 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
754 if(kPrint) ana->Print("");
760 //________________________________________________________
761 void ConfigureMC(AliAnaCaloTrackCorrBaseClass* ana)
763 if(kSimulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
764 else ana->SwitchOffDataMC() ;
766 //Set here generator name, default pythia
767 //ana->GetMCAnalysisUtils()->SetMCGenerator("");
770 //________________________________________________________
771 void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges)
773 // Set common bins for all analysis and MC histograms filling
775 histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
777 if(kCalorimeter=="EMCAL")
781 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
782 histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
783 histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
785 else if(kYears==2011)
787 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
788 histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
789 histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
793 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 190*TMath::DegToRad(), 122) ;
794 histoRanges->SetHistoXRangeAndNBins(-100,90,200); // QA
795 histoRanges->SetHistoYRangeAndNBins(50,450,100); // QA
798 histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
802 histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
803 histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
806 histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
808 // Invariant mass histoRangeslysis
809 histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
810 histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
812 // check if time calibration is on
813 histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
814 histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
816 // track-cluster residuals
817 histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
818 histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
820 // QA, electron, charged
821 histoRanges->SetHistoPOverERangeAndNBins(0,10.,100);
822 histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
825 histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
826 histoRanges->SetHistodRRangeAndNBins(0.,TMath::Pi(),150);
827 histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
828 histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
829 histoRanges->SetHistoNClusterCellRangeAndNBins(0,500,500);
830 histoRanges->SetHistoZRangeAndNBins(-400,400,200);
831 histoRanges->SetHistoRRangeAndNBins(400,450,25);
832 histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
833 histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
834 histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);