Reverting changes that need the trunk of Root
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveV0.h
CommitLineData
b594a020 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
29class TH1F;
30class TH2F;
31
32
33class AliEveV0List;
34
35class AliEveV0 : public TEvePointSet
36{
37 friend class AliEveV0List;
38
39public:
40 AliEveV0();
41 AliEveV0(TEveRecTrack* tNeg, TEveRecTrack* tPos, TEveRecV0* v0,
42 TEveTrackPropagator* rs);
43 virtual ~AliEveV0();
44
45 //void AddPathMarkPos(TEvePathMark* pm) { fPathMarksPos.push_back(pm); }
46 //void AddPathMarkNeg(TEvePathMark* pm) { fPathMarksNeg.push_back(pm); }
47
48 void Reset(TPolyLine3D* polyLine);
49
50 void MakeV0path();
51 void MakeV0();
52
53 virtual void PaintDaughters(Option_t* option="")
54 {
55 if (fRnrSelf) { fNegTrack->Paint(option); fPosTrack->Paint(option);}
56 }
57
58 virtual void Paint(Option_t* option="")
59 {
60 if (fRnrSelf) TEvePointSet::Paint(option);
61 }
62
63 virtual void PaintPath(Option_t* option="")
64 {
65 if (fRnrSelf) fPolyLineV0.Paint(option);
66 }
67
68 virtual void SetMainColor(Color_t col)
69 {
70 fMarkerColor = col; fMainColorPtr = &fMarkerColor;
71 fPolyLineV0.SetLineColor(fMarkerColor);
72 }
73
74 void SetRnrStyle(TEveTrackPropagator* rs) { fRnrStyle = rs; }
75
76 Float_t GetDaughterDCA() const { return fDaughterDCA; }
77 void SetDaughterDCA(Float_t dca) { fDaughterDCA = dca; }
78
79 Float_t GetRadius() const { return fRecDecayV.Perp(); }
80
ca8a6926 81 Bool_t GetOnFlyStatus() const { return fOnFlyStatus; }
82 void SetOnFlyStatus(Bool_t fs) { fOnFlyStatus = fs; }
83
b594a020 84 Int_t GetESDIndex() const { return fESDIndex; }
85 void SetESDIndex(Int_t ind) { fESDIndex = ind;}
86
87 virtual const Text_t* GetName() const { return Form("ESDv0_%i",fESDIndex); }
88 virtual const Text_t* GetTitle() const { return Form("ESDv0_%i",fESDIndex); }
89
90 //Int_t GetLabelPos() const { return fLabel_pos; }
91 //Int_t GetLabelNeg() const { return fLabel_neg; }
92 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
93
94 TEveTrack* GetNegTrack() { return fNegTrack; }
95 TEveTrack* GetPosTrack() { return fPosTrack; }
96
97 TPolyLine3D* GetPolyLineV0() { return &fPolyLineV0; }
98
99protected:
100 TEveVector fRecBirthV; // Reconstucted birth point of neutral particle
101 TEveVector fRecDecayV; // Point of closest approach
102 TEveVector fRecDecayP;
103
104 TEveTrack *fNegTrack;
105 TEveTrack *fPosTrack;
106
107 TEveTrackPropagator *fRnrStyle;
108
109 TPolyLine3D fPolyLineV0;
110
ca8a6926 111 Int_t fESDIndex; // Index in ESD V0 array.
112 Bool_t fOnFlyStatus; // Reconstructed during tracking.
113 Float_t fDaughterDCA; // Distance at the point of closest approach.
114 Float_t fChi2V0; // Some Chi-square.
b594a020 115
116private:
117 AliEveV0(const AliEveV0&); // Not implemented
118 AliEveV0& operator=(const AliEveV0&); // Not implemented
119
120 ClassDef(AliEveV0, 0); // Visual representation of a AliEveV0.
121};
122
123
124/******************************************************************************/
125// AliEveV0List
126/******************************************************************************/
127
128class AliEveV0List : public TEveElementList
129{
ca8a6926 130 friend class AliEveV0ListEditor;
131
b594a020 132public:
133 AliEveV0List();
134 AliEveV0List(TEveTrackPropagator* rs);
135 AliEveV0List(const Text_t* name, TEveTrackPropagator* rs=0);
136 virtual ~AliEveV0List();
137
138 virtual const Text_t* GetTitle() const { return fTitle; }
139 virtual void SetTitle(const Text_t* t) { fTitle = t; }
140 virtual void SetTracksColor(Color_t cNeg, Color_t cPos) {
141 fNegColor = cNeg; fPosColor = cPos;}
142
143 virtual Bool_t CanEditMainColor() const { return kTRUE; }
144
145 virtual void Paint(Option_t* option="");
146
147 void SetRnrStyle(TEveTrackPropagator* rst) { fRnrStyle = rst; }
148 TEveTrackPropagator* GetPropagator() { return fRnrStyle; }
149
150 Bool_t GetRnrV0vtx() const { return fRnrV0vtx; }
151 Bool_t GetRnrV0path() const { return fRnrV0path; }
152 Bool_t GetRnrDaughters() const { return fRnrDaughters; }
153
154 void SetRnrV0vtx(Bool_t);
155 void SetRnrV0path(Bool_t);
156 void SetRnrDaughters(Bool_t);
157
158 void MakeV0s();
159 void MakeMarkers();
160
ca8a6926 161 void FilterByRadius(Float_t minR, Float_t maxR);
162
b594a020 163protected:
164 TString fTitle;
165
166 TEveTrackPropagator *fRnrStyle;
167
168 Bool_t fRnrDaughters;
169 Bool_t fRnrV0vtx;
170 Bool_t fRnrV0path;
171
172 Color_t fNegColor;
173 Color_t fPosColor;
174
ca8a6926 175 Float_t fMinRCut;
176 Float_t fMaxRCut;
177
b594a020 178private:
179 void Init();
180
181 AliEveV0List(const AliEveV0List&); // Not implemented
182 AliEveV0List& operator=(const AliEveV0List&); // Not implemented
183
184 ClassDef(AliEveV0List, 0); // A list of AliEveV0 objecs.
185};
186
187
188#endif