TKDTree class now in 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;
68ca2fe7 38 friend class AliEveV0Editor;
b594a020 39
40public:
41 AliEveV0();
42 AliEveV0(TEveRecTrack* tNeg, TEveRecTrack* tPos, TEveRecV0* v0,
43 TEveTrackPropagator* rs);
44 virtual ~AliEveV0();
45
b594a020 46 void MakeV0();
47
b594a020 48 virtual void SetMainColor(Color_t col)
49 {
e6e8b28b 50 TEvePointSet::SetMainColor(col);
51 fPointingLine->SetLineColor(fMarkerColor);
b594a020 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(); }
e1bb28b4 60 Float_t GetPt() const { return fRecDecayP.Perp(); }
b594a020 61
ca8a6926 62 Bool_t GetOnFlyStatus() const { return fOnFlyStatus; }
63 void SetOnFlyStatus(Bool_t fs) { fOnFlyStatus = fs; }
64
b594a020 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
b594a020 71 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
72
e6e8b28b 73 TEveTrack* GetNegTrack() { return fNegTrack; }
74 TEveTrack* GetPosTrack() { return fPosTrack; }
b594a020 75
e6e8b28b 76 TEveLine* GetPointingLine() { return fPointingLine; }
b594a020 77
78protected:
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
e6e8b28b 88 TEveLine *fPointingLine;
b594a020 89
ca8a6926 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.
b594a020 94
95private:
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
107class AliEveV0List : public TEveElementList
108{
ca8a6926 109 friend class AliEveV0ListEditor;
110
b594a020 111public:
112 AliEveV0List();
113 AliEveV0List(TEveTrackPropagator* rs);
114 AliEveV0List(const Text_t* name, TEveTrackPropagator* rs=0);
e6e8b28b 115 virtual ~AliEveV0List() {}
b594a020 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
b594a020 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
b594a020 131 void MakeV0s();
b594a020 132
ca8a6926 133 void FilterByRadius(Float_t minR, Float_t maxR);
e1bb28b4 134 void FilterByDaughterDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
135 void FilterByPt(Float_t minPt, Float_t maxPt);
ca8a6926 136
b594a020 137protected:
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
ca8a6926 149 Float_t fMinRCut;
150 Float_t fMaxRCut;
151
e1bb28b4 152 Float_t fMinDaughterDCA;
153 Float_t fMaxDaughterDCA;
154
155 Float_t fMinPt;
156 Float_t fMaxPt;
157
b594a020 158private:
e6e8b28b 159 void Init();
b594a020 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