message: PWGDQ AliDielectronPID fixed centrality for TRDeleEff and run 2
diff: @@ -561,10 +561,10 @@ Bool_t AliDielectronPID::IsSelectedTRDeleEff(AliVTrack * const part, Int_t icut,
  if (fRequirePIDbit[icut]==AliDielectronPID::kIfAvailable&&(pidStatus!=AliPIDResponse::kDetPidOk)) return kTRUE;
  Double_t centrality = -1.;
  - if(part->IsA() == AliESDtrack::Class())
  - centrality=(const_cast<AliESDEvent*>( (static_cast<const AliESDtrack*>(part))->GetESDEvent()) )->GetCentrality()->GetCentralityPercentile("V0M");
  - if(part->IsA() == AliAODTrack::Class())
  - centrality=(const_cast<AliAODEvent*>( (static_cast<const AliAODTrack*>(part))->GetAODEvent()) )->GetCentrality()->GetCentralityPercentile("V0M");
  + AliVEvent *event = (AliVEvent*) part->GetEvent();
  + AliMultSelection *multSelection = (AliMultSelection*) event->FindListObject("MultSelection"); // Run2 centrality estimator, centrality is no longer stored in the AODs
  + if(!multSelection) centrality = event->GetCentrality()->GetCentralityPercentile("V0M"); // Should work for Run1 data
  + else centrality = multSelection->GetMultiplicityPercentile("V0M", kFALSE);
  Bool_t selected=fPIDResponse->IdentifiedAsElectronTRD(part,fNsigmaLow[icut], centrality, PIDmethod)^fExclude[icut];
  return selected;
  