message: Decorr task picking up AMPT on-fly centrality
diff: @@ -352,6 +352,7 @@ Float_t AliAnalysisDecorrTask::GetNCharged()
  }
  void AliAnalysisDecorrTask::NotifyRun() {
  + if(fOnTheFly) return;
  Bool_t dummy = fEventCuts.AcceptEvent(InputEvent());
  fEventCuts.SetRejectTPCPileupWithITSTPCnCluCorr(kTRUE);
  fEventCuts.fESDvsTPConlyLinearCut[0] = 500.;
  @@ -781,6 +782,8 @@ void AliAnalysisDecorrTask::UserExec(Option_t *)
  if(!fAOD) { return; }
  }
  if(!fEvent) { AliFatal("fEvent not found!"); return; }
  + if(fOnTheFly) if(!IsMCEventSelected()) return;
  +
  //Get centrality of event
  Double_t lCent = 0.0;
  @@ -806,16 +809,8 @@ void AliAnalysisDecorrTask::UserExec(Option_t *)
  lCent = lMultSel->GetMultiplicityPercentile(fCentEstimator);
  }
  if(lCent < 0) return;
  + if(!fOnTheFly) if(!IsEventSelected(lCent)) return;
  - if(fOnTheFly)
  - {
  - if(!IsMCEventSelected()) { return; }
  -
  - }
  - else
  - {
  - if(!IsEventSelected(lCent)) { return; }
  - }
  if(!fOnTheFly && fFillQA) FillWeights();
  @@ -2001,12 +1996,12 @@ Bool_t AliAnalysisDecorrTask::IsMCEventSelected()
  AliGenEventHeader *header = dynamic_cast<AliGenEventHeader*>(ev->GenEventHeader());
  if(!header) { AliFatal("MC event not generated!"); return kFALSE; }
  - const AliVVertex *vertex = ev->GetPrimaryVertex();
  + // const AliVVertex *vertex = ev->GetPrimaryVertex();
  if(!ev) { AliError("Vertex of MC not found!"); }
  - if(TMath::Abs(vertex->GetX()) > fPVtxCutX) return kFALSE;
  - if(TMath::Abs(vertex->GetY()) > fPVtxCutY) return kFALSE;
  - if(TMath::Abs(vertex->GetZ()) > fPVtxCutZ) return kFALSE;
  + // if(TMath::Abs(vertex->GetX()) > fPVtxCutX) return kFALSE;
  + // if(TMath::Abs(vertex->GetY()) > fPVtxCutY) return kFALSE;
  + // if(TMath::Abs(vertex->GetZ()) > fPVtxCutZ) return kFALSE;
  AliCollisionGeometry* headerH;
  AliGenHepMCEventHeader* headertmp;
  @@ -3155,4 +3150,3 @@ void AliAnalysisDecorrTask::Terminate(Option_t *)
  {
  }
  -
  