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 = ""; // MC or deltaAOD
14 TString kInputDataType = "ESD";
15 TString kCalorimeter = "EMCAL";
17 Bool_t kRecalTM = kTRUE;
23 Bool_t kHadronAN = kFALSE;
24 Bool_t kCalibE = kTRUE;
25 Bool_t kCalibT = kTRUE;
26 Bool_t kBadMap = kTRUE;
27 Bool_t kTender = kFALSE;
29 Int_t kRunNumber = -1;
31 AliAnalysisTaskCaloTrackCorrelation *AddTaskCaloTrackCorr(const TString data = "",
32 const TString calorimeter = "EMCAL",
33 const Bool_t simulation = kFALSE,
34 const Bool_t eventsel = kFALSE,
35 const Bool_t exotic = kTRUE,
36 const Bool_t nonlin = kFALSE,
37 TString outputfile = "",
38 const Int_t year = 2010,
39 const TString col = "pp",
40 const TString trigger = "MB",
41 const TString clustersArray = "V1",
42 const Bool_t mix = kTRUE,
43 const Bool_t recaltm = kTRUE,
44 const Bool_t tm = kTRUE,
45 const Int_t minCen = -1,
46 const Int_t maxCen = -1,
47 const Bool_t qaan = kFALSE,
48 const Bool_t hadronan = kFALSE,
49 const Bool_t calibE = kTRUE,
50 const Bool_t badmap = kTRUE,
51 const Bool_t calibT = kTRUE,
52 const Bool_t tender = kFALSE,
53 const Bool_t outputAOD = kFALSE,
54 const Bool_t printSettings = kFALSE,
55 const Double_t scaleFactor = -1,
56 const Int_t runNumber = -1
59 // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
61 kPrint = printSettings;
62 kSimulation = simulation;
66 kNonLinearity = nonlin;
68 kClusterArray = clustersArray;
70 kCalorimeter = calorimeter;
71 kOutputAOD = outputAOD;
76 kEventSelection= eventsel;
84 kRunNumber = runNumber;
86 // Get the pointer to the existing analysis manager via the static access method.
88 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
91 ::Error("AddTask", "No analysis manager to connect to.");
95 // Check the analysis type using the event handlers connected to the analysis manager.
97 if (!mgr->GetInputEventHandler())
99 ::Error("AddTask", "This task requires an input event handler");
103 kInputDataType = "AOD";
104 if(!kData.Contains("delta"))
105 kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
109 kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
110 if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
113 cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
115 // Name for containers
117 kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM);
119 if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
121 printf("<<<< NAME: %s >>>>>\n",kName.Data());
123 // #### Configure analysis ####
125 AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
127 maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
129 // General frame setting and configuration
130 maker->SetReader (ConfigureReader() );
131 maker->SetCaloUtils(ConfigureCaloUtils());
133 // Analysis tasks setting and configuration
134 Int_t n = 0;//Analysis number, order is important
136 // Isolation settings
137 Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
138 Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ;
144 maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
146 // Invariant mass analysis Put here to tag selected photons as decay
147 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
148 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, invariant mass and photon tagging from decay
151 maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,cone, pth), n++); // Photon isolation
152 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kFALSE), n++); // Gamma hadron correlation
153 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated gamma hadron correlation
154 //maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,kTRUE), n++); // Photon multi isolation, leave it the last
157 // Split cluster analysis
158 if(kCalorimeter == "EMCAL")
160 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, cluster splitting
161 maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,cone, pth), n++); // Pi0 isolation, cluster splits
162 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kFALSE), n++); // Pi0 hadron correlation
163 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
164 //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, split cluster
165 //maker->AddAnalysis(ConfigureInClusterIMAnalysis(0.5,3), n++);
168 // Invariant mass analysis
169 maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, and photon tagging from decay
170 maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,cone, pth), n++); // Pi0 isolation, invariant mass
171 maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SideBand", partInCone,thresType,cone, pth), n++); // Pi0 isolation, side band
172 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kFALSE), n++); // Pi0 hadron correlation
173 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
174 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kFALSE), n++); // Pi0 hadron correlation
175 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
176 //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, invariant mass, leave it the last
180 maker->AddAnalysis(ConfigureChargedAnalysis(), n++); // track selection
181 maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
182 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kFALSE), n++); // track-track correlation
183 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
184 //maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",partInCone,thresType,kTRUE), n++);// Hadron multi isolation
187 // Analysis with ghost triggers, only for Min Bias like events
188 if( kTrig.Contains("INT") || kTrig.Contains("Central") || kTrig.Contains("MB") )
190 maker->AddAnalysis(ConfigureRandomTriggerAnalysis(), n++);
191 maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,cone, pth), n++); // Ghost trigger isolation
192 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kFALSE), n++); // Ghost trigger hadron correlation
193 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated ghost hadron correlation
194 //maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,kTRUE), n++); // Ghost multi isolation
198 maker->AddAnalysis(ConfigureRandomTriggerAnalysis("CTS"), n++); // track selection
199 maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
200 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kFALSE), n++); // track-track correlation
201 maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
202 //maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,kTRUE), n++); // Ghost multi isolation
206 if(kQA) maker->AddAnalysis(ConfigureQAAnalysis(),n++);
208 maker->SetAnaDebug(kDebug) ;
209 maker->SwitchOnHistogramsMaker() ;
210 if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
211 else maker->SwitchOnAODsMaker() ;
213 if(kPrint) maker->Print("");
215 printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
219 AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
220 task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
221 task->SetDebugLevel(kDebug);
222 task->SetBranches("ESD:AliESDRun.,AliESDHeader");
223 task->SetAnalysisMaker(maker);
228 if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
230 AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
231 AliAnalysisManager::kOutputContainer,
232 Form("%s",outputfile.Data()));
234 AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(),
235 AliAnalysisManager::kParamContainer,
236 "AnalysisParameters.root");
238 // Create ONLY the output containers for the data produced by the task.
239 // Get and connect other common input/output containers via the manager as below
240 //==============================================================================
241 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
242 // AOD output slot will be used in a different way in future
243 if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
244 mgr->ConnectOutput (task, 1, cout_pc);
245 mgr->ConnectOutput (task, 2, cout_cuts);
249 UInt_t mask = SetTriggerMaskFromName();
250 task->SelectCollisionCandidates(mask);
256 //____________________________________
257 AliCaloTrackReader * ConfigureReader()
260 AliCaloTrackReader * reader = 0;
261 if (kInputDataType == "ESD"&& kData=="MC" )
262 reader = new AliCaloTrackMCReader();
263 else if(kInputDataType=="AOD" || kData.Contains("AOD"))
264 reader = new AliCaloTrackAODReader();
265 else if(kInputDataType=="ESD")
266 reader = new AliCaloTrackESDReader();
268 printf("AliCaloTrackReader::ConfigureReader() - Data combination not known kData=%s, kInputData=%s\n",kData.Data(),kInputDataType.Data());
270 reader->SetDebug(kDebug);//10 for lots of messages
273 // Event rejection cuts for jet-jet simulations
274 reader->SetPtHardAndJetPtComparison(kTRUE);
275 reader->SetPtHardAndJetPtFactor(4);
277 reader->SetPtHardAndClusterPtComparison(kTRUE);
278 reader->SetPtHardAndClusterPtFactor(1.5);
282 //reader->SetDeltaAODFileName("");
283 if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
287 if(kInputDataType == "ESD"){
288 reader->SwitchOnStack();
289 reader->SwitchOffAODMCParticles();
291 else if(kInputDataType == "AOD"){
292 reader->SwitchOffStack();
293 reader->SwitchOnAODMCParticles();
297 //------------------------
298 // Detector input filling
299 //------------------------
301 //Min cluster/track E
302 reader->SetEMCALEMin(0.3);
303 reader->SetEMCALEMax(1000);
304 reader->SetPHOSEMin(0.3);
305 reader->SetPHOSEMax(1000);
306 reader->SetCTSPtMin(0.2);
307 reader->SetCTSPtMax(1000);
312 reader->SwitchOffUseTrackTimeCut();
313 reader->SwitchOffUseParametrizedTimeCut();
314 reader->SwitchOffUseEMCALTimeCut();
315 reader->SetEMCALTimeCut(-1000,1000); // Open time cut
321 printf("Set time cut parameters for run %d\n",kRunNumber);
322 reader->SwitchOnUseEMCALTimeCut();
323 reader->SwitchOnUseParametrizedTimeCut();
326 reader->SetEMCALTimeCut(-20,20);
329 if (kRunNumber >= 151636 && kRunNumber <= 155384 )
331 printf("Set time parameters for LHC11c");
332 reader->SetEMCALParametrizedMinTimeCut(0,-5 ); reader->SetEMCALParametrizedMinTimeCut(1,-1 ); reader->SetEMCALParametrizedMinTimeCut(2, 1.87); reader->SetEMCALParametrizedMinTimeCut(3, 0.4);
333 reader->SetEMCALParametrizedMaxTimeCut(0, 3.5); reader->SetEMCALParametrizedMaxTimeCut(1, 50); reader->SetEMCALParametrizedMaxTimeCut(2, 0.15); reader->SetEMCALParametrizedMaxTimeCut(3, 1.6);
335 else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
337 printf("Set time parameters for LHC11d");
338 reader->SetEMCALParametrizedMinTimeCut(0,-5); reader->SetEMCALParametrizedMinTimeCut(1,-1 ); reader->SetEMCALParametrizedMinTimeCut(2, 3.5 ); reader->SetEMCALParametrizedMinTimeCut(3, 1. );
339 reader->SetEMCALParametrizedMaxTimeCut(0, 5); reader->SetEMCALParametrizedMaxTimeCut(1, 50); reader->SetEMCALParametrizedMaxTimeCut(2, 0.45); reader->SetEMCALParametrizedMaxTimeCut(3, 1.25);
343 reader->SwitchOffUseParametrizedTimeCut();
348 reader->SwitchOffUseParametrizedTimeCut();
349 reader->SwitchOffUseEMCALTimeCut();
350 reader->SetEMCALTimeCut(-1000,1000); // Open time cut
354 reader->SwitchOnFiducialCut();
355 reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
358 reader->SwitchOnCTS();
359 if(kInputDataType=="ESD")
361 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
362 AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
363 reader->SetTrackCuts(esdTrackCuts);
364 reader->SwitchOnConstrainTrackToVertex();
366 else if(kInputDataType=="AOD")
368 reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
369 //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
370 //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
375 reader->SetEMCALClusterListName(kClusterArray);
376 if(kClusterArray == "" && !kTender)
378 printf("**************** Standard EMCAL clusters branch analysis **************** \n");
379 reader->SwitchOnClusterRecalculation();
380 // Check in ConfigureCaloUtils that the recalibration and bad map are ON
384 printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
385 reader->SwitchOffClusterRecalculation();
388 //if(kCalorimeter == "EMCAL") {
389 reader->SwitchOnEMCALCells();
390 reader->SwitchOnEMCAL();
392 //if(kCalorimeter == "PHOS") {
393 reader->SwitchOnPHOSCells();
394 reader->SwitchOnPHOS();
397 // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
398 if(kData.Contains("delta"))
400 reader->SwitchOffEMCAL();
401 reader->SwitchOffPHOS();
402 reader->SwitchOffEMCALCells();
403 reader->SwitchOffPHOSCells();
410 //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
412 // For mixing with AliAnaParticleHadronCorrelation switch it off
415 reader->SwitchOffEventTriggerAtSE();
416 UInt_t mask = SetTriggerMaskFromName();
417 reader->SetEventTriggerMaks(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
418 //reader->SetMixEventTriggerMaks(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
419 reader->SetMixEventTriggerMaks(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
421 printf("---Trigger selection done in AliCaloTrackReader!!!\n");
424 reader->SwitchOnEventTriggerAtSE();
426 reader->SetZvertexCut(10.); // Open cut
427 reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
431 reader->SwitchOnEventSelection(); // remove pileup by default
432 reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
436 reader->SwitchOffEventSelection(); // remove pileup by default
437 reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
440 if(kCollisions=="PbPb")
443 reader->SetCentralityClass("V0M");
444 reader->SetCentralityOpt(10); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
445 reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
447 // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
448 reader->SetEventPlaneMethod("V0");
451 if (kYears==2010) reader->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2010.root");
452 else if(kYears==2011) reader->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root");
453 else reader->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2012.root");
455 if(kPrint) reader->Print("");
461 //_______________________________________
462 AliCalorimeterUtils* ConfigureCaloUtils()
465 AliCalorimeterUtils *cu = new AliCalorimeterUtils;
466 cu->SetDebug(kDebug);
468 // Remove clusters close to borders, at least max energy cell is 1 cell away
469 cu->SetNumberOfCellsFromEMCALBorder(1);
470 cu->SetNumberOfCellsFromPHOSBorder(2);
472 // Search of local maxima in cluster
473 if(kCollisions=="pp")
475 cu->SetLocalMaximaCutE(0.1);
476 cu->SetLocalMaximaCutEDiff(0.03);
480 cu->SetLocalMaximaCutE(0.2);
481 cu->SetLocalMaximaCutEDiff(0.03);
484 cu->SwitchOffClusterPlot();
486 if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
487 else cu->SwitchOffRecalculateClusterTrackMatching();
489 cu->SwitchOnBadChannelsRemoval() ;
494 cu->SwitchOnLoadOwnEMCALGeometryMatrices();
496 AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
500 cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
501 cu->SwitchOnRunDepCorrection();
504 gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
505 ConfigureEMCALRecoUtils(recou,
515 printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
516 cu->SwitchOnCorrectClusterLinearity();
519 printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
520 printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
524 cu->SwitchOffLoadOwnPHOSGeometryMatrices();
526 if(kPrint) cu->Print("");
532 //_____________________________________
533 AliAnaPhoton* ConfigurePhotonAnalysis()
536 AliAnaPhoton *ana = new AliAnaPhoton();
537 ana->SetDebug(kDebug); //10 for lots of messages
539 // cluster selection cuts
541 ana->SwitchOffFiducialCut();
543 ana->SetCalorimeter(kCalorimeter);
545 if(kCalorimeter == "PHOS")
547 ana->SetNCellCut(2);// At least 3 cells
549 ana->SetMinDistanceToBadChannel(2, 4, 5);
550 ana->SetTimeCut(-2000,2000); // open cut
554 ana->SetNCellCut(1);// At least 2 cells
555 ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
556 ana->SetMaxEnergy(1000);
557 ana->SetTimeCut(-1000,1000); // open cut, usual time window of [425-825] ns if time recalibration is off
558 // restrict to less than 100 ns when time calibration is on
559 ana->SetMinDistanceToBadChannel(2, 4, 6);
561 // NLM cut, used in all, exclude clusters with more than 2 maxima
562 // Not needed if M02 cut is already strong or clusterizer V2
563 ana->SetNLMCut(1, 2) ;
568 ana->SwitchOnTrackMatchRejection() ;
569 ana->SwitchOffTMHistoFill() ;
573 ana->SwitchOffTrackMatchRejection() ;
574 ana->SwitchOnTMHistoFill() ;
577 //PID cuts (shower shape)
578 ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
579 AliCaloPID* caloPID = ana->GetCaloPID();
580 //Not used in bayesian
583 caloPID->SetEMCALLambda0CutMax(0.27);
584 caloPID->SetEMCALLambda0CutMin(0.10);
586 caloPID->SetEMCALDEtaCut(0.025);
587 caloPID->SetEMCALDPhiCut(0.030);
590 caloPID->SetPHOSDispersionCut(2.5);
591 caloPID->SetPHOSRCut(2.);
592 if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
594 ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection
595 ana->SwitchOffFillPileUpHistograms();
597 // Input / output delta AOD settings
599 if(!kData.Contains("delta"))
601 ana->SetOutputAODName(Form("Photon%s",kName.Data()));
602 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
603 //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
605 else ana->SetInputAODName(Form("Photon%s",kName.Data()));
607 //Set Histograms name tag, bins and ranges
609 ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
610 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
612 // Number of particle type MC histograms
613 ana->FillNOriginHistograms(20);
614 ana->FillNPrimaryHistograms(20);
618 if(kPrint) ana->Print("");
624 //________________________________________________________________________________
625 AliAnaElectron* ConfigureElectronAnalysis()
628 AliAnaElectron *ana = new AliAnaElectron();
629 ana->SetDebug(kDebug); //10 for lots of messages
631 if(kCalorimeter == "PHOS")
633 ana->SetNCellCut(2);// At least 2 cells
635 ana->SetMinDistanceToBadChannel(2, 4, 5);
639 ana->SetNCellCut(1);// At least 2 cells
640 ana->SetMinPt(0.5); // no effect minium EMCAL cut.
642 //ana->SetTimeCut(400,900);// Time window of [400-900] ns
643 ana->SetMinDistanceToBadChannel(2, 4, 6);
646 //Electron selection cuts with tracks
647 ana->SetEOverP(0.85, 1.2);
648 // TO DO, find a more suitable way to set this
651 ana->SetdEdxCut(76, 85);
655 ana->SetdEdxCut(56, 64);
658 ana->SetCalorimeter(kCalorimeter);
660 ana->SwitchOnCaloPID();
662 AliCaloPID* caloPID = ana->GetCaloPID();
664 caloPID->SetEMCALLambda0CutMax(0.27);
665 caloPID->SetEMCALLambda0CutMin(0.10);
667 ana->SwitchOffFillShowerShapeHistograms();
668 ana->SwitchOffFillWeightHistograms() ;
669 ana->SwitchOffFiducialCut();
671 //ana->FillAODWithHadrons();
673 if(!kData.Contains("delta"))
675 ana->SetOutputAODName(Form("Electron%s",kName.Data()));
676 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
678 else ana->SetInputAODName(Form("Electron%s",kName.Data()));
680 //Set Histograms name tag, bins and ranges
682 ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
683 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
687 if(kPrint) ana->Print("");
693 //__________________________________________________________________________________________
694 AliAnaRandomTrigger* ConfigureRandomTriggerAnalysis(TString detector = "")
697 AliAnaRandomTrigger *ana = new AliAnaRandomTrigger();
698 ana->SetDebug(kDebug); //10 for lots of messages
700 if(detector=="") detector = kCalorimeter;
701 ana->SetDetector(detector);
707 if (detector=="EMCAL")
709 ana->SetEtaCut(-0.71,0.71);
710 ana->SetPhiCut(100*TMath::DegToRad(), 160*TMath::DegToRad());
712 else if(detector=="PHOS")
714 ana->SetEtaCut(-0.13,0.13);
715 ana->SetPhiCut(260*TMath::DegToRad(), 320*TMath::DegToRad());
717 else if(detector=="CTS")
719 ana->SetEtaCut(-0.9,0.9);
720 ana->SetPhiCut(0, TMath::TwoPi());
724 if(!kData.Contains("delta"))
726 ana->SetOutputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
727 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
730 ana->SetInputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
732 printf("Set RandomTrigger%s%s\n",detector.Data(),kName.Data());
734 //Set Histograms name tag, bins and ranges
736 ana->AddToHistogramsName(Form("AnaRandomTrigger%s_",detector.Data()));
738 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
742 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
743 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
746 if(kPrint) ana->Print("");
752 //__________________________________________________________________________________________
753 AliAnaInsideClusterInvariantMass* ConfigureInClusterIMAnalysis(Float_t l0min, Float_t l0max)
755 AliAnaInsideClusterInvariantMass *ana = new AliAnaInsideClusterInvariantMass();
756 ana->SetDebug(kDebug); //10 for lots of messages
760 ana->SetMinEnergy(5);
761 ana->SetMaxEnergy(200.);
762 ana->SetMinNCells(3);
763 ana->SetM02Cut(l0min,l0max);
764 ana->SetCalorimeter(kCalorimeter);
766 //ana->AddToHistogramsName(Form("AnaInClusterIM_%1.2f_%1.2f_",l0min,l0max));
767 ana->AddToHistogramsName("AnaInClusterIM_");
769 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
771 AliCaloPID* caloPID = ana->GetCaloPID();
772 caloPID->SetEMCALDEtaCut(0.025);
773 caloPID->SetEMCALDPhiCut(0.030);
774 caloPID->SetClusterSplittingM02Cut(0,100); // Do the selection in the analysis class and not in the PID method to fill SS histograms
776 caloPID->SetPi0MassRange(0.11, 0.18);
777 caloPID->SetEtaMassRange(0.40, 0.60);
778 caloPID->SetPhotonMassRange(0.00, 0.08);
782 if(kPrint) ana->Print("");
788 //_______________________________________________
789 AliAnaChargedParticles* ConfigureChargedAnalysis()
792 AliAnaChargedParticles *ana = new AliAnaChargedParticles();
793 ana->SetDebug(kDebug); //10 for lots of messages
798 ana->SwitchOnFiducialCut();
799 ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
800 ana->SwitchOffFillPileUpHistograms();
802 // Input / output delta AOD settings
804 if(!kData.Contains("delta"))
806 ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
807 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
808 //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
811 ana->SetInputAODName(Form("Hadron%s",kName.Data()));
812 printf("Set Hadron%s\n",kName.Data());
813 //Set Histograms name tag, bins and ranges
815 ana->AddToHistogramsName("AnaHadrons_");
816 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
818 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
819 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
823 if(kPrint) ana->Print("");
830 //_______________________________
831 AliAnaPi0* ConfigurePi0Analysis()
834 AliAnaPi0 *ana = new AliAnaPi0();
836 ana->SetDebug(kDebug);//10 for lots of messages
838 // Input delta AOD settings
839 ana->SetInputAODName(Form("Photon%s",kName.Data()));
841 // Calorimeter settings
842 ana->SetCalorimeter(kCalorimeter);
843 if(kCalorimeter=="PHOS") ana->SetNumberOfModules(3); //PHOS first year
846 if (kYears == 2010) ana->SetNumberOfModules( 4); // EMCAL first year
847 else if(kYears == 2011) ana->SetNumberOfModules(10); // Second year
848 else ana->SetNumberOfModules(12);
851 //settings for pp collision mixing
852 ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
855 if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(70);
857 if (kCollisions=="pp" )
859 ana->SetNCentrBin(1);
860 ana->SetNZvertBin(10);
862 ana->SetNMaxEvMix(100);
863 ana->SwitchOnSMCombinations();
865 else if(kCollisions=="PbPb")
867 ana->SetNCentrBin(10);
868 ana->SetNZvertBin(10);
870 ana->SetNMaxEvMix(10);
871 ana->SwitchOffSMCombinations();
874 ana->SwitchOffMultipleCutAnalysis();
876 //Set Histograms name tag, bins and ranges
878 ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
879 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
883 if(kPrint) ana->Print("");
889 //_____________________________________________________
890 AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle,
894 AliAnaPi0EbE *ana = new AliAnaPi0EbE();
895 ana->SetDebug(kDebug);//10 for lots of messages
897 ana->SetAnalysisType(analysis);
899 if(analysis==AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
900 if(analysis==AliAnaPi0EbE::kSSCalo) opt = "SS";
902 if(kCollisions=="pp") ana->SetMinPt(0.5);
903 else ana->SetMinPt(1.0);
905 if(kCalorimeter=="EMCAL")ana->SetPairTimeCut(20); // More strict than in pi0 inv mass analysis
907 ana->SetCalorimeter(kCalorimeter);
909 // Input / output delta AOD settings
911 ana->SetInputAODName(Form("Photon%s",kName.Data()));
912 if(!kInputDataType.Contains("delta"))
914 ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
915 ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
918 ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
920 if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
922 if(analysis!=AliAnaPi0EbE::kSSCalo)
924 AliNeutralMesonSelection *nms = ana->GetNeutralMesonSelection();
925 nms->SetParticle(particle);
927 // Tighten a bit mass cut with respect to default window
928 if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
929 if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
931 nms->SwitchOffAngleSelection();
932 if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
933 nms->SetSideBandCutRanges(-1,0,0.180,0.220);
935 nms->KeepNeutralMesonSelectionHistos(kTRUE);
936 //nms->SetAngleMaxParam(2,0.2);
937 nms->SetHistoERangeAndNBins(0, 20, 80) ;
938 //nms->SetHistoIMRangeAndNBins(0, 1, 400);
941 { // cluster splitting settings
942 ana->SetMinEnergy(5);
943 ana->SetMaxEnergy(200.);
944 ana->SetTimeCut(-1000,1000); // Open time cut
946 // NLM cut, used in all, exclude clusters with more than 2 maxima
947 ana->SetNLMCut(1, 2) ;
949 AliCaloPID* caloPID = ana->GetCaloPID();
950 caloPID->SetPi0MassRange(0.10, 0.18);
951 caloPID->SetEtaMassRange(0.40, 0.60);
952 caloPID->SetPhotonMassRange(0.00, 0.08);
953 caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
956 ana->SwitchOffSelectedClusterHistoFill();
957 ana->SwitchOffFillWeightHistograms();
958 ana->SwitchOffFillPileUpHistograms();
960 if(!kTM) ana->SwitchOnTMHistoFill();
961 else ana->SwitchOffTMHistoFill();
963 //Set Histograms name tag, bins and ranges
965 ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
966 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
970 if(kPrint) ana->Print("");
976 //____________________________________________________________________________________________________
977 AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString particle="Photon",
978 Int_t partInCone = AliIsolationCut::kOnlyCharged,
979 Int_t thresType = AliIsolationCut::kSumPtFracIC,
982 Bool_t multi = kFALSE)
985 AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
986 //ana->SetDebug(kDebug);
987 ana->SetDebug(kDebug);
989 ana->SwitchOnFiducialCut();
990 //Avoid borders of EMCal
991 if(kCalorimeter=="EMCAL")
992 ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
994 // Same Eta as EMCal, cut in phi if EMCAL was triggering
995 if(particle=="Hadron" || particle.Contains("CTS"))
997 // if(kTrig.Contains("EMC"))
998 // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1000 ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1005 // Input / output delta AOD settings
1007 ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1008 ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kName.Data()));
1010 ana->SetCalorimeter(kCalorimeter);
1012 if(!kTM) ana->SwitchOnTMHistoFill();
1013 else ana->SwitchOffTMHistoFill();
1015 ana->SwitchOffSSHistoFill();
1016 ana->SwitchOffFillPileUpHistograms();
1018 //Do settings for main isolation cut class
1019 AliIsolationCut * ic = ana->GetIsolationCut();
1020 ic->SetDebug(kDebug);
1022 if(cone >0 && pth > 0)
1024 ic->SetPtThreshold(pth);
1025 ic->SetConeSize(cone);
1029 if(kCollisions=="pp")
1031 ic->SetPtThreshold(0.5);
1032 ic->SetConeSize(0.4);
1034 if(kCollisions=="PbPb")
1036 ic->SetPtThreshold(3.);
1037 //ic->SetPtThreshold(1.);
1038 ic->SetConeSize(0.3);
1042 ic->SetPtFraction(0.1);
1043 ic->SetSumPtThreshold(1.0) ;
1044 ic->SetParticleTypeInCone(partInCone);
1045 ic->SetICMethod(thresType);
1047 //Do or not do isolation with previously produced AODs.
1048 //No effect if use of SwitchOnSeveralIsolation()
1049 ana->SwitchOffReIsolation();
1054 ic->SetConeSize(1.); // Take all for first iteration
1055 ic->SetPtThreshold(100);// Take all for first iteration
1056 ana->SwitchOnSeveralIsolation() ;
1057 ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),kTM));
1060 ana->SetNPtThresFrac(4);
1061 ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
1062 ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
1063 ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
1064 ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
1065 ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
1067 ana->SwitchOffTMHistoFill();
1068 ana->SwitchOffSSHistoFill();
1071 ana->SwitchOffSeveralIsolation() ;
1073 AliCaloPID* caloPID = ana->GetCaloPID();
1074 caloPID->SetEMCALDEtaCut(0.025);
1075 caloPID->SetEMCALDPhiCut(0.030);
1077 //Set Histograms name tag, bins and ranges
1079 if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),kTM));
1080 else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),kTM));
1082 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1084 ana->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
1085 ana->SetHistoPtSumRangeAndNBins (0, 100, 250);
1087 if(particle=="Hadron" || particle.Contains("CTS"))
1089 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1090 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1095 if(kPrint) ic ->Print("");
1096 if(kPrint) ana->Print("");
1102 //___________________________________________________________________________________
1103 AliAnaParticleHadronCorrelation* ConfigureHadronCorrelationAnalysis(TString particle,
1105 Int_t partInCone = AliIsolationCut::kOnlyCharged,
1106 Int_t thresType = AliIsolationCut::kSumPtFracIC,
1111 AliAnaParticleHadronCorrelation *ana = new AliAnaParticleHadronCorrelation();
1112 ana->SetDebug(kDebug);
1114 ana->SetMinimumTriggerPt(5);
1115 ana->SetAssociatedPtRange(0.2,100);
1116 ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
1118 ana->SetNAssocPtBins(9);
1120 ana->SetAssocPtBinLimit(0, 0.2) ;
1121 ana->SetAssocPtBinLimit(1, 0.5) ;
1122 ana->SetAssocPtBinLimit(2, 1) ;
1123 ana->SetAssocPtBinLimit(3, 2) ;
1124 ana->SetAssocPtBinLimit(4, 3) ;
1125 ana->SetAssocPtBinLimit(5, 4) ;
1126 ana->SetAssocPtBinLimit(6, 6) ;
1127 ana->SetAssocPtBinLimit(7, 10) ;
1128 ana->SetAssocPtBinLimit(8, 30) ;
1129 ana->SetAssocPtBinLimit(9, 200) ;
1131 ana->SelectIsolated(bIsolated); // do correlation with isolated photons
1135 //Do settings for main isolation cut class
1136 AliIsolationCut * ic = ana->GetIsolationCut();
1137 ic->SetDebug(kDebug);
1139 if(cone >0 && pth > 0)
1141 ic->SetPtThreshold(pth);
1142 ic->SetConeSize(cone);
1146 if(kCollisions=="pp")
1148 ic->SetPtThreshold(0.5);
1149 ic->SetConeSize(0.4);
1151 if(kCollisions=="PbPb")
1153 ic->SetPtThreshold(3.);
1154 //ic->SetPtThreshold(1.);
1155 ic->SetConeSize(0.3);
1159 ic->SetPtFraction(0.1);
1160 ic->SetSumPtThreshold(1.0) ;
1161 ic->SetParticleTypeInCone(partInCone);
1162 ic->SetICMethod(thresType);
1166 ana->SwitchOnAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
1167 ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
1169 // Mixing with own pool
1172 ana->SwitchOnOwnMix();
1173 ana->SwitchOnFillNeutralInMixedEvent();
1176 ana->SwitchOffOwnMix();
1178 ana->SetNZvertBin(20);
1180 if(kCollisions=="pp")
1182 ana->SetNMaxEvMix(100);
1183 ana->SwitchOnTrackMultBins();
1184 ana->SetNCentrBin(9); // Fixed track mult values
1189 ana->SetNMaxEvMix(10);
1190 ana->SwitchOffTrackMultBins(); // centrality bins
1191 ana->SetNCentrBin(3);
1193 if(kName.Contains("60_90"))
1195 printf("*** Set mixing for peripheral\n");
1196 ana->SetNMaxEvMix(50);
1197 ana->SetNCentrBin(2);
1201 ana->SwitchOnFiducialCut();
1203 //Avoid borders of EMCal, same as for isolation
1204 if(kCalorimeter=="EMCAL")
1205 ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1207 // Same Eta as EMCal, cut in phi if EMCAL was triggering
1208 if(particle=="Hadron" || particle.Contains("CTS"))
1210 //if(kTrig.Contains("EMC"))
1211 // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1213 ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1216 // Input / output delta AOD settings
1218 ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1219 ana->SetAODObjArrayName(Form("%sHadronCorrIso%d_%s",particle.Data(),bIsolated,kName.Data()));
1221 // Fill extra plots on tagged decay photons
1222 // If trigger is pi0/eta found with invariant mass, get the decays
1223 // If trigger is photon, check if it was tagged as decay previously
1224 if(particle!="Hadron" )
1226 if(particle.Contains("Pi0") || particle.Contains("Eta"))
1228 ana->SwitchOffPi0TriggerDecayCorr();
1229 ana->SwitchOffDecayTriggerDecayCorr();
1233 ana->SwitchOffPi0TriggerDecayCorr();
1234 ana->SwitchOnDecayTriggerDecayCorr(); // Make sure pi0 decay tagging runs before this task
1239 ana->SwitchOffPi0TriggerDecayCorr();
1240 ana->SwitchOffDecayTriggerDecayCorr();
1243 if(particle=="Photon")
1245 printf("**** SET M02 limits *** \n");
1246 ana->SetM02Cut(0.1,0.27);
1249 // if triggering on PHOS and EMCAL is on
1250 //if(kCalorimeter=="PHOS") ana->SwitchOnNeutralCorr();
1251 ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
1253 ana->SwitchOffHMPIDCorrelation();
1255 ana->SwitchOffFillBradHistograms();
1258 ana->SwitchOffEventSelection();
1259 ana->SwitchOnSeveralUECalculation();
1260 ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
1261 ana->SetMultiBin(1);
1263 //Set Histograms name tag, bins and ranges
1265 ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,kTM));
1266 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1268 if(particle=="Hadron" || particle.Contains("CTS"))
1270 ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1271 ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1276 if(kPrint) ana->Print("");
1282 //________________________________________
1283 AliAnaCalorimeterQA* ConfigureQAAnalysis()
1286 AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
1287 ana->SetDebug(kDebug); //10 for lots of messages
1288 ana->SetCalorimeter(kCalorimeter);
1290 ana->SetTimeCut(-1000,1000); // Open time cut
1292 // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
1293 if(kCalorimeter=="PHOS" && kTrig=="PHOS")
1294 ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1295 if(kCalorimeter=="EMCAL" && kClusterArray=="")
1296 ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1298 ana->SwitchOffCorrelation();
1300 // Study exotic clusters PHOS and EMCAL
1301 if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
1302 else ana->SwitchOffStudyBadClusters() ;
1305 ana->SwitchOffFiducialCut();
1306 ana->SwitchOffFillAllTH3Histogram();
1307 ana->SwitchOffFillAllPositionHistogram();
1308 ana->SwitchOffFillAllPositionHistogram2();
1309 if(!kExotic)ana->SwitchOnStudyBadClusters();
1310 else ana->SwitchOffStudyBadClusters();
1311 ana->SwitchOffStudyClustersAsymmetry();
1312 ana->SwitchOffStudyWeight();
1313 ana->SwitchOnFillAllTrackMatchingHistogram();
1314 ana->SwitchOnFillAllCellTimeHisto() ;
1316 if(kCalorimeter=="EMCAL")
1318 if (kYears==2010) ana->SetNumberOfModules(4);
1319 else if(kYears==2011) ana->SetNumberOfModules(10);
1320 else ana->SetNumberOfModules(12);
1324 ana->SetNumberOfModules(3);
1327 ana->AddToHistogramsName("QA_"); //Begining of histograms name
1328 SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1332 if(kPrint) ana->Print("");
1338 //________________________________________________________
1339 void ConfigureMC(AliAnaCaloTrackCorrBaseClass* ana)
1341 if(kSimulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
1342 else ana->SwitchOffDataMC() ;
1344 //Set here generator name, default pythia
1345 //ana->GetMCAnalysisUtils()->SetMCGenerator("");
1348 //________________________________________________________
1349 void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges)
1351 // Set common bins for all analysis and MC histograms filling
1353 histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
1355 if(kCalorimeter=="EMCAL")
1359 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
1360 histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
1361 histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
1363 else if(kYears==2011)
1365 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
1366 histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
1367 histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
1371 histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 190*TMath::DegToRad(), 122) ;
1372 histoRanges->SetHistoXRangeAndNBins(-100,90,200); // QA
1373 histoRanges->SetHistoYRangeAndNBins(50,450,100); // QA
1376 histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
1380 histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
1381 histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
1384 histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
1386 // Invariant mass histoRangeslysis
1387 histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
1388 histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
1390 // check if time calibration is on
1391 histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
1392 histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
1394 // track-cluster residuals
1395 histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
1396 histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
1397 histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
1399 // QA, electron, charged
1400 histoRanges->SetHistoPOverERangeAndNBins(0,10.,100);
1401 histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
1404 histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
1405 histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
1406 histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
1407 histoRanges->SetHistoNClusterCellRangeAndNBins(0,500,500);
1408 histoRanges->SetHistoZRangeAndNBins(-400,400,200);
1409 histoRanges->SetHistoRRangeAndNBins(400,450,25);
1410 histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
1411 histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
1412 histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
1416 //_____________________________
1417 UInt_t SetTriggerMaskFromName()
1421 printf("CaloTrackCorr trigger EMC7\n");
1422 return AliVEvent::kEMC7;
1424 else if (kTrig=="INT7")
1426 printf("CaloTrackCorr trigger INT7\n");
1427 return AliVEvent::kINT7;
1429 else if(kTrig=="EMC1")
1431 printf("CaloTrackCorr trigger EMC1\n");
1432 return AliVEvent::kEMC1;
1434 else if(kTrig=="MB")
1436 printf("CaloTrackCorr trigger MB\n");
1437 return AliVEvent::kMB;
1439 else if(kTrig=="PHOS")
1441 printf("CaloTrackCorr trigger PHOS\n");
1442 return AliVEvent::kPHI7;
1444 else if(kTrig=="PHOSPb")
1446 printf("CaloTrackCorr trigger PHOSPb\n");
1447 return AliVEvent::kPHOSPb;
1449 else if(kTrig=="AnyINT")
1451 printf("CaloTrackCorr trigger AnyINT\n");
1452 return AliVEvent::kAnyINT;
1454 else if(kTrig=="INT")
1456 printf("CaloTrackCorr trigger AnyINT\n");
1457 return AliVEvent::kAny;
1459 else if(kTrig=="EMCEGA")
1461 printf("CaloTrackCorr trigger EMC Gamma\n");
1462 return AliVEvent::kEMCEGA;
1464 else if(kTrig=="EMCEJE")
1466 printf("CaloTrackCorr trigger EMC Jet\n");
1467 return AliVEvent::kEMCEJE;
1469 else if(kTrig=="Central")
1471 printf("CaloTrackCorr trigger Central\n");
1472 return AliVEvent::kCentral;
1474 else if(kTrig=="SemiCentral")
1476 printf("CaloTrackCorr trigger SemiCentral\n");
1477 return AliVEvent::kSemiCentral;
1479 else if(kTrig=="SemiOrCentral")
1481 printf("CaloTrackCorr trigger SemiCentral Or Central\n");
1482 return (AliVEvent::kSemiCentral | AliVEvent::kCentral);