From befa9db4f013a8b845f4f2547a6148304ae6e82d Mon Sep 17 00:00:00 2001 From: morsch Date: Sat, 15 Jan 2011 00:37:13 +0000 Subject: [PATCH] GetCentrality now in base class AliVEvent --- STEER/AliAODEvent.h | 3 +- STEER/AliMCEvent.h | 4 ++- STEER/AliMixedEvent.h | 2 ++ STEER/AliVEvent.h | 68 ++++--------------------------------------- 4 files changed, 13 insertions(+), 64 deletions(-) diff --git a/STEER/AliAODEvent.h b/STEER/AliAODEvent.h index 53f515b8aa7..e9f09fba50b 100644 --- a/STEER/AliAODEvent.h +++ b/STEER/AliAODEvent.h @@ -33,6 +33,7 @@ class TTree; class TFolder; +class AliCentrality; class AliAODEvent : public AliVEvent { @@ -232,7 +233,7 @@ class AliAODEvent : public AliVEvent { virtual Int_t EventIndexForCaloCluster(Int_t) const {return 0;} virtual Int_t EventIndexForPHOSCell(Int_t) const {return 0;} virtual Int_t EventIndexForEMCALCell(Int_t) const {return 0;} - + AliCentrality* GetCentrality() {return fHeader->GetCentralityP();} private : TList *fAODObjects; // list of AODObjects diff --git a/STEER/AliMCEvent.h b/STEER/AliMCEvent.h index 4d29ba576d8..7cd80d959e1 100644 --- a/STEER/AliMCEvent.h +++ b/STEER/AliMCEvent.h @@ -24,6 +24,7 @@ #include "AliVVertex.h" #include "AliMCParticle.h" +class AliCentrality; class AliStack; class AliHeader; class AliGenEventHeader; @@ -132,10 +133,11 @@ public: virtual Int_t EventIndexForCaloCluster(Int_t) const {return 0;} virtual Int_t EventIndexForPHOSCell(Int_t) const {return 0;} virtual Int_t EventIndexForEMCALCell(Int_t) const {return 0;} - + AliCentrality* GetCentrality() {return 0;} private: virtual void ReorderAndExpandTreeTR(); virtual Int_t FindIndexAndEvent(Int_t oldidx, AliMCEvent*& event) const; + private: // Stanndard implementation for ESD production AliStack *fStack; // Current pointer to stack diff --git a/STEER/AliMixedEvent.h b/STEER/AliMixedEvent.h index b5a6fa41e6d..101e0393dc8 100644 --- a/STEER/AliMixedEvent.h +++ b/STEER/AliMixedEvent.h @@ -18,6 +18,7 @@ #include "AliVVertex.h" #include #include +class AliCentrality; class AliMixedEvent : public AliVEvent { @@ -108,6 +109,7 @@ public: virtual Int_t EventIndexForPHOSCell(Int_t icell) const; virtual Int_t EventIndexForEMCALCell(Int_t icell) const; + virtual AliCentrality* GetCentrality() {return 0;} // Primary vertex virtual const AliVVertex *GetPrimaryVertex() const {return fMeanVertex;} virtual Bool_t ComputeVtx(TObjArray *vertices, Double_t *pos,Double_t *sig,Int_t *nContributors); diff --git a/STEER/AliVEvent.h b/STEER/AliVEvent.h index a94db103196..6218d54c719 100644 --- a/STEER/AliVEvent.h +++ b/STEER/AliVEvent.h @@ -22,6 +22,7 @@ #include "AliVCluster.h" #include "AliVCaloCells.h" #include "TRefArray.h" +class AliCentrality; class AliVEvent : public TObject { @@ -126,68 +127,11 @@ public: virtual Bool_t IsPileupFromSPDInMultBins() const { return kFALSE; } - - virtual Int_t EventIndex(Int_t itrack) const = 0; - virtual Int_t EventIndexForCaloCluster(Int_t iclu) const= 0; - virtual Int_t EventIndexForPHOSCell(Int_t icell) const= 0; - virtual Int_t EventIndexForEMCALCell(Int_t icell) const= 0; - - //---------- end of new stuff - - - /* to be considered to go in here be implemented - - void SetPrimaryVertex(const AliESDVertex *vertex) { - *fPrimaryVertex = *vertex; - fPrimaryVertex->SetName("PrimaryVertex");// error prone use class wide names? - } - - void SetMultiplicity(const AliMultiplicity *mul) { - *fSPDMult = *mul; - // CKB - // new (&fSPDMult) AliMultiplicity(*mul); - } - const AliMultiplicity *GetMultiplicity() const {return fSPDMult;} - - - AliESDMuonTrack *GetMuonTrack(Int_t i) const { - return (AliESDMuonTrack *)fMuonTracks->UncheckedAt(i); - } - void AddMuonTrack(const AliESDMuonTrack *t) { - TClonesArray &fmu = *fMuonTracks; - new(fmu[fMuonTracks->GetEntriesFast()]) AliESDMuonTrack(*t); - } - - AliESDv0 *GetV0(Int_t i) const { - return (AliESDv0*)fV0s->UncheckedAt(i); - } - Int_t AddV0(const AliESDv0 *v); - - AliESDcascade *GetCascade(Int_t i) const { - return (AliESDcascade *)fCascades->UncheckedAt(i); - } - void AddCascade(const AliESDcascade *c) { - TClonesArray &fc = *fCascades; - new(fc[fCascades->GetEntriesFast()]) AliESDcascade(*c); - } - - AliESDkink *GetKink(Int_t i) const { - return (AliESDkink *)fKinks->UncheckedAt(i); - } - Int_t AddKink(const AliESDkink *c); - - AliESDCaloCluster *GetCaloCluster(Int_t i) const { - return (AliESDCaloCluster *)fCaloClusters->UncheckedAt(i); - } - Int_t AddCaloCluster(const AliESDCaloCluster *c); - - Int_t GetNumberOfMuonTracks() const {return fMuonTracks->GetEntriesFast();} - Int_t GetNumberOfV0s() const {return fV0s->GetEntriesFast();} - Int_t GetNumberOfCascades() const {return fCascades->GetEntriesFast();} - Int_t GetNumberOfKinks() const {return fKinks->GetEntriesFast();} - Int_t GetNumberOfCaloClusters() const {return fCaloClusters->GetEntriesFast();} - - */ + virtual AliCentrality* GetCentrality() = 0; + virtual Int_t EventIndex(Int_t itrack) const = 0; + virtual Int_t EventIndexForCaloCluster(Int_t iclu) const = 0; + virtual Int_t EventIndexForPHOSCell(Int_t icell) const = 0; + virtual Int_t EventIndexForEMCALCell(Int_t icell) const = 0; ClassDef(AliVEvent,1) // base class for AliEvent data }; -- 2.43.0