]>
Commit | Line | Data |
---|---|---|
a9255000 | 1 | #ifndef AliAODCluster_H |
2 | #define AliAODCluster_H | |
df9db588 | 3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
a9255000 | 9 | // AOD cluster base class |
df9db588 | 10 | // Author: Markus Oldenburg, CERN |
11 | //------------------------------------------------------------------------- | |
12 | ||
c8fe2783 | 13 | #include <AliVCluster.h> |
df9db588 | 14 | |
c8fe2783 | 15 | class AliAODCluster : public AliVCluster { |
df9db588 | 16 | |
17 | public: | |
18 | ||
a9255000 | 19 | AliAODCluster(); |
20 | AliAODCluster(Int_t id, | |
4cfedff1 | 21 | UInt_t nLabel, |
22 | Int_t *label, | |
df9db588 | 23 | Double_t energy, |
24 | Double_t x[3], | |
83dd7da3 | 25 | Double_t pid[13], |
4cfedff1 | 26 | Char_t ttype=kUndef, |
27 | UInt_t selectInfo=0); | |
df9db588 | 28 | |
a9255000 | 29 | AliAODCluster(Int_t id, |
4cfedff1 | 30 | UInt_t nLabel, |
31 | Int_t *label, | |
df9db588 | 32 | Float_t energy, |
33 | Float_t x[3], | |
83dd7da3 | 34 | Float_t pid[13], |
4cfedff1 | 35 | Char_t ttype=kUndef, |
36 | UInt_t selectInfo=0); | |
c8fe2783 | 37 | |
a9255000 | 38 | virtual ~AliAODCluster(); |
4cfedff1 | 39 | AliAODCluster(const AliAODCluster& clus); |
40 | AliAODCluster& operator=(const AliAODCluster& clus); | |
df9db588 | 41 | |
42 | Double_t Chi2() const { return fChi2; } | |
c8fe2783 | 43 | |
44 | Double_t E() const { return fEnergy; } | |
45 | ||
df9db588 | 46 | // PID |
c8fe2783 | 47 | |
48 | UShort_t GetMostProbablePID() const; | |
49 | const Double_t *GetPID() const { return fPID; }//{ for(Int_t i=0; i<13; ++i) pid[i]=fPID[i]; } | |
50 | Int_t GetID() const { return fID; } | |
51 | Int_t GetLabel() const { | |
52 | if( fLabel && fNLabel > 0) return fLabel[0]; | |
53 | else return -1;} //Most likely the track associated to the cluster | |
54 | Int_t GetLabelAt(UInt_t i) const; | |
78902954 | 55 | Int_t * GetLabels() const {return fLabel ; } |
c8fe2783 | 56 | UInt_t GetNLabels() const { return (UInt_t)fNLabel; } |
4cfedff1 | 57 | Bool_t TestFilterBit(UInt_t filterBit) const { return (Bool_t) ((filterBit & fFilterMap) != 0); } |
58 | Char_t GetType() const { return fType; } | |
c8fe2783 | 59 | |
60 | void GetPosition(Float_t *x) const { | |
61 | x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2];} | |
62 | ||
63 | Bool_t IsEMCAL() const {if(fType == kEMCALClusterv1) return kTRUE; | |
4cfedff1 | 64 | else return kFALSE;} |
c8fe2783 | 65 | Bool_t IsPHOS() const {if(fType == kPHOSCharged || fType == kPHOSNeutral) return kTRUE; |
4cfedff1 | 66 | else return kFALSE;} |
c8fe2783 | 67 | |
df9db588 | 68 | |
69 | void Print(const Option_t *opt = "") const; | |
c8fe2783 | 70 | |
df9db588 | 71 | // setters |
4858e81a | 72 | void SetE(Double32_t energy) {fEnergy = energy ; } |
14b34be5 | 73 | void SetID(Int_t id) { fID = id; } |
c8fe2783 | 74 | void SetType(Char_t ttype) { fType=ttype; } |
4cfedff1 | 75 | void SetLabel(Int_t *label, UInt_t size); |
14b34be5 | 76 | void SetChi2(Double_t chi2) { fChi2 = chi2; } |
c8fe2783 | 77 | |
78 | void SetPosition(Float_t *x); | |
79 | void SetPositionAt(Float_t x,Int_t i) { if(i>=0 && i<3) fPosition[i] = x ; | |
80 | else printf("Bad index for position array, i = %d\n",i);} | |
81 | ||
82 | void SetPIDAt(Float_t x,Int_t i) { if(i>=0 && i<13) fPID[i] = x ; | |
83 | else printf("Bad index for PID array, i = %d\n",i);} | |
84 | void SetPID(const Float_t *pid) { | |
85 | if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i]; | |
86 | else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;} | |
87 | template <class T> void SetPIDFromESD(const T *pid) { | |
88 | if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i]; fPID[11]=0; fPID[12]=0;} | |
89 | else {for(Int_t i=0; i<13; fPID[i++]=0) ;} fPID[AliAODCluster::kUnknown]=1.;} | |
90 | ||
91 | void RemoveLabel(); | |
92 | ||
93 | ||
df9db588 | 94 | private : |
c8fe2783 | 95 | |
df9db588 | 96 | // Energy & position |
97 | Double32_t fEnergy; // energy | |
01afc3fc | 98 | Double32_t fPosition[3]; // position of the cluster |
c8fe2783 | 99 | |
1e2eced6 | 100 | Double32_t fChi2; // chi2 (probably not necessary for PMD) |
83dd7da3 | 101 | Double32_t fPID[13]; // [0.,1.,8] pointer to PID object |
c8fe2783 | 102 | |
1e2eced6 | 103 | Int_t fID; // unique cluster ID, points back to the ESD cluster |
4cfedff1 | 104 | Int_t fNLabel; // number of original track for this cluster |
105 | Int_t *fLabel; // [fNLabel] particle label, points back to MC tracks | |
106 | UInt_t fFilterMap; // filter information, one bit per set of cuts | |
df9db588 | 107 | |
9333290e | 108 | Char_t fType; // cluster type |
c8fe2783 | 109 | |
110 | ClassDef(AliAODCluster,6); | |
df9db588 | 111 | }; |
112 | ||
113 | #endif |