]>
Commit | Line | Data |
---|---|---|
661eeab1 | 1 | |
2 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * See cxx source for full Copyright notice */ | |
4 | ||
5 | ||
6 | /*********************************************************************** | |
7 | * This code defines the reconstructed v0 visualized with EVE | |
8 | * | |
9 | * Ludovic Gaudichet (gaudichet@to.infn.it) | |
10 | ************************************************************************/ | |
11 | ||
12 | ||
13 | #ifndef REVE_V0_H | |
14 | #define REVE_V0_H | |
15 | ||
16 | #include <Reve/PODs.h> | |
17 | #include <Reve/RenderElement.h> | |
18 | #include <Reve/Track.h> | |
19 | ||
20 | #include <TPolyMarker3D.h> | |
21 | #include <TPolyLine3D.h> | |
22 | ||
23 | class TH1F; | |
24 | class TH2F; | |
25 | ||
26 | ||
27 | namespace Reve { | |
28 | ||
29 | class V0List; | |
30 | ||
31 | class V0 : public RenderElement, public TPolyMarker3D | |
32 | { | |
33 | friend class V0List; | |
34 | ||
35 | V0(const V0&); // Not implemented | |
36 | V0& operator=(const V0&); // Not implemented | |
37 | ||
38 | public: | |
39 | V0(); | |
40 | V0(Reve::RecTrack* tNeg, Reve::RecTrack* tPos,Reve::RecV0* v0, TrackRnrStyle* rs); | |
41 | virtual ~V0(); | |
42 | ||
43 | typedef std::vector<Reve::PathMark*> vpPathMark_t; | |
44 | typedef std::vector<Reve::PathMark*>::iterator vpPathMark_i; | |
45 | void AddPathMarkPos(Reve::PathMark* pm) { fPathMarksPos.push_back(pm); } | |
46 | void AddPathMarkNeg(Reve::PathMark* pm) { fPathMarksNeg.push_back(pm); } | |
47 | ||
48 | void Reset(TPolyLine3D* polyLine); | |
49 | ||
50 | void MakeTrack(vpPathMark_t& pathMark, Reve::Vector& vtx, Reve::Vector& p, | |
51 | Int_t charge, Float_t beta, TPolyLine3D& polyLine); | |
52 | ||
53 | void MakeV0path(); | |
54 | void MakeV0(); | |
55 | ||
56 | virtual void PaintDaughters(Option_t* option="") { | |
5b457dfa | 57 | if(fRnrSelf) {fPolyLineNeg.Paint(option);fPolyLinePos.Paint(option);} } |
661eeab1 | 58 | virtual void Paint(Option_t* option="") { |
5b457dfa | 59 | if(fRnrSelf) TPolyMarker3D::Paint(option);} |
661eeab1 | 60 | virtual void PaintPath(Option_t* option="") { |
5b457dfa | 61 | if(fRnrSelf) fPolyLineV0.Paint(option);} |
661eeab1 | 62 | |
63 | virtual void SetMainColor(Color_t col) { | |
64 | fMarkerColor = col; fMainColorPtr = &fMarkerColor; | |
65 | fPolyLineV0.SetLineColor(fMarkerColor);} | |
66 | virtual void SetTracksColor(Color_t cNeg, Color_t cPos) { | |
67 | fPolyLineNeg.SetLineColor(cNeg); fPolyLinePos.SetLineColor(cPos); } | |
68 | void SetRnrStyle(TrackRnrStyle* rs) { fRnrStyle = rs; } | |
69 | void SetESDIndex(Int_t ind) { fESDIndex = ind;} | |
70 | void SetDaughterDCA(Float_t dca); | |
71 | void SetCosPointingAngle(Float_t cos); | |
72 | void SetDecayLength(Float_t len); | |
73 | void SetDecayLength(Float_t primx, Float_t primy, Float_t primz); | |
74 | ||
87738a65 | 75 | Float_t GetDaughterDCA() const; |
76 | Float_t GetCosPointingAngle() const; | |
77 | Float_t GetRadius() const; | |
78 | Float_t GetDecayLength() const; | |
79 | ||
80 | Float_t GetP2() const; | |
81 | Float_t GetMomentum() const; | |
82 | Float_t GetPt() const; | |
83 | Float_t GetPt2() const; | |
84 | Float_t GetPx() const; | |
85 | Float_t GetPy() const; | |
86 | Float_t GetPz() const; | |
87 | Float_t GetPseudoRapidity() const; | |
88 | Float_t GetAlphaArmenteros() const; | |
89 | Float_t GetPtArmenteros() const; | |
90 | ||
91 | Float_t GetK0sE() const {return 0;}; | |
92 | Float_t GetLamE() const {return 0;}; | |
93 | Float_t GetAntiLamE() const {return 0;}; | |
94 | Float_t GetK0mass() const; | |
95 | Float_t GetLamMass() const; | |
96 | Float_t GetAntiLamMass() const; | |
97 | ||
98 | Float_t GetPionMinusE() const; | |
99 | Float_t GetPionPlusE() const; | |
100 | Float_t GetProtonE() const; | |
101 | Float_t GetPBarE() const; | |
102 | ||
103 | Float_t GetPosDCAtoPrim() const; | |
104 | Float_t GetPosP2() const; | |
105 | Float_t GetPosP() const; | |
106 | Float_t GetPosPt() const; | |
107 | Float_t GetPosPseudoRapidity() const; | |
108 | ||
109 | Float_t GetNegDCAtoPrim() const; | |
110 | Float_t GetNegP2() const; | |
111 | Float_t GetNegP() const; | |
112 | Float_t GetNegPt() const; | |
113 | Float_t GetNegPseudoRapidity() const; | |
114 | Int_t GetESDIndex() const {return fESDIndex;}; | |
661eeab1 | 115 | |
116 | virtual const Text_t* GetName() const { return Form("ESDv0_%i",fESDIndex); } | |
117 | virtual const Text_t* GetTitle() const { return Form("ESDv0_%i",fESDIndex); } | |
118 | Int_t GetLabelPos() const { return fLabel_pos; } | |
119 | Int_t GetLabelNeg() const { return fLabel_neg; } | |
120 | TrackRnrStyle* GetRnrStyle() const { return fRnrStyle; } | |
121 | TPolyLine3D* GetPolyLineNeg() {return &fPolyLineNeg;} | |
122 | TPolyLine3D* GetPolyLinePos() {return &fPolyLinePos;} | |
123 | TPolyLine3D* GetPolyLineV0() {return &fPolyLineV0;} | |
124 | ||
125 | protected: | |
126 | ||
127 | Reve::Vector fV_neg; // Vertex of negative track | |
128 | Reve::Vector fP_neg; // Momentum of negative track | |
129 | Reve::Vector fV_pos; // Vertex of positive track | |
130 | Reve::Vector fP_pos; // Momentum of positive track | |
131 | ||
132 | Reve::Vector fV_v0; // Point of closest approach | |
133 | Reve::Vector fV0_birth; // Reconstucted birth point of neutral particle | |
134 | ||
135 | Float_t fBeta_neg; | |
136 | Float_t fBeta_pos; | |
137 | ||
138 | Int_t fLabel_neg; | |
139 | Int_t fLabel_pos; | |
140 | ||
141 | vpPathMark_t fPathMarksNeg; | |
142 | vpPathMark_t fPathMarksPos; | |
143 | TrackRnrStyle* fRnrStyle; | |
144 | ||
145 | TPolyLine3D fPolyLineNeg; | |
146 | TPolyLine3D fPolyLinePos; | |
147 | TPolyLine3D fPolyLineV0; | |
148 | ||
149 | Int_t fESDIndex; | |
150 | Float_t fDaughterDCA; | |
151 | Float_t fCosPointingAngle; | |
152 | Float_t fDecayLength; | |
153 | ||
154 | static const Float_t fgkMassPion2; | |
155 | static const Float_t fgkMassProton2; | |
156 | ||
157 | ClassDef(V0, 1) | |
158 | }; // endclass V0 | |
159 | ||
160 | ||
161 | ||
162 | //______________________________________________________________________ | |
163 | inline void V0::SetDaughterDCA(Float_t dca) { | |
164 | fDaughterDCA = dca; | |
165 | } | |
166 | ||
167 | inline void V0::SetCosPointingAngle(Float_t cos) { | |
168 | fCosPointingAngle = cos; | |
169 | } | |
170 | ||
171 | inline void V0::SetDecayLength(Float_t len) { | |
172 | fDecayLength = len; | |
173 | } | |
174 | ||
175 | ||
176 | //______________________________________________________________________ | |
87738a65 | 177 | inline Float_t V0::GetPt2() const { |
661eeab1 | 178 | Float_t px = fP_neg.x+fP_pos.x, py = fP_neg.y+fP_pos.y; |
179 | return (px*px+py*py); | |
180 | } | |
181 | ||
87738a65 | 182 | inline Float_t V0::GetP2() const { |
661eeab1 | 183 | |
184 | Float_t px = fP_neg.x+fP_pos.x, py = fP_neg.y+fP_pos.y, pz = fP_neg.z+fP_pos.z; | |
185 | return (px*px+py*py+pz*pz); | |
186 | } | |
187 | ||
87738a65 | 188 | inline Float_t V0::GetPt() const { |
661eeab1 | 189 | return sqrt(GetPt2()); |
190 | } | |
191 | ||
87738a65 | 192 | inline Float_t V0::GetMomentum() const { |
661eeab1 | 193 | return sqrt(GetP2()); |
194 | } | |
195 | ||
87738a65 | 196 | inline Float_t V0::GetPx() const { |
661eeab1 | 197 | return (fP_neg.x+fP_pos.x); |
198 | } | |
199 | ||
87738a65 | 200 | inline Float_t V0::GetPy() const { |
661eeab1 | 201 | return (fP_neg.y+fP_pos.y); |
202 | } | |
203 | ||
87738a65 | 204 | inline Float_t V0::GetPz() const { |
661eeab1 | 205 | return (fP_neg.z+fP_pos.z); |
206 | } | |
207 | ||
208 | //______________________________________________________________________ | |
209 | ||
87738a65 | 210 | inline Float_t V0::GetDaughterDCA() const { |
211 | return fDaughterDCA; | |
661eeab1 | 212 | } |
213 | ||
87738a65 | 214 | inline Float_t V0::GetCosPointingAngle() const { |
661eeab1 | 215 | return fCosPointingAngle; |
216 | } | |
217 | ||
87738a65 | 218 | inline Float_t V0::GetRadius() const { |
661eeab1 | 219 | return sqrt(fV_v0.x*fV_v0.x + fV_v0.y*fV_v0.y); |
220 | } | |
221 | ||
87738a65 | 222 | inline Float_t V0::GetDecayLength() const { |
661eeab1 | 223 | return fDecayLength; |
224 | } | |
225 | ||
87738a65 | 226 | inline Float_t V0::GetPseudoRapidity() const { |
661eeab1 | 227 | Float_t theta = acos( GetPz()/GetMomentum() ); |
228 | return ( -log(tan(theta/2.)) ); | |
229 | } | |
230 | ||
231 | //______________________________________________________________________ | |
232 | ||
87738a65 | 233 | inline Float_t V0::GetPionMinusE() const { |
661eeab1 | 234 | return sqrt(fgkMassPion2+GetNegP2()); |
235 | } | |
236 | ||
87738a65 | 237 | inline Float_t V0::GetPionPlusE() const { |
661eeab1 | 238 | return sqrt(fgkMassPion2+GetPosP2()); |
239 | } | |
87738a65 | 240 | inline Float_t V0::GetProtonE() const { |
661eeab1 | 241 | return sqrt(fgkMassProton2+GetPosP2()); |
242 | ||
243 | } | |
87738a65 | 244 | inline Float_t V0::GetPBarE() const { |
661eeab1 | 245 | return sqrt(fgkMassProton2+GetNegP2()); |
246 | } | |
247 | ||
248 | //______________________________________________________________________ | |
249 | ||
87738a65 | 250 | inline Float_t V0::GetPosP2() const { |
661eeab1 | 251 | return (fP_pos.x*fP_pos.x + fP_pos.y*fP_pos.y + fP_pos.z*fP_pos.z); |
252 | } | |
253 | ||
87738a65 | 254 | inline Float_t V0::GetPosP() const { |
661eeab1 | 255 | return sqrt(GetPosP2()); |
256 | } | |
257 | ||
87738a65 | 258 | inline Float_t V0::GetPosPt() const { |
661eeab1 | 259 | return sqrt(fP_pos.x*fP_pos.x + fP_pos.y*fP_pos.y); |
260 | } | |
261 | ||
87738a65 | 262 | inline Float_t V0::GetPosPseudoRapidity() const { |
661eeab1 | 263 | Float_t theta = acos( fP_pos.z/GetPosP() ); |
264 | return ( -log(tan(theta/2.)) ); | |
265 | } | |
266 | ||
87738a65 | 267 | inline Float_t V0::GetPosDCAtoPrim() const { |
661eeab1 | 268 | return 0; |
269 | } | |
270 | ||
271 | //______________________________________________________________________ | |
87738a65 | 272 | inline Float_t V0::GetNegP2() const { |
661eeab1 | 273 | return (fP_neg.x*fP_neg.x + fP_neg.y*fP_neg.y + fP_neg.z*fP_neg.z); |
274 | } | |
275 | ||
87738a65 | 276 | inline Float_t V0::GetNegP() const { |
661eeab1 | 277 | return sqrt(GetNegP2()); |
278 | } | |
279 | ||
87738a65 | 280 | inline Float_t V0::GetNegPt() const { |
661eeab1 | 281 | return sqrt(fP_neg.x*fP_neg.x + fP_neg.y*fP_neg.y); |
282 | } | |
283 | ||
87738a65 | 284 | inline Float_t V0::GetNegPseudoRapidity() const { |
661eeab1 | 285 | Float_t theta = acos( fP_neg.z/GetNegP() ); |
286 | return ( -log(tan(theta/2.)) ); | |
287 | } | |
288 | ||
87738a65 | 289 | inline Float_t V0::GetNegDCAtoPrim() const { |
661eeab1 | 290 | return 0; |
291 | } | |
292 | ||
293 | //______________________________________________________________________ | |
294 | ||
87738a65 | 295 | inline Float_t V0::GetK0mass() const { |
661eeab1 | 296 | Float_t energy = GetPionMinusE() + GetPionPlusE(); |
297 | return sqrt( energy*energy - GetP2() ); | |
298 | } | |
299 | ||
87738a65 | 300 | inline Float_t V0::GetLamMass() const { |
661eeab1 | 301 | Float_t energy = GetPionMinusE() + GetProtonE(); |
302 | return sqrt( energy*energy - GetP2() ); | |
303 | } | |
304 | ||
87738a65 | 305 | inline Float_t V0::GetAntiLamMass() const { |
661eeab1 | 306 | Float_t energy = GetPionPlusE() + GetPBarE(); |
307 | return sqrt( energy*energy - GetP2() ); | |
308 | } | |
309 | ||
310 | ||
311 | ||
312 | ||
313 | /**************************************************************************/ | |
314 | // V0List | |
315 | /**************************************************************************/ | |
316 | ||
5b457dfa | 317 | class V0List : public TNamed, public RenderElement |
661eeab1 | 318 | { |
319 | V0List(const V0List&); // Not implemented | |
320 | V0List& operator=(const V0List&); // Not implemented | |
321 | ||
322 | public: | |
323 | V0List(); | |
324 | V0List(TrackRnrStyle* rs); | |
325 | V0List(const Text_t* name, TrackRnrStyle* rs=0); | |
326 | virtual ~V0List(); | |
327 | ||
328 | virtual const Text_t* GetTitle() const { return fTitle; } | |
329 | virtual void SetTitle(const Text_t* t) { fTitle = t; } | |
330 | virtual void SetTracksColor(Color_t cNeg, Color_t cPos) { | |
331 | fNegColor = cNeg; fPosColor = cPos;} | |
332 | ||
333 | virtual Bool_t CanEditMainColor() { return kTRUE; } | |
334 | ||
335 | virtual void Paint(Option_t* option=""); | |
336 | ||
337 | virtual void AddElement(RenderElement* el); | |
338 | ||
339 | void SetRnrStyle(TrackRnrStyle* rst) { fRnrStyle= rst; } | |
340 | TrackRnrStyle* GetRnrStyle() { return fRnrStyle; } | |
341 | ||
342 | Bool_t GetRnrV0vtx() const { return fRnrV0vtx; } | |
343 | Bool_t GetRnrV0path() const { return fRnrV0path; } | |
344 | Bool_t GetRnrDaughters() const { return fRnrDaughters; } | |
345 | ||
346 | void SetRnrV0vtx(Bool_t); | |
347 | void SetRnrV0path(Bool_t); | |
348 | void SetRnrDaughters(Bool_t); | |
349 | void SetMin(Int_t i, Float_t val) { | |
350 | if ((i>=0)&&(i<fgkNcutVar)) fMin[i]=val;} | |
351 | void SetMax(Int_t i, Float_t val) { | |
352 | if ((i>=0)&&(i<fgkNcutVar)) fMax[i]=val;} | |
353 | ||
354 | void MakeV0s(); | |
355 | void MakeMarkers(); | |
356 | ||
357 | TH1F* GetHist(Int_t i) { | |
358 | if ((i>=0)&&(i<fgkNcutVar)) return fHist[i]; else return 0;} | |
359 | TH2F* GetHist2D(Int_t i) { | |
360 | if ((i>=0)&&(i<fgkNcutVar2D)) return fHist2D[i]; else return 0;} | |
361 | Float_t GetMin(Int_t i) { | |
362 | if ((i>=0)&&(i<fgkNcutVar)) return fMin[i]; else return 0;} | |
363 | Float_t GetMax(Int_t i) { | |
364 | if ((i>=0)&&(i<fgkNcutVar)) return fMax[i]; else return 0;} | |
365 | void GetV0IndexRange(Int_t &imin, Int_t &imax); | |
366 | ||
367 | Float_t GetMaxR() const { return fRnrStyle->fMaxZ; } | |
368 | Float_t GetMaxZ() const { return fRnrStyle->fMaxR; } | |
369 | Float_t GetMaxOrbs() const { return fRnrStyle->fMaxOrbs; } | |
370 | Float_t GetMinAng() const { return fRnrStyle->fMinAng; } | |
371 | Float_t GetDelta() const { return fRnrStyle->fDelta; } | |
372 | Bool_t GetFitDaughters() const { return fRnrStyle->fFitDaughters; } | |
373 | Bool_t GetFitDecay() const { return fRnrStyle->fFitDecay; } | |
374 | ||
375 | void AdjustHist(Int_t iHist); | |
376 | void UnFill(V0* v0); | |
377 | void Filter(V0* v0); | |
378 | void FilterAll(); | |
379 | void PtFilter(Float_t min, Float_t max); | |
380 | ||
381 | void K0sMFilter(Float_t min, Float_t max); | |
382 | void LamMFilter(Float_t min, Float_t max); | |
383 | void ALamMFilter(Float_t min, Float_t max); | |
384 | void CosPointingFilter(Float_t min, Float_t max); | |
385 | void DaughterDCAFilter(Float_t min, Float_t max); | |
386 | void RadiusFilter(Float_t min, Float_t max); | |
387 | void EtaFilter(Float_t min, Float_t max); | |
388 | void NegPtFilter(Float_t min, Float_t max); | |
389 | void NegEtaFilter(Float_t min, Float_t max); | |
390 | void PosPtFilter(Float_t min, Float_t max); | |
391 | void PosEtaFilter(Float_t min, Float_t max); | |
392 | void IndexFilter(Float_t min, Float_t max); | |
393 | ||
394 | ||
395 | private: | |
396 | void Init(); | |
397 | ||
398 | protected: | |
399 | TString fTitle; | |
400 | ||
401 | TrackRnrStyle* fRnrStyle; | |
402 | ||
403 | Bool_t fRnrDaughters; | |
404 | Bool_t fRnrV0vtx; | |
405 | Bool_t fRnrV0path; | |
406 | ||
407 | Color_t fNegColor; | |
408 | Color_t fPosColor; | |
409 | ||
410 | static const Int_t fgkNcutVar = 13; | |
411 | TH1F *fHist[fgkNcutVar]; | |
412 | Float_t fMin[fgkNcutVar]; | |
413 | Float_t fMax[fgkNcutVar]; | |
414 | ||
415 | static const Int_t fgkNcutVar2D = 1; | |
416 | TH2F *fHist2D[fgkNcutVar2D]; | |
417 | Float_t fMinX[fgkNcutVar2D]; | |
418 | Float_t fMinY[fgkNcutVar2D]; | |
419 | Float_t fMaxX[fgkNcutVar2D]; | |
420 | Float_t fMaxY[fgkNcutVar2D]; | |
421 | ||
422 | ClassDef(V0List, 1) | |
423 | }; | |
424 | ||
425 | ||
426 | } // namespace Reve | |
427 | ||
428 | #endif |