]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGCF/EBYE/PIDFluctuation/task/AliEbyEParticleRatioFluctuationTask.cxx
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / EBYE / PIDFluctuation / task / AliEbyEParticleRatioFluctuationTask.cxx
index 7d6eb9b11e0a291a270afdbfd254ccda8dd6b5c3..1c622bffb87641e83de5d6936e7577a8049b5601 100644 (file)
@@ -143,8 +143,9 @@ void AliEbyEParticleRatioFluctuationTask::UserExec( Option_t * ){
   Int_t gCent   = -1;
   Float_t gRefMul = -1;
   
-  AliAODHeader *aodHeader = event->GetHeader();
-  gCent = (Int_t)aodHeader->GetCentralityP()->GetCentralityPercentile(fCentralityEstimator.Data());
+  AliAODHeader *aodHeader = dynamic_cast<AliAODHeader*>(event->GetHeader());
+  if(!aodHeader) AliFatal("Not a standard AOD");
+  gCent = (Int_t)aodHeader->GetCentralityP()->GetCentralityPercentile(fCentralityEstimator.Data()); // V0M`
   gRefMul = aodHeader->GetRefMultiplicity();
   if (gCent < 0 || gCent > 100) return;
   if (isQA) fEventCounter->Fill(2);