AliPhysics  vAN-20150822 (d56cf94)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskPi0.C
Go to the documentation of this file.
1 
9 TString kAnaPi0 = "";
10 
35 (
36  TString calorimeter = "EMCAL",
37  Bool_t simulation = kFALSE,
38  Int_t year = 2011,
39  TString col = "pp",
40  TString trigger = "EMC7",
41  Int_t rejectEMCTrig = 0,
42  TString clustersArray = "",
43  Bool_t tender = kFALSE,
44  Bool_t nonLinOn = kFALSE,
45  Float_t shshMax = 0.5,
46  Bool_t tm = kTRUE,
47  Int_t minCen = -1,
48  Int_t maxCen = -1,
49  Bool_t mixOn = kTRUE,
50  TString outputfile = "",
51  Bool_t printSettings = kFALSE,
52  Int_t debug = 0 // Debug level
53  )
54 
55 {
56  // Get the pointer to the existing analysis manager via the static access method.
57 
58  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>, tm %d, minCen %d, maxCen %d, mixOn <%d>,\n outputfile <%s>, printSettings <%d>, debug <%d>\n",
59  calorimeter.Data(),simulation,year,col.Data(),trigger.Data(), rejectEMCTrig, clustersArray.Data(),tender, nonLinOn, shshMax,tm,
60  minCen,maxCen,mixOn,outputfile.Data(),printSettings,debug);
61 
62  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
63  if (!mgr)
64  {
65  ::Error("AddTask", "No analysis manager to connect to.");
66  return NULL;
67  }
68 
69  // Check the analysis type using the event handlers connected to the analysis manager.
70 
71  if (!mgr->GetInputEventHandler())
72  {
73  ::Error("AddTask", "This task requires an input event handler");
74  return NULL;
75  }
76 
77  // Make sure the B field is enabled for track selection, some cuts need it
78  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
79 
80  // Name for containers
81 
82  kAnaPi0 = Form("Pi0_%s_Trig%s_Col_%s_Year%d_Cl%s_Ten%d_TM%d_M02_%1.2f_Mix%d",
83  calorimeter.Data(),trigger.Data(),col.Data(),year,clustersArray.Data(),tender,
84  tm, shshMax,mixOn);
85 
86  if(col=="PbPb" && maxCen>=0) kAnaPi0+=Form("Cen%d_%d",minCen,maxCen);
87 
88  printf("<<<< NAME: %s >>>>>\n",kAnaPi0.Data());
89 
90  // #### Configure analysis ####
91 
93 
94  // General frame setting and configuration
95  maker->SetReader ( ConfigureReader (col,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
96  maker->SetCaloUtils( ConfigureCaloUtils(col,simulation,clustersArray,tender,nonLinOn,year, printSettings,debug) );
97 
98  // Analysis tasks setting and configuration
99  Int_t n = 0;//Analysis number, order is important
100 
101  // Photon analysis
102  //
103  maker->AddAnalysis(ConfigurePhotonAnalysis(col, simulation, calorimeter, year, tm, shshMax, printSettings, debug), n++);
104 
105  // Pi0 analysis
106  //
107  maker->AddAnalysis(ConfigurePi0Analysis (col, simulation, calorimeter, year, tm, mixOn , printSettings, debug), n++);
108 
109  maker->SetAnaDebug(debug) ;
110 
111  maker->SwitchOnHistogramsMaker() ;
112  maker->SwitchOnAODsMaker() ;
113 
114  maker->SwitchOffDataControlHistograms();
115  if(rejectEMCTrig) maker->SwitchOnDataControlHistograms();
116 
117  if(printSettings) maker->Print("");
118 
119  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
120 
121  // Create task
122 
124 
125  task->SetDebugLevel(debug);
126 
127  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
128  //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
129 
130  task->SetAnalysisMaker(maker);
131 
132  mgr->AddTask(task);
133 
134  //Create containers
135 
136  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
137 
138  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaPi0, TList::Class(),
139  AliAnalysisManager::kOutputContainer,
140  Form("%s",outputfile.Data()));
141 
142  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaPi0.Data()), TList::Class(),
143  AliAnalysisManager::kParamContainer,
144  "AnalysisParameters.root");
145 
146  // Create ONLY the output containers for the data produced by the task.
147  // Get and connect other common input/output containers via the manager as below
148  //==============================================================================
149  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
150  //if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
151  mgr->ConnectOutput (task, 1, cout_pc);
152  mgr->ConnectOutput (task, 2, cout_cuts);
153 
154 // if(!mixOn)
155 // {
156  UInt_t mask = SetTriggerMaskFromName(trigger);
157  task->SelectCollisionCandidates(mask);
158 // }
159 
160  return task;
161 }
162 
166 AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation,
167  TString clustersArray, Bool_t tender,
168  TString calorimeter, Bool_t nonLinOn,
169  TString trigger, Bool_t rejectEMCTrig,
170  Int_t minCen, Int_t maxCen,
171  Bool_t printSettings, Int_t debug )
172 {
173  // Get the data type ESD or AOD
174  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
175  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
176 
177  AliCaloTrackReader * reader = 0;
178  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
179  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
180  else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
181 
182  reader->SetDebug(debug);//10 for lots of messages
183 
184  //
185  // MC settings
186  //
187  // Check if kine stack is available, independent of request of simulation
188  Bool_t useKinematics = kFALSE;
189  useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
190 
191  if(simulation)
192  {
193  if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
194  }
195 
196  if(useKinematics)
197  {
198  if(inputDataType == "ESD")
199  {
200  reader->SwitchOnStack();
201  reader->SwitchOffAODMCParticles();
202  }
203  else if(inputDataType == "AOD")
204  {
205  reader->SwitchOffStack();
206  reader->SwitchOnAODMCParticles();
207  }
208  }
209 
210  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
211  // reject some special events that bother the cross section
212  if(simulation)
213  {
214  // Event rejection cuts for jet-jet simulations, do not use in other
215  reader->SetPtHardAndJetPtComparison(kTRUE);
216  reader->SetPtHardAndJetPtFactor(4);
217 
218  reader->SetPtHardAndClusterPtComparison(kTRUE);
219  reader->SetPtHardAndClusterPtFactor(1.5);
220  }
221 
222  //------------------------
223  // Detector input filling
224  //------------------------
225 
226  //Min cluster/track E
227  reader->SetEMCALEMin(0.3);
228  reader->SetEMCALEMax(1000);
229  reader->SetPHOSEMin(0.3);
230  reader->SetPHOSEMax(1000);
231  reader->SetCTSPtMin(0.2);
232  reader->SetCTSPtMax(1000);
233 
236 
237  // Shower shape smearing
238  // Set it in the train configuration page not here for the moment
239 // if(simulation)
240 // {
241 // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
242 // reader->SetShowerShapeSmearWidth(0.005);
243 // }
244 
245  //
246  // Tracks
247  //
248  reader->SwitchOnCTS();
249 
250  reader->SwitchOffUseTrackTimeCut();
251  reader->SetTrackTimeCut(0,50);
252 
253  reader->SwitchOnFiducialCut();
254  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
255 
256  reader->SwitchOffUseTrackDCACut();
257  //reader->SetTrackDCACut(0,0.0105);
258  //reader->SetTrackDCACut(1,0.035);
259  //reader->SetTrackDCACut(2,1.1);
260 
261  if(inputDataType=="ESD")
262  {
263  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
264 
265  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
266  //reader->SetTrackCuts(esdTrackCuts);
267 
268  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
269  reader->SetTrackCuts(esdTrackCuts);
270  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
271  reader->SetTrackComplementaryCuts(esdTrackCuts2);
272 
274  }
275  else if(inputDataType=="AOD")
276  {
277  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
279  reader->SetTrackStatus(AliVTrack::kITSrefit);
280 
281  //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
282  //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
283  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
284  }
285 
286  //
287  // Calorimeter
288  //
289  if(clustersArray == "" && !tender)
290  {
291  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
293  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
294  }
295  else
296  {
297  printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
298  reader->SetEMCALClusterListName(clustersArray);
300  }
301 
302  // Time cuts
304  if(simulation)
305  {
306  reader->SwitchOffUseEMCALTimeCut();
307  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
308  }
309  else
310  {
311  reader->SwitchOnUseEMCALTimeCut();
312  reader->SetEMCALTimeCut(-25,20);
313  }
314 
315  // CAREFUL
316  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
318 
319  if(calorimeter == "EMCAL")
320  {
321  reader->SwitchOnEMCALCells();
322  reader->SwitchOnEMCAL();
323  }
324 
325  if(calorimeter == "PHOS")
326  { // Should be on if QA is activated with correlation on
327  reader->SwitchOnPHOSCells();
328  reader->SwitchOnPHOS();
329  }
330 
331  //-----------------
332  // Event selection
333  //-----------------
334 
335  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
336 
337  // Event triggered by EMCal selection settings
340 
341  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
342  {
343  printf("=== Remove bad triggers === \n");
346 
347 // reader->SetTriggerPatchTimeWindow(8,9); // default values
348 // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
349 // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
350 // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
351 // //redefine for other periods, triggers
352 //
353 // if(kRunNumber < 172000)
354 // {
355 // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
356 // printf("\t Old L1 Trigger data format!\n");
357 // }
358 // else
359 // {
360 // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
361 // printf("\t Current L1 Trigger data format!\n");
362 // }
363 
364  if(clustersArray != "" || tender)
365  {
366  printf("Trigger cluster calibration OFF\n");
368  }
369  }
370 
371  //reader->RejectFastClusterEvents() ;
372 
373  reader->SetZvertexCut(10.); // Open cut
374  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
375  reader->SwitchOnRejectNoTrackEvents();
376 
377  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
378  reader->SwitchOffPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
379 
380  if(col=="PbPb")
381  {
382  // Centrality
383  reader->SetCentralityClass("V0M");
384  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
385  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
386 
387  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
388  reader->SetEventPlaneMethod("V0");
389  }
390 
391  if(printSettings) reader->Print("");
392 
393  return reader;
394 }
395 
399 AliCalorimeterUtils* ConfigureCaloUtils(TString col, Bool_t simulation,
400  TString clustersArray, Bool_t tender,
401  Bool_t nonLinOn, Int_t year,
402  Bool_t printSettings, Int_t debug)
403 {
405 
406  cu->SetDebug(debug);
407 
408  // Remove clusters close to borders, at least max energy cell is 1 cell away
411 
413 
414  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
415  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
416  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
417  else cu->SetNumberOfSuperModulesUsed(10);
418 
419  printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
420 
421  // Search of local maxima in cluster
422  if(col=="pp")
423  {
424  cu->SetLocalMaximaCutE(0.1);
425  cu->SetLocalMaximaCutEDiff(0.03);
426  }
427  else
428  {
429  cu->SetLocalMaximaCutE(0.2);
430  cu->SetLocalMaximaCutEDiff(0.03);
431  }
432 
434 
436 
437  // EMCAL settings
438 
439  if(!simulation)
441 
442  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
443 
444  // calibrations
445  Bool_t calibEner = kFALSE;
446  Bool_t calibTime = kFALSE;
447  cu->SwitchOffRecalibration();
449 
450  if( !tender )
451  {
452  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
454 
455  calibEner = kTRUE;
456  calibTime = kTRUE;
457  }
458 
459  if( simulation )
460  {
461  calibEner = kFALSE;
462  calibTime = kFALSE;
463 
464  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
466  }
467 
468  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
470  simulation,
471  kTRUE, // exotic
472  nonLinOn, // Non linearity
473  calibEner, // E calib
474  kTRUE, // bad map
475  calibTime); // time calib
476 
477  if( calibTime ) recou->SetExoticCellDiffTimeCut(50);
478 
479  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
480 
481  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
482  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
483 
484  // PHOS
486 
487  if(printSettings) cu->Print("");
488 
489  return cu;
490 }
491 
496 AliAnaPhoton* ConfigurePhotonAnalysis(TString col, Bool_t simulation,
497  TString calorimeter, Int_t year,
498  Int_t tm, Float_t shshMax,
499  Bool_t printSettings, Int_t debug)
500 {
501  AliAnaPhoton *ana = new AliAnaPhoton();
502 
503  // cluster selection cuts
504 
506 
507  ana->SwitchOffFiducialCut();
508 
509  ana->SetCalorimeter(calorimeter);
510 
511  ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
512 
513  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
514 
515  if(tm) ana->SwitchOnTrackMatchRejection() ;
516  else ana->SwitchOffTrackMatchRejection() ;
517 
518  ana->SwitchOnTMHistoFill() ;
519 
520  if(calorimeter == "PHOS")
521  {
522  ana->SetNCellCut(2);// At least 3 cells
523  ana->SetMinPt(0.3);
524  ana->SetMinDistanceToBadChannel(2, 4, 5);
525  ana->SetTimeCut(-1e10,1e10); // open cut
526  }
527  else
528  {//EMCAL
529  ana->SetNCellCut(1);// At least 2 cells
530  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
531  ana->SetMaxEnergy(100);
532  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
533  // restrict to less than 100 ns when time calibration is on
534  ana->SetMinDistanceToBadChannel(2, 4, 6);
535 
536  // NLM cut, used in all, exclude clusters with more than 2 maxima
537  // Not needed if M02 cut is already strong or clusterizer V2
538  ana->SetNLMCut(1, 2) ;
539  }
540 
541  //PID cuts (shower shape)
542  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
543  AliCaloPID* caloPID = ana->GetCaloPID();
544  //Not used in bayesian
545 
546  // EMCAL
547 
548  //caloPID->SetEMCALLambda0CutMax(0.27);
549  caloPID->SetEMCALLambda0CutMax(shshMax);
550  caloPID->SetEMCALLambda0CutMin(0.10);
551 
552  // Track matching
553  caloPID->SetEMCALDEtaCut(0.025);
554  caloPID->SetEMCALDPhiCut(0.030);
555 
556  // PHOS
557  caloPID->SetPHOSDispersionCut(2.5);
558  caloPID->SetPHOSRCut(2.);
559  //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
560 
561  // Branch AOD settings
562  ana->SetOutputAODName(Form("Photon_%s",kAnaPi0.Data()));
563  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
564 
565  //Set Histograms name tag, bins and ranges
566  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
567 
568  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
569 
570  if(ana->GetFirstSMCoveredByTRD() > 0)
571  printf(">>> Set first SM covered by TRD, SM=%d <<< year %d \n", ana->GetFirstSMCoveredByTRD(),year);
572 
573  // Number of particle type MC histograms
574  ana->FillNOriginHistograms (14); // 14 max
575  ana->FillNPrimaryHistograms(6); // 6 max
576 
577  return ana;
578 }
579 
583 AliAnaPi0* ConfigurePi0Analysis(TString col, Bool_t simulation,
584  TString calorimeter, Int_t year,
585  Int_t tm, Bool_t mixOn,
586  Bool_t printSettings, Int_t debug)
587 {
588  AliAnaPi0 *ana = new AliAnaPi0();
589 
590  ana->SetDebug(debug);
591 
592  // Input delta AOD settings
593  ana->SetInputAODName(Form("Photon_%s",kAnaPi0.Data()));
594 
595  // Calorimeter settings
596  ana->SetCalorimeter(calorimeter);
597 
598  // settings for pp collision mixing
599  if(mixOn) ana->SwitchOnOwnMix();
600  else ana->SwitchOffOwnMix();
601 
602  // Cuts
603  if (calorimeter == "EMCAL" ) ana->SetPairTimeCut(200);
604 
605  ana->SetNPIDBits(1);
606  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
607  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
608 
609  if (col == "pp" )
610  {
611  ana->SetNCentrBin(1);
612  ana->SwitchOffTrackMultBins();
613  ana->SetNZvertBin(10);
614  ana->SetNRPBin(1);
615  ana->SetNMaxEvMix(100);
616  ana->SetMinPt(0.5);
617  }
618  else if(col == "PbPb")
619  {
620  ana->SetNCentrBin(10);
621  ana->SetNZvertBin(10);
622  ana->SetNRPBin(4);
623  ana->SetNMaxEvMix(10);
624  ana->SetMinPt(1.5);
625  }
626  else if(collision =="pPb")
627  {
628  ana->SetNCentrBin(1);
629  ana->SetNZvertBin(10);
630  ana->SetNRPBin(4);
631  ana->SetNMaxEvMix(100);
632  ana->SetMinPt(0.5);
633  }
634 
635  ana->SwitchOnSMCombinations();
638  ana->SwitchOnFillOriginHisto(); // MC
639 
640  // Set Histograms name tag, bins and ranges
641 
642  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",tm));
643 
644  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
645 
646  if(printSettings) ana->Print("");
647 
648  return ana;
649 }
650 
658  TString calorimeter, Int_t year,
659  TString col, Bool_t simulation,
660  Bool_t printSettings, Int_t debug)
661 {
662  //
663  // Histograms ranges
664  //
665  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
666 
667  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
668 
669  if(calorimeter=="EMCAL")
670  {
671  if(year==2010)
672  {
673  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
674  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
675  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
676  }
677  else if ( year < 2014 )
678  {
679  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
680  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
681  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
682  }
683  else // Run2
684  {
685  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
686  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
687  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
688  }
689 
690  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
691  }
692  else if(calorimeter=="PHOS")
693  {
694  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
695  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
696  }
697  else if(calorimeter=="CTS")
698  {
699  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
700  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
701  }
702 
703  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
704 
705  // Invariant mass histo
706  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
707  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
708 
709  // check if time calibration is on
710  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
711  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
712  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
713 
714  // track-cluster residuals
715  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
716  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
717  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
718 
719  // QA, electron, charged
720  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
721  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
722 
723  // QA
724  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
725  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
726  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
727  histoRanges->SetHistoRRangeAndNBins(430,460,30);
728  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
729  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
730 
731  // QA, correlation
732  if(col=="PbPb")
733  {
734  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
735  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
736  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
737  }
738  else
739  {
740  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
741  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
742  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
743  }
744 
745  // xE, zT
746  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
747  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
748 
749  // Isolation
750  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
751  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
752 
753  //
754  // TRD SM
755  //
756  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
757  else if(year == 2012 ||
758  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
759  else ana->SetFirstSMCoveredByTRD(-1);
760 
761  //
762  // MC histograms?
763  //
764  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
765  else ana->SwitchOffDataMC() ;
766 
767  //Set here generator name, default pythia
768  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
769 
770  //
771  // Debug
772  //
773  if(printSettings) ana->Print("");
774 
775  ana->SetDebug(debug); // 10 for lots of messages
776 }
777 
782 UInt_t SetTriggerMaskFromName(TString trigger)
783 {
784  if(trigger=="EMC7")
785  {
786  printf("CaloTrackCorr trigger EMC7\n");
787  return AliVEvent::kEMC7;
788  }
789  else if (trigger=="INT7")
790  {
791  printf("CaloTrackCorr trigger INT7\n");
792  return AliVEvent::kINT7;
793  }
794  else if(trigger=="EMC1")
795  {
796  printf("CaloTrackCorr trigger EMC1\n");
797  return AliVEvent::kEMC1;
798  }
799  else if(trigger=="MB")
800  {
801  printf("CaloTrackCorr trigger MB\n");
802  return AliVEvent::kMB;
803  }
804  else if(trigger=="PHOS")
805  {
806  printf("CaloTrackCorr trigger PHOS\n");
807  return AliVEvent::kPHI7;
808  }
809  else if(trigger=="PHOSPb")
810  {
811  printf("CaloTrackCorr trigger PHOSPb\n");
812  return AliVEvent::kPHOSPb;
813  }
814  else if(trigger=="AnyINT")
815  {
816  printf("CaloTrackCorr trigger AnyINT\n");
817  return AliVEvent::kAnyINT;
818  }
819  else if(trigger=="INT")
820  {
821  printf("CaloTrackCorr trigger AnyINT\n");
822  return AliVEvent::kAny;
823  }
824  else if(trigger=="EMCEGA")
825  {
826  printf("CaloTrackCorr trigger EMC Gamma\n");
827  return AliVEvent::kEMCEGA;
828  }
829  else if(trigger=="EMCEJE")
830  {
831  printf("CaloTrackCorr trigger EMC Jet\n");
832  return AliVEvent::kEMCEJE;
833  }
834  else if(trigger=="Central")
835  {
836  printf("CaloTrackCorr trigger Central\n");
837  return AliVEvent::kCentral;
838  }
839  else if(trigger=="CentralEGA")
840  {
841  printf("CaloTrackCorr trigger Central+EMCEGA\n");
842  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
843  }
844  else if(trigger=="SemiCentral")
845  {
846  printf("CaloTrackCorr trigger SemiCentral\n");
847  return AliVEvent::kSemiCentral;
848  }
849  else if(trigger=="SemiOrCentral")
850  {
851  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
852  return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
853  }
854  else return AliVEvent::kAny;
855 }
856 
virtual void SwitchOnAODTrackSharedClusterSelection()
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SwitchOnFillOriginHisto()
Definition: AliAnaPi0.h:128
void ana(Int_t mode=mGRID)
Definition: ana.C:86
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
virtual void SwitchOnFiducialCut()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:102
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnTMHistoFill()
Definition: AliAnaPhoton.h:76
void SetNPIDBits(Int_t s)
Definition: AliAnaPi0.h:115
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:107
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:38
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
AliAnalysisTaskCaloTrackCorrelation * AddTaskPi0(TString calorimeter="EMCAL", Bool_t simulation=kFALSE, Int_t year=2011, TString col="pp", TString trigger="EMC7", Int_t rejectEMCTrig=0, TString clustersArray="", Bool_t tender=kFALSE, Bool_t nonLinOn=kFALSE, Float_t shshMax=0.5, Bool_t tm=kTRUE, Int_t minCen=-1, Int_t maxCen=-1, Bool_t mixOn=kTRUE, TString outputfile="", Bool_t printSettings=kFALSE, Int_t debug=0)
Definition: AddTaskPi0.C:35
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
void SwitchOnSMCombinations()
Definition: AliAnaPi0.h:89
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:85
virtual void SetOutputAODClassName(TString name)
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:110
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SetPHOSEMax(Float_t e)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SetEMCALEMin(Float_t e)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:93
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.
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
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SwitchOffVertexBCEventSelection()
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:103
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()
void SwitchOffFillAngleHisto()
Definition: AliAnaPi0.h:80
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliHistogramRanges * GetHistogramRanges()
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTrackStatus(ULong_t bit)
TString kAnaPi0
Global name to be composed of the settings, used to set the AOD branch name.
Definition: AddTaskPi0.C:9
AliAnaPi0 * ConfigurePi0Analysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t mixOn, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:583
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)
AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, TString calorimeter, Bool_t nonLinOn, TString trigger, Bool_t rejectEMCTrig, Int_t minCen, Int_t maxCen, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:166
virtual void SetPtHardAndClusterPtComparison(Bool_t compare)
void SwitchOffTriggerClusterTimeRecal()
Base class for event, clusters and tracks filtering and preparation for the analysis.
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
Int_t GetNumberOfSuperModulesUsed() const
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:88
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:657
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void SetZvertexCut(Float_t zcut=10.)
void SetNumberOfSuperModulesUsed(Int_t nSM)
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:192
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.
AliAnaPhoton * ConfigurePhotonAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Float_t shshMax, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:496
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.
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:210
UInt_t SetTriggerMaskFromName(TString trigger)
Definition: AddTaskPi0.C:782
virtual void SetTrackCuts(AliESDtrackCuts *)
virtual void SetCentralityClass(TString name)
void SwitchOnFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:68
void SwitchOnBadTriggerEventsRemoval()
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnClusterELinearityCorrection()
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SwitchOffLoadOwnPHOSGeometryMatrices()
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliCalorimeterUtils * ConfigureCaloUtils(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, Bool_t nonLinOn, Int_t year, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:399
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.
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:51
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:105
virtual void SetNMaxEvMix(Int_t n=20)
Number of bins in track multiplicity.
void SetPHOSEMin(Float_t e)
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class with utils specific to calorimeter clusters/cells.
virtual void SwitchOnConstrainTrackToVertex()
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:195
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALEMax(Float_t e)
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:198
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:96
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)
Int_t GetFirstSMCoveredByTRD() const
Time cut in ns.
Steering class of package CaloTrackCorrelartions.