AliPhysics  068200c (068200c)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
17 #include "AliLog.h"
19 #include "AliCaloTrackESDReader.h"
20 #include "AliCaloTrackAODReader.h"
21 #include "AliCalorimeterUtils.h"
23 #include "AliHistogramRanges.h"
24 #include "AliAnaCalorimeterQA.h"
27 #include "AliAnalysisManager.h"
28 #include "AliInputEventHandler.h"
29 #include "AliVTrack.h"
31 #include "AliESDtrackCuts.h"
32 #include "CreateTrackCutsPWGJE.C"
35 
36 #endif
37 
38  // Declare methods for compilation
39 
41 (TString col, Bool_t simulation,
42  TString clustersArray, Bool_t tender,
43  TString calorimeter, Bool_t nonLinOn,
44  TString trigger, Bool_t rejectEMCTrig,
45  Int_t minCen, Int_t maxCen,
46  Bool_t printSettings, Int_t debug );
47 
49 (TString col, Bool_t simulation,
50  Bool_t tender,
51  Bool_t nonLinOn, Int_t year,
52  Bool_t printSettings, Int_t debug );
53 
55 (Bool_t tmPtDep, TString col , Bool_t simulation,
56  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug);
57 
59 (TString col, Bool_t simulation,
61  Bool_t printSettings, Int_t debug );
62 
65  TString calorimeter , Int_t year,
66  TString col , Bool_t simulation,
67  Bool_t printSettings, Int_t debug);
68 
69 
72 
73 //
75 //const char* kPeriod = "LHC16t"; // gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTAG");
76 //const char* kColType = "PbPb"; // gSystem->Getenv("ALIEN_JDL_LPMINTERACTIONTYPE"); //either "pp", "pPb" or "PbPb"
77 //const char* kProdType = "MC"; // gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTYPE");
78 //Bool_t kMC = kFALSE;
79 
101 (
102  TString calorimeter = "EMCAL",
103  Bool_t simulation = kFALSE,
104  TString collision = "pp",
105  TString period = "",
106  Int_t rejectEMCTrig = 0,
107  TString clustersArray = "",
108  Bool_t tender = kFALSE,
109  Bool_t nonLinOn = kFALSE,
110  Bool_t tmDep = kTRUE,
111  Bool_t qaAn = kFALSE,
112  TString outputfile = "",
113  Bool_t printSettings = kFALSE,
114  Int_t debug = 0, // Debug level
115  const char *trigSuffix = "EMC7"
116 )
117 {
118  // Check the global variables, and reset the provided ones if empty.
119  //
120  TString trigger = trigSuffix;
121 
122  if(collision=="")
123  {
124  if (!strcmp(kColType, "PbPb")) collision = "PbPb";
125  else if (!strcmp(kColType, "AA" )) collision = "PbPb";
126  else if (!strcmp(kColType, "pA" )) collision = "pPb";
127  else if (!strcmp(kColType, "Ap" )) collision = "pPb";
128  else if (!strcmp(kColType, "pPb" )) collision = "pPb";
129  else if (!strcmp(kColType, "Pbp" )) collision = "pPb";
130  else if (!strcmp(kColType, "pp" )) collision = "pp" ;
131 
132  simulation = kMC;
133  period = kPeriod;
134 
135  // print check on global settings once
136  if(trigger.Contains("default") ||trigger.Contains("INT") || trigger.Contains("MB") )
137  printf("AddTaskClusterShape - Get the data features from global parameters: collision <%s>, period <%s>, mc <%d> \n",
138  kColType,kPeriod,kMC);
139  }
140 
141  Int_t year = 2017;
142  if ( period!="" )
143  {
144  if (period.Contains("16")) year = 2016;
145  else if(period.Contains("15")) year = 2015;
146  else if(period.Contains("13")) year = 2013;
147  else if(period.Contains("12")) year = 2012;
148  else if(period.Contains("11")) year = 2011;
149  else if(period.Contains("10")) year = 2010;
150  }
151 
152  // Get the pointer to the existing analysis manager via the static access method.
153  //
154  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
155  if (!mgr)
156  {
157  ::Error("AddTaskClusterShape", "No analysis manager to connect to.");
158  return NULL;
159  }
160 
161  // Check the analysis type using the event handlers connected to the analysis manager.
162 
163  if (!mgr->GetInputEventHandler())
164  {
165  ::Error("AddTaskClusterShape", "This task requires an input event handler");
166  return NULL;
167  }
168 
169  //
170  // Create task
171  //
172 
173  // Name for containers
174  kAnaClusterShape = Form("ShapeAna%s_%s",trigger.Data(),clustersArray.Data());
175 
176  Int_t minCen = -1, maxCen = -1;
177 
178  if(collision=="PbPb" && maxCen>=0) kAnaClusterShape+=Form("Cen%d_%d",minCen,maxCen);
179 
180  // Create task
181 
182  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("%s",kAnaClusterShape.Data()));
183 
184  task->SetDebugLevel(debug);
185 
186  // task->SetFirstEvent(1800);
187  // task->SetLastEvent (2000);
188 
190 
191  task->SetAnalysisMaker(maker);
192 
193  mgr->AddTask(task);
194 
195  //
196  // Create containers
197 
198  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
199 
200  TString containerName = Form("Shape_%s",calorimeter.Data());
201  if(clustersArray.Length()>0) containerName = Form("%s_%s",containerName.Data(),clustersArray.Data());
202 
203  TString subcontainerName = Form("%s",trigger.Data());
204  if(clustersArray.Length()>0) subcontainerName = Form("%s_%s",subcontainerName.Data(),clustersArray.Data());
205 
206  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(subcontainerName, TList::Class(),
207  AliAnalysisManager::kOutputContainer,
208  Form("%s:%s",outputfile.Data(),containerName.Data()));
209 
210  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",subcontainerName.Data()), TList::Class(),
211  AliAnalysisManager::kParamContainer,
212  Form("%s_Parameters.root",containerName.Data()));
213 
214 
215  // Create ONLY the output containers for the data produced by the task.
216  // Get and connect other common input/output containers via the manager as below
217  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
218  mgr->ConnectOutput (task, 1, cout_pc);
219  mgr->ConnectOutput (task, 2, cout_cuts);
220  //==============================================================================
221 
222  // Do not configure the wagon for certain analysis combinations
223  // But create the task so that the sub-wagon train can run
224  //
225  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/CheckActiveEMCalTriggerPerPeriod.C");
226  Bool_t doAnalysis = CheckActiveEMCalTriggerPerPeriod(simulation,trigger,period,year);
227  if(!doAnalysis)
228  {
229  maker->SwitchOffProcessEvent();
230  return task;
231  }
232 
233  // #### Start analysis configuration ####
234  //
235  TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
236 
237  // Make sure the B field is enabled for track selection, some cuts need it
238  //
239  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
240 
241  // Print settings to check all is as expected
242  //
243  printf("AddTaskClusterShape - Task NAME: %s \n",kAnaClusterShape.Data());
244 
245  printf("Passed settings:\n calorimeter <%s>, simulation <%d>, year <%d>,\n collision <%s>, trigger <%s>, reject EMC <%d>,"
246  " clustersArray <%s>, tender <%d>, non linearity <%d>, TM dep <%d>, QA on <%d>\n outputfile <%s>, printSettings <%d>, debug <%d>\n",
247  calorimeter.Data(),simulation,year,collision.Data(),trigger.Data(), rejectEMCTrig,
248  clustersArray.Data(),tender, nonLinOn, tmDep, qaAn, outputfile.Data(),printSettings,debug);
249 
250 
251  // General frame setting and configuration
252  maker->SetReader ( ConfigureReader (collision,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
253  maker->SetCaloUtils( ConfigureCaloUtils(collision,simulation,tender,nonLinOn,year,printSettings,debug) );
254 
255  // Analysis tasks setting and configuration
256  Int_t n = 0;//Analysis number, order is important
257 
258  // SHAPE
259  maker->AddAnalysis(ConfigureClusterShape(tmDep, collision,simulation,calorimeter,year,printSettings,debug) , n++);
260 
261  // Detector QA
262  if (qaAn) maker->AddAnalysis(ConfigureQAAnalysis(collision,simulation,calorimeter,year,printSettings,debug) , n++);
263 
264 
265  maker->SetAnaDebug(debug) ;
266 
267  maker->SwitchOnHistogramsMaker() ;
268  maker->SwitchOnAODsMaker() ;
269 
270  //if( simulation || !trigger.Contains("EMC") )
272 
273  if(simulation)
274  {
275  // Calculate the cross section weights, apply them to all histograms
276  // and fill xsec and trial histo. Sumw2 must be activated.
277  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
278  //maker->SwitchOnSumw2Histograms();
279 
280  // For recent productions where the cross sections and trials are not stored in separate file
281  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionFromEventHeader() ;
282 
283  // Just fill cross section and trials histograms.
285 
286  // Add control histogram with pT hard to control aplication of weights
287  maker->SwitchOnPtHardHistogram();
288  }
289 
290  if(printSettings) maker->Print("");
291 
292  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
293 
294 
295  //
296  // Select events trigger depending on trigger
297  //
298  if(!simulation)
299  {
300  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C");
301  TString caloTriggerString = "";
302  UInt_t mask = ConfigureAndGetEventTriggerMaskAndCaloTriggerString(trigger, year, caloTriggerString);
303 
304  maker->GetReader()->SetFiredTriggerClassName(caloTriggerString);
305 
306  task ->SelectCollisionCandidates( mask );
307  }
308 
309  return task;
310 }
311 
316  TString clustersArray, Bool_t tender,
317  TString calorimeter, Bool_t nonLinOn,
318  TString trigger, Bool_t rejectEMCTrig,
319  Int_t minCen, Int_t maxCen,
320  Bool_t printSettings, Int_t debug )
321 {
322  // Get the data type ESD or AOD
323  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
324  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
325 
326  AliCaloTrackReader * reader = 0;
327  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
328  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
329  else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
330 
331  reader->SetDebug(debug);//10 for lots of messages
332 
333  //
334  // MC settings
335  //
336  // Check if kine stack is available, independent of request of simulation
337 // Bool_t useKinematics = kFALSE;
338 // useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
339 //
340 // if(simulation)
341 // {
342 // if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
343 // }
344 
345  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
346  // reject some special events that bother the cross section
347  if(simulation)
348  {
349  // Event rejection cuts for jet-jet simulations, do not use in other
350  reader->SetPtHardAndJetPtComparison(kTRUE);
351  reader->SetPtHardAndJetPtFactor(2);
352 
353  reader->SetPtHardAndClusterPtComparison(kTRUE);
354  reader->SetPtHardAndClusterPtFactor(1.5);
355  }
356 
357  //------------------------
358  // Detector input filling
359  //------------------------
360 
361  //Min cluster/track E
362  reader->SetEMCALEMin(0.3);
363  reader->SetEMCALEMax(1000);
364  reader->SetPHOSEMin(0.3);
365  reader->SetPHOSEMax(1000);
366  reader->SetCTSPtMin(0.2);
367  reader->SetCTSPtMax(1000);
368 
369  reader->SetEMCALBadChannelMinDist(5);
370  reader->SetEMCALNCellsCut(2);
371 
374 
375  // Shower shape smearing
376  // Set it in the train configuration page not here for the moment
377  // if(simulation)
378  // {
379  // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
380  // reader->SetShowerShapeSmearWidth(0.005);
381  // }
383 
384  //
385  // Tracks
386  //
387  reader->SwitchOffCTS();
388 
389  reader->SwitchOffUseTrackTimeCut();
390  reader->SetTrackTimeCut(0,50);
391 
392  reader->SwitchOnFiducialCut();
393  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
394 
395  reader->SwitchOffUseTrackDCACut();
396  //reader->SetTrackDCACut(0,0.0105);
397  //reader->SetTrackDCACut(1,0.035);
398  //reader->SetTrackDCACut(2,1.1);
399 
400  if(inputDataType=="ESD")
401  {
402  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
403 
404  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
405  //reader->SetTrackCuts(esdTrackCuts);
406 
407  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
408  reader->SetTrackCuts(esdTrackCuts);
409  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
410  reader->SetTrackComplementaryCuts(esdTrackCuts2);
411 
413  }
414  else if(inputDataType=="AOD")
415  {
416  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
418  reader->SetTrackStatus(AliVTrack::kITSrefit);
419 
420  //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
421  //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
422  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
423  }
424 
425  //
426  // Calorimeter
427  //
428  if(clustersArray == "" && !tender)
429  {
430  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
432  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
433  }
434  else
435  {
436  printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
437  reader->SetEMCALClusterListName(clustersArray);
439  }
440 
441  // Time cuts
443  if(simulation)
444  {
445  reader->SwitchOffUseEMCALTimeCut();
446  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
447  }
448  else
449  {
450  reader->SwitchOnUseEMCALTimeCut();
451  reader->SetEMCALTimeCut(-25,20);
452  }
453 
454  // CAREFUL
455  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
457 
458  if(calorimeter == "EMCAL")
459  {
460  reader->SwitchOnEMCALCells();
461  reader->SwitchOnEMCAL();
462  }
463 
464  if(calorimeter == "PHOS")
465  { // Should be on if QA is activated with correlation on
466  reader->SwitchOnPHOSCells();
467  reader->SwitchOnPHOS();
468  }
469 
470  //-----------------
471  // Event selection
472  //-----------------
473 
474  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
475 
476  // Event triggered by EMCal selection settings
479 
480  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
481  {
482  printf("=== Remove bad triggers === \n");
485 
486  // reader->SetTriggerPatchTimeWindow(8,9); // default values
487  // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
488  // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
489  // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
490  // //redefine for other periods, triggers
491  //
492  // if(kRunNumber < 172000)
493  // {
494  // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
495  // printf("\t Old L1 Trigger data format!\n");
496  // }
497  // else
498  // {
499  // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
500  // printf("\t Current L1 Trigger data format!\n");
501  // }
502 
503  if(clustersArray != "" || tender)
504  {
505  printf("Trigger cluster calibration OFF\n");
507  }
508 
509  }
510 
511  //reader->RejectFastClusterEvents() ;
512 
513  // For mixing with AliAnaParticleHadronCorrelation switch it off
514  reader->SwitchOnEventTriggerAtSE(); // on is default case
515 
516  reader->SetZvertexCut(10.); // Open cut
517  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
518 
519  reader->SwitchOnRejectNoTrackEvents();
520  reader->SetTrackMultiplicityEtaCut(0.8);
521 
522  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
523  reader->SwitchOnPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
524 
525  if(col=="PbPb")
526  {
527  // Centrality
528  reader->SetCentralityClass("V0M");
529  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
530  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
531  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
532  reader->SetEventPlaneMethod("V0");
533  }
534 
535  if(printSettings) reader->Print("");
536 
537  return reader;
538 }
539 
544  Bool_t tender,
545  Bool_t nonLinOn, Int_t year,
546  Bool_t printSettings, Int_t debug)
547 {
549 
550  cu->SetDebug(debug);
551 
552  // Remove clusters close to borders, at least max energy cell is 1 cell away
555 
557 
558  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
559  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
560  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
561  else cu->SetNumberOfSuperModulesUsed(10);
562 
563  printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
564 
565  // Search of local maxima in cluster
566  if(col=="pp")
567  {
568  cu->SetLocalMaximaCutE(0.1);
569  cu->SetLocalMaximaCutEDiff(0.03);
570  }
571  else
572  {
573  cu->SetLocalMaximaCutE(0.2);
574  cu->SetLocalMaximaCutEDiff(0.03);
575  }
576 
578 
580 
581  // EMCAL settings
582 
583  if(!simulation)
585 
586  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
587 
588  // calibrations
589  Bool_t calibEner = kFALSE;
590  Bool_t calibTime = kFALSE;
593 
594  if( !tender )
595  {
596  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
598 
599  calibEner = kTRUE;
600  calibTime = kTRUE;
601  }
602 
603  if( simulation )
604  {
605  calibEner = kFALSE;
606  calibTime = kFALSE;
607 
608  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
610  }
611 
612  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
614  simulation,
615  kTRUE, // exotic
616  nonLinOn, // Non linearity
617  calibEner, // E calib
618  kTRUE, // bad map
619  calibTime); // time calib
620 
621  //if( calibTime ) recou->SetExoticCellDiffTimeCut(1e6);
622 
623  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
624 
625  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
626  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
627 
628  // PHOS
630 
631  if(printSettings) cu->Print("");
632 
633  return cu;
634 }
635 
640 (Bool_t tmPtDep, TString col , Bool_t simulation,
641  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
642 {
644 
645  ana->SetM02Min(-1);
646  ana->SetNCellsPerClusterMin(-1);
647 
648  ana->SetCalorimeter(calorimeter);
649 
650  if(simulation) ana->SetConstantTimeShift(615);
651 
652  ana->SwitchOffFiducialCut();
653 
655 
657 
658  ana->SwitchOffStudyWeight();
659 
661  ana->SwitchOffStudyExotic();
662 
663  // PID cuts (Track-matching)
664  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
665  AliCaloPID* caloPID = ana->GetCaloPID();
666 
667  if(tmPtDep)
668  {
669  // track pT dependent cut
671 
672  // Begining of histograms name
673  ana->AddToHistogramsName("Shape_TMDep_");
674  }
675  else
676  {
677  // Fix
679  caloPID->SetEMCALDEtaCut(0.025);
680  caloPID->SetEMCALDPhiCut(0.030);
681 
682  // Begining of histograms name
683  ana->AddToHistogramsName("Shape_TMFix_");
684  }
685 
686  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
687 
688  return ana;
689 }
690 
695  TString calorimeter, Int_t year,
696  Bool_t printSettings, Int_t debug )
697 {
699 
700  ana->SetEMCALM02Min(-1);
702  ana->SetEMCALCellAmpMin(0.1);
703 
704  ana->SetCalorimeter(calorimeter);
705 
706  ana->SetTimeCut(-1e10,1e10); // Open time cut
707  if(simulation) ana->SetConstantTimeShift(615);
708 
709  ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
710 
712 
713  ana->SwitchOffFiducialCut();
718  // ana->SwitchOffStudyClustersAsymmetry();
719  // ana->SwitchOffStudyWeight();
720  // ana->SwitchOnStudyTCardCorrelation() ;
721  // ana->SwitchOffStudyM02Dependence() ;
723  // ana->SwitchOnStudyExotic();
724 
727 
728  ana->AddToHistogramsName("QA_"); // Begining of histograms name
729 
730  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
731 
732  return ana;
733 }
734 
735 
743  TString calorimeter, Int_t year,
744  TString col, Bool_t simulation,
745  Bool_t printSettings, Int_t debug)
746 {
747  //
748  // Histograms ranges
749  //
750  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
751 
752  histoRanges->SetHistoPtRangeAndNBins(0, 75, 150) ; // Energy and pt histograms
753 
754  if(calorimeter=="EMCAL")
755  {
756  if ( year == 2010 )
757  {
758  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
759  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
760  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
761  }
762  else if ( year < 2014 )
763  {
764  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
765  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
766  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
767  }
768  else // Run2
769  {
770  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
771  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
772  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
773  }
774 
775  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
776  }
777  else if(calorimeter=="PHOS")
778  {
779  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
780  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
781  }
782  else if(calorimeter=="CTS")
783  {
784  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
785  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
786  }
787 
788  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 2.9, 300);
789 
790  // Invariant mass histo
791  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
792  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
793 
794  // check if time calibration is on
795  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
796  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
797  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
798 
799  // track-cluster residuals
800  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.06,0.06,120);
801  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.06,0.06,120);
802  histoRanges->SetHistodRRangeAndNBins(0.,0.06,60);//QA
803 
804  // QA, electron, charged
805  histoRanges->SetHistoPOverERangeAndNBins(0,1.5,150);
806  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
807 
808  // QA
809  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
810  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
811  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
812  histoRanges->SetHistoRRangeAndNBins(430,460,30);
813  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
814  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
815 
816  // QA, correlation
817  if(col=="PbPb")
818  {
819  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
820  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
821  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
822  }
823  else
824  {
825  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
826  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
827  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,150,150);
828  }
829 
830  // xE, zT
831  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
832  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
833 
834  // Isolation
835  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 100);
836  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 100);
837 
838  //
839  // TRD SM
840  //
841  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
842  else if(year == 2012 ||
843  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
844  else ana->SetFirstSMCoveredByTRD(-1);
845 
846  //
847  // MC histograms?
848  //
849  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
850  else ana->SwitchOffDataMC() ;
851 
852  //Set here generator name, default pythia
853  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
854 
855  //
856  // Debug
857  //
858  if(printSettings) ana->Print("");
859 
860  ana->SetDebug(debug); // 10 for lots of messages
861 }
862 
void SetEMCALNCellsPerClusterMin(Int_t n)
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 SetTimeCut(Double_t min, Double_t max)
void ana(Int_t mode=mGRID)
Definition: ana.C:87
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
Configuration of AliEMCALRecoUtils.
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
virtual void SwitchOnFiducialCut()
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)
virtual void SwitchOnAODHybridTrackSelection()
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.
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
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)
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()
Bool_t kMC
Definition: ana.C:63
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 AliFiducialCut * GetFiducialCut()
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)
void SetTrackStatus(ULong_t bit)
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 SwitchOffFillAllTrackMatchingHistogram()
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 SetTrackMultiplicityEtaCut(Float_t eta)
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 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 debug=-1)
virtual void SetTrackCuts(AliESDtrackCuts *)
void SetEMCALCellAmpMin(Float_t amp)
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 SetTrackTimeCut(Double_t a, Double_t b)
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)
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()
virtual void SwitchOnConstrainTrackToVertex()
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)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetCaloUtils(AliCalorimeterUtils *cu)
Steering class of package CaloTrackCorrelartions.