AliPhysics  vAN-20150822 (d56cf94)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskGammaHadronCorrelation.C
Go to the documentation of this file.
1 //
21 //
95 //
97 //TString kAnaGammaHadronCorr = "";
98 //
129 //AliAnalysisTaskCaloTrackCorrelation * AddTaskGammaHadronCorrelation
130 //(
131 // TString calorimeter = "EMCAL",
132 // Bool_t simulation = kFALSE,
133 // Int_t year = 2011,
134 // TString col = "pp",
135 // TString trigger = "EMC7",
136 // Int_t rejectEMCTrig = 0,
137 // TString clustersArray = "",
138 // Bool_t tender = kFALSE,
139 // Bool_t nonLinOn = kFALSE,
140 // Float_t shshMax = 0.27,
141 // Float_t isoCone = 0.4,
142 // Float_t isoPtTh = 0.5,
143 // Int_t isoMethod = AliIsolationCut::kPtThresIC,
144 // Int_t isoContent = AliIsolationCut::kNeutralAndCharged,
145 // Int_t leading = 0,
146 // Bool_t tm = kTRUE,
147 // Int_t minCen = -1,
148 // Int_t maxCen = -1,
149 // Bool_t mixOn = kTRUE,
150 // Bool_t qaAn = kFALSE,
151 // Bool_t chargedAn = kFALSE,
152 // TString outputfile = "",
153 // Bool_t printSettings = kFALSE,
154 // Int_t debug = 0 // Debug level
155 // )
156 //
157 //{
158 // // Get the pointer to the existing analysis manager via the static access method.
159 //
160 // printf("Passed settings:\n calorimeter <%s>, simulation <%d>, year <%d>,\n col <%s>, trigger <%s>, reject EMC <%d>, clustersArray <%s>, tender <%d>, non linearity <%d>\n shshMax <%2.2f>, isoCone <%2.2f>, isoPtTh <%2.2f>, isoMethod <%d>,isoContent <%d>,\n leading <%d>, tm <%d>, minCen <%d>, maxCen <%d>, mixOn <%d>,\n qaAn <%d>, chargedAn <%d>, outputfile <%s>, printSettings <%d>, debug <%d>\n",
161 // calorimeter.Data(),simulation,year,col.Data(),trigger.Data(), rejectEMCTrig, clustersArray.Data(),tender, nonLinOn, shshMax,
162 // isoCone,isoPtTh,isoMethod,isoContent,leading,tm,
163 // minCen,maxCen,mixOn,qaAn,chargedAn,outputfile.Data(),printSettings,debug);
164 //
165 // AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
166 // if (!mgr)
167 // {
168 // ::Error("AddTask", "No analysis manager to connect to.");
169 // return NULL;
170 // }
171 //
172 // // Check the analysis type using the event handlers connected to the analysis manager.
173 //
174 // if (!mgr->GetInputEventHandler())
175 // {
176 // ::Error("AddTask", "This task requires an input event handler");
177 // return NULL;
178 // }
179 //
180 // // Make sure the B field is enabled for track selection, some cuts need it
181 // ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
182 //
183 // // Name for containers
184 //
185 // //kAnaGammaHadronCorr = Form("%s_Trig%s_Cl%s_TM%d_R%1.1f_Pt%1.1f",calorimeter.Data(), trigger.Data(),kClusterArray.Data(),tm,cone,pth);
186 // kAnaGammaHadronCorr = Form("GammaHadron_%s_Trig%s_Col_%s_Year%d_Cl%s_Ten%d_TM%d_M02_%1.2f_IsoParam_C%1.2fPt%1.2fM%dPa%d_Lead%d_Mix%d",
187 // calorimeter.Data(),trigger.Data(),col.Data(),year,clustersArray.Data(),tender,
188 // tm, shshMax,isoCone,isoPtTh,isoMethod,isoContent,leading,mixOn);
189 //
190 // if(col=="PbPb" && maxCen>=0) kAnaGammaHadronCorr+=Form("Cen%d_%d",minCen,maxCen);
191 //
192 // printf("<<<< NAME: %s >>>>>\n",kAnaGammaHadronCorr.Data());
193 //
194 // // #### Configure analysis ####
195 //
196 // AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
197 //
198 // // General frame setting and configuration
199 // maker->SetReader ( ConfigureReader (col,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,mixOn,printSettings,debug) );
200 // maker->SetCaloUtils( ConfigureCaloUtils(col,simulation,clustersArray,tender,nonLinOn,year, printSettings,debug) );
201 //
202 // // Analysis tasks setting and configuration
203 // Int_t n = 0;//Analysis number, order is important
204 //
205 // //
206 // // Photon analysis
207 // //
208 // maker->AddAnalysis(ConfigurePhotonAnalysis(col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Photon cluster selection
209 //
210 //
211 // maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0" , AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
212 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
213 //
214 // maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta" , AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
215 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Eta event by event selection, invariant mass and photon tagging from decay
216 //
217 // maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
218 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Pi0 out of peak event by event selection, and photon tagging from decay
219 //
220 // maker->AddAnalysis(ConfigurePi0EbEAnalysis("EtaSideBand", AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
221 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Eta out of peak event by event selection, and photon tagging from decay
222 //
223 //
224 // maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", leading, isoContent,isoMethod,isoCone,isoPtTh, kFALSE,
225 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Photon isolation
226 //
227 //
228 // maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon", leading, kFALSE, shshMax, isoContent,isoMethod,isoCone,isoPtTh, mixOn,
229 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Gamma-hadron correlation
230 //
231 // maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon", leading, kTRUE, shshMax, isoContent,isoMethod,isoCone,isoPtTh, mixOn,
232 // col,simulation,calorimeter,year,tm,printSettings,debug) , n++); // Isolated gamma hadron correlation
233 //
234 // //
235 // // Merged pi0 analysis
236 // //
237 // maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo,kTRUE,kTRUE,
238 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Pi0 event by event selection, cluster splitting
239 //
240 // maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", leading, isoContent,isoMethod,isoCone,isoPtTh, kFALSE,
241 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Pi0 isolation, cluster splits
242 //
243 //
244 // maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS", leading, kFALSE, shshMax, isoContent,isoMethod,isoCone,isoPtTh, mixOn,
245 // col,simulation,calorimeter,year,tm,printSettings,debug), n++); // Pi0-hadron correlation
246 //
247 // maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS", leading, kTRUE, shshMax, isoContent,isoMethod,isoCone,isoPtTh, mixOn,
248 // col,simulation,calorimeter,year,tm,printSettings,debug) , n++); // Isolated pi0-hadron correlation
249 //
250 // // Check the generated kinematics
251 // if(simulation) maker->AddAnalysis(ConfigureGenKineAnalysis(isoMethod,isoCone,isoPtTh,
252 // col,simulation,calorimeter,year,printSettings,debug), n++);
253 //
254 // // Charged analysis
255 // if(chargedAn) maker->AddAnalysis(ConfigureChargedAnalysis(simulation,printSettings,debug), n++); // track selection checks
256 //
257 // // Calo QA
258 // if(qaAn) maker->AddAnalysis(ConfigureQAAnalysis(col,simulation,calorimeter,year,printSettings,debug) , n++);
259 //
260 // maker->SetAnaDebug(debug) ;
261 //
262 // maker->SwitchOnHistogramsMaker() ;
263 // maker->SwitchOnAODsMaker() ;
264 //
265 // if( simulation || !trigger.Contains("EMC") ) maker->SwitchOffDataControlHistograms();
266 //
267 // if(printSettings) maker->Print("");
268 //
269 // printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
270 //
271 // // Create task
272 //
273 // AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("%s",kAnaGammaHadronCorr.Data()));
274 //
275 // task->SetDebugLevel(debug);
276 //
277 // //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
278 // //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
279 //
280 // task->SetAnalysisMaker(maker);
281 //
282 // mgr->AddTask(task);
283 //
284 // //Create containers
285 //
286 // if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
287 //
288 // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaGammaHadronCorr, TList::Class(),
289 // AliAnalysisManager::kOutputContainer,
290 // Form("%s",outputfile.Data()));
291 //
292 // AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaGammaHadronCorr.Data()), TList::Class(),
293 // AliAnalysisManager::kParamContainer,
294 // "AnalysisParameters.root");
295 //
296 // // Create ONLY the output containers for the data produced by the task.
297 // // Get and connect other common input/output containers via the manager as below
298 // //==============================================================================
299 // mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
300 // //if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
301 // mgr->ConnectOutput (task, 1, cout_pc);
302 // mgr->ConnectOutput (task, 2, cout_cuts);
303 //
304 // if(!mixOn)
305 // {
306 // UInt_t mask = SetTriggerMaskFromName(trigger);
307 // task->SelectCollisionCandidates(mask);
308 // }
309 //
310 // return task;
311 //}
312 //
316 //AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation,
317 // TString clustersArray, Bool_t tender,
318 // TString calorimeter, Bool_t nonLinOn,
319 // TString trigger, Bool_t rejectEMCTrig,
320 // Int_t minCen, Int_t maxCen,
321 // Bool_t mixOn, Bool_t printSettings,
322 // Int_t debug )
323 //{
324 // // Get the data type ESD or AOD
325 // AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
326 // TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
327 //
328 // AliCaloTrackReader * reader = 0;
329 // if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
330 // else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
331 // else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
332 //
333 // reader->SetDebug(debug);//10 for lots of messages
334 //
335 // //
336 // // MC settings
337 // //
338 // // Check if kine stack is available, independent of request of simulation
339 // Bool_t useKinematics = kFALSE;
340 // useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
341 //
342 // if(simulation)
343 // {
344 // if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
345 // }
346 //
347 // if(useKinematics)
348 // {
349 // if(inputDataType == "ESD")
350 // {
351 // reader->SwitchOnStack();
352 // reader->SwitchOffAODMCParticles();
353 // }
354 // else if(inputDataType == "AOD")
355 // {
356 // reader->SwitchOffStack();
357 // reader->SwitchOnAODMCParticles();
358 // }
359 // }
360 //
361 // // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
362 // // reject some special events that bother the cross section
363 // if(simulation)
364 // {
365 // // Event rejection cuts for jet-jet simulations, do not use in other
366 // reader->SetPtHardAndJetPtComparison(kTRUE);
367 // reader->SetPtHardAndJetPtFactor(4);
368 //
369 // reader->SetPtHardAndClusterPtComparison(kTRUE);
370 // reader->SetPtHardAndClusterPtFactor(1.5);
371 // }
372 //
373 // //------------------------
374 // // Detector input filling
375 // //------------------------
376 //
377 // //Min cluster/track E
378 // reader->SetEMCALEMin(0.3);
379 // reader->SetEMCALEMax(1000);
380 // reader->SetPHOSEMin(0.3);
381 // reader->SetPHOSEMax(1000);
382 // reader->SetCTSPtMin(0.2);
383 // reader->SetCTSPtMax(1000);
384 //
385 // reader->SwitchOffRecalculateVertexBC();
386 // reader->SwitchOffVertexBCEventSelection();
387 //
388 // // Shower shape smearing
389 // // Set it in the train configuration page not here for the moment
395 //
396 // //
397 // // Tracks
398 // //
399 // reader->SwitchOnCTS();
400 //
401 // reader->SwitchOffUseTrackTimeCut();
402 // reader->SetTrackTimeCut(0,50);
403 //
404 // reader->SwitchOnFiducialCut();
405 // reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
406 //
407 // reader->SwitchOffUseTrackDCACut();
408 // //reader->SetTrackDCACut(0,0.0105);
409 // //reader->SetTrackDCACut(1,0.035);
410 // //reader->SetTrackDCACut(2,1.1);
411 //
412 // if(inputDataType=="ESD")
413 // {
414 // gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
415 //
416 // //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
417 // //reader->SetTrackCuts(esdTrackCuts);
418 //
419 // AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
420 // reader->SetTrackCuts(esdTrackCuts);
421 // AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
422 // reader->SetTrackComplementaryCuts(esdTrackCuts2);
423 //
424 // reader->SwitchOnConstrainTrackToVertex();
425 // }
426 // else if(inputDataType=="AOD")
427 // {
428 // reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
429 // reader->SwitchOnAODTrackSharedClusterSelection();
430 // reader->SetTrackStatus(AliVTrack::kITSrefit);
431 //
432 // //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
433 // //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
434 // //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
435 // }
436 //
437 // //
438 // // Calorimeter
439 // //
440 // if(clustersArray == "" && !tender)
441 // {
442 // printf("**************** Standard EMCAL clusters branch analysis **************** \n");
443 // reader->SwitchOnClusterRecalculation();
444 // // Check in ConfigureCaloUtils that the recalibration and bad map are ON
445 // }
446 // else
447 // {
448 // printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
449 // reader->SetEMCALClusterListName(clustersArray);
450 // reader->SwitchOffClusterRecalculation();
451 // }
452 //
453 // // Time cuts
454 // reader->SwitchOffUseParametrizedTimeCut();
455 // if(simulation)
456 // {
457 // reader->SwitchOffUseEMCALTimeCut();
458 // reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
459 // }
460 // else
461 // {
462 // reader->SwitchOnUseEMCALTimeCut();
463 // reader->SetEMCALTimeCut(-25,20);
464 // }
465 //
466 // // CAREFUL
467 // if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
468 // else reader->SwitchOffClusterELinearityCorrection();
469 //
470 // if(calorimeter == "EMCAL")
471 // {
472 // reader->SwitchOnEMCALCells();
473 // reader->SwitchOnEMCAL();
474 // }
475 //
476 // if(calorimeter == "PHOS")
477 // { // Should be on if QA is activated with correlation on
478 // reader->SwitchOnPHOSCells();
479 // reader->SwitchOnPHOS();
480 // }
481 //
482 // //-----------------
483 // // Event selection
484 // //-----------------
485 //
486 // //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
487 //
488 // // Event triggered by EMCal selection settings
489 // reader->SwitchOffTriggerPatchMatching();
490 // reader->SwitchOffBadTriggerEventsRemoval();
491 //
492 // if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
493 // {
494 // printf("=== Remove bad triggers === \n");
495 // reader->SwitchOnTriggerPatchMatching();
496 // reader->SwitchOnBadTriggerEventsRemoval();
497 //
514 //
515 // if(clustersArray != "" || tender)
516 // {
517 // printf("Trigger cluster calibration OFF\n");
518 // reader->SwitchOffTriggerClusterTimeRecal() ;
519 // }
520 //
521 // }
522 //
523 // //reader->RejectFastClusterEvents() ;
524 //
525 // // For mixing with AliAnaParticleHadronCorrelation switch it off
526 // reader->SwitchOnEventTriggerAtSE(); // on is default case
527 // if(mixOn)
528 // {
529 // reader->SwitchOffEventTriggerAtSE();
530 // UInt_t mask = SetTriggerMaskFromName(trigger);
531 // reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
532 // //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
533 // reader->SetMixEventTriggerMask(AliVEvent::kINT7); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
534 //
535 // printf("---Trigger selection done in AliCaloTrackReader!!!\n");
536 // }
537 //
538 // reader->SetZvertexCut(10.); // Open cut
539 // reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
540 // reader->SwitchOnRejectNoTrackEvents();
541 //
542 // reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
543 // reader->SwitchOffPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
544 //
545 // if(col=="PbPb")
546 // {
547 // // Centrality
548 // reader->SetCentralityClass("V0M");
549 // reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
550 // reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
551 // reader->SwitchOnAcceptOnlyHIJINGLabels();
552 // // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
553 // reader->SetEventPlaneMethod("V0");
554 // }
555 //
556 // if(printSettings) reader->Print("");
557 //
558 // return reader;
559 //}
560 //
564 //AliCalorimeterUtils* ConfigureCaloUtils(TString col, Bool_t simulation,
565 // TString clustersArray, Bool_t tender,
566 // Bool_t nonLinOn, Int_t year,
567 // Bool_t printSettings, Int_t debug)
568 //{
569 // AliCalorimeterUtils *cu = new AliCalorimeterUtils;
570 //
571 // cu->SetDebug(debug);
572 //
573 // // Remove clusters close to borders, at least max energy cell is 1 cell away
574 // cu->SetNumberOfCellsFromEMCALBorder(1);
575 // cu->SetNumberOfCellsFromPHOSBorder (2);
576 //
577 // cu->SetNumberOfSuperModulesUsed(10);
578 //
579 // if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
580 // else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
581 // else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
582 // else cu->SetNumberOfSuperModulesUsed(10);
583 //
584 // printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
585 //
586 // // Search of local maxima in cluster
587 // if(col=="pp")
588 // {
589 // cu->SetLocalMaximaCutE(0.1);
590 // cu->SetLocalMaximaCutEDiff(0.03);
591 // }
592 // else
593 // {
594 // cu->SetLocalMaximaCutE(0.2);
595 // cu->SetLocalMaximaCutEDiff(0.03);
596 // }
597 //
598 // cu->SwitchOffRecalculateClusterTrackMatching();
599 //
600 // cu->SwitchOnBadChannelsRemoval() ;
601 //
602 // // EMCAL settings
603 //
604 // if(!simulation)
605 // cu->SwitchOnLoadOwnEMCALGeometryMatrices();
606 //
607 // AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
608 //
609 // // calibrations
610 // Bool_t calibEner = kFALSE;
611 // Bool_t calibTime = kFALSE;
612 // cu->SwitchOffRecalibration();
613 // cu->SwitchOffRunDepCorrection();
614 //
615 // if( !tender )
616 // {
617 // cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
618 // cu->SwitchOnRunDepCorrection();
619 //
620 // calibEner = kTRUE;
621 // calibTime = kTRUE;
622 // }
623 //
624 // if( simulation )
625 // {
626 // calibEner = kFALSE;
627 // calibTime = kFALSE;
628 //
629 // cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
630 // cu->SwitchOffRunDepCorrection();
631 // }
632 //
633 // gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
634 // ConfigureEMCALRecoUtils(recou,
635 // simulation,
636 // kTRUE, // exotic
637 // nonLinOn, // Non linearity
638 // calibEner, // E calib
639 // kTRUE, // bad map
640 // calibTime); // time calib
641 //
642 // if( calibTime ) recou->SetExoticCellDiffTimeCut(50);
643 //
644 // if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
645 //
646 // printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
647 // printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
648 //
649 // // PHOS
650 // cu->SwitchOffLoadOwnPHOSGeometryMatrices();
651 //
652 // if(printSettings) cu->Print("");
653 //
654 // return cu;
655 //}
656 //
661 //AliAnaPhoton* ConfigurePhotonAnalysis(TString col, Bool_t simulation,
662 // TString calorimeter, Int_t year, Int_t tm,
663 // Bool_t printSettings, Int_t debug)
664 //{
665 // AliAnaPhoton *ana = new AliAnaPhoton();
666 //
667 // // cluster selection cuts
668 //
669 // ana->SwitchOnRealCaloAcceptance();
670 //
671 // ana->SwitchOffFiducialCut();
672 //
673 // ana->SetCalorimeter(calorimeter);
674 //
675 // ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
676 //
677 // //if(!simulation) ana->SwitchOnFillPileUpHistograms();
678 //
679 // if(tm) ana->SwitchOnTrackMatchRejection() ;
680 // else ana->SwitchOffTrackMatchRejection() ;
681 //
682 // ana->SwitchOnTMHistoFill() ;
683 //
684 // if(calorimeter == "PHOS")
685 // {
686 // ana->SetNCellCut(2);// At least 3 cells
687 // ana->SetMinPt(0.3);
688 // ana->SetMinDistanceToBadChannel(2, 4, 5);
689 // ana->SetTimeCut(-1e10,1e10); // open cut
690 // }
691 // else
692 // {//EMCAL
693 // ana->SetNCellCut(1);// At least 2 cells
694 // ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
695 // ana->SetMaxEnergy(100);
696 // ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
697 // // restrict to less than 100 ns when time calibration is on
698 // ana->SetMinDistanceToBadChannel(2, 4, 6);
699 //
700 // // NLM cut, used in all, exclude clusters with more than 2 maxima
701 // // Not needed if M02 cut is already strong or clusterizer V2
702 // ana->SetNLMCut(1, 2) ;
703 // }
704 //
705 // //PID cuts (shower shape)
706 // ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
707 // AliCaloPID* caloPID = ana->GetCaloPID();
708 // //Not used in bayesian
709 //
710 // // EMCAL
711 //
712 // //caloPID->SetEMCALLambda0CutMax(0.27);
713 // caloPID->SetEMCALLambda0CutMax(10); // open, full shower shape needed for isolation studies
714 // caloPID->SetEMCALLambda0CutMin(0.10);
715 //
716 // // Track matching
717 // caloPID->SetEMCALDEtaCut(0.025);
718 // caloPID->SetEMCALDPhiCut(0.030);
719 //
720 // // PHOS
721 // caloPID->SetPHOSDispersionCut(2.5);
722 // caloPID->SetPHOSRCut(2.);
723 // //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
724 //
725 // // Branch AOD settings
726 // ana->SetOutputAODName(Form("PhotonTrigger_%s",kAnaGammaHadronCorr.Data()));
727 // ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
728 //
729 // //Set Histograms name tag, bins and ranges
730 // ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
731 //
732 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
733 //
734 // if(ana->GetFirstSMCoveredByTRD() > 0)
735 // printf(">>> Set first SM covered by TRD, SM=%d <<< year %d \n", ana->GetFirstSMCoveredByTRD(),year);
736 //
737 // // Number of particle type MC histograms
738 // ana->FillNOriginHistograms (14); // 14 max
739 // ana->FillNPrimaryHistograms(6); // 6 max
740 //
741 // return ana;
742 //}
743 //
748 //AliAnaPi0EbE* ConfigurePi0EbEAnalysis(TString particle, Int_t analysis,
749 // Bool_t useSSIso, Bool_t useAsy,
750 // TString col, Bool_t simulation,
751 // TString calorimeter, Int_t year, Int_t tm,
752 // Bool_t printSettings, Int_t debug )
753 //{
754 // // Configuration of pi0 event by event selection
755 //
756 // AliAnaPi0EbE *ana = new AliAnaPi0EbE();
757 //
758 // ana->SetAnalysisType((AliAnaPi0EbE::anaTypes)analysis);
759 // TString opt = "";
760 // if(analysis==AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
761 // if(analysis==AliAnaPi0EbE::kSSCalo) opt = "SS";
762 //
763 // ana->SwitchOffAllNLMHistoFill();
764 // ana->SwitchOffSelectedClusterHistoFill();
765 //
766 // ana->SwitchOffFillWeightHistograms();
767 // //if(!simulation) ana->SwitchOnFillPileUpHistograms();
768 // //if(!kTime && !simulation) ana->SwitchOnFillEMCALBCHistograms();
769 //
770 // if(tm) ana->SwitchOnTrackMatchRejection() ;
771 // else ana->SwitchOffTrackMatchRejection() ;
772 // ana->SwitchOffTMHistoFill() ;
773 //
774 // ana->SetCalorimeter(calorimeter);
775 //
776 // // Branch AOD settings
777 // ana->SetOutputAODName(Form("%s%sTrigger_%s",particle.Data(), opt.Data(), kAnaGammaHadronCorr.Data()));
778 // printf("***Out branch %s***\n",ana->GetOutputAODName().Data());
779 // ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
780 //
781 // if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
782 //
783 // //Set Histograms name tag, bins and ranges
784 //
785 // ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),tm));
786 //
787 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
788 //
789 // ///////////////////////////////////
790 // if(analysis!=AliAnaPi0EbE::kSSCalo)
791 // {
792 // ana->SetInputAODName(Form("PhotonTrigger_%s",kAnaGammaHadronCorr.Data()));
793 //
794 // ana->SetM02CutForInvMass(0.1,0.35); // Loose SS cut
795 //
796 // ana->SwitchOnSelectPairInIsolationCone();
797 // ana->SetR(0.4);
798 // ana->SetIsolationCandidateMinPt(5);
799 //
800 // if(useSSIso)
801 // {
802 // ana->SwitchOnSelectIsolatedDecay();
803 // ana->AddToHistogramsName(Form("Ana%s%sEbEIsoDecay_TM%d_",particle.Data(),opt.Data(),tm));
804 // ana->SetOutputAODName(Form("%s%sIsoDecayTrigger_%s",particle.Data(), opt.Data(), kAnaGammaHadronCorr.Data()));
805 // }
806 //
807 // if(calorimeter=="EMCAL" && !simulation) ana->SetPairTimeCut(100);
808 //
809 // AliNeutralMesonSelection *nms = ana->GetNeutralMesonSelection();
810 // nms->SetParticle(particle);
811 //
812 // //****
813 // nms->SetInvMassCutMaxParameters(0,0,0); // Overrule the setting in SetParticle for Pi0 option
814 // //****
815 //
816 // // Tighten a bit mass cut with respect to default window
817 // if(particle=="Pi0") nms->SetInvMassCutRange(0.110,0.160);
818 // if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
819 //
820 // //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
821 // //else nms->SwitchOnAngleSelection();
822 //
823 // nms->SwitchOffAngleSelection();
824 //
825 // if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
826 // nms->SetSideBandCutRanges(-1,0,0.190,0.240);
827 //
828 // if(particle.Contains("EtaSideBand")) // For pi0, do not consider left band
829 // nms->SetSideBandCutRanges(0.410,0.470,0.620,0.680);
830 //
831 // nms->KeepNeutralMesonSelectionHistos(kTRUE);
832 // //nms->SetAngleMaxParam(2,0.2);
833 // nms->SetHistoERangeAndNBins(0, 20, 80) ;
834 // //nms->SetHistoIMRangeAndNBins(0, 1, 400);
835 // }
836 // else ///////////////////////////////////
837 // {
838 // // cluster splitting settings
839 // ana->SetMinEnergy(6);
840 // ana->SetMaxEnergy(100.);
841 //
842 // ana->SetNLMMinEnergy(0, 10);
843 // ana->SetNLMMinEnergy(1, 6);
844 // ana->SetNLMMinEnergy(2, 6);
845 //
846 // // NLM cut, used in all, exclude clusters with more than 2 maxima
847 // ana->SetNLMCut(1, 2) ;
848 //
849 // //
850 // ana->SetMinDistanceToBadChannel(2, 4, 6);
851 // ana->SwitchOnSplitClusterDistToBad();
852 // ana->SetTimeCut(-1e10,1e10); // Open time cut
853 //
854 // AliCaloPID* caloPID = ana->GetCaloPID();
855 //
856 // caloPID->SetSplitWidthSigma(3); // cut at 3 sigma of the mean pi0 peak.
857 //
858 // if(!useSSIso)
859 // {
860 // printf("Do not apply SS cut on merged pi0 analysis \n");
861 // caloPID->SwitchOffSplitShowerShapeCut() ;
862 // ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),tm));
863 // ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenSS",particle.Data(), opt.Data(), kAnaGammaHadronCorr.Data()));
864 // caloPID->SetClusterSplittingM02Cut(0.1,10);
865 // }
866 // else
867 // {
868 // caloPID->SetClusterSplittingM02Cut(0.3,4); // Do the selection in the analysis class and not in the PID method to fill SS histograms
869 // caloPID->SwitchOnSplitShowerShapeCut() ;
870 // }
871 //
872 // if(useAsy)
873 // {
874 // caloPID->SwitchOnSplitAsymmetryCut() ;
875 // ana->GetCaloPID()->SetSubClusterEnergyMinimum(0,2);
876 // ana->GetCaloPID()->SetSubClusterEnergyMinimum(1,0.5);
877 // ana->GetCaloPID()->SetSubClusterEnergyMinimum(2,0.5);
878 // }
879 // else
880 // {
881 // caloPID->SwitchOffSplitAsymmetryCut() ;
882 // if(!useSSIso)
883 // {
884 // ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),tm));
885 // ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kAnaGammaHadronCorr.Data()));
886 // }
887 // else
888 // {
889 // ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),tm));
890 // ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenAsy",particle.Data(), opt.Data(), kAnaGammaHadronCorr.Data()));
891 // }
892 // }
893 //
894 // // For Pi0 only if SwitchOnSimpleSplitMassCut()
895 // caloPID->SetPi0MassRange(0.10, 0.18);
896 // caloPID->SetEtaMassRange(0.50, 0.60);
897 // caloPID->SetPhotonMassRange(0.00, 0.08);
898 //
899 // caloPID->SetClusterSplittingMinNCells(6);
900 //
901 // //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
902 // //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
903 // //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
904 //
905 // if(col=="PbPb" || kAnaGammaHadronCorr.Contains("150"))
906 // {
907 // caloPID->SetClusterSplittingMinNCells(4);
908 // //caloPID->SetPi0MassShiftHighECell(0.005);
909 // }
910 // }
911 // ///////////////////////////////////
912 //
913 // return ana;
914 //}
915 //
919 //AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString particle, Int_t leading,
920 // Int_t partInCone, Int_t thresType,
921 // Float_t cone, Float_t pth, Bool_t multi,
922 // TString col, Bool_t simulation,
923 // TString calorimeter, Int_t year, Int_t tm,
924 // Bool_t printSettings, Int_t debug )
925 //{
926 // AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
927 //
928 // ana->SetMinPt(5);
929 // ana->SetCalorimeter(calorimeter);
930 //
931 // ana->SwitchOffUEBandSubtractionHistoFill();
932 // ana->SwitchOffCellHistoFill() ;
933 //
934 // ana->SwitchOffLeadingOnly();
935 // ana->SwitchOffCheckNeutralClustersForLeading();
936 // if( leading > 0 ) ana->SwitchOnLeadingOnly();
937 // if( leading == 2 ||
938 // leading == 4) ana->SwitchOnCheckNeutralClustersForLeading();
939 //
940 // // MC
941 // ana->SwitchOnPrimariesInConeSelection();
942 // ana->SwitchOnPrimariesPi0DecayStudy() ;
943 //
944 // if(particle.Contains("Photon"))
945 // {
946 // ana->SwitchOnDecayTaggedHistoFill() ;
947 // ana->SetNDecayBits(5);
948 // ana->SwitchOnSSHistoFill();
949 // }
950 // else
951 // {
952 // ana->SwitchOffSSHistoFill();
953 // }
954 //
955 // ana->SwitchOnPtTrigBinHistoFill();
956 // ana->SetNPtTrigBins(6);
957 // //ana->SetPtTrigLimits(0,8); ana->SetPtTrigLimits(1,12); ana->SetPtTrigLimits(2,16); ana->SetPtTrigLimits(3,25);
958 //
959 // ana->SwitchOnBackgroundBinHistoFill();
960 // ana->SetNBackgroundBins(11);
961 // //ana->SetBackgroundLimits(0,0); ana->SetBackgroundLimits(1,0.2); ana->SetBackgroundLimits(2,3); ana->SetBackgroundLimits(3,0.4);
962 //
963 // if(!tm) ana->SwitchOnTMHistoFill();
964 // else ana->SwitchOffTMHistoFill();
965 //
966 // //if(!simulation) ana->SwitchOnFillPileUpHistograms();
967 //
968 // ana->SwitchOnRealCaloAcceptance();
969 // ana->SwitchOnFiducialCut();
970 //
971 // if(calorimeter=="EMCAL")
972 // {
973 // // Avoid borders of EMCal
974 // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 86, 174) ;
975 //
976 // }
977 //
978 // // Same Eta as EMCal, cut in phi if EMCAL was triggering
979 // if(particle=="Hadron" || particle.Contains("CTS"))
980 // {
981 // //if(trigger.Contains("EMC"))
982 // // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
983 // //else
984 // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
985 // }
986 //
987 // // Branch AOD settings
988 //
989 // ana->SetInputAODName(Form("%sTrigger_%s",particle.Data(),kAnaGammaHadronCorr.Data()));
990 // ana->SetAODObjArrayName(Form("IC%sTrigger_%s_R%1.1f_ThMin%1.1f",particle.Data(),kAnaGammaHadronCorr.Data(),cone,pth));
991 //
992 // //
993 // // Do settings for main isolation cut class
994 // //
995 // AliIsolationCut * ic = ana->GetIsolationCut();
996 // ic->SetDebug(debug);
997 // ic->SetParticleTypeInCone(partInCone);
998 // ic->SetICMethod(thresType);
999 // ic->SetPtFraction(0.1);
1000 // ic->SetPtThreshold(0.5); // default, change in next lines
1001 // ic->SetSumPtThreshold(1.0); // default, change in next lines
1002 //
1003 // if(cone > 0 && pth > 0)
1004 // {
1005 // ic->SetConeSize(cone);
1006 // ic->SetPtThresholdMax(10000);
1007 //
1008 // if(thresType == AliIsolationCut::kPtThresIC)
1009 // {
1010 // printf("*** Iso *** PtThresMin = %1.1f GeV/c *** R = %1.1f ***\n",pth,cone);
1011 // ic->SetPtThreshold(pth);
1012 // }
1013 //
1014 // if(thresType == AliIsolationCut::kSumPtIC)
1015 // {
1016 // printf("*** Iso *** SumPtMin = %1.1f GeV/c *** R = %1.1f ***\n",pth,cone);
1017 // ic->SetSumPtThreshold(pth);
1018 // }
1019 // }
1020 // else
1021 // {
1022 // if(col=="pp")
1023 // {
1024 // ic->SetPtThreshold(0.5);
1025 // ic->SetSumPtThreshold(1.0) ;
1026 // ic->SetConeSize(0.4);
1027 // }
1028 // if(col=="PbPb")
1029 // {
1030 // ic->SetPtThreshold(3.);
1031 // ic->SetSumPtThreshold(3.0) ;
1032 // ic->SetConeSize(0.3);
1033 // }
1034 // }
1035 //
1036 //
1037 // // Do or not do isolation with previously produced AODs.
1038 // // No effect if use of SwitchOnSeveralIsolation()
1039 // ana->SwitchOffReIsolation();
1040 //
1041 // // Multiple IC
1042 // if(multi)
1043 // {
1044 // ic->SetConeSize(1.); // Take all for first iteration
1045 // ic->SetPtThreshold(100);// Take all for first iteration
1046 // ana->SwitchOnSeveralIsolation() ;
1047 // ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),tm));
1048 //
1049 // ana->SetNCones(3);
1050 // ana->SetNPtThresFrac(2);
1051 // ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4); ana->SetConeSizes(2,0.5);
1052 // ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 1.5); ana->SetPtThresholds(3, 2);
1053 // ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
1054 // ana->SetSumPtThresholds(0, 0.5) ; ana->SetSumPtThresholds(1, 1) ; ana->SetSumPtThresholds(2, 1.5); ana->SetSumPtThresholds(3, 2) ;
1055 // //ana->SetPtThresholds(0, 0.5);
1056 //
1057 // ana->SwitchOffTMHistoFill();
1058 // ana->SwitchOffSSHistoFill();
1059 // }
1060 // else
1061 // ana->SwitchOffSeveralIsolation() ;
1062 //
1063 // AliCaloPID* caloPID = ana->GetCaloPID();
1064 // caloPID->SetEMCALDEtaCut(0.025);
1065 // caloPID->SetEMCALDPhiCut(0.030);
1066 //
1067 // //Set Histograms name tag, bins and ranges
1068 //
1069 // if(!multi) ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),tm));
1070 // else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),tm));
1071 //
1072 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
1073 //
1074 // if(particle=="Hadron" || particle.Contains("CTS"))
1075 // {
1076 // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1077 // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1078 // }
1079 //
1080 // if(printSettings) ic ->Print("");
1081 //
1082 // return ana;
1083 //}
1084 //
1085 //
1089 //AliAnaParticleHadronCorrelation* ConfigureHadronCorrelationAnalysis(TString particle, Int_t leading,
1090 // Bool_t bIsolated, Float_t shshMax,
1091 // Int_t partInCone, Int_t thresType,
1092 // Float_t cone, Float_t pth, Bool_t mixOn,
1093 // TString col, Bool_t simulation,
1094 // TString calorimeter, Int_t year, Int_t tm,
1095 // Bool_t printSettings, Int_t debug )
1096 //{
1097 // AliAnaParticleHadronCorrelation *ana = new AliAnaParticleHadronCorrelation();
1098 //
1099 // ana->SetTriggerPtRange(5,100);
1100 // ana->SetAssociatedPtRange(0.2,100);
1101 // ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
1102 //
1103 // // Underlying event
1104 // ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
1105 // ana->SwitchOnSeveralUECalculation();
1106 //
1107 // ana->SwitchOffAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
1108 // ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
1109 // ana->SwitchOffCheckNeutralClustersForLeading();
1110 //
1111 // if(leading > 0 && leading < 3 ) ana->SwitchOnAbsoluteLeading();
1112 // if(leading > 2 ) ana->SwitchOnNearSideLeading();
1113 // if(leading == 2 || leading == 4 ) ana->SwitchOnCheckNeutralClustersForLeading();
1114 //
1115 // ana->SwitchOffFillPtImbalancePerPtABinHistograms();
1116 // ana->SwitchOffCorrelationVzBin() ;
1117 // ana->SwitchOffFillEtaGapHistograms();
1118 //
1119 // ana->SwitchOffFillHighMultiplicityHistograms();
1120 //
1121 // ana->SwitchOffPi0TriggerDecayCorr();
1122 // if(particle.Contains("Photon"))
1123 // {
1124 // ana->SwitchOnDecayTriggerDecayCorr();
1125 // ana->SetNDecayBits(5);
1126 // printf("**** SET M02 limits in correlation task *** \n");
1127 // ana->SetM02Cut(0.10,shshMax);
1128 // ana->SwitchOnInvariantMassHistograms();
1129 // ana->SwitchOnBackgroundBinsPtInConeHistograms();
1130 // }
1131 //
1132 // ana->SetMCGenType(0,7);
1133 //
1134 // ana->SwitchOffLeadHadronSelection(); // Open cuts, just fill histograms
1135 // ana->SwitchOnFillLeadHadronHistograms();
1136 // ana->SwitchOnBackgroundBinsTaggedDecayPtInConeHistograms();
1137 // ana->SetLeadHadronPhiCut(TMath::DegToRad()*130, TMath::DegToRad()*230.);
1138 // ana->SetLeadHadronPtCut(0.5, 1000);
1139 //
1140 // // if triggering on PHOS and EMCAL is on
1141 // ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
1142 // //ana->SetPi0AODBranchName("Pi0EMCAL_TrigEMC7_Cl_TM1");
1143 //
1144 // ana->SwitchOffHMPIDCorrelation();
1145 //
1146 // ana->SwitchOffFillBradHistograms();
1147 //
1148 // //if(!simulation) ana->SwitchOnFillPileUpHistograms();
1149 //
1150 // ana->SetNAssocPtBins(8);
1151 // ana->SetAssocPtBinLimit(0, 1) ;
1152 // ana->SetAssocPtBinLimit(1, 2) ;
1153 // ana->SetAssocPtBinLimit(2, 3) ;
1154 // ana->SetAssocPtBinLimit(3, 4) ;
1155 // ana->SetAssocPtBinLimit(4, 5) ;
1156 // ana->SetAssocPtBinLimit(5, 8) ;
1157 // ana->SetAssocPtBinLimit(6, 10) ;
1158 // ana->SetAssocPtBinLimit(7, 100);
1159 //
1160 // ana->SelectIsolated(bIsolated); // do correlation with isolated photons
1161 //
1162 // // Mixing with own pool
1163 // if(mixOn)
1164 // {
1165 // ana->SwitchOnOwnMix();
1166 // ana->SwitchOnFillNeutralInMixedEvent();
1167 //
1168 // if(bIsolated)
1169 // {
1170 // //Do settings for main isolation cut class
1171 // AliIsolationCut * ic = ana->GetIsolationCut();
1172 // ic->SetDebug(debug);
1173 //
1174 // if(cone >0 && pth > 0)
1175 // {
1176 // printf("*** Correl *** PtThres = %1.1f GeV/c *** R = %1.1f ***\n",pth,cone);
1177 // ic->SetPtThreshold(pth);
1178 // ic->SetConeSize(cone);
1179 // }
1180 // else
1181 // {
1182 // if(col=="pp")
1183 // {
1184 // ic->SetPtThreshold(0.5);
1185 // ic->SetConeSize(0.4);
1186 // }
1187 // if(col=="PbPb")
1188 // {
1189 // ic->SetPtThreshold(3.);
1190 // //ic->SetPtThreshold(1.);
1191 // ic->SetConeSize(0.3);
1192 // }
1193 // }
1194 //
1195 // ic->SetPtFraction(0.1);
1196 // ic->SetSumPtThreshold(1.0) ;
1197 // ic->SetParticleTypeInCone(partInCone);
1198 // ic->SetICMethod(thresType);
1199 // }
1200 // }
1201 // else
1202 // ana->SwitchOffOwnMix();
1203 //
1204 // ana->SetNZvertBin(20);
1205 //
1206 // if(col=="pp")
1207 // {
1208 // ana->SetNMaxEvMix(100);
1209 // ana->SwitchOnTrackMultBins();
1210 // ana->SetNTrackMultBin(10);
1211 // ana->SetNRPBin(1);
1212 // }
1213 // else
1214 // {
1215 // ana->SetNMaxEvMix(10);
1216 // ana->SwitchOffTrackMultBins(); // centrality bins
1217 // ana->SetNCentrBin(12);
1218 // ana->SetNRPBin(3);
1219 // if(kAnaGammaHadronCorr.Contains("60_90"))
1220 // {
1221 // printf("*** Set mixing for peripheral\n");
1222 // ana->SetNMaxEvMix(50);
1223 // ana->SetNCentrBin(2);
1224 // }
1225 // }
1226 //
1227 // ana->SwitchOnFiducialCut();
1228 //
1229 // if(calorimeter=="EMCAL")
1230 // {
1231 // // Avoid borders of EMCal, same as for isolation
1232 // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1233 //
1234 // }
1235 //
1236 // // Input / output delta AOD settings
1237 //
1238 // ana->SetInputAODName(Form("%sTrigger_%s",particle.Data(),kAnaGammaHadronCorr.Data()));
1239 // ana->SetAODObjArrayName(Form("%sHadronCorrIso%dTrigger_%s",particle.Data(),bIsolated,kAnaGammaHadronCorr.Data()));
1240 // ana->SetAODNamepTInConeHisto(Form("IC%s_%s_R%1.1f_ThMin%1.1f" ,particle.Data(),kAnaGammaHadronCorr.Data(),cone,pth));
1241 //
1242 // //Set Histograms name tag, bins and ranges
1243 //
1244 // ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,tm));
1245 //
1246 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
1247 //
1248 // if(particle=="Hadron" || particle.Contains("CTS"))
1249 // {
1250 // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1251 // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1252 // }
1253 //
1254 // return ana;
1255 //}
1256 //
1260 //AliAnaChargedParticles* ConfigureChargedAnalysis( Bool_t simulation, Bool_t printSettings, Int_t debug )
1261 //{
1262 // AliAnaChargedParticles *ana = new AliAnaChargedParticles();
1263 //
1264 // // selection cuts
1265 //
1266 // ana->SetMinPt(0.2);
1267 // ana->SwitchOnFiducialCut();
1268 // ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
1269 //
1270 // ana->SwitchOffFillVertexBC0Histograms();
1271 //
1272 // ana->SwitchOffFillPileUpHistograms();
1273 // ana->SwitchOffFillTrackBCHistograms();
1274 //
1275 // // Branch AOD settings
1276 //
1277 // ana->SetOutputAODName(Form("HadronTrigger_%s",kAnaGammaHadronCorr.Data()));
1278 // ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
1279 //
1280 // //Set Histograms name tag, bins and ranges
1281 //
1282 // ana->AddToHistogramsName("AnaHadrons_");
1283 //
1284 // SetAnalysisCommonParameters(ana,"CTS",2012,"pp",simulation,printSettings,debug); // see method below
1285 //
1286 // return ana;
1287 //}
1288 //
1292 //AliAnaCalorimeterQA* ConfigureQAAnalysis(TString col, Bool_t simulation,
1293 // TString calorimeter, Int_t year,
1294 // Bool_t printSettings, Int_t debug )
1295 //{
1296 // AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
1297 //
1298 // ana->SetCalorimeter(calorimeter);
1299 //
1300 // ana->SetTimeCut(-1e10,1e10); // Open time cut
1301 //
1302 // ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1303 //
1304 // ana->SwitchOnRealCaloAcceptance();
1305 //
1306 // ana->SwitchOffFiducialCut();
1307 // ana->SwitchOffFillAllTH3Histogram();
1308 // ana->SwitchOffFillAllPositionHistogram();
1309 // ana->SwitchOffFillAllPositionHistogram2();
1310 // ana->SwitchOffStudyBadClusters() ;
1311 // ana->SwitchOffStudyClustersAsymmetry();
1312 // ana->SwitchOffStudyWeight();
1313 // ana->SwitchOffFillAllCellTimeHisto() ;
1314 //
1315 // ana->SwitchOnFillAllTrackMatchingHistogram();
1316 //
1317 // ana->AddToHistogramsName("QA_"); // Begining of histograms name
1318 //
1319 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
1320 //
1321 // return ana;
1322 //}
1323 //
1327 //AliAnaGeneratorKine* ConfigureGenKineAnalysis(Int_t thresType, Float_t cone,
1328 // Float_t pth,
1329 // TString col, Bool_t simulation,
1330 // TString calorimeter, Int_t year,
1331 // Bool_t printSettings, Int_t debug )
1332 //{
1333 // AliAnaGeneratorKine *ana = new AliAnaGeneratorKine();
1334 //
1335 // // Trigger detector, acceptance and pT cut
1336 // ana->SetTriggerDetector(calorimeter);
1337 // ana->SetMinPt(2); // Trigger photon, pi0 minimum pT
1338 // ana->GetFiducialCutForTrigger()->SetSimpleEMCALFiducialCut(0.4, 90, 170);
1339 //
1340 // // Particles associated to trigger or isolation cone acceptance and pT cut
1341 // ana->SetCalorimeter(calorimeter);
1342 // ana->SetMinChargedPt(0.2);
1343 // ana->SetMinNeutralPt(0.3);
1344 // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
1345 // ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
1346 //
1347 // // Isolation paramters
1348 // AliIsolationCut * ic = ana->GetIsolationCut();
1349 // ic->SetDebug(debug);
1350 // ic->SetPtThreshold(pth);
1351 // ic->SetConeSize(cone);
1352 // ic->SetSumPtThreshold(1.0) ;
1353 // ic->SetICMethod(thresType);
1354 //
1355 // ana->AddToHistogramsName("AnaGenKine_");
1356 //
1357 // SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
1358 //
1359 // return ana;
1360 //}
1361 //
1362 //
1369 //void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass* ana,
1370 // TString calorimeter, Int_t year,
1371 // TString col, Bool_t simulation,
1372 // Bool_t printSettings, Int_t debug)
1373 //{
1374 // //
1375 // // Histograms ranges
1376 // //
1377 // AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
1378 //
1379 // histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
1380 //
1381 // if(calorimeter=="EMCAL")
1382 // {
1383 // if ( year == 2010 )
1384 // {
1385 // histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
1386 // histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
1387 // histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
1388 // }
1389 // else if ( year < 2014 )
1390 // {
1391 // histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
1392 // histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
1393 // histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA }
1394 // else // Run2
1395 // {
1396 // histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
1397 // histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
1398 // histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
1399 // }
1400 //
1401 // histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
1402 // }
1403 // else if(calorimeter=="PHOS")
1404 // {
1405 // histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
1406 // histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
1407 // }
1408 // else if(calorimeter=="CTS")
1409 // {
1410 // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1411 // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1412 // }
1413 // }
1414 //
1415 // histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
1416 //
1417 // // Invariant mass histo
1418 // histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
1419 // histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
1420 //
1421 // // check if time calibration is on
1422 // //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
1423 // histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
1424 // histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
1425 //
1426 // // track-cluster residuals
1427 // histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
1428 // histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
1429 // histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
1430 //
1431 // // QA, electron, charged
1432 // histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
1433 // histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
1434 //
1435 // // QA
1436 // histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
1437 // histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
1438 // histoRanges->SetHistoZRangeAndNBins(-350,350,175);
1439 // histoRanges->SetHistoRRangeAndNBins(430,460,30);
1440 // histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
1441 // histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
1442 //
1443 // // QA, correlation
1444 // if(col=="PbPb")
1445 // {
1446 // histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
1447 // histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
1448 // histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
1449 // }
1450 // else
1451 // {
1452 // histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
1453 // histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
1454 // histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
1455 // }
1456 //
1457 // // xE, zT
1458 // histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
1459 // histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
1460 //
1461 // // Isolation
1462 // histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
1463 // histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
1464 //
1465 // //
1466 // // TRD SM
1467 // //
1468 // if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
1469 // else if(year == 2012 ||
1470 // year == 2013) ana->SetFirstSMCoveredByTRD( 4);
1471 // else ana->SetFirstSMCoveredByTRD(-1);
1472 //
1473 // //
1474 // // MC histograms?
1475 // //
1476 // if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
1477 // else ana->SwitchOffDataMC() ;
1478 //
1479 // //Set here generator name, default pythia
1480 // //ana->GetMCAnalysisUtils()->SetMCGenerator("");
1481 //
1482 // //
1483 // // Debug
1484 // //
1485 // if(printSettings) ana->Print("");
1486 //
1487 // ana->SetDebug(debug); // 10 for lots of messages
1488 //}
1489 //
1494 //UInt_t SetTriggerMaskFromName(TString trigger)
1495 //{
1496 // if(trigger=="EMC7")
1497 // {
1498 // printf("CaloTrackCorr trigger EMC7\n");
1499 // return AliVEvent::kEMC7;
1500 // }
1501 // else if (trigger=="INT7")
1502 // {
1503 // printf("CaloTrackCorr trigger INT7\n");
1504 // return AliVEvent::kINT7;
1505 // }
1506 // else if(trigger=="EMC1")
1507 // {
1508 // printf("CaloTrackCorr trigger EMC1\n");
1509 // return AliVEvent::kEMC1;
1510 // }
1511 // else if(trigger=="MB")
1512 // {
1513 // printf("CaloTrackCorr trigger MB\n");
1514 // return AliVEvent::kMB;
1515 // }
1516 // else if(trigger=="PHOS")
1517 // {
1518 // printf("CaloTrackCorr trigger PHOS\n");
1519 // return AliVEvent::kPHI7;
1520 // }
1521 // else if(trigger=="PHOSPb")
1522 // {
1523 // printf("CaloTrackCorr trigger PHOSPb\n");
1524 // return AliVEvent::kPHOSPb;
1525 // }
1526 // else if(trigger=="AnyINT")
1527 // {
1528 // printf("CaloTrackCorr trigger AnyINT\n");
1529 // return AliVEvent::kAnyINT;
1530 // }
1531 // else if(trigger=="INT")
1532 // {
1533 // printf("CaloTrackCorr trigger AnyINT\n");
1534 // return AliVEvent::kAny;
1535 // }
1536 // else if(trigger=="EMCEGA")
1537 // {
1538 // printf("CaloTrackCorr trigger EMC Gamma\n");
1539 // return AliVEvent::kEMCEGA;
1540 // }
1541 // else if(trigger=="EMCEJE")
1542 // {
1543 // printf("CaloTrackCorr trigger EMC Jet\n");
1544 // return AliVEvent::kEMCEJE;
1545 // }
1546 // else if(trigger=="Central")
1547 // {
1548 // printf("CaloTrackCorr trigger Central\n");
1549 // return AliVEvent::kCentral;
1550 // }
1551 // else if(trigger=="CentralEGA")
1552 // {
1553 // printf("CaloTrackCorr trigger Central+EMCEGA\n");
1554 // return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
1555 // }
1556 // else if(trigger=="SemiCentral")
1557 // {
1558 // printf("CaloTrackCorr trigger SemiCentral\n");
1559 // return AliVEvent::kSemiCentral;
1560 // }
1561 // else if(trigger=="SemiOrCentral")
1562 // {
1563 // printf("CaloTrackCorr trigger SemiCentral Or Central\n");
1564 // return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
1565 // }
1566 // else return AliVEvent::kAny;
1567 //}
1568 //
1569 
1570 
1571 
1572 
1573 
1574 Bool_t kPrint = kFALSE;
1575 Bool_t kSimulation = kFALSE;
1576 Bool_t kUseKinematics = kFALSE;
1577 Bool_t kOutputAOD = kFALSE;
1578 Bool_t kEventSelection= kFALSE;
1579 Bool_t kExotic = kTRUE;
1580 Bool_t kNonLinearity = kFALSE;
1581 Int_t kYears = 2011;
1582 TString kCollisions = "pp";
1583 TString kTrig = "EMC7" ;
1584 TString kClusterArray = "";
1585 TString kData = ""; // MC or deltaAOD
1586 TString kInputDataType = "ESD";
1587 TString kCalorimeter = "EMCAL";
1588 Bool_t kTM = kTRUE;
1589 Bool_t kRecalTM = kTRUE;
1590 Int_t kMinCen = -1;
1591 Int_t kMaxCen = -1;
1592 TString kName = "";
1593 Int_t kDebug = -1;
1594 Bool_t kQA = kFALSE;
1595 Bool_t kHadronAN = kFALSE;
1596 Bool_t kCalibE = kTRUE;
1597 Bool_t kCalibT = kTRUE;
1598 Bool_t kBadMap = kTRUE;
1599 Bool_t kTender = kFALSE;
1600 Bool_t kMix = kFALSE;
1601 Int_t kRunNumber = -1;
1602 
1604  const TString calorimeter = "EMCAL",
1605  const Bool_t simulation = kFALSE,
1606  const Bool_t eventsel = kFALSE,
1607  const Bool_t exotic = kTRUE,
1608  const Bool_t nonlin = kFALSE,
1609  TString outputfile = "",
1610  const Int_t year = 2010,
1611  const TString col = "pp",
1612  const TString trigger = "MB",
1613  const TString clustersArray = "V1",
1614  const Bool_t mix = kTRUE,
1615  const Bool_t recaltm = kTRUE,
1616  const Bool_t tm = kTRUE,
1617  const Int_t minCen = -1,
1618  const Int_t maxCen = -1,
1619  const Bool_t qaan = kFALSE,
1620  const Bool_t hadronan = kFALSE,
1621  const Bool_t calibE = kTRUE,
1622  const Bool_t badmap = kTRUE,
1623  const Bool_t calibT = kTRUE,
1624  const Bool_t tender = kFALSE,
1625  const Bool_t outputAOD = kFALSE,
1626  const Bool_t printSettings = kFALSE,
1627  const Double_t scaleFactor = -1,
1628  const Int_t runNumber = -1
1629  )
1630 {
1631  // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
1632 
1633  kPrint = printSettings;
1634  kSimulation = simulation;
1635  kYears = year;
1636  kCollisions = col;
1637  kExotic = exotic;
1638  kNonLinearity = nonlin;
1639  kTrig = trigger;
1640  kClusterArray = clustersArray;
1641  kData = data;
1643  kOutputAOD = outputAOD;
1644  kTM = tm;
1645  kRecalTM = recaltm;
1646  kMinCen = minCen;
1647  kMaxCen = maxCen;
1648  kEventSelection= eventsel;
1649  kQA = qaan;
1650  kHadronAN = hadronan;
1651  kCalibE = calibE;
1652  kCalibT = calibT;
1653  kBadMap = badmap;
1654  kTender = tender;
1655  kMix = mix;
1656  kRunNumber = runNumber;
1657 
1658  // Get the pointer to the existing analysis manager via the static access method.
1659 
1660  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
1661  if (!mgr)
1662  {
1663  ::Error("AddTask", "No analysis manager to connect to.");
1664  return NULL;
1665  }
1666 
1667  // Check the analysis type using the event handlers connected to the analysis manager.
1668 
1669  if (!mgr->GetInputEventHandler())
1670  {
1671  ::Error("AddTask", "This task requires an input event handler");
1672  return NULL;
1673  }
1674 
1675  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
1676 
1677  kInputDataType = "AOD";
1678  if(!kData.Contains("delta"))
1679  kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
1680 
1681  if(kSimulation)
1682  {
1683  kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
1684  if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
1685  }
1686 
1687  cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
1688 
1689  // Name for containers
1690 
1691  //kName = Form("%s_Trig%s_Cl%s_TM%d_R%1.1f_Pt%1.1f",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM,cone,pth);
1692  kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM);
1693 
1694 
1695  if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
1696 
1697  printf("<<<< NAME: %s >>>>>\n",kName.Data());
1698 
1699  // #### Configure analysis ####
1700 
1702  //printf("SCALE FACTOR %e\n",scaleFactor);
1703  maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
1704 
1705  // General frame setting and configuration
1706  maker->SetReader (ConfigureReader() );
1707  maker->SetCaloUtils(ConfigureCaloUtils());
1708 
1709  // Analysis tasks setting and configuration
1710  Int_t n = 0;//Analysis number, order is important
1711 
1712  // Isolation settings
1713  Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
1714  Int_t thresType = AliIsolationCut::kPtThresIC;
1715  //Int_t thresType = AliIsolationCut::kSumPtIC;
1716  Float_t cone = 0.4;
1717  Float_t pth = 0.5;
1718  Float_t pthMax = 1000;
1719 
1720  // maker->AddAnalysis(ConfigureQAAnalysis(), n++);
1721 
1722  // Photon analysis
1723  maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
1724  maker->AddAnalysis(ConfigurePi0Analysis(), n++);
1725  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0" , AliAnaPi0EbE::kIMCalo,kFALSE), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
1726  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta" , AliAnaPi0EbE::kIMCalo,kFALSE), n++); // Eta event by event selection, invariant mass and photon tagging from decay
1727  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo,kFALSE), n++); // Pi0 out of peak event by event selection, and photon tagging from decay
1728  maker->AddAnalysis(ConfigurePi0EbEAnalysis("EtaSideBand", AliAnaPi0EbE::kIMCalo,kFALSE), n++); // Eta out of peak event by event selection, and photon tagging from decay
1729  printf("\n\nBEFORE ISOLATION PHOTON\n\n");
1730  maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType, cone, pth), n++); // Photon isolation
1731  printf("\n\nBEFORE CORRELATION PHOTON NON ISO\n\n");
1732  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kFALSE), n++); // Gamma hadron correlation
1733  printf("\n\nBEFORE CORRELATION PHOTON ISO\n\n");
1734  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kTRUE, partInCone,thresType, cone, pth) , n++); // Isolated gamma hadron correlation
1735  printf("");
1736 
1737  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0" , AliAnaPi0EbE::kIMCalo,kTRUE), n++); // Pi0 event by event+isolation selection, invariant mass and photon tagging from decay
1738  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta" , AliAnaPi0EbE::kIMCalo,kTRUE), n++); // Eta event by event+isolation selection, invariant mass and photon tagging from decay
1739  //
1741  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo,kTRUE,kTRUE), n++); // Pi0 event by event selection, cluster splitting
1742  printf("\n\nBEFORE ISOLATION PI0\n\n");
1743  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType, cone, pth), n++); // Pi0 isolation, cluster splits
1744  printf("\n\nBEFORE CORRELATION PI0 NON ISO\n\n");
1745  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kFALSE), n++); // Pi0 hadron correlation
1746  printf("\n\nBEFORE CORRELATION PHOTON ISO\n\n");
1747  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kTRUE, partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1748 
1749 
1750  // Charged analysis
1751  maker->AddAnalysis(ConfigureChargedAnalysis(), n++); // track selection
1752 
1753  maker->SetAnaDebug(kDebug) ;
1754  maker->SwitchOnHistogramsMaker() ;
1755  if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
1756  else maker->SwitchOnAODsMaker() ;
1757 
1758  //if(kSimulation || !kTrig.Contains("EMC"))
1759  maker->SwitchOffDataControlHistograms();
1760 
1761  if(kPrint) maker->Print("");
1762 
1763  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
1764 
1765  // Create task
1766 
1767  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
1768  task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
1769  task->SetDebugLevel(kDebug);
1770  //task->SetDebugLevel(100);
1771  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
1772  task->SetAnalysisMaker(maker);
1773  mgr->AddTask(task);
1774 
1775  //Create containers
1776 
1777  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
1778 
1779  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
1780  AliAnalysisManager::kOutputContainer,
1781  Form("%s",outputfile.Data()));
1782 
1783  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(),
1784  AliAnalysisManager::kParamContainer,
1785  "AnalysisParameters.root");
1786 
1787  // Create ONLY the output containers for the data produced by the task.
1788  // Get and connect other common input/output containers via the manager as below
1789  //==============================================================================
1790  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
1791  // AOD output slot will be used in a different way in future
1792  if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
1793  mgr->ConnectOutput (task, 1, cout_pc);
1794  mgr->ConnectOutput (task, 2, cout_cuts);
1795 
1796  if(!kMix)
1797  {
1798  UInt_t mask = SetTriggerMaskFromName();
1799  task->SelectCollisionCandidates(mask);
1800  }
1801 
1802  AliAnaCaloTrackCorrMaker* maker = task->GetAnalysisMaker();
1807 
1808  return task;
1809 }
1810 
1811 //____________________________________
1813 {
1814 
1815  AliCaloTrackReader * reader = 0;
1816  if (kInputDataType == "ESD"&& kData=="MC" )
1817  reader = new AliCaloTrackMCReader();
1818  else if(kInputDataType=="AOD" || kData.Contains("AOD"))
1819  reader = new AliCaloTrackAODReader();
1820  else if(kInputDataType=="ESD")
1821  reader = new AliCaloTrackESDReader();
1822  else
1823  printf("AliCaloTrackReader::ConfigureReader() - Data combination not known kData=%s, kInputData=%s\n",kData.Data(),kInputDataType.Data());
1824 
1825  reader->SetDebug(kDebug);//10 for lots of messages
1826  //reader->SetDebug(100);
1827 
1828  // Event triggered selection settings
1829  if(!kSimulation && (kTrig.Contains("EMC") || kTrig.Contains("L")))
1830  {
1831  printf("=== Remove bad triggers === \n");
1832  reader->SwitchOnTriggerPatchMatching();
1834 
1835  reader->SetTriggerPatchTimeWindow(8,9);
1836  if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
1837  else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
1838  else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
1839  //redefine for other periods, triggers
1840 
1841  if(kRunNumber < 172000)
1842  {
1843  reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
1844  printf("\t Old L1 Trigger data format!\n");
1845  }
1846  else
1847  {
1848  reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
1849  printf("\t Current L1 Trigger data format!\n");
1850  }
1851 
1852  if(kClusterArray != "" || kTender)
1853  {
1854  printf("Trigger cluster calibration OFF\n");
1856  }
1857 
1858  }
1859  else
1860  {
1863  }
1864  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
1865  // reject some special events that bother the cross section
1866  if(kSimulation)
1867  {
1868  // Event rejection cuts for jet-jet simulations, do not use in other
1869  reader->SetPtHardAndJetPtComparison(kTRUE);
1870  reader->SetPtHardAndJetPtFactor(4);
1871 
1872  reader->SetPtHardAndClusterPtComparison(kTRUE);
1873  reader->SetPtHardAndClusterPtFactor(1.5);
1874  }
1875 
1876  //Delta AOD?
1877  //reader->SetDeltaAODFileName("");
1878  if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
1879 
1880  // MC settings
1881  if(kUseKinematics){
1882  if(kInputDataType == "ESD"){
1883  reader->SwitchOnStack();
1884  reader->SwitchOffAODMCParticles();
1885  }
1886  else if(kInputDataType == "AOD"){
1887  reader->SwitchOffStack();
1888  reader->SwitchOnAODMCParticles();
1889  }
1890  }
1891 
1892  //------------------------
1893  // Detector input filling
1894  //------------------------
1895 
1896  //Min cluster/track E
1897  reader->SetEMCALEMin(0.3);
1898  reader->SetEMCALEMax(1000);
1899  reader->SetPHOSEMin(0.3);
1900  reader->SetPHOSEMax(1000);
1901  reader->SetCTSPtMin(0.2);
1902  reader->SetCTSPtMax(1000);
1903 
1904  reader->SwitchOffRecalculateVertexBC();
1906 
1907  // Shower shape smearing
1908  if(kSimulation)
1909  {
1910  reader->SwitchOffShowerShapeSmearing(); // Active only on MC
1911  //reader->SetShowerShapeSmearWidth(0.002);
1912  //reader->SetShowerShapeSmearWidth(0.003);
1913  reader->SetShowerShapeSmearWidth(0.005);
1914  }
1915 
1916  // Time cuts
1917  if(kSimulation)
1918  {
1919  reader->SwitchOffUseTrackTimeCut();
1921  reader->SwitchOffUseEMCALTimeCut();
1922  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
1923  }
1924  else
1925  {
1926  if(kCalibT)
1927  {
1928  printf("Set time cut parameters for run %d\n",kRunNumber);
1929  reader->SwitchOnUseEMCALTimeCut();
1931 
1932  //Absolute window
1933  reader->SetEMCALTimeCut(-25,20);
1934 
1935  //Parametrization
1936  if (kRunNumber >= 151636 && kRunNumber <= 155384 )
1937  {
1938  printf("Set time parameters for LHC11c\n");
1941  }
1942  else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
1943  {
1944  printf("Set time parameters for LHC11d\n");
1947  }
1948  else
1949  {
1951  }
1952  }
1953  else
1954  {
1956  reader->SwitchOffUseEMCALTimeCut();
1957  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
1958  }
1959  }
1960 
1961  reader->SwitchOffUseTrackTimeCut();
1962  reader->SetTrackTimeCut(0,50);
1963 
1964  reader->SwitchOnFiducialCut();
1965  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
1966 
1967  reader->SwitchOffUseTrackDCACut();
1968  //reader->SetTrackDCACut(0,0.0105);
1969  //reader->SetTrackDCACut(1,0.035);
1970  //reader->SetTrackDCACut(2,1.1);
1971 
1972  // Tracks
1973  reader->SwitchOnCTS();
1974 
1975  if(kInputDataType=="ESD")
1976  {
1977  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
1978  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
1979  //reader->SetTrackCuts(esdTrackCuts);
1980 
1981  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
1982  reader->SetTrackCuts(esdTrackCuts);
1983  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
1984  reader->SetTrackComplementaryCuts(esdTrackCuts2);
1986  }
1987  else if(kInputDataType=="AOD")
1988  {
1989  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
1990  //reader->SwitchOffAODTrackSharedClusterSelection();
1991  //reader->SetTrackStatus(AliVTrack::kITSrefit);
1992  //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
1993  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
1994  }
1995 
1996  // Calorimeter
1997 
1999  if(kClusterArray == "" && !kTender)
2000  {
2001  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
2002  reader->SwitchOnClusterRecalculation();
2003  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
2004  }
2005  else
2006  {
2007  printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
2009  }
2010 
2011  // CAREFUL
2013 
2014  // if(kQA) reader->SwitchOnClusterRecalculation();
2015  // else reader->SwitchOffClusterRecalculation();
2016 
2017  //if(kCalorimeter == "EMCAL") {
2018  reader->SwitchOnEMCALCells();
2019  reader->SwitchOnEMCAL();
2020  //}
2021  //if(kCalorimeter == "PHOS") { // Should be on if QA is activated with correlation on
2022  reader->SwitchOffPHOSCells();
2023  reader->SwitchOffPHOS();
2024  //}
2025 
2026  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
2027  if(kData.Contains("delta"))
2028  {
2029  reader->SwitchOffEMCAL();
2030  reader->SwitchOffPHOS();
2031  reader->SwitchOffEMCALCells();
2032  reader->SwitchOffPHOSCells();
2033  }
2034 
2035  //-----------------
2036  // Event selection
2037  //-----------------
2038 
2039  //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
2040 
2041  reader->RejectFastClusterEvents() ;
2042 
2043  // For mixing with AliAnaParticleHadronCorrelation switch it off
2044  if(kMix)
2045  {
2046  reader->SwitchOffEventTriggerAtSE();
2047  UInt_t mask = SetTriggerMaskFromName();
2048  reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
2049  //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
2050  reader->SetMixEventTriggerMask(AliVEvent::kINT7); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
2051 
2052  printf("---Trigger selection done in AliCaloTrackReader!!!\n");
2053  }
2054  else
2055  reader->SwitchOnEventTriggerAtSE();
2056 
2057  reader->SetZvertexCut(10.); // Open cut
2058  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
2059  reader->SwitchOnRejectNoTrackEvents();
2060 
2061  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
2062  reader->SwitchOffPileUpEventRejection(); // remove pileup by default
2063 
2064  if(kCollisions=="PbPb")
2065  {
2066  // Centrality
2067  reader->SetCentralityClass("V0M");
2068  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
2069  reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
2070 
2071  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
2072  reader->SetEventPlaneMethod("V0");
2073  }
2074 
2075  if(kPrint) reader->Print("");
2076 
2077  return reader;
2078 
2079 }
2080 
2081 //_______________________________________
2083 {
2084 
2086  cu->SetDebug(kDebug);
2087  //cu->SetDebug(100);
2088 
2089  // Remove clusters close to borders, at least max energy cell is 1 cell away
2092 
2094 
2095  // Search of local maxima in cluster
2096  if(kCollisions=="pp")
2097  {
2098  cu->SetLocalMaximaCutE(0.1);
2099  cu->SetLocalMaximaCutEDiff(0.03);
2100 
2101  if(kName.Contains("150"))
2102  {
2103  printf("Reclusterize with 150 threshold, set PbPb settings\n");
2104  cu->SetLocalMaximaCutE(0.2);
2105  cu->SetLocalMaximaCutEDiff(0.03);
2106  }
2107  }
2108  else
2109  {
2110  cu->SetLocalMaximaCutE(0.2);
2111  cu->SetLocalMaximaCutEDiff(0.03);
2112  }
2113 
2114  cu->SwitchOffClusterPlot();
2115 
2116  if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
2118 
2120 
2121  //EMCAL settings
2122 
2123  if(!kSimulation)
2125 
2126  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
2127 
2128  if(kClusterArray == "" && !kTender)
2129  {
2130  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
2132  }
2133 
2134  if(!kSimulation)
2135  {
2136  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
2138  }
2139  else
2140  {
2141  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
2143  }
2144 
2145  //gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
2146  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
2148  kSimulation,
2149  kExotic,
2150  kNonLinearity,
2151  kCalibE,
2152  kBadMap,
2153  kCalibT);
2154  recou->SetExoticCellDiffTimeCut(50);
2155 
2156  if( kNonLinearity )
2157  {
2158  // printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
2159  // //CAREFUL only for the latest simulation
2160  // recou->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrected);
2161  // recou->SetNonLinearityParam(0,9.81039e-01);
2162  // recou->SetNonLinearityParam(1,1.13508e-01);
2163  // recou->SetNonLinearityParam(2,1.00173e+00);
2164  // recou->SetNonLinearityParam(3,9.67998e-02);
2165  // recou->SetNonLinearityParam(4,2.19381e+02);
2166  // recou->SetNonLinearityParam(5,6.31604e+01);
2167  // recou->SetNonLinearityParam(6,1);
2168  if(kRunNumber <= 150000 && kSimulation) {// CAREFUL only for old productions
2169  printf("\t ------>>>>> Set NonLin kPi0MC\n");
2170  recou->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MC);
2171  }
2173  }
2174 
2175 
2176  // if(!kQA)
2177  // {
2178  // //cu->SwitchOffEMCALOADB() ;
2179  // cu->SwitchOffRecalibration();
2180  // cu->SwitchOffRunDepCorrection();
2181  // cu->SwitchOffTimeRecalibration();
2182  // }
2183 
2184  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
2185  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
2186 
2187 
2188  // PHOS
2190 
2191  if(kPrint) cu->Print("");
2192 
2193  return cu;
2194 
2195 }
2196 
2197 //_____________________________________
2199 {
2200 
2201  AliAnaPhoton *ana = new AliAnaPhoton();
2202  ana->SetDebug(kDebug); //10 for lots of messages
2203 
2204  // cluster selection cuts
2205 
2207 
2208  ana->SwitchOffFiducialCut();
2209 
2211 
2212  ana->SetFirstSMCoveredByTRD(-1);
2213 
2214  ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
2215 
2216  //if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
2217 
2218  if(kTM) ana->SwitchOnTrackMatchRejection() ;
2219  else ana->SwitchOffTrackMatchRejection() ;
2220  ana->SwitchOffTMHistoFill() ;
2221 
2222  if(kCalorimeter == "PHOS")
2223  {
2224  ana->SetNCellCut(2);// At least 3 cells
2225  ana->SetMinPt(0.3);
2226  ana->SetMinDistanceToBadChannel(2, 4, 5);
2227  ana->SetTimeCut(-1e10,1e10); // open cut
2228  }
2229  else
2230  {//EMCAL
2231  ana->SetNCellCut(1);// At least 2 cells
2232  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
2233  ana->SetMaxEnergy(100);
2234  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
2235  // restrict to less than 100 ns when time calibration is on
2236  ana->SetMinDistanceToBadChannel(2, 4, 6);
2237 
2238  // NLM cut, used in all, exclude clusters with more than 2 maxima
2239  // Not needed if M02 cut is already strong or clusterizer V2
2240  ana->SetNLMCut(1, 2) ;
2241  }
2242 
2243  //PID cuts (shower shape)
2244  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
2245  AliCaloPID* caloPID = ana->GetCaloPID();
2246  //Not used in bayesian
2247 
2248  //EMCAL
2249  //caloPID->SetEMCALLambda0CutMax(0.27);
2250  caloPID->SetEMCALLambda0CutMax(10);
2251  caloPID->SetEMCALLambda0CutMin(0.10);
2252 
2253  caloPID->SetEMCALDEtaCut(0.025);
2254  caloPID->SetEMCALDPhiCut(0.030);
2255 
2256  //PHOS
2257  caloPID->SetPHOSDispersionCut(2.5);
2258  caloPID->SetPHOSRCut(2.);
2259  if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
2260 
2261  // Input / output delta AOD settings
2262 
2263  if(!kData.Contains("delta"))
2264  {
2265  ana->SetOutputAODName(Form("Photon%s",kName.Data()));
2266  //ana->SetOutputAODClassName("AliAODCaloTrackParticleCorrelation");
2267  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
2268  //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
2269  }
2270  else ana->SetInputAODName(Form("Photon%s",kName.Data()));
2271 
2272  //Set Histograms name tag, bins and ranges
2273 
2274  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
2275  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2276 
2277  // Number of particle type MC histograms
2278  ana->FillNOriginHistograms (4); // 14 max
2279  ana->FillNPrimaryHistograms(4); // 6 max
2280 
2281  ConfigureMC(ana);
2282 
2283  if(kPrint) ana->Print("");
2284 
2285  return ana;
2286 
2287 }
2288 
2289 //_______________________________
2291 {
2292 
2293  AliAnaPi0 *ana = new AliAnaPi0();
2294 
2295  ana->SetDebug(kDebug);//10 for lots of messages
2296 
2297  // Input delta AOD settings
2298  ana->SetInputAODName(Form("Photon%s",kName.Data()));
2299 
2301 
2302  //ana->SwitchOnFiducialCut();
2303  //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
2304 
2305  // Calorimeter settings
2307 
2308  //settings for pp collision mixing
2309  ana->SwitchOffOwnMix(); //Off when mixing done with general mixing frame
2310 
2311  // Cuts
2312  if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(70);
2313 
2314  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
2315  //In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
2316 
2317  if (kCollisions=="pp" )
2318  {
2319  ana->SetNCentrBin(1);
2320  ana->SetNZvertBin(10);
2321  ana->SetNRPBin(1);
2322  ana->SetNMaxEvMix(100);
2323  ana->SwitchOnSMCombinations();
2324  }
2325  else if(kCollisions=="PbPb")
2326  {
2327  ana->SetNCentrBin(10);
2328  ana->SetNZvertBin(10);
2329  ana->SetNRPBin(4);
2330  ana->SetNMaxEvMix(10);
2331  ana->SwitchOffSMCombinations();
2332  }
2333 
2335 
2336  //Set Histograms name tag, bins and ranges
2337 
2338  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
2339  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2340 
2341  ana->SwitchOnFillOriginHisto();
2342  ConfigureMC(ana);
2343 
2344  if(kPrint) ana->Print("");
2345 
2346  return ana;
2347 
2348 }
2349 
2350 //_____________________________________________________
2352  Int_t analysis, Bool_t useSSIso = kTRUE, Bool_t useAsy = kTRUE)
2353 {
2354 
2355  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
2356  ana->SetDebug(kDebug);//10 for lots of messages
2357 
2358  ana->SetAnalysisType(analysis);
2359  TString opt = "";
2360  if(analysis==AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
2361  if(analysis==AliAnaPi0EbE::kSSCalo) opt = "SS";
2362 
2363  ana->SwitchOffAllNLMHistoFill();
2364  ana->SetFirstSMCoveredByTRD(-1);
2366 
2367  // if(opt.Contains("SS")) ana->SwitchOnSelectedClusterHistoFill();
2368  // else ana->SwitchOffSelectedClusterHistoFill();
2369 
2371  //if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
2372  //if(!kTime && !kSimulation) ana->SwitchOnFillEMCALBCHistograms();
2373 
2374  if(kTM) ana->SwitchOnTrackMatchRejection() ;
2375  else ana->SwitchOffTrackMatchRejection() ;
2376  ana->SwitchOffTMHistoFill() ;
2377 
2379 
2380  // Output delta AOD settings
2381 
2382  if(!kInputDataType.Contains("delta"))
2383  {
2384  ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
2385  printf("***Out branch %s***\n",ana->GetOutputAODName().Data());
2386  //ana->SetOutputAODClassName("AliAODCaloTrackParticleCorrelation");
2387  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
2388  }
2389  else
2390  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
2391 
2392  if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
2393 
2394  //Set Histograms name tag, bins and ranges
2395 
2396  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
2397  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2398 
2399  if(kPrint) ana->Print("");
2400 
2401  ConfigureMC(ana);
2402 
2404  if(analysis!=AliAnaPi0EbE::kSSCalo)
2405  {
2406  ana->SetInputAODName(Form("Photon%s",kName.Data()));
2407 
2409  ana->SetR(0.4);
2411 
2412  if(useSSIso)
2413  {
2415  ana->AddToHistogramsName(Form("Ana%s%sEbEIsoDecay_TM%d_",particle.Data(),opt.Data(),kTM));
2416  ana->SetOutputAODName(Form("%s%sIsoDecay%s",particle.Data(), opt.Data(), kName.Data()));
2417  }
2418 
2419  if(kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
2420 
2422  nms->SetParticle(particle);
2423 
2424  // Tighten a bit mass cut with respect to default window
2425  if(particle=="Pi0") nms->SetInvMassCutRange(0.110,0.160);
2426  if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
2427 
2428  //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
2429  //else nms->SwitchOnAngleSelection();
2430 
2431  nms->SwitchOffAngleSelection();
2432  if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
2433  nms->SetSideBandCutRanges(-1,0,0.170,0.210);
2434 
2435  if(particle.Contains("EtaSideBand")) // For pi0, do not consider left band
2436  nms->SetSideBandCutRanges(0.450,0.510,0.590,0.650);
2437 
2438  nms->KeepNeutralMesonSelectionHistos(kTRUE);
2439  //nms->SetAngleMaxParam(2,0.2);
2440  nms->SetHistoERangeAndNBins(0, 20, 80) ;
2441  //nms->SetHistoIMRangeAndNBins(0, 1, 400);
2442  }
2443  else
2444  {
2445  // cluster splitting settings
2446  ana->SetMinEnergy(6);
2447  ana->SetMaxEnergy(200.);
2448 
2449  ana->SetNLMMinEnergy(0, 10);
2450  ana->SetNLMMinEnergy(1, 6);
2451  ana->SetNLMMinEnergy(2, 6);
2452 
2453  // NLM cut, used in all, exclude clusters with more than 2 maxima
2454  ana->SetNLMCut(1, 2) ;
2455 
2456  //
2457  ana->SetMinDistanceToBadChannel(2, 4, 6);
2459  ana->SetTimeCut(-1e10,1e10); // Open time cut
2460 
2461  AliCaloPID* caloPID = ana->GetCaloPID();
2462 
2463  caloPID->SetSplitWidthSigma(3); // cut at 3 sigma of the mean pi0 peak.
2464 
2465  if(!useSSIso)
2466  {
2467  printf("Do not apply SS cut on merged pi0 analysis \n");
2468  caloPID->SwitchOffSplitShowerShapeCut() ;
2469  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
2470  ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
2471  caloPID->SetClusterSplittingM02Cut(0.1,10);
2472  }
2473  else
2474  {
2475  caloPID->SetClusterSplittingM02Cut(0.3,4); // Do the selection in the analysis class and not in the PID method to fill SS histograms
2476  caloPID->SwitchOnSplitShowerShapeCut() ;
2477  }
2478 
2479  if(useAsy)
2480  {
2481  caloPID->SwitchOnSplitAsymmetryCut() ;
2483  ana->GetCaloPID()->SetSubClusterEnergyMinimum(1,0.5);
2484  ana->GetCaloPID()->SetSubClusterEnergyMinimum(2,0.5);
2485  }
2486  else
2487  {
2488  caloPID->SwitchOffSplitAsymmetryCut() ;
2489  if(!useSSIso)
2490  {
2491  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
2492  ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
2493  }
2494  else
2495  {
2496  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
2497  ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
2498  }
2499  }
2500 
2501  //For Pi0 only if SwitchOnSimpleSplitMassCut()
2502  caloPID->SetPi0MassRange(0.10, 0.18);
2503  caloPID->SetEtaMassRange(0.40, 0.60);
2504  caloPID->SetPhotonMassRange(0.00, 0.08);
2505 
2506  caloPID->SetClusterSplittingMinNCells(6);
2507 
2508  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
2509  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
2510  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
2511 
2512  if(kCollisions=="PbPb" || kName.Contains("150"))
2513  {
2514  caloPID->SetClusterSplittingMinNCells(4);
2515  //caloPID->SetPi0MassShiftHighECell(0.005);
2516  }
2517  }
2519 
2520  return ana;
2521 
2522 }
2523 
2524 //____________________________________________________________________________________________________
2526  Int_t partInCone = AliIsolationCut::kOnlyCharged,
2527  Int_t thresType = AliIsolationCut::kSumPtFracIC,
2528  Float_t cone = 0.4,
2529  Float_t pth = 0.5, Float_t pthMax = -1,
2530  Bool_t multi = kFALSE)
2531 {
2532 
2534  ana->SetDebug(kDebug);
2535 
2536  ana->SetMinPt(5);
2538 
2540  ana->SwitchOffCellHistoFill() ;
2541 
2542  ana->SwitchOffLeadingOnly();
2544 
2545  // MC
2548 
2549  if(particle.Contains("Photon"))
2550  {
2552  ana->SetNDecayBits(4);
2553  ana->SwitchOnSSHistoFill();
2554  }
2555  else
2556  {
2557  ana->SwitchOffSSHistoFill();
2558  }
2559 
2561  ana->SetNPtTrigBins(6);
2562  //ana->SetPtTrigLimits(0,8); ana->SetPtTrigLimits(1,12); ana->SetPtTrigLimits(2,16); ana->SetPtTrigLimits(3,25);
2563 
2565  ana->SetNBackgroundBins(11);
2566  //ana->SetBackgroundLimits(0,0); ana->SetBackgroundLimits(1,0.2); ana->SetBackgroundLimits(2,3); ana->SetBackgroundLimits(3,0.4);
2567 
2568  ana->SetFirstSMCoveredByTRD(-1);
2569 
2570  if(!kTM) ana->SwitchOnTMHistoFill();
2571  else ana->SwitchOffTMHistoFill();
2572 
2573  //if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
2574 
2576  ana->SwitchOnFiducialCut();
2577 
2578  //Avoid borders of EMCal
2579  if(kCalorimeter=="EMCAL")
2580  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 86, 174) ;
2581 
2582  // Same Eta as EMCal, cut in phi if EMCAL was triggering
2583  if(particle=="Hadron" || particle.Contains("CTS"))
2584  {
2585  //if(kTrig.Contains("EMC"))
2586  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
2587  //else
2588  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
2589  }
2590 
2591  // Input / output delta AOD settings
2592 
2593  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
2594  if(pthMax > pth) ana->SetAODObjArrayName(Form("IC%s_%s_R%1.1f_ThMin%1.1f_ThMax%1.1f",particle.Data(),kName.Data(),cone,pth,pthMax));
2595  else ana->SetAODObjArrayName(Form("IC%s_%s_R%1.1f_ThMin%1.1f" ,particle.Data(),kName.Data(),cone,pth));
2596 
2597 
2598  //Do settings for main isolation cut class
2599  AliIsolationCut * ic = ana->GetIsolationCut();
2600  ic->SetDebug(kDebug);
2601  ic->SetParticleTypeInCone(partInCone);
2602  ic->SetICMethod(thresType);
2603  ic->SetPtFraction(0.1);
2604  ic->SetPtThreshold(0.5); // default, change in next lines
2605  ic->SetSumPtThreshold(1.0); // default, change in next lines
2606 
2607  if(cone >0 && pth > 0)
2608  {
2609  ic->SetConeSize(cone);
2610 
2611  if(thresType == AliIsolationCut::kPtThresIC)
2612  {
2613  printf("*** Iso *** PtThresMin = %1.1f GeV/c *** PtThresMax = %1.1f GeV/c *** R = %1.1f ***\n",pth,pthMax,cone);
2614  ic->SetPtThreshold(pth);
2615  if(pthMax > pth)ic->SetPtThresholdMax(pthMax);
2616  else ic->SetPtThresholdMax(100000);
2617  }
2618 
2619  if(thresType == AliIsolationCut::kSumPtIC)
2620  {
2621  printf("*** Iso *** SumPtMin = %1.1f GeV/c *** SumPtMax = %1.1f GeV/c *** R = %1.1f ***\n",pth,pthMax,cone);
2622  ic->SetSumPtThreshol(pth);
2623  if(pthMax > pth)ic->SetSumPtThresholdMax(pthMax);
2624  else ic->SetSumPtThresholdMax(100000);
2625  }
2626  }
2627  else
2628  {
2629  if(kCollisions=="pp")
2630  {
2631  ic->SetPtThreshold(0.5);
2632  ic->SetSumPtThreshold(1.0) ;
2633  ic->SetConeSize(0.4);
2634  }
2635  if(kCollisions=="PbPb")
2636  {
2637  ic->SetPtThreshold(3.);
2638  ic->SetSumPtThreshold(3.0) ;
2639  ic->SetConeSize(0.3);
2640  }
2641  }
2642 
2643 
2644  //Do or not do isolation with previously produced AODs.
2645  //No effect if use of SwitchOnSeveralIsolation()
2646  ana->SwitchOffReIsolation();
2647 
2648  //Multiple IC
2649  if(multi)
2650  {
2651  ic->SetConeSize(1.); // Take all for first iteration
2652  ic->SetPtThreshold(100);// Take all for first iteration
2653  ana->SwitchOnSeveralIsolation() ;
2654  ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),kTM));
2655 
2656  ana->SetNCones(3);
2657  ana->SetNPtThresFrac(2);
2658  ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4); ana->SetConeSizes(2,0.5);
2659  ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 1.5); ana->SetPtThresholds(3, 2);
2660  ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
2661  ana->SetSumPtThresholds(0, 0.5) ; ana->SetSumPtThresholds(1, 1) ; ana->SetSumPtThresholds(2, 1.5); ana->SetSumPtThresholds(3, 2) ;
2662  //ana->SetPtThresholds(0, 0.5);
2663 
2664  ana->SwitchOffTMHistoFill();
2665  ana->SwitchOffSSHistoFill();
2666  }
2667  else
2668  ana->SwitchOffSeveralIsolation() ;
2669 
2670  AliCaloPID* caloPID = ana->GetCaloPID();
2671  caloPID->SetEMCALDEtaCut(0.025);
2672  caloPID->SetEMCALDPhiCut(0.030);
2673 
2674  //Set Histograms name tag, bins and ranges
2675 
2676  if(!multi) ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),kTM));
2677  else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),kTM));
2678 
2679  // if(pthMax > pth) ana->AddToHistogramsName(Form("AnaIsol%s_R%1.1f_ThMin%1.1f_ThMax%1.1f_",particle.Data(),cone,pth,pthMax));
2680  // else ana->AddToHistogramsName(Form("AnaIsol%s_R%1.1f_ThMin%1.1f_" ,particle.Data(),cone,pth));
2681 
2682  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2683 
2684  if(particle=="Hadron" || particle.Contains("CTS"))
2685  {
2686  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
2687  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
2688  }
2689 
2690  ConfigureMC(ana);
2691 
2692  if(kPrint) ic ->Print("");
2693  if(kPrint) ana->Print("");
2694 
2695  return ana;
2696 
2697 }
2698 
2699 //___________________________________________________________________________________
2701  Bool_t bIsolated,
2702  Int_t partInCone = AliIsolationCut::kOnlyCharged,
2703  Int_t thresType = AliIsolationCut::kSumPtFracIC,
2704  Float_t cone = 0.3,
2705  Float_t pth = 0.3)
2706 {
2707 
2708  printf("1111111111/n");
2710  ana->SetDebug(kDebug);
2711 
2712  ana->SetTriggerPtRange(5,100);
2713  ana->SetAssociatedPtRange(0.2,100);
2714  //ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
2715  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
2716  // Underlying event
2717  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
2719  ana->SwitchOffAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
2720  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
2722 
2724  ana->SwitchOffCorrelationVzBin() ;
2726 
2729  if(particle.Contains("Photon"))
2730  {
2732  ana->SetNDecayBits(4);
2733  printf("**** SET M02 limits *** \n");
2734  ana->SetM02Cut(0.10,0.27);
2736  //ana->SwitchOnBackgroundBinsPtInConeHistograms();
2737  }
2738 
2739  ana->SetMCGenType(0,7);
2740 
2741  ana->SwitchOffLeadHadronSelection(); // Open cuts, just fill histograms
2745  printf("*****SWITCH ON DECAY BIT PT IN CONE HISTO******\n");
2746  ana->SetLeadHadronPhiCut(TMath::DegToRad()*130, TMath::DegToRad()*230.);
2747  ana->SetLeadHadronPtCut(0.5, 1000);
2748  // if triggering on PHOS and EMCAL is on
2749  //if(kCalorimeter=="PHOS") ana->SwitchOnNeutralCorr();
2750  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
2751  ana->SetPi0AODBranchName("Pi0EMCAL_TrigEMC7_Cl_TM1");
2752 
2754 
2756 
2757  //if(!kSimulation) ana->SwitchOnFillPileUpHistograms();
2758 
2759  ana->SetNAssocPtBins(8);
2760  ana->SetAssocPtBinLimit(0, 1) ;
2761  ana->SetAssocPtBinLimit(1, 2) ;
2762  ana->SetAssocPtBinLimit(2, 3) ;
2763  ana->SetAssocPtBinLimit(3, 4) ;
2764  ana->SetAssocPtBinLimit(4, 5) ;
2765  ana->SetAssocPtBinLimit(5, 8) ;
2766  ana->SetAssocPtBinLimit(6, 10) ;
2767  ana->SetAssocPtBinLimit(7, 100);
2768  ana->SelectIsolated(bIsolated); // do correlation with isolated photons
2769 
2770  // Mixing with own pool
2771  if(kMix)
2772  {
2773  ana->SwitchOnOwnMix();
2775 
2776  if(bIsolated)
2777  {
2778  //Do settings for main isolation cut class
2779  AliIsolationCut * ic = ana->GetIsolationCut();
2780  ic->SetDebug(kDebug);
2781 
2782  if(cone >0 && pth > 0)
2783  {
2784  printf("*** Correl *** PtThres = %1.1f GeV/c *** R = %1.1f ***\n",pth,cone);
2785  ic->SetPtThreshold(pth);
2786  ic->SetConeSize(cone);
2787  }
2788  else
2789  {
2790  if(kCollisions=="pp")
2791  {
2792  ic->SetPtThreshold(0.5);
2793  ic->SetConeSize(0.4);
2794  }
2795  if(kCollisions=="PbPb")
2796  {
2797  ic->SetPtThreshold(3.);
2798  //ic->SetPtThreshold(1.);
2799  ic->SetConeSize(0.3);
2800  }
2801  }
2802 
2803  ic->SetPtFraction(0.1);
2804  ic->SetSumPtThreshold(1.0) ;
2805  ic->SetParticleTypeInCone(partInCone);
2806  ic->SetICMethod(thresType);
2807  }
2808  }
2809  else
2810  ana->SwitchOffOwnMix();
2811  ana->SetNZvertBin(20);
2812 
2813  if(kCollisions=="pp")
2814  {
2815  ana->SetNMaxEvMix(100);
2816  ana->SwitchOnTrackMultBins();
2817  ana->SetNTrackMultBin(10);
2818  ana->SetNRPBin(1);
2819  }
2820  else
2821  {
2822  ana->SetNMaxEvMix(10);
2823  ana->SwitchOffTrackMultBins(); // centrality bins
2824  ana->SetNCentrBin(12);
2825  ana->SetNRPBin(3);
2826  if(kName.Contains("60_90"))
2827  {
2828  printf("*** Set mixing for peripheral\n");
2829  ana->SetNMaxEvMix(50);
2830  ana->SetNCentrBin(2);
2831  }
2832  }
2833 
2834  ana->SwitchOnFiducialCut();
2835 
2836  //Avoid borders of EMCal, same as for isolation
2837  if(kCalorimeter=="EMCAL")
2838  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
2839 
2840  // Same Eta as EMCal, cut in phi if EMCAL was triggering
2841  if(particle=="Hadron" || particle.Contains("CTS"))
2842  {
2843  //if(kTrig.Contains("EMC"))
2844  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
2845  //else
2846  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
2847  }
2848 
2849  // Input / output delta AOD settings
2850 
2851  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
2852  ana->SetAODObjArrayName(Form("%sHadronCorrIso%d_%s",particle.Data(),bIsolated,kName.Data()));
2853 
2854 
2855  //Set Histograms name tag, bins and ranges
2856 
2857  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,kTM));
2858  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2859 
2860  if(particle=="Hadron" || particle.Contains("CTS"))
2861  {
2862  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
2863  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
2864  }
2865 
2866  ConfigureMC(ana);
2867 
2868  if(kPrint) ana->Print("");
2869  printf("aaaaaaaaaaa\n");
2870 
2871  return ana;
2872 
2873 }
2874 
2875 //________________________________________________________________________________
2877 {
2878 
2880  ana->SetDebug(kDebug); //10 for lots of messages
2881 
2882  ana->FillAODWithElectrons() ;
2883  //ana->FillAODWithHadrons();
2884  //ana->FillAODWithAny();
2885 
2886  if(kCalorimeter == "PHOS")
2887  {
2888  ana->SetNCellCut(2);// At least 2 cells
2889  ana->SetMinPt(0.3);
2890  ana->SetMinDistanceToBadChannel(2, 4, 5);
2891  }
2892  else
2893  {//EMCAL
2894  ana->SetNCellCut(1);// At least 2 cells
2895  ana->SetMinPt(0.5); // no effect minium EMCAL cut.
2896  ana->SetMaxPt(100);
2897  //ana->SetTimeCut(400,900);// Time window of [400-900] ns
2898  ana->SetMinDistanceToBadChannel(2, 4, 6);
2899  }
2900 
2901  //Electron selection cuts with tracks
2902  ana->SetEOverP(0.85, 1.2);
2903 
2904  // TO DO, find a more suitable way to set this
2905  if (kRunNumber < 146861) ana->SetdEdxCut(72, 90);
2906  else if(kRunNumber < 154000) ana->SetdEdxCut(54, 70);
2907  else ana->SetdEdxCut(74, 90);
2908 
2909  if(kSimulation) ana->SetdEdxCut(80, 100);
2910 
2912 
2913  ana->SwitchOnCaloPID();
2914 
2915  AliCaloPID* caloPID = ana->GetCaloPID();
2916 
2917  caloPID->SetEMCALLambda0CutMax(0.27);
2918  caloPID->SetEMCALLambda0CutMin(0.10);
2919 
2922  ana->SwitchOffFiducialCut();
2923 
2924 
2925  if(!kData.Contains("delta"))
2926  {
2927  ana->SetOutputAODName(Form("Electron%s",kName.Data()));
2928  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
2929  }
2930  else ana->SetInputAODName(Form("Electron%s",kName.Data()));
2931 
2932  //Set Histograms name tag, bins and ranges
2933 
2934  ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
2935  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2936 
2937  ConfigureMC(ana);
2938 
2939  if(kPrint) ana->Print("");
2940 
2941  return ana ;
2942 
2943 }
2944 
2945 
2946 //_______________________________________________
2948 {
2949 
2951  ana->SetDebug(kDebug); //10 for lots of messages
2952 
2953  // selection cuts
2954 
2955  ana->SetMinPt(0.2);
2956  ana->SwitchOnFiducialCut();
2957  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
2958 
2960  //if(!kSimulation)
2963 
2964  // Input / output delta AOD settings
2965 
2966  if(!kData.Contains("delta"))
2967  {
2968  ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
2969  //ana->SetOutputAODClassName("AliAODCaloTrackParticleCorrelation");
2970  //ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
2971  ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
2972  }
2973  else
2974  ana->SetInputAODName(Form("Hadron%s",kName.Data()));
2975  printf("Set Hadron%s\n",kName.Data());
2976  //Set Histograms name tag, bins and ranges
2977 
2978  ana->AddToHistogramsName("AnaHadrons_");
2979  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
2980 
2981  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
2982  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
2983 
2984  ConfigureMC(ana);
2985 
2986  if(kPrint) ana->Print("");
2987 
2988  return ana;
2989 
2990 }
2991 
2992 //________________________________________
2994 {
2995 
2997  ana->SetDebug(kDebug); //10 for lots of messages
2999 
3000  ana->SetTimeCut(-1e10,1e10); // Open time cut
3001 
3002  // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
3003  if(kCalorimeter=="PHOS" && kTrig=="PHOS")
3004  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
3005  if(kCalorimeter=="EMCAL" && kClusterArray=="")
3006  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
3007  else
3008  ana->SwitchOffCorrelation();
3009 
3010  // Study exotic clusters PHOS and EMCAL
3011  if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
3012  else ana->SwitchOffStudyBadClusters() ;
3013 
3015 
3016  ana->SwitchOffFiducialCut();
3020  if(!kExotic)ana->SwitchOnStudyBadClusters();
3021  else ana->SwitchOffStudyBadClusters();
3023  ana->SwitchOffStudyWeight();
3026 
3027  ana->AddToHistogramsName("QA_"); //Begining of histograms name
3028  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
3029 
3030  ConfigureMC(ana);
3031 
3032  if(kPrint) ana->Print("");
3033 
3034  return ana;
3035 
3036 }
3037 
3038 //________________________________________________________________
3040 {
3041  // Analysis for parton, jets correlation with photon and pi0
3042 
3044  ana->SetDebug(kDebug); //10 for lots of messages
3045 
3046  // Trigger detector, acceptance and pT cut
3047  ana->SetTriggerDetector("EMCAL");
3048  ana->SetMinPt(10); // Trigger photon, pi0 minimum pT
3050 
3051  // Particles associated to trigger or isolation cone acceptance and pT cut
3052  ana->SetCalorimeter("EMCAL");
3053  ana->SetMinChargedPt(0.2);
3054  ana->SetMinNeutralPt(0.3);
3055  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
3056  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
3057 
3058  // Isolation paramters
3059  AliIsolationCut * ic = ana->GetIsolationCut();
3060  ic->SetDebug(kDebug);
3061  ic->SetPtThreshold(0.5);
3062  ic->SetConeSize(0.4);
3063  ic->SetSumPtThreshold(1.0) ;
3064  ic->SetICMethod(AliIsolationCut::kSumPtIC); // kSumPtIC
3065 
3066  ana->AddToHistogramsName("AnaGenKine_");
3067  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
3068 
3069  if(kPrint) ana->Print("");
3070 
3071  return ana;
3072 
3073 }
3074 
3075 //________________________________________________________________
3077 {
3078  // For filling all histograms meaninfully, in the reader, time cut must be off
3079  // and bad triggered events not rejected, and of course analyze triggered events.
3080 
3082  ana->SetDebug(kDebug); //10 for lots of messages
3083 
3084  // cluster selection cuts
3085 
3086  ana->SwitchOffFiducialCut();
3087  ana->SetNCellCut(1);// At least 2 cells
3088  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
3089  ana->SetMaxEnergy(1000);
3090  ana->SetM02(1, 2) ;
3092 
3093  ana->AddToHistogramsName("EMCTriggerClusters_");
3094  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
3095 
3096  if(kPrint) ana->Print("");
3097 
3098  return ana;
3099 
3100 }
3101 
3102 //___________________________________________________
3104 {
3105  // For filling all histograms meaninfully, in the reader, time cut must be off
3106  // and bad triggered events in different BC not rejected
3107 
3109  ana->SetDebug(kDebug); //10 for lots of messages
3110 
3111  // cluster selection cuts
3112 
3113  ana->SwitchOffFiducialCut();
3114  ana->SetNCellCut(1);// At least 2 cells
3115  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
3116  ana->SetMaxEnergy(1000);
3117 
3118  ana->AddToHistogramsName("ClusterPileUp_");
3119  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
3120 
3121  if(kPrint) ana->Print("");
3122 
3123  return ana;
3124 
3125 }
3126 
3127 //________________________________________________________
3129 {
3130  if(kSimulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
3131  else ana->SwitchOffDataMC() ;
3132 
3133  //Set here generator name, default pythia
3134  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
3135 }
3136 
3137 //________________________________________________________
3139 {
3140  // Set common bins for all analysis and MC histograms filling
3141 
3142  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
3143 
3144  if(kCalorimeter=="EMCAL")
3145  {
3146  if(kYears==2010)
3147  {
3148  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
3149  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
3150  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
3151  }
3152  else if(kYears==2011)
3153  {
3154  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
3155  histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
3156  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
3157  }
3158  else
3159  {
3160  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 190*TMath::DegToRad(), 122) ;
3161  histoRanges->SetHistoXRangeAndNBins(-100,90,200); // QA
3162  histoRanges->SetHistoYRangeAndNBins(50,450,100); // QA
3163  }
3164 
3165  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
3166  }
3167  else
3168  {
3169  histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
3170  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
3171  }
3172 
3173  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
3174 
3175  // Invariant mass histoRangeslysis
3176  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
3177  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
3178 
3179  // check if time calibration is on
3180  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
3181  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
3182  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
3183 
3184  // track-cluster residuals
3185  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
3186  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
3187  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
3188 
3189  // QA, electron, charged
3190  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
3191  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
3192 
3193  // QA
3194  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
3195  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
3196  histoRanges->SetHistoZRangeAndNBins(-400,400,200);
3197  histoRanges->SetHistoRRangeAndNBins(400,450,25);
3198  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
3199  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
3200 
3201  // QA, correlation
3202  if(kCollisions=="PbPb")
3203  {
3204  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
3205  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
3206  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
3207  }
3208  else
3209  {
3210  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
3211  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
3212  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
3213  }
3214 
3215  // xE, zT
3216  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
3217  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
3218 
3219  // Isolation
3220  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
3221  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
3222 
3223 }
3224 
3225 //_____________________________
3227 {
3228  if(kTrig=="EMC7")
3229  {
3230  printf("CaloTrackCorr trigger EMC7\n");
3231  return AliVEvent::kEMC7;
3232  }
3233  else if (kTrig=="INT7")
3234  {
3235  printf("CaloTrackCorr trigger INT7\n");
3236  return AliVEvent::kINT7;
3237  }
3238  else if(kTrig=="EMC1")
3239  {
3240  printf("CaloTrackCorr trigger EMC1\n");
3241  return AliVEvent::kEMC1;
3242  }
3243  else if(kTrig=="MB")
3244  {
3245  printf("CaloTrackCorr trigger MB\n");
3246  return AliVEvent::kMB;
3247  }
3248  else if(kTrig=="PHOS")
3249  {
3250  printf("CaloTrackCorr trigger PHOS\n");
3251  return AliVEvent::kPHI7;
3252  }
3253  else if(kTrig=="PHOSPb")
3254  {
3255  printf("CaloTrackCorr trigger PHOSPb\n");
3256  return AliVEvent::kPHOSPb;
3257  }
3258  else if(kTrig=="AnyINT")
3259  {
3260  printf("CaloTrackCorr trigger AnyINT\n");
3261  return AliVEvent::kAnyINT;
3262  }
3263  else if(kTrig=="INT")
3264  {
3265  printf("CaloTrackCorr trigger AnyINT\n");
3266  return AliVEvent::kAny;
3267  }
3268  else if(kTrig=="EMCEGA")
3269  {
3270  printf("CaloTrackCorr trigger EMC Gamma\n");
3271  return AliVEvent::kEMCEGA;
3272  }
3273  else if(kTrig=="EMCEJE")
3274  {
3275  printf("CaloTrackCorr trigger EMC Jet\n");
3276  return AliVEvent::kEMCEJE;
3277  }
3278  else if(kTrig=="Central")
3279  {
3280  printf("CaloTrackCorr trigger Central\n");
3281  return AliVEvent::kCentral;
3282  }
3283  else if(kTrig=="CentralEGA")
3284  {
3285  printf("CaloTrackCorr trigger Central+EMCEGA\n");
3286  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
3287  }
3288  else if(kTrig=="SemiCentral")
3289  {
3290  printf("CaloTrackCorr trigger SemiCentral\n");
3291  return AliVEvent::kSemiCentral;
3292  }
3293  else if(kTrig=="SemiOrCentral")
3294  {
3295  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
3296  return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
3297  }
3298 }
3299 
3300 
3301 
3302 
3303 
void SetEOverP(Double_t min, Double_t max)
void SetSumPtThresholds(Int_t i, Float_t pt)
void SwitchOffSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:113
void SetPtThreshold(Float_t pt)
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
TString kClusterArray
void SwitchOnFillOriginHisto()
Definition: AliAnaPi0.h:128
void SetShowerShapeSmearWidth(Float_t w)
void SetTimeCut(Double_t min, Double_t max)
void ana(Int_t mode=mGRID)
Definition: ana.C:86
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
AliCaloTrackReader * ConfigureReader()
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
AliAnaPi0 * ConfigurePi0Analysis()
void SwitchOnFillAllTrackMatchingHistogram()
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:248
virtual void SwitchOnFiducialCut()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:102
void SetClusterSplittingM02Cut(Float_t min=0, Float_t max=100)
Definition: AliCaloPID.h:229
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:225
void SetAssociatedPtRange(Float_t min, Float_t max)
void SetTriggerPatchTimeWindow(Int_t min, Int_t max)
Class with utils to perform Isolation Cuts.
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliAnalysisTaskCaloTrackCorrelation * AddTaskCaloTrackCorr(const TString data="", const TString calorimeter="EMCAL", const Bool_t simulation=kFALSE, const Bool_t eventsel=kFALSE, const Bool_t exotic=kTRUE, const Bool_t nonlin=kFALSE, TString outputfile="", const Int_t year=2010, const TString col="pp", const TString trigger="MB", const TString clustersArray="V1", const Bool_t mix=kTRUE, const Bool_t recaltm=kTRUE, const Bool_t tm=kTRUE, const Int_t minCen=-1, const Int_t maxCen=-1, const Bool_t qaan=kFALSE, const Bool_t hadronan=kFALSE, const Bool_t calibE=kTRUE, const Bool_t badmap=kTRUE, const Bool_t calibT=kTRUE, const Bool_t tender=kFALSE, const Bool_t outputAOD=kFALSE, const Bool_t printSettings=kFALSE, const Double_t scaleFactor=-1, const Int_t runNumber=-1)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SetConeSize(Float_t r)
void SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par)
void SetPtFraction(Float_t pt)
void SwitchOnSelectPairInIsolationCone()
Definition: AliAnaPi0EbE.h:128
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPi0EbE.h:143
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:107
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SwitchOffSplitShowerShapeCut()
Definition: AliCaloPID.h:226
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:232
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:38
void SetDebug(Int_t d)
void SetMinChargedPt(Float_t pt)
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
virtual AliIsolationCut * GetIsolationCut()
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(TString particle, Int_t analysis, Bool_t useSSIso=kTRUE, Bool_t useAsy=kTRUE)
void SwitchOnSMCombinations()
Definition: AliAnaPi0.h:89
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:85
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
void SwitchOffTMHistoFill()
Definition: AliAnaPhoton.h:77
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
void SetSumPtThresholdMax(Float_t s)
virtual void SetOutputAODClassName(TString name)
AliAnaChargedParticles * ConfigureChargedAnalysis()
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetSumPtThreshold(Float_t s)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPi0EbE.h:134
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:110
Class for the Calorimeter QA analysis.
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
Get trigger particles/partons/jets and correlations at generator level.
void SetPHOSEMax(Float_t e)
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:222
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:93
void SwitchOffFillWeightHistograms()
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SwitchOffTMHistoFill()
Definition: AliAnaPi0EbE.h:110
void SetEMCALEMin(Float_t e)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:93
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:31
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
void SetPtFractions(Int_t i, Float_t pt)
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:87
Selection of electron clusters in calorimeter.
const TString calorimeter
Definition: anaM.C:35
virtual void SetPtHardAndJetPtComparison(Bool_t compare)
Bool_t IsRecalibrationOn() const
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetIsolationCandidateMinPt(Float_t min)
Definition: AliAnaPi0EbE.h:123
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
void SetCTSPtMin(Float_t pt)
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:207
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:201
void SetLeadHadronPtCut(Float_t min, Float_t max)
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SetEventTriggerMask(UInt_t evtTrig=AliVEvent::kAny)
void SetICMethod(Int_t i)
void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par)
AliAnaParticleHadronCorrelation * ConfigureHadronCorrelationAnalysis(TString particle, Bool_t bIsolated, Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.3, Float_t pth=0.3)
void SwitchOffVertexBCEventSelection()
void SetR(Float_t r)
Definition: AliAnaPi0EbE.h:122
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
virtual void SetNTrackMultBin(Int_t n=1)
Number of bins in centrality.
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:103
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:89
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
virtual AliFiducialCut * GetFiducialCut()
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetSideBandCutRanges(Double_t lmin, Double_t lmax, Double_t rmin, Double_t rmax)
virtual AliHistogramRanges * GetHistogramRanges()
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:221
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
Bool_t IsBadChannelsRemovalSwitchedOn() const
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:32
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetConeSizes(Int_t i, Float_t r)
void SetHistoRangeAndNBins(AliHistogramRanges *histoRanges)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SwitchOnSelectIsolatedDecay()
Definition: AliAnaPi0EbE.h:125
Class for filtering generated MC particles and prepare them as input for the analysis.
Fill histograms for cluster spectra dependence on pile-up.
AliCalorimeterUtils * ConfigureCaloUtils()
TString kCalorimeter
void SetM02Cut(Float_t min=0, Float_t max=10)
void SwitchOnSplitClusterDistToBad()
Definition: AliAnaPi0EbE.h:161
void SwitchOnRecalculateClusterTrackMatching()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void SetPtHardAndClusterPtComparison(Bool_t compare)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SwitchOffTriggerClusterTimeRecal()
void SwitchOffTrackMatchRejection()
Definition: AliAnaPi0EbE.h:150
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n)
Base class for event, clusters and tracks filtering and preparation for the analysis.
void SetInputAODGammaConvName(TString name)
Definition: AliAnaPi0EbE.h:99
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SwitchOffBadTriggerEventsRemoval()
void SetEMCALClusterListName(TString &name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:1269
void SetMinNeutralPt(Float_t pt)
void SetParticle(TString particleName)
Set some default parameters for selection of pi0 or eta.
void FillAODWithElectrons()
void SetEventTriggerL1Bit(Int_t ega, Int_t eje)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaPhoton * ConfigurePhotonAnalysis()
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:88
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Class for study of EMCAL trigger behaviour.
void SetPtThresholdMax(Float_t pt)
virtual void SetZvertexCut(Float_t zcut=10.)
AliAnaCalorimeterQA * ConfigureQAAnalysis()
AliFiducialCut * GetFiducialCutForTrigger()
TString kInputDataType
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:270
void SetNumberOfSuperModulesUsed(Int_t nSM)
UInt_t SetTriggerMaskFromName()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:269
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:192
void SwitchOnTrackMatchRejection()
Definition: AliAnaPi0EbE.h:149
virtual void SetNCentrBin(Int_t n=1)
Number of bins in reaction plain.
virtual void SetPtHardAndJetPtFactor(Float_t factor)
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
virtual void SetEventPlaneMethod(TString m)
void SetNAsymCuts(Int_t s)
Definition: AliAnaPi0.h:113
virtual void SetNRPBin(Int_t n=1)
Number of bins for vertex position.
AliAnaElectron * ConfigureElectronAnalysis()
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:210
virtual void SetTrackCuts(AliESDtrackCuts *)
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPi0EbE.h:101
Track selection for correlation analysis.
void SetM02(Float_t min, Float_t max)
void SetMCGenType(Int_t min=0, Int_t max=6)
virtual void SetCentralityClass(TString name)
void SwitchOnFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:68
Select clusters/tracks with low particle environment in their vecinity, isolated within a cone...
void SwitchOnBadTriggerEventsRemoval()
AliAnaParticleIsolation * ConfigureIsolationAnalysis(TString particle="Photon", Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.4, Float_t pth=0.5, Float_t pthMax=-1, Bool_t multi=kFALSE)
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffFillWeightHistograms()
Definition: AliAnaPi0EbE.h:153
void SwitchOffFillShowerShapeHistograms()
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
void SetTriggerDetector(TString &det)
Set the calorimeter for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetAODObjArrayName(TString name)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SwitchOffLoadOwnPHOSGeometryMatrices()
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0SignalRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
Class that contains methods to select candidate cluster pairs to neutral meson.
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void ConfigureMC(AliAnaCaloTrackCorrBaseClass *ana)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEventTriggerL0Threshold(Float_t tr)
void SwitchOffSMCombinations()
Definition: AliAnaPi0.h:90
void SetNAssocPtBins(Int_t n)
Set number of associated charged (neutral) hadrons pT bins.
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:51
1 calorimeter cluster shower shape and split invariatn mass selection
Definition: AliAnaPi0EbE.h:88
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:105
virtual void SetNMaxEvMix(Int_t n=20)
Number of bins in track multiplicity.
void SetNCellCut(Int_t n)
void SetPHOSEMin(Float_t e)
void SetNLMMinEnergy(Int_t i, Float_t min)
Definition: AliAnaPi0EbE.h:139
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLeadHadronPhiCut(Float_t min, Float_t max)
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class with utils specific to calorimeter clusters/cells.
virtual void SwitchOnConstrainTrackToVertex()
void SetMixEventTriggerMask(UInt_t evtTrig=AliVEvent::kAnyINT)
TString kInputData
With real data kMC = kFALSE.
Definition: ana.C:63
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:195
Bool_t kEventSelection
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaGeneratorKine * ConfigureGenKineAnalysis()
void SetParticleTypeInCone(Int_t i)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALEMax(Float_t e)
void SetSubClusterEnergyMinimum(Int_t i, Float_t min)
Definition: AliCaloPID.h:238
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:198
void SetPhotonMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:271
AliAnaEMCALTriggerClusters * ConfigureEMCALTriggerClusterAnalysis()
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
void SetPtThresholds(Int_t i, Float_t pt)
void SetdEdxCut(Double_t min, Double_t max)
AliAnaClusterPileUp * ConfigureClusterPileUpAnalysis()
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffAllNLMHistoFill()
Definition: AliAnaPi0EbE.h:107
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:96
void SetAssocPtBinLimit(Int_t ibin, Float_t pt)
Set the list of pT limits for the of associated charged (neutral) hadrons.
void ConfigureEMCALRecoUtils(AliEMCALRecoUtils *reco, Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE)
Steering class of package CaloTrackCorrelartions.
void SetTriggerPtRange(Float_t min, Float_t max)