#include <TMatrixDSym.h>
#include <TMath.h>
#include "AliVMultiplicity.h"
+#include "AliPPVsMultUtils.h"
#include "AliAnalysisUtils.h"
fnSigmaPlpDiamZSPD(5.),
fUseSPDCutInMultBins(kFALSE),
fASPDCvsTCut(65.),
- fBSPDCvsTCut(4.)
+ fBSPDCvsTCut(4.),
+ fPPVsMultUtils(0x0)
{
// Default contructor
}
if(fisAOD){
AliAODHeader *aodheader = 0x0;
- aodheader = aod->GetHeader();
+ aodheader = dynamic_cast<AliAODHeader*>(aod->GetHeader());
+ if(!aodheader) AliFatal("Not a standard AOD");
if(!aodheader){
AliFatal("AOD header not there ?!");
return kFALSE;
AliFatal("Event is neither of AOD nor ESD type");
return kFALSE;
}
- Int_t bc2 = (aod)?aod->GetHeader()->GetIRInt2ClosestInteractionMap():esd->GetHeader()->GetIRInt2ClosestInteractionMap();
+ Int_t bc2 = (aod)?((AliVAODHeader*)aod->GetHeader())->GetIRInt2ClosestInteractionMap():esd->GetHeader()->GetIRInt2ClosestInteractionMap();
if (bc2 != 0)
return kTRUE;
- Int_t bc1 = (aod)?aod->GetHeader()->GetIRInt1ClosestInteractionMap():esd->GetHeader()->GetIRInt1ClosestInteractionMap();
+ Int_t bc1 = (aod)?((AliVAODHeader*)aod->GetHeader())->GetIRInt1ClosestInteractionMap():esd->GetHeader()->GetIRInt1ClosestInteractionMap();
if (bc1 != 0)
return kTRUE;
}
+//______________________________________________________________________
+Float_t AliAnalysisUtils::GetMultiplicityPercentile(AliVEvent *event, TString lMethod ){
+ if(!fPPVsMultUtils)
+ fPPVsMultUtils=new AliPPVsMultUtils();
+ if( (event->InheritsFrom("AliAODEvent")) || (event->InheritsFrom("AliESDEvent")) ) return fPPVsMultUtils->GetMultiplicityPercentile(event,lMethod);
+ else {
+ AliFatal("Event is neither of AOD nor ESD type");
+ return -999.;
+ }
+}