run centrality on MC
authormfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 14:15:02 +0000 (14:15 +0000)
committermfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2011 14:15:02 +0000 (14:15 +0000)
PWG2/SPECTRA/LambdaK0PbPb/AliAnalysisCentralitySelector.cxx
PWG2/SPECTRA/LambdaK0PbPb/run.C

index d341d8d..b5f65f3 100644 (file)
@@ -69,7 +69,6 @@ Bool_t AliAnalysisCentralitySelector::IsCentralityBinSelected(AliESDEvent* aEsd,
   } else {
 
    AliCentrality *centrality = (AliCentrality*) aEsd->GetCentrality(); // FIXME: change to alicentrality?
-   if(fIsMC) centrality->SetMCInput();
     if(!centrality && !fUseMultRange) {
       AliFatal("Centrality object not available"); 
     }
index 092f378..da30e39 100644 (file)
@@ -76,6 +76,7 @@ void run(const char * data, const char * passOrPath, Long64_t nev = -1, Long64_t
   // Centrality
   gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
   AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
+  if(isMC) taskCentrality->SetMCInput();
 
   AliAnalysisCentralitySelector * centrSelector = new AliAnalysisCentralitySelector();
   centrSelector->SetIsMC(isMC);