AliPhysics  31210d0 (31210d0)
AddTaskClusterShape.C
Go to the documentation of this file.
1 
10 // Set includes for compilation
11 
12 #if !defined(__CINT__) || defined(__MAKECINT__)
13 
14 #include <TString.h>
15 #include <TROOT.h>
16 #include <TSystem.h>
17 
18 #include "AliLog.h"
20 #include "AliCaloTrackESDReader.h"
21 #include "AliCaloTrackAODReader.h"
22 #include "AliCalorimeterUtils.h"
24 #include "AliHistogramRanges.h"
25 #include "AliAnaCalorimeterQA.h"
27 #include "AliAnalysisManager.h"
28 #include "AliInputEventHandler.h"
29 #include "AliVTrack.h"
31 #include "AliESDtrackCuts.h"
32 #include "CreateTrackCutsPWGJE.C"
34 //#include "ConfigureEMCALRecoUtils.C"
36 
37 #endif // CINT
38 
39  // Declare methods for compilation
40 
42 (TString col, Bool_t simulation,
43  TString clustersArray, Bool_t tender,
44  TString calorimeter, Bool_t nonLinOn,
45  TString trigger, Bool_t rejectEMCTrig,
46  Int_t minCen, Int_t maxCen,
47  Bool_t printSettings, Int_t debug );
48 
50 (TString col, Bool_t simulation,
51  Bool_t tender,
52  Bool_t nonLinOn, Int_t year,
53  Bool_t printSettings, Int_t debug );
54 
56 (Bool_t tmPtDep, TString col , Bool_t simulation,
57  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug);
58 
60 (TString col, Bool_t simulation,
62  Bool_t printSettings, Int_t debug );
63 
66  TString calorimeter , Int_t year,
67  TString col , Bool_t simulation,
68  Bool_t printSettings, Int_t debug);
69 
70 
73 
95 (
96  TString calorimeter = "EMCAL",
97  Bool_t simulation = kFALSE,
98  TString collision = "pp",
99  TString period = "",
100  Int_t rejectEMCTrig = 0,
101  TString clustersArray = "",
102  Bool_t tender = kFALSE,
103  Bool_t nonLinOn = kFALSE,
104  Bool_t tmDep = kTRUE,
105  Bool_t qaAn = kFALSE,
106  TString outputfile = "",
107  Bool_t printSettings = kFALSE,
108  Int_t debug = 0, // Debug level
109  const char *trigSuffix = "EMC7"
110 )
111 {
112  // Check the global variables, and reset the provided ones if empty.
113  //
114  TString trigger = trigSuffix;
115 
116  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/GetAlienGlobalProductionVariables.C");
117 
118  Int_t year = 2017;
119  Bool_t printGlobal = kTRUE;
120 
121  GetAlienGlobalProductionVariables(simulation,collision,period,year,printGlobal);
122 
123  // Get the pointer to the existing analysis manager via the static access method.
124  //
125  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
126  if (!mgr)
127  {
128  ::Error("AddTaskClusterShape", "No analysis manager to connect to.");
129  return NULL;
130  }
131 
132  // Check the analysis type using the event handlers connected to the analysis manager.
133 
134  if (!mgr->GetInputEventHandler())
135  {
136  ::Error("AddTaskClusterShape", "This task requires an input event handler");
137  return NULL;
138  }
139 
140  //
141  // Create task
142  //
143 
144  // Name for containers
145  kAnaClusterShape = Form("ShapeAna%s_%s",trigger.Data(),clustersArray.Data());
146 
147  Int_t minCen = -1, maxCen = -1;
148 
149  if(collision=="PbPb" && maxCen>=0) kAnaClusterShape+=Form("Cen%d_%d",minCen,maxCen);
150 
151  // Create task
152 
153  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("%s",kAnaClusterShape.Data()));
154 
155  task->SetDebugLevel(debug);
156 
157  // task->SetFirstEvent(1800);
158  // task->SetLastEvent (2000);
159 
161 
162  task->SetAnalysisMaker(maker);
163 
164  mgr->AddTask(task);
165 
166  //
167  // Create containers
168 
169  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
170 
171  TString containerName = Form("Shape_%s",calorimeter.Data());
172  if(clustersArray.Length()>0) containerName = Form("%s_%s",containerName.Data(),clustersArray.Data());
173 
174  TString subcontainerName = Form("%s",trigger.Data());
175  if(clustersArray.Length()>0) subcontainerName = Form("%s_%s",subcontainerName.Data(),clustersArray.Data());
176 
177  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(subcontainerName, TList::Class(),
178  AliAnalysisManager::kOutputContainer,
179  Form("%s:%s",outputfile.Data(),containerName.Data()));
180 
181  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",subcontainerName.Data()), TList::Class(),
182  AliAnalysisManager::kParamContainer,
183  Form("%s_Parameters.root",containerName.Data()));
184 
185 
186  // Create ONLY the output containers for the data produced by the task.
187  // Get and connect other common input/output containers via the manager as below
188  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
189  mgr->ConnectOutput (task, 1, cout_pc);
190  mgr->ConnectOutput (task, 2, cout_cuts);
191  //==============================================================================
192 
193  // Do not configure the wagon for certain analysis combinations
194  // But create the task so that the sub-wagon train can run
195  //
196  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/CheckActiveEMCalTriggerPerPeriod.C");
197  Bool_t doAnalysis = CheckActiveEMCalTriggerPerPeriod(simulation,trigger,period,year);
198  if(!doAnalysis)
199  {
200  maker->SwitchOffProcessEvent();
201  return task;
202  }
203 
204  // #### Start analysis configuration ####
205  //
206  TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
207 
208  // Make sure the B field is enabled for track selection, some cuts need it
209  //
210  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
211 
212  // Print settings to check all is as expected
213  //
214  printf("AddTaskClusterShape() - Task NAME: %s; Passed settings\n",kAnaClusterShape.Data());
215 
216  printf("\t calorimeter <%s>, simulation <%d>, year <%d>, collision <%s>, trigger <%s>, reject EMC <%d>,\n"
217  "\t clustersArray <%s>, tender <%d>, non linearity <%d>, TM dep <%d>, QA on <%d>,\n"
218  "\t outputfile <%s>, printSettings <%d>, debug <%d>\n",
219  calorimeter.Data(),simulation,year,collision.Data(),trigger.Data(), rejectEMCTrig,
220  clustersArray.Data(),tender, nonLinOn, tmDep, qaAn, outputfile.Data(),printSettings,debug);
221 
222 
223  // General frame setting and configuration
224  maker->SetReader ( ConfigureReader (collision,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
225  maker->SetCaloUtils( ConfigureCaloUtils(collision,simulation,tender,nonLinOn,year,printSettings,debug) );
226 
227  // Analysis tasks setting and configuration
228  Int_t n = 0;//Analysis number, order is important
229 
230  // SHAPE
231  maker->AddAnalysis(ConfigureClusterShape(tmDep, collision,simulation,calorimeter,year,printSettings,debug) , n++);
232 
233  // Detector QA
234  if (qaAn) maker->AddAnalysis(ConfigureQAAnalysis(collision,simulation,calorimeter,year,printSettings,debug) , n++);
235 
236 
237  maker->SetAnaDebug(debug) ;
238 
239  maker->SwitchOnHistogramsMaker() ;
240  maker->SwitchOnAODsMaker() ;
241 
242  //if( simulation || !trigger.Contains("EMC") )
244 
245  if(simulation)
246  {
247  // Calculate the cross section weights, apply them to all histograms
248  // and fill xsec and trial histo. Sumw2 must be activated.
249  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
250  //maker->SwitchOnSumw2Histograms();
251 
252  // Just fill cross section and trials histograms.
254 
255  // For recent productions where the cross sections and trials are not stored in separate file
256  TString prodType = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTYPE");
257  printf("AddTaskClusterShape() - MC production name: %s\n",prodType.Data());
258  if ( prodType.Contains("LHC16c") ) // add here any other affected periods, for the moment jet-jet 8 TeV
259  {
260  printf("\t use the cross section from EventHeader per Event\n");
262  }
263 
264  // Add control histogram with pT hard to control aplication of weights
265  maker->SwitchOnPtHardHistogram();
266  }
267 
268  if(printSettings) maker->Print("");
269 
270  printf("AddTaskClusterShape() - << End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
271 
272 
273  //
274  // Select events trigger depending on trigger
275  //
276  if(!simulation)
277  {
278  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C");
279  TString caloTriggerString = "";
280  UInt_t mask = ConfigureAndGetEventTriggerMaskAndCaloTriggerString(trigger, year, caloTriggerString);
281 
282  maker->GetReader()->SetFiredTriggerClassName(caloTriggerString);
283 
284  task ->SelectCollisionCandidates( mask );
285  }
286 
287  return task;
288 }
289 
294  TString clustersArray, Bool_t tender,
295  TString calorimeter, Bool_t nonLinOn,
296  TString trigger, Bool_t rejectEMCTrig,
297  Int_t minCen, Int_t maxCen,
298  Bool_t printSettings, Int_t debug )
299 {
300  // Get the data type ESD or AOD
301  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
302  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
303 
304  AliCaloTrackReader * reader = 0;
305  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
306  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
307  else printf("AddTaskClusterShape::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
308 
309  reader->SetDebug(debug);//10 for lots of messages
310 
311  //
312  // MC settings
313  //
314  // Check if kine stack is available, independent of request of simulation
315 // Bool_t useKinematics = kFALSE;
316 // useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
317 //
318 // if(simulation)
319 // {
320 // if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
321 // }
322 
323  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
324  // reject some special events that bother the cross section
325  if(simulation)
326  {
327  // Event rejection cuts for jet-jet simulations, do not use in other
328  reader->SetPtHardAndJetPtComparison(kTRUE);
329  reader->SetPtHardAndJetPtFactor(2);
330 
331  reader->SetPtHardAndClusterPtComparison(kTRUE);
332  reader->SetPtHardAndClusterPtFactor(1.5);
333  }
334 
335  //------------------------
336  // Detector input filling
337  //------------------------
338 
339  //Min cluster/track E
340  reader->SetEMCALEMin(0.3);
341  reader->SetEMCALEMax(1000);
342  reader->SetPHOSEMin(0.3);
343  reader->SetPHOSEMax(1000);
344  reader->SetCTSPtMin(0.2);
345  reader->SetCTSPtMax(1000);
346 
347  reader->SetEMCALBadChannelMinDist(5);
348  reader->SetEMCALNCellsCut(2);
349 
352 
353  // Shower shape smearing
354  // Set it in the train configuration page not here for the moment
355  // if(simulation)
356  // {
357  // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
358  // reader->SetShowerShapeSmearWidth(0.005);
359  // }
361 
362  reader->SwitchOffFiducialCut();
363 
364  //
365  // No track in this analysis
366  reader->SwitchOffCTS();
367 
368  //
369  // Calorimeter
370  //
371  if(clustersArray == "" && !tender)
372  {
373  printf("AddTaskClusterShape::ConfigureReader() - **************** Standard EMCAL clusters branch analysis **************** \n");
375  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
376  }
377  else
378  {
379  printf("AddTaskClusterShape::ConfigureReader() - **************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
380  reader->SetEMCALClusterListName(clustersArray);
382  }
383 
384  // Time cuts
386  if(simulation)
387  {
388  reader->SwitchOffUseEMCALTimeCut();
389  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
390  }
391  else
392  {
393  reader->SwitchOnUseEMCALTimeCut();
394  reader->SetEMCALTimeCut(-25,20);
395  }
396 
397  // CAREFUL
398  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
400 
401  if(calorimeter == "EMCAL")
402  {
403  reader->SwitchOnEMCALCells();
404  reader->SwitchOnEMCAL();
405  }
406 
407  if(calorimeter == "PHOS")
408  { // Should be on if QA is activated with correlation on
409  reader->SwitchOnPHOSCells();
410  reader->SwitchOnPHOS();
411  }
412 
413  //-----------------
414  // Event selection
415  //-----------------
416 
417  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
418 
419  // Event triggered by EMCal selection settings
422 
423  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
424  {
425  printf("AddTaskClusterShape::ConfigureReader() === Remove bad triggers === \n");
428 
429  // reader->SetTriggerPatchTimeWindow(8,9); // default values
430  // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
431  // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
432  // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
433  // //redefine for other periods, triggers
434  //
435  // if(kRunNumber < 172000)
436  // {
437  // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
438  // printf("\t Old L1 Trigger data format!\n");
439  // }
440  // else
441  // {
442  // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
443  // printf("\t Current L1 Trigger data format!\n");
444  // }
445 
446  if(clustersArray != "" || tender)
447  {
448  printf("AddTaskClusterShape::ConfigureReader() - Trigger cluster calibration OFF\n");
450  }
451 
452  }
453 
454  //reader->RejectFastClusterEvents() ;
455 
456  // For mixing with AliAnaParticleHadronCorrelation switch it off
457  reader->SwitchOnEventTriggerAtSE(); // on is default case
458 
459  reader->SetZvertexCut(10.); // Open cut
460  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
461 
462  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
463  reader->SwitchOnPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
464 
465  if(col=="PbPb")
466  {
467  // Centrality
468  reader->SetCentralityClass("V0M");
469  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
470  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
471  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
472  reader->SetEventPlaneMethod("V0");
473  }
474 
475  if(printSettings) reader->Print("");
476 
477  return reader;
478 }
479 
484  Bool_t tender,
485  Bool_t nonLinOn, Int_t year,
486  Bool_t printSettings, Int_t debug)
487 {
489 
490  cu->SetDebug(debug);
491 
492  // Remove clusters close to borders, at least max energy cell is 1 cell away
495 
497 
498  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
499  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
500  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
501  else cu->SetNumberOfSuperModulesUsed(10);
502 
503  printf("AddTaskClusterShape::ConfigureCaloUtils() xxx Number of SM set to <%d> xxx\n",
505 
506  // Search of local maxima in cluster
507  if(col=="pp")
508  {
509  cu->SetLocalMaximaCutE(0.1);
510  cu->SetLocalMaximaCutEDiff(0.03);
511  }
512  else
513  {
514  cu->SetLocalMaximaCutE(0.2);
515  cu->SetLocalMaximaCutEDiff(0.03);
516  }
517 
519 
521 
522  // EMCAL settings
523 
524  if(!simulation)
526 
527  // calibrations
528  Bool_t calibEner = kFALSE;
529  Bool_t calibTime = kFALSE;
532 
533  if( !tender )
534  {
535  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
537 
538  calibEner = kTRUE;
539  calibTime = kTRUE;
540  }
541 
542  if( simulation )
543  {
544  calibEner = kFALSE;
545  calibTime = kFALSE;
546 
547  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
549  }
550 
551 AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
552 //
553 // gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
554 // ConfigureEMCALRecoUtils(recou,
555 // simulation,
556 // kTRUE, // exotic
557 // nonLinOn, // Non linearity
558 // calibEner, // E calib
559 // kTRUE, // bad map
560 // calibTime); // time calib
561 
562  cu->ConfigureEMCALRecoUtils(simulation,
563  kTRUE, // exotic
564  nonLinOn, // Non linearity
565  calibEner, // E calib
566  kTRUE, // bad map
567  calibTime); // time calib
568 
569  //if( calibTime ) recou->SetExoticCellDiffTimeCut(1e6);
570 
571  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
572 
573  printf("AddTaskClusterShape::ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
574  printf("AddTaskClusterShape::ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
575 
576  // PHOS
578 
579  if(printSettings) cu->Print("");
580 
581  return cu;
582 }
583 
588 (Bool_t tmPtDep, TString col , Bool_t simulation,
589  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
590 {
592 
593  ana->SetM02Min(-1);
594  ana->SetNCellsPerClusterMin(-1);
595 
596  ana->SetCalorimeter(calorimeter);
597 
598  if(simulation) ana->SetConstantTimeShift(615);
599 
600  ana->SwitchOffFiducialCut();
601 
603 
605 
607 
608  ana->SwitchOffStudyMatchedPID() ;
609 
610  ana->SwitchOffStudyWeight();
611 
612  ana->SetNCellBinLimits(-1); // no analysis on predefined bins in nCell
613 
615  ana->SwitchOffStudyExotic();
618  ana->SwitchOffStudyCellTime() ;
619 
620  // PID cuts (Track-matching)
621  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
622  AliCaloPID* caloPID = ana->GetCaloPID();
623 
624  if(tmPtDep)
625  {
626  // track pT dependent cut
628 
629  // Begining of histograms name
630  ana->AddToHistogramsName("Shape_TMDep_");
631  }
632  else
633  {
634  // Fix
636  caloPID->SetEMCALDEtaCut(0.025);
637  caloPID->SetEMCALDPhiCut(0.030);
638 
639  // Begining of histograms name
640  ana->AddToHistogramsName("Shape_TMFix_");
641  }
642 
643  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
644 
645  return ana;
646 }
647 
652  TString calorimeter, Int_t year,
653  Bool_t printSettings, Int_t debug )
654 {
656 
657  ana->SetEMCALM02Min(-1);
659  ana->SetEMCALCellAmpMin(0.1);
660 
661  ana->SetCalorimeter(calorimeter);
662 
663  ana->SetTimeCut(-1e10,1e10); // Open time cut
664  if(simulation) ana->SetConstantTimeShift(615);
665 
666  ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
667 
669 
670  ana->SwitchOffFiducialCut();
675  // ana->SwitchOffStudyClustersAsymmetry();
676  // ana->SwitchOffStudyWeight();
677  // ana->SwitchOnStudyTCardCorrelation() ;
678  // ana->SwitchOffStudyM02Dependence() ;
680  // ana->SwitchOnStudyExotic();
681 
683 
685 
686  ana->AddToHistogramsName("QA_"); // Begining of histograms name
687 
688  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
689 
690  return ana;
691 }
692 
693 
701  TString calorimeter, Int_t year,
702  TString col, Bool_t simulation,
703  Bool_t printSettings, Int_t debug)
704 {
705  //
706  // Histograms ranges
707  //
708  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
709 
710  histoRanges->SetHistoPtRangeAndNBins(0, 75, 150) ; // Energy and pt histograms
711 
712  if(calorimeter=="EMCAL")
713  {
714  if ( year == 2010 )
715  {
716  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
717  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
718  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
719  }
720  else if ( year < 2014 )
721  {
722  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
723  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
724  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
725  }
726  else // Run2
727  {
728  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
729  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
730  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
731  }
732 
733  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
734  }
735  else if(calorimeter=="PHOS")
736  {
737  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
738  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
739  }
740  else if(calorimeter=="CTS")
741  {
742  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
743  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
744  }
745 
746  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 2.9, 300);
747 
748  // Invariant mass histo
749  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
750  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
751 
752  // check if time calibration is on
753  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
754  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
755  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
756 
757  // track-cluster residuals
758  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.06,0.06,120);
759  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.06,0.06,120);
760  histoRanges->SetHistodRRangeAndNBins(0.,0.06,60);//QA
761 
762  // QA, electron, charged
763  histoRanges->SetHistoPOverERangeAndNBins(0,1.5,150);
764  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
765 
766  // QA
767  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
768  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
769  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
770  histoRanges->SetHistoRRangeAndNBins(430,460,30);
771  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
772  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
773 
774  // QA, correlation
775  if(col=="PbPb")
776  {
777  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
778  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
779  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
780  }
781  else
782  {
783  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
784  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
785  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,150,150);
786  }
787 
788  // xE, zT
789  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
790  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
791 
792  // Isolation
793  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 100);
794  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 100);
795 
796  //
797  // TRD SM
798  //
799  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
800  else if(year == 2012 ||
801  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
802  else ana->SetFirstSMCoveredByTRD(-1);
803 
804  //
805  // MC histograms?
806  //
807  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
808  else ana->SwitchOffDataMC() ;
809 
810  //
811  // Debug
812  //
813  if(printSettings) ana->Print("");
814 
815  ana->SetDebug(debug); // 10 for lots of messages
816 }
817 
void SetEMCALNCellsPerClusterMin(Int_t n)
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SetTimeCut(Double_t min, Double_t max)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnFillAllTrackMatchingHistogram()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SetEMCALM02Min(Float_t m02)
AliAnaClusterShapeCorrelStudies * ConfigureClusterShape(Bool_t tmPtDep, TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
TSystem * gSystem
void SetEMCALEMin(Float_t en)
void AddAnalysis(TObject *ana, Int_t n)
Add analysis depending on AliAnaCaloTrackCorrBaseClass to list.
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)
void ana(anaModes mode=mLocal)
Definition: ana.C:986
Class for the Calorimeter QA analysis.
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SwitchOnMCCrossSectionHistoFill()
Definition: AliAnaWeights.h:88
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Bool_t CheckActiveEMCalTriggerPerPeriod(Bool_t simulation, TString trigger, TString period, Int_t year)
Bool_t IsBadChannelsRemovalSwitchedOn() const
const TString calorimeter
Definition: anaM.C:36
virtual void SetPtHardAndJetPtComparison(Bool_t compare)
Bool_t IsRecalibrationOn() const
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnMCCrossSectionFromEventHeader()
Definition: AliAnaWeights.h:90
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
AliAnaCalorimeterQA * ConfigureQAAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
void SetCTSPtMin(Float_t pt)
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:221
void SwitchOffRecalculateClusterTrackMatching()
void SwitchOffVertexBCEventSelection()
AliAnalysisTaskCaloTrackCorrelation * AddTaskClusterShape(TString calorimeter="EMCAL", Bool_t simulation=kFALSE, TString collision="pp", TString period="", Int_t rejectEMCTrig=0, TString clustersArray="", Bool_t tender=kFALSE, Bool_t nonLinOn=kFALSE, Bool_t tmDep=kTRUE, Bool_t qaAn=kFALSE, TString outputfile="", Bool_t printSettings=kFALSE, Int_t debug=0, const char *trigSuffix="EMC7")
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
virtual void SetCalorimeter(TString calo)
Set the calorimeter for the analysis. A string.
Base class for CaloTrackCorr analysis algorithms.
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
Check EMCal trigger availability in period.
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
int Int_t
Definition: External.C:63
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
void SwitchOnDataControlHistograms(Int_t lev=1)
TString kAnaClusterShape
Global name to be composed of the settings, used to set the AOD branch name.
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
Bool_t IsBadChannelsRemovalSwitchedOn() const
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class for cluster shape, cell T-Card correlation and exoticity.
void SetEMCALBadChannelMinDist(Float_t di)
void GetAlienGlobalProductionVariables(Bool_t &simulation, TString &col, TString &period, Int_t &year, Bool_t print=kFALSE)
void SetEMCALNCellsCut(Int_t nc)
virtual void SetPtHardAndClusterPtComparison(Bool_t compare)
void SetEMCALClusterListName(TString name)
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()
Int_t GetNumberOfSuperModulesUsed() const
void SetAnalysisMaker(AliAnaCaloTrackCorrMaker *const maker)
void SetHistoYRangeAndNBins(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 SetConstantTimeShift(Float_t shift)
virtual void SetZvertexCut(Float_t zcut=10.)
void SetNumberOfSuperModulesUsed(Int_t nSM)
UInt_t ConfigureAndGetEventTriggerMaskAndCaloTriggerString(TString trigger, Int_t year, TString &triggerString)
Class containing more common histogram axis types.
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 SetPHOSEMin(Float_t en)
void SetReader(AliCaloTrackReader *re)
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetEMCALCellAmpMin(Float_t amp)
virtual void SwitchOffFiducialCut()
virtual void SetCentralityClass(TString name)
void SwitchOnBadTriggerEventsRemoval()
AliCalorimeterUtils * ConfigureCaloUtils(TString col, Bool_t simulation, Bool_t tender, Bool_t nonLinOn, Int_t year, Bool_t printSettings, Int_t debug)
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnClusterELinearityCorrection()
void SetEMCALTimeCut(Double_t a, Double_t b)
Configuration of the event trigger.
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SwitchOnEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:228
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.
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALEMax(Float_t en)
void ConfigureEMCALRecoUtils(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 debug=-1)
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
void SetFiredTriggerClassName(TString name)
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
bool Bool_t
Definition: External.C:53
void SetPHOSEMax(Float_t en)
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class with utils specific to calorimeter clusters/cells.
void SwitchOffEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:229
AliCaloTrackReader * GetReader()
AliAnaWeights * GetWeightUtils()
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:218
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
Get year, collision type, mc/data type and period from alien global variables.
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetCaloUtils(AliCalorimeterUtils *cu)
Steering class of package CaloTrackCorrelartions.