]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Alieve/blacklisted-classes/V0.h
Remove EVE/Reve/ sub-module.
[u/mrichter/AliRoot.git] / EVE / Alieve / blacklisted-classes / V0.h
CommitLineData
ed412809 1#ifndef ALIEVE_V0_H
2#define ALIEVE_V0_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7
8/***********************************************************************
9* This code defines the reconstructed v0 visualized with EVE
10*
11* Ludovic Gaudichet (gaudichet@to.infn.it)
12************************************************************************/
13
14#include <Reve/PODs.h>
15#include <Reve/RenderElement.h>
16#include <Reve/Track.h>
17
18#include <TPolyMarker3D.h>
19#include <TPolyLine3D.h>
20
21class TH1F;
22class TH2F;
23
24
25namespace Alieve {
26
27class V0List;
28
29class V0 : public Reve::RenderElement,
30 public TPolyMarker3D
31{
32 friend class V0List;
33
34 V0(const V0&); // Not implemented
35 V0& operator=(const V0&); // Not implemented
36
37public:
38 V0();
39 V0(Reve::RecTrack* tNeg, Reve::RecTrack* tPos, Reve::RecV0* v0,
40 Reve::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="") {
57 if(fRnrSelf) {fPolyLineNeg.Paint(option);fPolyLinePos.Paint(option);} }
58 virtual void Paint(Option_t* option="") {
59 if(fRnrSelf) TPolyMarker3D::Paint(option);}
60 virtual void PaintPath(Option_t* option="") {
61 if(fRnrSelf) fPolyLineV0.Paint(option);}
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(Reve::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
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;};
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 Reve::TrackRnrStyle* GetRnrStyle() const { return fRnrStyle; }
121 TPolyLine3D* GetPolyLineNeg() {return &fPolyLineNeg;}
122 TPolyLine3D* GetPolyLinePos() {return &fPolyLinePos;}
123 TPolyLine3D* GetPolyLineV0() {return &fPolyLineV0;}
124
125protected:
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 Reve::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); // Visual representation of a V0.
158}; // endclass V0
159
160
161//______________________________________________________________________
162inline void V0::SetDaughterDCA(Float_t dca) {
163 fDaughterDCA = dca;
164}
165
166inline void V0::SetCosPointingAngle(Float_t cos) {
167 fCosPointingAngle = cos;
168}
169
170inline void V0::SetDecayLength(Float_t len) {
171 fDecayLength = len;
172}
173
174
175//______________________________________________________________________
176inline Float_t V0::GetPt2() const {
177 Float_t px = fP_neg.x+fP_pos.x, py = fP_neg.y+fP_pos.y;
178 return (px*px+py*py);
179}
180
181inline Float_t V0::GetP2() const {
182
183 Float_t px = fP_neg.x+fP_pos.x, py = fP_neg.y+fP_pos.y, pz = fP_neg.z+fP_pos.z;
184 return (px*px+py*py+pz*pz);
185}
186
187inline Float_t V0::GetPt() const {
188 return sqrt(GetPt2());
189}
190
191inline Float_t V0::GetMomentum() const {
192 return sqrt(GetP2());
193}
194
195inline Float_t V0::GetPx() const {
196 return (fP_neg.x+fP_pos.x);
197}
198
199inline Float_t V0::GetPy() const {
200 return (fP_neg.y+fP_pos.y);
201}
202
203inline Float_t V0::GetPz() const {
204 return (fP_neg.z+fP_pos.z);
205}
206
207//______________________________________________________________________
208
209inline Float_t V0::GetDaughterDCA() const {
210 return fDaughterDCA;
211}
212
213inline Float_t V0::GetCosPointingAngle() const {
214return fCosPointingAngle;
215}
216
217inline Float_t V0::GetRadius() const {
218 return sqrt(fV_v0.x*fV_v0.x + fV_v0.y*fV_v0.y);
219}
220
221inline Float_t V0::GetDecayLength() const {
222return fDecayLength;
223}
224
225inline Float_t V0::GetPseudoRapidity() const {
226 Float_t theta = acos( GetPz()/GetMomentum() );
227 return ( -log(tan(theta/2.)) );
228}
229
230//______________________________________________________________________
231
232inline Float_t V0::GetPionMinusE() const {
233 return sqrt(fgkMassPion2+GetNegP2());
234}
235
236inline Float_t V0::GetPionPlusE() const {
237 return sqrt(fgkMassPion2+GetPosP2());
238}
239inline Float_t V0::GetProtonE() const {
240 return sqrt(fgkMassProton2+GetPosP2());
241
242}
243inline Float_t V0::GetPBarE() const {
244 return sqrt(fgkMassProton2+GetNegP2());
245}
246
247//______________________________________________________________________
248
249inline Float_t V0::GetPosP2() const {
250 return (fP_pos.x*fP_pos.x + fP_pos.y*fP_pos.y + fP_pos.z*fP_pos.z);
251}
252
253inline Float_t V0::GetPosP() const {
254 return sqrt(GetPosP2());
255}
256
257inline Float_t V0::GetPosPt() const {
258 return sqrt(fP_pos.x*fP_pos.x + fP_pos.y*fP_pos.y);
259}
260
261inline Float_t V0::GetPosPseudoRapidity() const {
262 Float_t theta = acos( fP_pos.z/GetPosP() );
263 return ( -log(tan(theta/2.)) );
264}
265
266inline Float_t V0::GetPosDCAtoPrim() const {
267 return 0;
268}
269
270//______________________________________________________________________
271inline Float_t V0::GetNegP2() const {
272 return (fP_neg.x*fP_neg.x + fP_neg.y*fP_neg.y + fP_neg.z*fP_neg.z);
273}
274
275inline Float_t V0::GetNegP() const {
276 return sqrt(GetNegP2());
277}
278
279inline Float_t V0::GetNegPt() const {
280 return sqrt(fP_neg.x*fP_neg.x + fP_neg.y*fP_neg.y);
281}
282
283inline Float_t V0::GetNegPseudoRapidity() const {
284 Float_t theta = acos( fP_neg.z/GetNegP() );
285 return ( -log(tan(theta/2.)) );
286}
287
288inline Float_t V0::GetNegDCAtoPrim() const {
289 return 0;
290}
291
292//______________________________________________________________________
293
294inline Float_t V0::GetK0mass() const {
295 Float_t energy = GetPionMinusE() + GetPionPlusE();
296 return sqrt( energy*energy - GetP2() );
297}
298
299inline Float_t V0::GetLamMass() const {
300 Float_t energy = GetPionMinusE() + GetProtonE();
301 return sqrt( energy*energy - GetP2() );
302}
303
304inline Float_t V0::GetAntiLamMass() const {
305 Float_t energy = GetPionPlusE() + GetPBarE();
306 return sqrt( energy*energy - GetP2() );
307}
308
309
310
311/**************************************************************************/
312// V0List
313/**************************************************************************/
314
315class V0List : public Reve::RenderElementList
316{
317 V0List(const V0List&); // Not implemented
318 V0List& operator=(const V0List&); // Not implemented
319
320public:
321 V0List();
322 V0List(Reve::TrackRnrStyle* rs);
323 V0List(const Text_t* name, Reve::TrackRnrStyle* rs=0);
324 virtual ~V0List();
325
326 virtual const Text_t* GetTitle() const { return fTitle; }
327 virtual void SetTitle(const Text_t* t) { fTitle = t; }
328 virtual void SetTracksColor(Color_t cNeg, Color_t cPos) {
329 fNegColor = cNeg; fPosColor = cPos;}
330
331 virtual Bool_t CanEditMainColor() { return kTRUE; }
332
333 virtual void Paint(Option_t* option="");
334
335 void SetRnrStyle(Reve::TrackRnrStyle* rst) { fRnrStyle= rst; }
336 Reve::TrackRnrStyle* GetRnrStyle() { return fRnrStyle; }
337
338 Bool_t GetRnrV0vtx() const { return fRnrV0vtx; }
339 Bool_t GetRnrV0path() const { return fRnrV0path; }
340 Bool_t GetRnrDaughters() const { return fRnrDaughters; }
341
342 void SetRnrV0vtx(Bool_t);
343 void SetRnrV0path(Bool_t);
344 void SetRnrDaughters(Bool_t);
345 void SetMin(Int_t i, Float_t val) {
346 if ((i>=0)&&(i<fgkNcutVar)) fMin[i]=val;}
347 void SetMax(Int_t i, Float_t val) {
348 if ((i>=0)&&(i<fgkNcutVar)) fMax[i]=val;}
349
350 void MakeV0s();
351 void MakeMarkers();
352
353 TH1F* GetHist(Int_t i) {
354 if ((i>=0)&&(i<fgkNcutVar)) return fHist[i]; else return 0;}
355 TH2F* GetHist2D(Int_t i) {
356 if ((i>=0)&&(i<fgkNcutVar2D)) return fHist2D[i]; else return 0;}
357 Float_t GetMin(Int_t i) {
358 if ((i>=0)&&(i<fgkNcutVar)) return fMin[i]; else return 0;}
359 Float_t GetMax(Int_t i) {
360 if ((i>=0)&&(i<fgkNcutVar)) return fMax[i]; else return 0;}
361 void GetV0IndexRange(Int_t &imin, Int_t &imax);
362
363 Float_t GetMaxR() const { return fRnrStyle->fMaxZ; }
364 Float_t GetMaxZ() const { return fRnrStyle->fMaxR; }
365 Float_t GetMaxOrbs() const { return fRnrStyle->fMaxOrbs; }
366 Float_t GetMinAng() const { return fRnrStyle->fMinAng; }
367 Float_t GetDelta() const { return fRnrStyle->fDelta; }
368 Bool_t GetFitDaughters() const { return fRnrStyle->fFitDaughters; }
369 Bool_t GetFitDecay() const { return fRnrStyle->fFitDecay; }
370
371 void AdjustHist(Int_t iHist);
372 void UnFill(V0* v0);
373 void Filter(V0* v0);
374 void FilterAll();
375 void PtFilter(Float_t min, Float_t max);
376
377 void K0sMFilter(Float_t min, Float_t max);
378 void LamMFilter(Float_t min, Float_t max);
379 void ALamMFilter(Float_t min, Float_t max);
380 void CosPointingFilter(Float_t min, Float_t max);
381 void DaughterDCAFilter(Float_t min, Float_t max);
382 void RadiusFilter(Float_t min, Float_t max);
383 void EtaFilter(Float_t min, Float_t max);
384 void NegPtFilter(Float_t min, Float_t max);
385 void NegEtaFilter(Float_t min, Float_t max);
386 void PosPtFilter(Float_t min, Float_t max);
387 void PosEtaFilter(Float_t min, Float_t max);
388 void IndexFilter(Float_t min, Float_t max);
389
390
391private:
392 void Init();
393
394protected:
395 TString fTitle;
396
397 Reve::TrackRnrStyle *fRnrStyle;
398
399 Bool_t fRnrDaughters;
400 Bool_t fRnrV0vtx;
401 Bool_t fRnrV0path;
402
403 Color_t fNegColor;
404 Color_t fPosColor;
405
406 static const Int_t fgkNcutVar = 13;
407 TH1F *fHist[fgkNcutVar];
408 Float_t fMin[fgkNcutVar];
409 Float_t fMax[fgkNcutVar];
410
411 static const Int_t fgkNcutVar2D = 1;
412 TH2F *fHist2D[fgkNcutVar2D];
413 Float_t fMinX[fgkNcutVar2D];
414 Float_t fMinY[fgkNcutVar2D];
415 Float_t fMaxX[fgkNcutVar2D];
416 Float_t fMaxY[fgkNcutVar2D];
417
418 ClassDef(V0List, 1); // A list of V0 objecs.
419};
420
421
422} // namespace Alieve
423
424#endif