]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveV0.h
Merge the following revisions between 29371 and 30342 from
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveV0.h
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9 #ifndef AliEveV0_H
10 #define AliEveV0_H
11
12 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
13  * See cxx source for full Copyright notice                               */
14
15
16 /***********************************************************************
17 * This code defines the reconstructed v0 visualized with EVE
18 *
19 * Ludovic Gaudichet (gaudichet@to.infn.it)
20 ************************************************************************/
21
22 #include <TEveVSDStructs.h>
23 #include <TEveElement.h>
24 #include <TEveTrack.h>
25
26 #include <TPolyMarker3D.h>
27 #include <TPolyLine3D.h>
28
29 class TH1F;
30 class TH2F;
31
32
33 class AliEveV0List;
34
35 class AliEveV0 : public TEvePointSet
36 {
37   friend class AliEveV0List;
38   friend class AliEveV0Editor;
39
40 public:
41   AliEveV0();
42   AliEveV0(TEveRecTrack* tNeg, TEveRecTrack* tPos, TEveRecV0* v0,
43      TEveTrackPropagator* rs);
44   virtual ~AliEveV0();
45
46   void MakeV0();
47
48   virtual void  SetMainColor(Color_t col)
49   {
50     TEvePointSet::SetMainColor(col);
51     fPointingLine->SetLineColor(fMarkerColor);
52   }
53
54   void SetRnrStyle(TEveTrackPropagator* rs) { fRnrStyle = rs; }
55
56   Float_t GetDaughterDCA() const { return fDaughterDCA; }
57   void SetDaughterDCA(Float_t dca) { fDaughterDCA = dca; }
58
59   Float_t GetRadius() const { return fRecDecayV.Perp(); }
60   Float_t GetPt()     const { return fRecDecayP.Perp(); }
61
62   Bool_t GetOnFlyStatus()    const { return fOnFlyStatus; }
63   void   SetOnFlyStatus(Bool_t fs) { fOnFlyStatus = fs; }
64
65   Int_t GetESDIndex() const { return fESDIndex; }
66   void  SetESDIndex(Int_t ind) { fESDIndex = ind;}
67
68   virtual const Text_t* GetName() const    { return Form("ESDv0_%i",fESDIndex); }
69   virtual const Text_t* GetTitle() const   { return Form("ESDv0_%i",fESDIndex); }
70
71   TEveTrackPropagator* GetPropagator() const  { return fRnrStyle; }
72
73   TEveTrack* GetNegTrack() { return fNegTrack; }
74   TEveTrack* GetPosTrack() { return fPosTrack; }
75
76   TEveLine*  GetPointingLine() { return fPointingLine; }
77
78 protected:
79   TEveVector fRecBirthV;    // Reconstucted birth point of neutral particle
80   TEveVector fRecDecayV;    // Point of closest approach
81   TEveVector fRecDecayP;
82
83   TEveTrack        *fNegTrack;
84   TEveTrack        *fPosTrack;
85
86   TEveTrackPropagator *fRnrStyle;
87
88   TEveLine         *fPointingLine;
89
90   Int_t             fESDIndex;    // Index in ESD V0 array.
91   Bool_t            fOnFlyStatus; // Reconstructed during tracking.
92   Float_t           fDaughterDCA; // Distance at the point of closest approach. 
93   Float_t           fChi2V0;      // Some Chi-square.
94
95 private:
96   AliEveV0(const AliEveV0&);            // Not implemented
97   AliEveV0& operator=(const AliEveV0&); // Not implemented
98
99   ClassDef(AliEveV0, 0); // Visual representation of a AliEveV0.
100 };
101
102
103 /******************************************************************************/
104 // AliEveV0List
105 /******************************************************************************/
106
107 class AliEveV0List : public TEveElementList
108 {
109   friend class AliEveV0ListEditor;
110
111 public:
112   AliEveV0List();
113   AliEveV0List(TEveTrackPropagator* rs);
114   AliEveV0List(const Text_t* name, TEveTrackPropagator* rs=0);
115   virtual ~AliEveV0List() {}
116
117   virtual const Text_t* GetTitle() const { return fTitle; }
118   virtual void SetTitle(const Text_t* t) { fTitle = t; }
119   virtual void SetTracksColor(Color_t cNeg, Color_t cPos) {
120     fNegColor = cNeg; fPosColor = cPos;}
121
122   virtual Bool_t CanEditMainColor() const { return kTRUE; }
123
124   void  SetRnrStyle(TEveTrackPropagator* rst) { fRnrStyle = rst; }
125   TEveTrackPropagator* GetPropagator()        { return fRnrStyle; }
126
127   Bool_t GetRnrV0vtx()     const { return fRnrV0vtx; }
128   Bool_t GetRnrV0path()    const { return fRnrV0path; }
129   Bool_t GetRnrDaughters() const { return fRnrDaughters; }
130
131   void   MakeV0s();
132
133   void   FilterByRadius(Float_t minR, Float_t maxR);
134   void   FilterByDaughterDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
135   void   FilterByPt(Float_t minPt, Float_t maxPt);
136
137 protected:
138   TString              fTitle;
139
140   TEveTrackPropagator *fRnrStyle;
141
142   Bool_t               fRnrDaughters;
143   Bool_t               fRnrV0vtx;
144   Bool_t               fRnrV0path;
145
146   Color_t              fNegColor;
147   Color_t              fPosColor;
148
149   Float_t              fMinRCut;
150   Float_t              fMaxRCut;
151
152   Float_t              fMinDaughterDCA;
153   Float_t              fMaxDaughterDCA;
154
155   Float_t              fMinPt;
156   Float_t              fMaxPt;
157
158 private:
159   void Init();
160
161   AliEveV0List(const AliEveV0List&);            // Not implemented
162   AliEveV0List& operator=(const AliEveV0List&); // Not implemented
163
164   ClassDef(AliEveV0List, 0); // A list of AliEveV0 objecs.
165 };
166
167
168 #endif