]>
Commit | Line | Data |
---|---|---|
df9db588 | 1 | #ifndef AliAODNeutral_H |
2 | #define AliAODNeutral_H | |
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 | //------------------------------------------------------------------------- | |
9 | // AOD track base class | |
10 | // Author: Markus Oldenburg, CERN | |
11 | //------------------------------------------------------------------------- | |
12 | ||
13 | #include <TRef.h> | |
14 | ||
15 | #include "AliVirtualParticle.h" | |
16 | #include "AliAODVertex.h" | |
17 | #include "AliAODTrack.h" | |
18 | ||
19 | class AliAODNeutral : public AliVirtualParticle { | |
20 | ||
21 | public: | |
22 | ||
01afc3fc | 23 | enum AODNeu_t {kUndef=-1, kPHOSCluster,kEMCALPseudoCluster, kEMCALClusterv1}; |
df9db588 | 24 | |
01afc3fc | 25 | enum AODNeuPID_t { |
df9db588 | 26 | kUnknown=0, kPhoton, kPi0, kNeutron, kKaon0, kEleCon, kOther}; |
27 | ||
28 | AliAODNeutral(); | |
29 | AliAODNeutral(Int_t id, | |
30 | Int_t label, | |
31 | Double_t energy, | |
32 | Double_t x[3], | |
01afc3fc | 33 | Double_t covMatrix[10], |
df9db588 | 34 | Double_t pid[10], |
35 | AliAODVertex *prodVertex, | |
36 | AliAODTrack *primTrack, | |
37 | Char_t ttype=kUndef); | |
38 | ||
39 | AliAODNeutral(Int_t id, | |
40 | Int_t label, | |
41 | Float_t energy, | |
42 | Float_t x[3], | |
01afc3fc | 43 | Float_t covMatrix[10], |
df9db588 | 44 | Float_t pid[10], |
45 | AliAODVertex *prodVertex, | |
46 | AliAODTrack *primTrack, | |
47 | Char_t ttype=kUndef); | |
48 | ||
49 | virtual ~AliAODNeutral(); | |
50 | AliAODNeutral(const AliAODNeutral& trk); | |
51 | AliAODNeutral& operator=(const AliAODNeutral& trk); | |
52 | ||
53 | Double_t Chi2() const { return fChi2; } | |
54 | ||
55 | virtual Double_t E() const { return fEnergy; } | |
56 | // make a connection to the PID object, here!!! | |
57 | virtual Double_t M() const { return -999.; } | |
58 | ||
59 | // make a connection to the PID object, here!!! | |
60 | virtual Double_t Y() const { return -999.; } | |
61 | ||
62 | // PID | |
63 | virtual const Double_t *PID() const { return fPID; } | |
64 | ||
65 | template <class T> void GetPID(T *pid) const { | |
66 | for(Int_t i=0; i<10; ++i) pid[i]=fPID[i];} | |
67 | ||
68 | template <class T> void SetPID(const T *pid) { | |
69 | if(pid) for(Int_t i=0; i<10; ++i) fPID[i]=pid[i]; | |
70 | else {for(Int_t i=1; i<10; fPID[i++]=0); fPID[0]=1.;}} | |
71 | ||
72 | Int_t GetID() const { return fID; } | |
73 | Int_t GetLabel() const { return fLabel; } | |
74 | ||
75 | template <class T> Bool_t GetPosition(T *x) const { | |
76 | x[0]=fPosition[0]; x[1]=fPosition[1]; x[2]=fPosition[2]; | |
01afc3fc | 77 | return kTRUE;} |
df9db588 | 78 | |
79 | template <class T> void SetCovMatrix(const T *covMatrix) { | |
5d62ce04 | 80 | if(!fCovMatrix) fCovMatrix=new AliAODRedCov<4>(); |
df9db588 | 81 | fCovMatrix->SetCovMatrix(covMatrix);} |
82 | ||
83 | template <class T> Bool_t GetCovMatrix(T *covMatrix) const { | |
84 | if(!fCovMatrix) return kFALSE; | |
85 | fCovMatrix->GetCovMatrix(covMatrix); return kTRUE;} | |
86 | ||
87 | void RemoveCovMatrix() {delete fCovMatrix; fCovMatrix=NULL;} | |
88 | ||
89 | AliAODVertex *GetProdVertex() const { return (AliAODVertex*)fProdVertex.GetObject(); } | |
90 | AliAODTrack *GetPrimTrack() const { return (AliAODTrack*)fPrimTrack.GetObject(); } | |
91 | ||
92 | ||
93 | void Print(const Option_t *opt = "") const; | |
94 | ||
95 | // setters | |
14b34be5 | 96 | void SetID(Int_t id) { fID = id; } |
97 | void SetLabel(Int_t label) {fLabel = label; } | |
df9db588 | 98 | |
01afc3fc | 99 | template <class T> void SetPosition(const T *x); |
df9db588 | 100 | |
14b34be5 | 101 | void SetChi2(Double_t chi2) { fChi2 = chi2; } |
df9db588 | 102 | |
103 | void SetProdVertex(TObject *vertex) { fProdVertex = vertex; } | |
104 | void SetPrimTrack(TObject *ptrack) { fPrimTrack = ptrack; } | |
105 | ||
106 | virtual Double_t Px() const {return 0.;} | |
107 | virtual Double_t Py() const {return 0.;} | |
108 | virtual Double_t Pz() const {return 0.;} | |
109 | virtual Double_t Pt() const {return 0.;} | |
110 | virtual Double_t P() const {return 0.;} | |
111 | virtual Double_t OneOverPt() const {return 0.;} | |
112 | virtual Double_t Phi() const {return 0.;} | |
113 | virtual Double_t Theta() const {return 0.;} | |
114 | virtual Double_t Eta() const {return 0.;} | |
115 | virtual Short_t Charge() const {return 0.;} | |
116 | ||
df9db588 | 117 | private : |
118 | ||
119 | // Energy & position | |
120 | Double32_t fEnergy; // energy | |
01afc3fc | 121 | Double32_t fPosition[3]; // position of the cluster |
df9db588 | 122 | |
123 | Double32_t fPID[10]; // [0.,1.,8] pointer to PID object | |
124 | Double32_t fChi2; // chi2 of mometum fit | |
125 | ||
126 | Int_t fID; // unique track ID, points back to the ESD track | |
127 | Int_t fLabel; // particle label, points back to MC track | |
128 | ||
5d62ce04 | 129 | AliAODRedCov<4> *fCovMatrix; // covariance matrix (x, y, z, E) |
df9db588 | 130 | TRef fProdVertex; // vertex of origin |
131 | TRef fPrimTrack; // primary track number associated with this cluster | |
132 | ||
14b34be5 | 133 | Char_t fType; |
df9db588 | 134 | |
135 | ||
136 | ClassDef(AliAODNeutral,1); | |
137 | }; | |
138 | ||
139 | #endif |