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 kCharged = 11, //For PMD?
39 kNeutral =12 //For PMD?
43 AliAODCluster(Int_t id,
52 AliAODCluster(Int_t id,
61 virtual ~AliAODCluster();
62 AliAODCluster(const AliAODCluster& clus);
63 AliAODCluster& operator=(const AliAODCluster& clus);
65 Double_t Chi2() const { return fChi2; }
67 virtual Double_t E() const { return fEnergy; }
70 virtual const Double_t *PID() const { return fPID; }
71 AODCluPID_t GetMostProbablePID() const;
73 template <class T> void GetPID(T *pid) const {
74 for(Int_t i=0; i<13; ++i) pid[i]=fPID[i];}
76 template <class T> void SetPID(const T *pid) {
77 if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i];
78 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
80 template <class T> void SetPIDFromESD(const T *pid) {
81 if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i]; fPID[11]=0; fPID[12]=0;}
82 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
84 Int_t GetID() const { return fID; }
85 Int_t GetLabel(UInt_t i) const;
86 Int_t * GetLabels() const {return fLabel ; }
87 UInt_t GetNLabel() const { return (UInt_t)fNLabel; }
88 Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); }
89 Char_t GetType() const { return fType; }
91 template <class T> Bool_t GetPosition(T *x) const {
92 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];
95 Bool_t IsEMCALCluster() {if(fType == kEMCALClusterv1) return kTRUE;
97 Bool_t IsPHOSCluster() {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE;
101 void Print(const Option_t *opt = "") const;
104 void SetID(Int_t id) { fID = id; }
105 void SetType(AODClu_t ttype) { fType=ttype; }
106 void SetLabel(Int_t *label, UInt_t size);
109 template <class T> void SetPosition(const T *x);
111 void SetChi2(Double_t chi2) { fChi2 = chi2; }
116 Double32_t fEnergy; // energy
117 Double32_t fPosition[3]; // position of the cluster
119 Double32_t fChi2; // chi2 (probably not necessary for PMD)
120 Double32_t fPID[13]; // [0.,1.,8] pointer to PID object
122 Int_t fID; // unique cluster ID, points back to the ESD cluster
123 Int_t fNLabel; // number of original track for this cluster
124 Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks
125 UInt_t fFilterMap; // filter information, one bit per set of cuts
127 Char_t fType; // cluster type
129 ClassDef(AliAODCluster,5);