]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/CaloTrackCorrelations/macros/QA/AddTaskPi0IMGammaCorrQA.C
change the setting of the maximum number of super modules from the analysis class...
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / macros / QA / AddTaskPi0IMGammaCorrQA.C
1
2 AliAnalysisTaskCaloTrackCorrelation *AddTaskPi0IMGammaCorrQA(const TString  calorimeter   = "EMCAL",
3                                                              const Bool_t   simulation    = kFALSE,
4                                                              const TString  collision     = "pp",
5                                                              const TString  suffix        = "default",
6                                                              const Bool_t   qaan          = kFALSE,
7                                                              const Bool_t   hadronan      = kFALSE,
8                                                              const Int_t    minCen        = -1,
9                                                              const Int_t    maxCen        = -1,
10                                                              const Int_t    debugLevel    = -1
11                                                           )
12 {
13   // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
14   
15   
16   if(simulation)
17   {
18     printf("AddTaskPi0IMGammaCorrQA - CAREFUL : Triggered events not checked in simulation!! \n");
19     TString ssuffix = suffix;
20     if(!ssuffix.Contains("default")) return;
21   }
22
23   // Get the pointer to the existing analysis manager via the static access method.
24   
25   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
26   if (!mgr) 
27   {
28     ::Error("AddTaskPi0IMGammaCorrQA", "No analysis manager to connect to.");
29     return NULL;
30   }  
31   
32   // Check the analysis type using the event handlers connected to the analysis manager.
33   
34   if (!mgr->GetInputEventHandler()) 
35   {
36     ::Error("AddTaskPi0IMGammaCorrQA", "This task requires an input event handler");
37     return NULL;
38   }
39   
40   TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
41   
42   // Name for containers
43   
44   TString containerName = Form("%s_%s",calorimeter.Data(), suffix.Data());
45   
46   if(collision!="pp" && maxCen>=0) containerName+=Form("Cen%d_%d",minCen,maxCen);
47     
48   printf("AddTaskPi0IMGammaCorrQA - Container NAME: %s \n",containerName.Data());
49   
50   // #### Configure analysis ####
51     
52   AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker();
53
54   // General frame setting and configuration
55   maker->SetReader   ( ConfigureReader   (inputDataType,minCen,maxCen,simulation,debugLevel) );
56   maker->SetCaloUtils( ConfigureCaloUtils(simulation,debugLevel) );
57   
58   // Analysis tasks setting and configuration
59   Int_t n = 0;//Analysis number, order is important
60   
61   // Photon analysis
62   maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,          containerName,simulation     ,debugLevel), n++); // Photon cluster selection
63   maker->AddAnalysis(ConfigurePi0Analysis   (calorimeter,collision,containerName,simulation,qaan,debugLevel) ,n++); // Previous photon invariant mass
64
65   if(hadronan)
66   {
67     maker->GetReader()->SwitchOnCTS();
68     maker->AddAnalysis(ConfigureChargedAnalysis(containerName,simulation,debugLevel), n++); // charged tracks plots
69     maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",calorimeter,collision,containerName,simulation,debugLevel), n++); // Gamma hadron correlation
70   }
71   
72   if(qaan) maker->AddAnalysis(ConfigureQAAnalysis(calorimeter,simulation,debugLevel),n++);
73   
74   maker->SetAnaDebug(debugLevel)  ;
75   maker->SwitchOnHistogramsMaker()  ;
76   maker->SwitchOnAODsMaker() ;
77   if(simulation || !suffix.Contains("EMC"))
78     maker->SwitchOffDataControlHistograms();
79   else
80     maker->SwitchOnDataControlHistograms();
81
82   if(debugLevel > 0) maker->Print("");
83   
84   // Create task
85   
86   TString taskName =Form("Pi0IM_GammaTrackCorr_%s",containerName.Data());
87   
88   AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (taskName);
89   task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
90   task->SetDebugLevel(debugLevel);
91   //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
92   //task->SetBranches("AOD:header,tracks,vertices,emcalCells,caloClusters");
93   task->SetAnalysisMaker(maker);
94   mgr->AddTask(task);
95   
96   //Create containers
97   
98   TString outputfile = AliAnalysisManager::GetCommonFileName();
99   
100   AliAnalysisDataContainer *cout_pc   = mgr->CreateContainer(taskName, TList::Class(),
101                                                              AliAnalysisManager::kOutputContainer, 
102                                                              Form("%s:%s",outputfile.Data(),taskName.Data()));
103         
104   AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",taskName.Data()), TList::Class(),
105                                                              AliAnalysisManager::kParamContainer, 
106                                                              Form("%s_Parameters.root",taskName.Data()));
107   
108   // Create ONLY the output containers for the data produced by the task.
109   // Get and connect other common input/output containers via the manager as below
110   //==============================================================================
111   mgr->ConnectInput  (task, 0, mgr->GetCommonInputContainer());
112   mgr->ConnectOutput (task, 1, cout_pc);
113   mgr->ConnectOutput (task, 2, cout_cuts);
114   
115   return task;
116 }
117
118 //___________________________________________________________________________
119 AliCaloTrackReader * ConfigureReader(TString inputDataType,
120                                      Int_t minCen,          Int_t maxCen,
121                                      Bool_t  simulation,    Int_t debugLevel)
122 {
123   
124   AliCaloTrackReader * reader = 0;
125   if     (inputDataType=="AOD")
126     reader = new AliCaloTrackAODReader();
127   else if(inputDataType=="ESD")
128     reader = new AliCaloTrackESDReader();
129   else 
130     printf("AliCaloTrackReader::ConfigureReader() - Data combination not known input Data=%s\n",
131            inputDataType.Data());
132   
133   reader->SetDebug(debugLevel);//10 for lots of messages
134
135   // MC settings
136   if(simulation)
137   {
138     if(inputDataType == "ESD")
139     {
140       reader->SwitchOnStack();
141       reader->SwitchOffAODMCParticles();
142     }
143     else if(inputDataType == "AOD")
144     {
145       reader->SwitchOffStack();
146       reader->SwitchOnAODMCParticles();
147     }
148   }
149   
150   //------------------------
151   // Detector input filling
152   //------------------------
153   
154   //Min cluster/track E
155   reader->SetEMCALEMin(0.3); 
156   reader->SetEMCALEMax(1000); 
157   reader->SetPHOSEMin(0.3);
158   reader->SetPHOSEMax(1000);
159   reader->SetCTSPtMin(0.2);
160   reader->SetCTSPtMax(1000);
161
162   // Time cut off
163   reader->SwitchOffUseTrackTimeCut();
164   reader->SwitchOffUseParametrizedTimeCut();
165   reader->SwitchOffUseEMCALTimeCut() ;
166   reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
167   reader->SetTrackTimeCut(-1e10,1e10);
168
169   reader->SwitchOnFiducialCut();
170   
171   // Tracks
172   reader->SwitchOffCTS();
173   reader->SwitchOffRejectNoTrackEvents();
174   reader->SwitchOffRecalculateVertexBC();
175   reader->SwitchOffVertexBCEventSelection();
176   reader->SwitchOffUseTrackDCACut();
177   //reader->SetTrackDCACut(0,0.0105);
178   //reader->SetTrackDCACut(1,0.035);
179   //reader->SetTrackDCACut(2,1.1);
180   
181   if(inputDataType=="ESD")
182   {
183     gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
184 //    if(year > 2010)
185 //    {
186       //Hybrids 2011
187       AliESDtrackCuts * esdTrackCuts  = CreateTrackCutsPWGJE(10001008);
188       reader->SetTrackCuts(esdTrackCuts);
189       AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
190       reader->SetTrackComplementaryCuts(esdTrackCuts2);
191 //    }
192 //    else
193 //    {
194 //      //Hybrids 2010
195 //      AliESDtrackCuts * esdTrackCuts  = CreateTrackCutsPWGJE(10001006);
196 //      reader->SetTrackCuts(esdTrackCuts);
197 //      AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
198 //      reader->SetTrackComplementaryCuts(esdTrackCuts2);
199 //    }
200   }
201   else if(inputDataType=="AOD")
202   {
203     reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
204     reader->SetTrackStatus(AliVTrack::kITSrefit);    
205   }
206   
207   // Calorimeter
208   
209   reader->SetEMCALClusterListName("");
210   reader->SwitchOffClusterRecalculation();
211   
212   reader->SwitchOnEMCALCells();
213   reader->SwitchOnEMCAL();
214
215   reader->SwitchOnPHOSCells();
216   reader->SwitchOnPHOS();
217   
218   //-----------------
219   // Event selection
220   //-----------------
221   
222   reader->SwitchOnEventTriggerAtSE();
223   
224   reader->SetZvertexCut(10.);
225   reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
226   reader->SwitchOffPileUpEventRejection();  // remove pileup
227   reader->SwitchOffV0ANDSelection() ;       // and besides v0 AND
228   
229   reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
230   reader->SetCentralityOpt(100);  // 10 (c= 0-10, 10-20 ...), 20  (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
231
232   if(debugLevel > 0) reader->Print("");
233   
234   return reader;
235   
236 }
237
238 //__________________________________________________________________________
239 AliCalorimeterUtils* ConfigureCaloUtils(Bool_t simulation, Int_t debugLevel)
240 {
241   
242   AliCalorimeterUtils *cu = new AliCalorimeterUtils;
243   cu->SetDebug(debugLevel);
244   
245   // Remove clusters close to borders, at least max energy cell is 1 cell away 
246   cu->SetNumberOfCellsFromEMCALBorder(1);
247   cu->SetNumberOfCellsFromPHOSBorder(2);
248   
249   // Search of local maxima in cluster
250   cu->SetLocalMaximaCutE(0.1);
251   cu->SetLocalMaximaCutEDiff(0.03);
252
253   cu->SwitchOffClusterPlot();
254   cu->SwitchOffRecalculateClusterTrackMatching();
255   
256   cu->SwitchOnBadChannelsRemoval() ;
257   
258   //EMCAL settings
259
260   if(!simulation)
261     cu->SwitchOnLoadOwnEMCALGeometryMatrices();
262   
263   AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
264   cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
265   cu->SwitchOffRunDepCorrection();
266
267   gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
268   ConfigureEMCALRecoUtils(recou,
269                           simulation,
270                           kTRUE,//kExotic,
271                           kTRUE,//kNonLinearity,
272                           kFALSE,//kCalibE,
273                           kTRUE,//kBadMap,
274                           kFALSE);//kCalibT
275   recou->SetExoticCellDiffTimeCut(50.);
276
277   cu->SwitchOnCorrectClusterLinearity();
278
279   if(kCalorimeter=="PHOS")
280     cu->SetNumberOfSuperModulesUsed(3);
281   else
282     cu->SetNumberOfSuperModulesUsed(10);
283   
284   // PHOS 
285   cu->SwitchOffLoadOwnPHOSGeometryMatrices();
286     
287   if(debugLevel > 0) cu->Print("");
288   
289   return cu;
290   
291 }
292
293 //_______________________________________________________________________________
294 AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter, TString containerName,
295                                       Bool_t simulation, Int_t debugLevel)
296 {
297   
298   AliAnaPhoton *ana = new AliAnaPhoton();
299   ana->SetDebug(debugLevel); //10 for lots of messages
300   
301   // cluster selection cuts
302   
303   ana->SwitchOffFiducialCut();
304
305   ana->SetCalorimeter(calorimeter);
306   
307   if(calorimeter == "PHOS")
308   {
309     ana->SetNCellCut(2);// At least 3 cells
310     ana->SetMinPt(0.3);
311     ana->SetMinDistanceToBadChannel(2, 4, 5);
312     ana->SetTimeCut(-1e10,1e10); // open cut
313   }
314   else 
315   {//EMCAL
316     ana->SetNCellCut(1);// At least 2 cells
317     ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
318     ana->SetMaxEnergy(1000); 
319     ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off 
320     // restrict to less than 100 ns when time calibration is on 
321     ana->SetMinDistanceToBadChannel(2, 4, 6); 
322     // Not useful if M02 cut is already strong
323     ana->SetNLMCut(1, 2) ;
324   }
325   
326   ana->SwitchOnTrackMatchRejection() ;
327   ana->SwitchOffTMHistoFill() ;
328
329   
330   //PID cuts (shower shape)
331   ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
332   AliCaloPID* caloPID = ana->GetCaloPID();
333   //Not used in bayesian
334   
335   //EMCAL
336   caloPID->SetEMCALLambda0CutMax(0.4); // Rather open
337   caloPID->SetEMCALLambda0CutMin(0.10);
338   
339   caloPID->SetEMCALDEtaCut(0.025);
340   caloPID->SetEMCALDPhiCut(0.030);
341     
342   //PHOS
343   caloPID->SetPHOSDispersionCut(2.5);
344   caloPID->SetPHOSRCut(2.);
345   
346   ana->SwitchOnFillShowerShapeHistograms();  // Filled before photon shower shape selection
347   //if(!simulation)ana->SwitchOnFillPileUpHistograms();
348
349   // Input / output delta AOD settings
350   ana->SetOutputAODName(Form("Photon%s",containerName.Data()));
351   ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
352   ana->SetInputAODName (Form("Photon%s",containerName.Data()));
353
354   //Set Histograms name tag, bins and ranges
355   
356   ana->AddToHistogramsName("AnaPhoton_");
357   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
358   
359   // Number of particle type MC histograms
360   ana->FillNOriginHistograms(7);
361   ana->FillNPrimaryHistograms(4);
362   
363   if(simulation) ana->SwitchOnDataMC();
364   
365   if(debugLevel > 0 ) ana->Print("");
366   
367   return ana;
368   
369 }
370
371 //_________________________________________________________________________
372 AliAnaPi0* ConfigurePi0Analysis(TString calorimeter, TString collision,
373                                 TString containerName, Bool_t simulation,
374                                 Bool_t qaan, Int_t debugLevel)
375 {
376   
377   AliAnaPi0 *ana = new AliAnaPi0();
378   
379   ana->SetDebug(debugLevel);//10 for lots of messages
380   
381   // Input delta AOD settings
382   ana->SetInputAODName(Form("Photon%s",containerName.Data()));
383   
384   // Calorimeter settings
385   ana->SetCalorimeter(calorimeter);
386   
387   //settings for pp collision mixing
388   ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
389   
390   // Cuts 
391   if(calorimeter=="EMCAL") ana->SetPairTimeCut(70);
392   
393   if     (collision == "pp"  )
394   {
395     ana->SetNCentrBin(1);
396     ana->SetNZvertBin(10);
397     ana->SetNRPBin(1);
398     ana->SetNMaxEvMix(100);    
399   }
400   else if(collision =="PbPb")
401   {
402     ana->SetNCentrBin(10);
403     ana->SetNZvertBin(10);
404     ana->SetNRPBin(4);
405     ana->SetNMaxEvMix(10);
406   }
407   else if(collision =="pPb")
408   {
409     ana->SetNCentrBin(1);
410     ana->SetNZvertBin(10);
411     ana->SetNRPBin(4);
412     ana->SetNMaxEvMix(100);
413   }
414
415   ana->SwitchOffMultipleCutAnalysis();
416   ana->SwitchOnSMCombinations();
417   ana->SwitchOffFillAngleHisto();
418   ana->SwitchOffFillOriginHisto();
419
420   //Set Histograms name tag, bins and ranges
421   
422   ana->AddToHistogramsName("AnaPi0_");
423   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
424
425   if(simulation) ana->SwitchOnDataMC();
426
427   if(debugLevel > 0) ana->Print("");
428   
429   return ana;
430   
431 }
432
433 //___________________________________________________________________________________
434 AliAnaChargedParticles* ConfigureChargedAnalysis(TString containerName,
435                                                  Bool_t simulation, Int_t debugLevel)
436 {
437   
438   AliAnaChargedParticles *ana = new AliAnaChargedParticles();
439   ana->SetDebug(debugLevel); //10 for lots of messages
440   
441   // selection cuts
442   
443   ana->SetMinPt(0.5);
444   ana->SwitchOnFiducialCut();
445   ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
446   
447   ana->SwitchOffFillVertexBC0Histograms() ;
448   //if(!simulation) ana->SwitchOnFillPileUpHistograms();
449   
450   // Input / output delta AOD settings
451   
452   ana->SetOutputAODName(Form("Hadron%s",containerName.Data()));
453   ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
454   ana->SetInputAODName(Form("Hadron%s",containerName.Data()));
455
456   //Set Histograms name tag, bins and ranges
457   
458   ana->AddToHistogramsName("AnaHadrons_");
459   SetHistoRangeAndNBins(ana->GetHistogramRanges(),""); // see method below
460   
461   ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
462   ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
463   
464   if(debugLevel > 0) ana->Print("");
465   
466   return ana;
467   
468 }
469
470 //__________________________________________________________________________________________________________
471 AliAnaParticleHadronCorrelation* ConfigureHadronCorrelationAnalysis(TString particle,  TString calorimeter,
472                                                                     TString collision, TString containerName,
473                                                                     Bool_t simulation, Int_t debugLevel)
474 {
475   
476   AliAnaParticleHadronCorrelation *ana = new AliAnaParticleHadronCorrelation();
477   ana->SetDebug(debugLevel);
478   
479   ana->SetMinimumTriggerPt(5);
480   ana->SetAssociatedPtRange(0.2,100); 
481   ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
482   
483   ana->SetNAssocPtBins(4);
484   
485   ana->SetAssocPtBinLimit(0, 0.5) ;
486   ana->SetAssocPtBinLimit(1, 2) ;
487   ana->SetAssocPtBinLimit(2, 5) ;
488   ana->SetAssocPtBinLimit(3, 10) ;
489   ana->SetAssocPtBinLimit(4, 20) ;
490
491   ana->SelectIsolated(kFALSE); // do correlation with isolated photons
492
493   //if(!simulation) ana->SwitchOnFillPileUpHistograms();
494   
495   ana->SwitchOnAbsoluteLeading();  // Select trigger leading particle of all the selected tracks
496   ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
497   
498   // Mixing with own pool
499   ana->SwitchOffOwnMix();
500   
501   ana->SetNZvertBin(20);
502   
503   if(collision=="pp")
504   {
505     ana->SetNMaxEvMix(100);    
506     ana->SwitchOnTrackMultBins();
507     ana->SetNCentrBin(9); // Fixed track mult values
508     ana->SetNRPBin(1);
509   }
510   else 
511   {
512     ana->SetNMaxEvMix(10);    
513     ana->SwitchOffTrackMultBins(); // centrality bins
514     ana->SetNCentrBin(10); 
515     ana->SetNRPBin(3);
516   }
517   
518   // Input / output delta AOD settings
519   
520   ana->SetInputAODName(Form("%s%s",particle.Data(),containerName.Data()));
521   ana->SetAODObjArrayName(Form("%sHadronCorr_%s",particle.Data(),containerName.Data()));
522   
523   ana->SwitchOffPi0TriggerDecayCorr();
524   ana->SwitchOffDecayTriggerDecayCorr();
525   ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
526   ana->SwitchOffHMPIDCorrelation();
527   ana->SwitchOffFillBradHistograms();
528   
529   // Underlying event
530   ana->SwitchOffEventSelection();
531   ana->SwitchOffSeveralUECalculation();
532   ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
533   ana->SetMultiBin(1);
534   
535   //Set Histograms name tag, bins and ranges
536   
537   ana->AddToHistogramsName(Form("Ana%sHadronCorr_",particle.Data()));
538   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
539   
540   if(simulation) ana->SwitchOnDataMC();
541   
542   if(debugLevel > 0) ana->Print("");
543  
544   return ana;
545   
546 }
547
548 //________________________________________________________________________________
549 AliAnaCalorimeterQA* ConfigureQAAnalysis(TString calorimeter,  Bool_t simulation,
550                                          Int_t debugLevel)
551 {
552   
553   AliAnaCalorimeterQA *ana = new AliAnaCalorimeterQA();
554   ana->SetDebug(debugLevel); //10 for lots of messages
555   ana->SetCalorimeter(calorimeter);
556   
557   ana->SetTimeCut(-1e10,1e10); // Open time cut
558   ana->SwitchOnCorrelation();
559   ana->SwitchOffStudyBadClusters() ;
560   ana->SwitchOffFiducialCut();
561   ana->SwitchOffFillAllTH3Histogram();
562   ana->SwitchOffFillAllPositionHistogram();
563   ana->SwitchOffFillAllPositionHistogram2();
564   ana->SwitchOffStudyBadClusters();
565   ana->SwitchOffStudyClustersAsymmetry();
566   ana->SwitchOffStudyWeight();
567   ana->SwitchOnFillAllTrackMatchingHistogram();
568   ana->SwitchOnFillAllCellTimeHisto() ;
569   
570   ana->AddToHistogramsName("QA_"); //Begining of histograms name
571   SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
572   
573   if(simulation) ana->SwitchOnDataMC();
574   
575   if(debugLevel > 0) ana->Print("");
576   
577   return ana;
578   
579 }
580
581
582 //________________________________________________________
583 void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges,
584                             TString calorimeter)
585 {
586   // Set common bins for all analysis and MC histograms filling
587     
588   histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
589   
590   if(calorimeter=="EMCAL")
591   {
592 //    if(year==2010)
593 //    {
594 //      histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
595 //      histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
596 //      histoRanges->SetHistoYRangeAndNBins(370,450,40);  // QA
597 //    }
598 //    else if(year==2011)
599 //    {           
600 //      histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
601 //      histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
602 //      histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
603 //    }
604 //    else
605     {
606       histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 190*TMath::DegToRad(), 122) ;
607       histoRanges->SetHistoXRangeAndNBins(-100,90,200); // QA
608       histoRanges->SetHistoYRangeAndNBins(50,450,100);  // QA
609     }
610
611     histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
612   }
613   else
614   {
615     histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
616     histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
617   }
618   
619   histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
620   
621   // Invariant mass histoRangeslysis
622   histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
623   histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
624   
625   // check if time calibration is on
626   histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,2000);
627   //histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
628   histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
629   
630   // track-cluster residuals
631   histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
632   histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
633   histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
634
635   // QA, electron, charged
636   histoRanges->SetHistoPOverERangeAndNBins(0,  2.5 ,500);
637   histoRanges->SetHistodEdxRangeAndNBins  (0.,250.0,500);
638   
639   // QA
640   histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
641   histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100);
642   histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
643   histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
644   histoRanges->SetHistoNClustersRangeAndNBins(0,100,100);
645   histoRanges->SetHistoZRangeAndNBins(-400,400,200);
646   histoRanges->SetHistoRRangeAndNBins(400,450,25);
647   histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
648   histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
649   histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
650   
651 }
652