fOutputAODBranch(0x0), fNewAOD(kFALSE),
fOutputAODName(""), fOutputAODClassName(""),
fAODObjArrayName(""), fAddToHistogramsName(""),
+ fCentralityClass("V0M"),fCentralityOpt(10),
fCaloPID(0x0), fFidCut(0x0), fIC(0x0),fMCUtils(0x0), fNMS(0x0),
fCaloUtils(0x0),
fHistoPtBins(0), fHistoPtMax(0.), fHistoPtMin(0.),
return fReader->GetEventNumber() ;
}
+
+//__________________________________________________
+Int_t AliAnaPartCorrBaseClass::GetEventCentrality() const {
+ //Return current event centrality
+
+ if(GetCentrality()){
+ if(fCentralityOpt==100) return (Int_t) GetCentrality()->GetCentralityPercentile(fCentralityClass);
+ else if(fCentralityOpt==10) return GetCentrality()->GetCentralityClass10(fCentralityClass);
+ else if(fCentralityOpt==5) return GetCentrality()->GetCentralityClass5(fCentralityClass);
+ else {
+ printf("AliAnaPartCorrBaseClass::Unknown centrality option %d, use 5, 10 or 100\n",fCentralityOpt);
+ return 0;
+ }
+ }
+ else return 0;
+
+}
+
//__________________________________________________
AliStack * AliAnaPartCorrBaseClass::GetMCStack() const {
Int_t GetModuleNumber(AliVCluster * cluster) const {
return fCaloUtils->GetModuleNumber(cluster);}
- AliESDCentrality* GetCentrality() const {return fReader->GetCentrality();}
-
+ //Centrality
+ AliESDCentrality* GetCentrality() const { return fReader->GetCentrality() ;}
+ void SetCentralityClass(TString name) { fCentralityClass = name ;}
+ void SetCentralityOpt(Int_t opt) { fCentralityOpt = opt ;}
+ TString GetCentralityClass() const { return fCentralityClass ;}
+ Int_t GetCentralityPercent() const { return fCentralityOpt ;}
+ Int_t GetEventCentrality() const ;
+
virtual void Terminate(TList * /*outputList*/) {;}
//analysis AOD branch
Bool_t fNewAOD ; // Flag, new aod branch added to the analysis or not.
TString fOutputAODName ; // Name of output AOD branch;
TString fOutputAODClassName; // Type of aod objects to be stored in the TClonesArray (AliAODPWG4Particle, AliAODPWG4ParticleCorrelation ...)
- TString fAODObjArrayName ; // Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track references.
- TString fAddToHistogramsName;// Add this string to histograms name
+ TString fAODObjArrayName ; // Name of ref array kept in a TList in AliAODParticleCorrelation with clusters or track references.
+ TString fAddToHistogramsName;// Add this string to histograms name
+
+ TString fCentralityClass; // Name of selected centrality class
+ Int_t fCentralityOpt; // Option for the returned value of the centrality, possible options 5, 10, 100
//Analysis helper classes access pointers
AliCaloPID * fCaloPID; //! PID calculation
Int_t fHistoTrMMax ; // Maximum value of track multiplicity histogram range
Int_t fHistoTrMMin ; // Minimum value of track multiplicity histogram range
- ClassDef(AliAnaPartCorrBaseClass,13)
+ ClassDef(AliAnaPartCorrBaseClass,14)
} ;
continue ;
if(TMath::Abs(vert[2]) > GetZvertexCut()) continue ; //vertex cut
if (evtIndex1 != currentEvtIndex) {
- //Get Reaction Plan position and calculate RP bin
- //does not exist in ESD yet????
- curCentrBin = 0 ;
+ curCentrBin = GetEventCentrality();
curRPBin = 0 ;
curZvertBin = (Int_t)(0.5*GetNZvertBin()*(vert[2]+GetZvertexCut())/GetZvertexCut()) ;
fhEvents->Fill(curCentrBin+0.5,curZvertBin+0.5,curRPBin+0.5) ;
currentEvtIndex = evtIndex1 ;
+ //if(GetDebug() > 1)
+ printf("AliAnaPi0::MakeAnalysisFillHistograms() - Centrality %d, Vertex Bin %d, RP bin %d\n",curCentrBin,curRPBin,curZvertBin);
}
//printf("AliAnaPi0::MakeAnalysisFillHistograms(): Photon 1 Evt %d Vertex : %f,%f,%f\n",evtIndex1, GetVertex(evtIndex1)[0] ,GetVertex(evtIndex1)[1],GetVertex(evtIndex1)[2]);