]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveHF.h
Including TEnv.h to declare gEnv
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveHF.h
1 // $Id$
2 // Main author: Davide Caffarri 2009
3 // Base header class to HF visualization
4
5 /**************************************************************************
6  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
7  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
8  * full copyright notice.                                                 *
9  **************************************************************************/
10
11 #ifndef AliEveHF_H
12 #define AliEveHF_H
13
14 #include "AliAODRecoDecay.h"
15 #include "AliEveTrack.h"
16
17 #include <TEveVSDStructs.h>
18 #include <TPolyLine3D.h>
19
20 #include <TPDGCode.h>
21
22
23 class TH1F;
24 class TH2F;
25
26
27 class AliEveHFList;
28
29 class AliEveHF : public TEvePointSet
30 {
31   friend class AliEveHFList; //friend class for the list of HF in the same event
32   friend class AliEveHFEditor; //friend class for the list of HF visualization
33
34 public:
35   AliEveHF();
36   AliEveHF(TEveRecTrack* tNeg, TEveRecTrack* tPos, Double_t primVtx[3], AliAODRecoDecay* aodObj, TEveTrackPropagator* rs);
37   virtual ~AliEveHF();
38
39   void MakeHF();
40
41   virtual void SetMainColor(Color_t col)
42   {
43     TEvePointSet::SetMainColor(col);
44     fPointingLine->SetLineColor(fMarkerColor);
45   }
46
47   void SetRnrStyle(TEveTrackPropagator* rs) { fRnrStyle = rs; }
48
49   //HF Property
50
51   Float_t GetPhi()     { return fRecDecayHF.Phi(); }
52   Float_t GetEta()     { return fRecDecayMomHF.Eta(); }
53   Float_t GetRadius()  { return fRecDecayHF.Perp(); }
54   Float_t GetPt()      { return fRecDecayMomHF.Perp(); }
55
56   Double_t GetInvariantMassPart()     { CalculateInvMass(fDecay); return fInvariantMassPart; }
57   Double_t GetInvariantMassAntiPart() { CalculateInvMass(fDecay); return fInvariantMassAntiPart; }
58
59   Float_t GetChi2Vtx() const { return fChi2SecondVtx; }
60   Float_t GetCosPointingAngle() const {return fPointingAngleHF; }
61
62   AliAODRecoDecay *GetAODobj() const {return fAODobj; }
63
64   Int_t GetAODIndex() const { return fAODIndex; }
65   void  SetAODIndex(Int_t ind) { fAODIndex = ind;}
66
67   virtual const Text_t* GetName() const    { return Form("AOD_HF_%i",fAODIndex); }
68   virtual const Text_t* GetTitle() const   { return Form("AOD_HF_%i",fAODIndex); }
69
70   //Prongs Property
71
72   Double_t GetProngDCA(Int_t iProng)const { return fProngDCA[iProng]; }
73   void SetProngDCA() const ;
74
75   Double_t Getd0Prong(Int_t iProng)const  { return fProngd0[iProng]; }
76   void Setd0Prong() const ;
77
78   void CalculateInvMass(Int_t decay);
79
80   Bool_t SelectInvMass(Int_t decay, Float_t decayCuts);
81
82   void      SetMaxProbPdgPid();
83   Int_t     GetPdgProngMaxProb(Int_t iProng)const { return fProngMaxProbPdg[iProng]; }
84   Double_t  GetPidProngMaxProb(Int_t iProng)const { return fProngMaxProbPid[iProng]; }
85
86   TEveTrackPropagator* GetPropagator() const  { return fRnrStyle; }
87
88   TEveTrack* GetNegTrack()const { return fNegTrack; }
89   TEveTrack* GetPosTrack()const { return fPosTrack; }
90
91   TEveLine*  GetPointingLine()const { return fPointingLine; }
92
93 protected:
94
95   AliAODRecoDecay  *fAODobj;  //AOD object of the HF decay. 
96
97   TEveVector  fRecBirthHF;    // Reconstucted birth point of neutral particle
98   TEveVector  fRecDecayHF;    // Point of closest approach
99   TEveVector  fRecDecayMomHF;   // Momentum of the HF 
100   Double_t    fPointingAngleHF; // Track Pointing Angle
101
102   TEveTrack        *fNegTrack;  //Negative daughter of the HF
103   TEveTrack        *fPosTrack;  //Positive daughter of the HF
104
105   TEveTrackPropagator *fRnrStyle;  //Eve propagator for the track 
106
107   TEveLine         *fPointingLine;  //Flight Line of the HF 
108
109   Int_t             fnProng;      // Number of Prong.
110   Int_t             fAODIndex;    // Index in HF loop array.
111   Double_t          fChi2SecondVtx;      //Secondary Vertex Chi-square.
112
113   Double_t          *fProngDCA;//[fnProng] Distance at the point of closest approach.
114   Double_t          *fProngd0;//[fnProng] Impact Paramter if each prong.
115   Int_t             *fProngMaxProbPdg;//[fnProng] Maximum PDG probability for the negative daughter
116   Double_t          *fProngMaxProbPid;//[fnProng] Maximum PID probability for the negative daughter
117
118   Double_t           fInvariantMassPart; //Invariant Mass of the particle
119   Double_t           fInvariantMassAntiPart; //Invariant Mass of the Antiparticle
120
121   Int_t              fDecay; //Index for the type of decay
122
123  private:
124   AliEveHF(const AliEveHF&);            // Not implemented
125   AliEveHF& operator=(const AliEveHF&); // Not implemented
126
127   ClassDef(AliEveHF,0); // Visual representation of a AliEveHF.
128 };
129
130
131 /******************************************************************************/
132 // AliEveHFList
133 /******************************************************************************/
134 class AliEveHFList : public TEveElementList
135 {
136   friend class AliEveHFListEditor; //Class for the list of HF visualization 
137
138
139 public:
140   AliEveHFList();
141   AliEveHFList(TEveTrackPropagator* rs);
142   AliEveHFList(const Text_t* name, TEveTrackPropagator* rs=0);
143   virtual  ~AliEveHFList() {}
144
145   virtual const Text_t* GetTitle() const { return fTitle; }
146   virtual void SetTitle(const Text_t* t) { fTitle = t; }
147   virtual void SetTracksColor(Color_t cNeg, Color_t cPos, Int_t ip)
148   {fProngColor[ip] = cNeg; fProngColor[ip++] = cPos;}
149
150   virtual Bool_t CanEditMainColor() const { return kTRUE; }
151
152   void  SetRnrStyle(TEveTrackPropagator* rst) { fRnrStyle = rst; }
153   TEveTrackPropagator* GetPropagator()        { return fRnrStyle; }
154
155   Bool_t GetRnrHFvtx()     const { return fRnrHFvtx; }
156   Bool_t GetRnrHFpath()    const { return fRnrHFpath; }
157   Bool_t GetRnrDaughters() const { return fRnrDaughters; }
158
159   void   MakeHFs();
160
161   void   FilterByPt(Float_t minPt, Float_t maxPt);
162   void   FilterByRadius(Float_t minR, Float_t maxR);
163   void   FilterByCosPointingAngle(Float_t minCosPointingAngle, Float_t maxCosPointingAngle);
164   void   FilterByDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
165   void   FilterByd0(Float_t mind0, Float_t maxd0);
166   //void   FilterByCheckedPidMinProb(Int_t rFlag, Int_t rDaughter, Int_t rPid, Float_t rProb);
167
168   // void   SetProngCheckedPid(Int_t rProngCheckedPid) const;
169   Int_t  GetProngCheckedPid(Int_t iProng) {return fProngCheckedPid[iProng];}
170   // void   SetProngCheckedProb(Float_t rProngCheckedProb) const;
171   // Float_t  GetProngCheckedProb(Int_t iProng) const  { return fProngCheckedProb[iProng]; }
172
173   void   FilterByInvariantMass (Int_t decay, Float_t deltaInvariantMass);
174
175 protected:
176   TString              fTitle; 
177
178   TEveTrackPropagator *fRnrStyle;
179
180   Bool_t               fRnrDaughters; //variable for HF daughters visualization
181   Bool_t               fRnrHFvtx; //variable for the HF vertex visualization
182   Bool_t               fRnrHFpath; //variable for the visualization of the HF line
183
184   Color_t*             fProngColor;//[fnProng]
185
186   Float_t              fMinRCut; //minimum cut for the radius 
187   Float_t              fMaxRCut; //maximum cut for the radius
188
189   Float_t              fMinDaughterDCA; //minimum cut for the DCA of the daughter particles
190   Float_t              fMaxDaughterDCA; //maximum cut for the DCA of the daughter particles
191
192   Float_t              fMinPt; //minimum cut for the Pt
193   Float_t              fMaxPt; //maximum cut for the Pt
194
195   Float_t              fMinCosPointingAngle; //minimum cut for the cosine of the pointing angle 
196   Float_t              fMaxCosPointingAngle; //maximum cut for the cosine of the pointing angle 
197
198   Float_t              fMind0; //minimum cut for the impact parameter
199   Float_t              fMaxd0; //maximum cut for the impact parameter
200
201   Int_t*               fProngCheckedPid;//[fnProng]
202
203   Float_t*             fProngCheckedProb;//[fnProng]
204
205   Float_t              fDeltaInvariantMass; //invariant mass window to select the candidate
206   Int_t                fDecay; //index for the type of decay
207
208 private:
209   void Init();
210
211   AliEveHFList(const AliEveHFList&);            // Not implemented
212   AliEveHFList& operator=(const AliEveHFList&); // Not implemented
213
214   ClassDef(AliEveHFList,0); // A list of AliEveHF objecs.
215 };
216
217
218 #endif