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 //-------------------------------------------------------------------------
13 #include <AliVCluster.h>
15 class AliAODCluster : public AliVCluster {
20 AliAODCluster(Int_t id,
29 AliAODCluster(Int_t id,
38 virtual ~AliAODCluster();
39 AliAODCluster(const AliAODCluster& clus);
40 AliAODCluster& operator=(const AliAODCluster& clus);
41 void Clear(const Option_t*);
43 Double_t Chi2() const { return fChi2; }
45 Double_t E() const { return fEnergy; }
49 UShort_t GetMostProbablePID() const;
50 const Double_t *GetPID() const { return fPID; }//{ for(Int_t i=0; i<13; ++i) pid[i]=fPID[i]; }
51 Int_t GetID() const { return fID; }
52 Int_t GetLabel() const {
53 if( fLabel && fNLabel > 0) return fLabel[0];
54 else return -1;} //Most likely the track associated to the cluster
55 Int_t GetLabelAt(UInt_t i) const;
56 Int_t * GetLabels() const {return fLabel ; }
57 UInt_t GetNLabels() const { return (UInt_t)fNLabel; }
58 Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); }
59 Char_t GetType() const { return fType; }
61 void GetPosition(Float_t *x) const {
62 x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];}
64 Bool_t IsEMCAL() const {if(fType == kEMCALClusterv1) return kTRUE;
66 Bool_t IsPHOS() const {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE;
70 void Print(const Option_t *opt = "") const;
73 void SetE(Double32_t energy) {fEnergy = energy ; }
74 void SetID(Int_t id) { fID = id; }
75 void SetType(Char_t ttype) { fType=ttype; }
76 void SetLabel(Int_t *label, UInt_t size);
77 void SetChi2(Double_t chi2) { fChi2 = chi2; }
79 void SetPosition(Float_t *x);
80 void SetPositionAt(Float_t x,Int_t i) { if(i>=0 && i<3) fPosition[i] = x ;
81 else printf("Bad index for position array, i = %d\n",i);}
83 void SetPIDAt(Float_t x,Int_t i) { if(i>=0 && i<13) fPID[i] = x ;
84 else printf("Bad index for PID array, i = %d\n",i);}
85 void SetPID(const Float_t *pid) {
86 if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i];
87 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
88 template <class T> void SetPIDFromESD(const T *pid) {
89 if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i]; fPID[11]=0; fPID[12]=0;}
90 else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;}
98 Double32_t fEnergy; // energy
99 Double32_t fPosition[3]; // position of the cluster
101 Double32_t fChi2; // chi2 (probably not necessary for PMD)
102 Double32_t fPID[13]; // [0.,1.,8] pointer to PID object
104 Int_t fID; // unique cluster ID, points back to the ESD cluster
105 Int_t fNLabel; // number of original track for this cluster
106 Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks
107 UInt_t fFilterMap; // filter information, one bit per set of cuts
109 Char_t fType; // cluster type
111 ClassDef(AliAODCluster,6);