AliPhysics  d565ceb (d565ceb)
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 
606  ana->SwitchOffStudyWeight();
607 
609  ana->SwitchOffStudyExotic();
610 
611  // PID cuts (Track-matching)
612  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
613  AliCaloPID* caloPID = ana->GetCaloPID();
614 
615  if(tmPtDep)
616  {
617  // track pT dependent cut
619 
620  // Begining of histograms name
621  ana->AddToHistogramsName("Shape_TMDep_");
622  }
623  else
624  {
625  // Fix
627  caloPID->SetEMCALDEtaCut(0.025);
628  caloPID->SetEMCALDPhiCut(0.030);
629 
630  // Begining of histograms name
631  ana->AddToHistogramsName("Shape_TMFix_");
632  }
633 
634  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
635 
636  return ana;
637 }
638 
643  TString calorimeter, Int_t year,
644  Bool_t printSettings, Int_t debug )
645 {
647 
648  ana->SetEMCALM02Min(-1);
650  ana->SetEMCALCellAmpMin(0.1);
651 
652  ana->SetCalorimeter(calorimeter);
653 
654  ana->SetTimeCut(-1e10,1e10); // Open time cut
655  if(simulation) ana->SetConstantTimeShift(615);
656 
657  ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
658 
660 
661  ana->SwitchOffFiducialCut();
666  // ana->SwitchOffStudyClustersAsymmetry();
667  // ana->SwitchOffStudyWeight();
668  // ana->SwitchOnStudyTCardCorrelation() ;
669  // ana->SwitchOffStudyM02Dependence() ;
671  // ana->SwitchOnStudyExotic();
672 
674 
676 
677  ana->AddToHistogramsName("QA_"); // Begining of histograms name
678 
679  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
680 
681  return ana;
682 }
683 
684 
692  TString calorimeter, Int_t year,
693  TString col, Bool_t simulation,
694  Bool_t printSettings, Int_t debug)
695 {
696  //
697  // Histograms ranges
698  //
699  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
700 
701  histoRanges->SetHistoPtRangeAndNBins(0, 75, 150) ; // Energy and pt histograms
702 
703  if(calorimeter=="EMCAL")
704  {
705  if ( year == 2010 )
706  {
707  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
708  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
709  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
710  }
711  else if ( year < 2014 )
712  {
713  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
714  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
715  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
716  }
717  else // Run2
718  {
719  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
720  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
721  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
722  }
723 
724  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
725  }
726  else if(calorimeter=="PHOS")
727  {
728  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
729  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
730  }
731  else if(calorimeter=="CTS")
732  {
733  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
734  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
735  }
736 
737  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 2.9, 300);
738 
739  // Invariant mass histo
740  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
741  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
742 
743  // check if time calibration is on
744  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
745  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
746  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
747 
748  // track-cluster residuals
749  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.06,0.06,120);
750  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.06,0.06,120);
751  histoRanges->SetHistodRRangeAndNBins(0.,0.06,60);//QA
752 
753  // QA, electron, charged
754  histoRanges->SetHistoPOverERangeAndNBins(0,1.5,150);
755  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
756 
757  // QA
758  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
759  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
760  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
761  histoRanges->SetHistoRRangeAndNBins(430,460,30);
762  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
763  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
764 
765  // QA, correlation
766  if(col=="PbPb")
767  {
768  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
769  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
770  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
771  }
772  else
773  {
774  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
775  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
776  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,150,150);
777  }
778 
779  // xE, zT
780  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
781  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
782 
783  // Isolation
784  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 100);
785  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 100);
786 
787  //
788  // TRD SM
789  //
790  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
791  else if(year == 2012 ||
792  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
793  else ana->SetFirstSMCoveredByTRD(-1);
794 
795  //
796  // MC histograms?
797  //
798  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
799  else ana->SwitchOffDataMC() ;
800 
801  //Set here generator name, default pythia
802  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
803 
804  //
805  // Debug
806  //
807  if(printSettings) ana->Print("");
808 
809  ana->SetDebug(debug); // 10 for lots of messages
810 }
811 
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 ana(Int_t mode=mGRID)
Definition: ana.C:162
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnFillAllTrackMatchingHistogram()
const int debug
Definition: scanAll.C:15
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)
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
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)
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)
const TString calorimeter
Definition: anaM.C:36
virtual void SetPtHardAndJetPtComparison(Bool_t compare)
Bool_t IsRecalibrationOn() const
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)
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 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)
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.