1 #ifndef AliAODCluster_H
2 #define AliAODCluster_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // AOD cluster base class
10 // Author: Markus Oldenburg, CERN
11 //-------------------------------------------------------------------------
15 class AliAODCluster : public TObject {
19 enum AODClu_t {kUndef = -1,
38 AliAODCluster(Int_t id,
47 AliAODCluster(Int_t id,
56 virtual ~AliAODCluster();
57 AliAODCluster(const AliAODCluster& clus);
58 AliAODCluster& operator=(const AliAODCluster& clus);
60 Double_t Chi2() const { return fChi2; }
62 virtual Double_t E() const { return fEnergy; }
65 virtual const Double_t *PID() const { return fPID; }
66 AODCluPID_t GetMostProbablePID() const;
68 template <class T> void GetPID(T *pid) const {
69 for(Int_t i=0; i<9; ++i) pid[i]=fPID[i];}
71 template <class T> void SetPID(const T *pid) {
72 if(pid) for(Int_t i=0; i<9; ++i) fPID[i]=pid[i];
73 else {for(Int_t i=0; i<9; fPID[i++]=0);} fPID[AliAODCluster::kUnknown]=1.;}
75 Int_t GetID() const { return fID; }
76 Int_t GetLabel(UInt_t i) const;
77 UInt_t GetNLabel() const { return (UInt_t)fNLabel; }
78 Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); }
79 Char_t GetType() const { return fType; }
81 template <class T> Bool_t GetPosition(T *x) const {
82 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];
85 Bool_t IsEMCALCluster() {if(fType == kEMCALClusterv1) return kTRUE;
87 Bool_t IsPHOSCluster() {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE;
91 void Print(const Option_t *opt = "") const;
94 void SetID(Int_t id) { fID = id; }
95 void SetType(AODClu_t ttype) { fType=ttype; }
96 void SetLabel(Int_t *label, UInt_t size);
99 template <class T> void SetPosition(const T *x);
101 void SetChi2(Double_t chi2) { fChi2 = chi2; }
106 Double32_t fEnergy; // energy
107 Double32_t fPosition[3]; // position of the cluster
109 Double32_t fChi2; // chi2 (probably not necessary for PMD)
110 Double32_t fPID[9]; // [0.,1.,8] pointer to PID object
112 Int_t fID; // unique cluster ID, points back to the ESD cluster
113 Int_t fNLabel; // number of original track for this cluster
114 Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks
115 UInt_t fFilterMap; // filter information, one bit per set of cuts
117 Char_t fType; // cluster type
119 ClassDef(AliAODCluster,4);