From Boris: Proper detailed-view for V0s with two GL views and details in a canvas.
[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
d4dbbb43 29#include <TPDGCode.h>
30
b594a020 31class TH1F;
32class TH2F;
33
34
35class AliEveV0List;
36
37class AliEveV0 : public TEvePointSet
38{
39 friend class AliEveV0List;
68ca2fe7 40 friend class AliEveV0Editor;
b594a020 41
42public:
43 AliEveV0();
44 AliEveV0(TEveRecTrack* tNeg, TEveRecTrack* tPos, TEveRecV0* v0,
45 TEveTrackPropagator* rs);
46 virtual ~AliEveV0();
47
b594a020 48 void MakeV0();
49
b594a020 50 virtual void SetMainColor(Color_t col)
51 {
e6e8b28b 52 TEvePointSet::SetMainColor(col);
53 fPointingLine->SetLineColor(fMarkerColor);
b594a020 54 }
55
56 void SetRnrStyle(TEveTrackPropagator* rs) { fRnrStyle = rs; }
57
58 Float_t GetDaughterDCA() const { return fDaughterDCA; }
59 void SetDaughterDCA(Float_t dca) { fDaughterDCA = dca; }
60
e7c12214 61 Float_t GetPhi() const { return fRecDecayP.Phi(); }
62 Float_t GetEta() const { return fRecDecayP.Eta(); }
b594a020 63 Float_t GetRadius() const { return fRecDecayV.Perp(); }
e1bb28b4 64 Float_t GetPt() const { return fRecDecayP.Perp(); }
b594a020 65
2c7d7ac0 66 Float_t GetInvMass(Int_t nPdgCode, Int_t pPdgCode) const;
d4dbbb43 67 Float_t GetK0sInvMass() const { return GetInvMass(kPiMinus,kPiPlus); }
68 Float_t GetLambdaInvMass() const { return GetInvMass(kPiMinus,kProton); }
69 Float_t GetAntiLambdaInvMass() const { return GetInvMass(kProton,kPiPlus); }
70
ca8a6926 71 Bool_t GetOnFlyStatus() const { return fOnFlyStatus; }
72 void SetOnFlyStatus(Bool_t fs) { fOnFlyStatus = fs; }
73
2c7d7ac0 74 void SetMaxProbPdgPid(Int_t iDaughter, Int_t rPdg, Float_t rPid);
75 Int_t GetNegMaxProbPdg() const { return fNegMaxProbPdg; }
76 Int_t GetPosMaxProbPdg() const { return fPosMaxProbPdg; }
77 Float_t GetNegMaxProbPid() const { return fNegMaxProbPid; }
78 Float_t GetPosMaxProbPid() const { return fPosMaxProbPid; }
79
b594a020 80 Int_t GetESDIndex() const { return fESDIndex; }
81 void SetESDIndex(Int_t ind) { fESDIndex = ind;}
82
83 virtual const Text_t* GetName() const { return Form("ESDv0_%i",fESDIndex); }
84 virtual const Text_t* GetTitle() const { return Form("ESDv0_%i",fESDIndex); }
85
b594a020 86 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
87
e6e8b28b 88 TEveTrack* GetNegTrack() { return fNegTrack; }
89 TEveTrack* GetPosTrack() { return fPosTrack; }
b594a020 90
e6e8b28b 91 TEveLine* GetPointingLine() { return fPointingLine; }
b594a020 92
93protected:
94 TEveVector fRecBirthV; // Reconstucted birth point of neutral particle
95 TEveVector fRecDecayV; // Point of closest approach
96 TEveVector fRecDecayP;
97
98 TEveTrack *fNegTrack;
99 TEveTrack *fPosTrack;
100
101 TEveTrackPropagator *fRnrStyle;
102
e6e8b28b 103 TEveLine *fPointingLine;
b594a020 104
ca8a6926 105 Int_t fESDIndex; // Index in ESD V0 array.
106 Bool_t fOnFlyStatus; // Reconstructed during tracking.
107 Float_t fDaughterDCA; // Distance at the point of closest approach.
108 Float_t fChi2V0; // Some Chi-square.
b594a020 109
2c7d7ac0 110 Int_t fNegMaxProbPdg; // Maximum PDG probability for the negative daughter
111 Int_t fPosMaxProbPdg; // Maximum PDG probability for the positive daughter
112 Float_t fNegMaxProbPid; // Maximum PID probability for the negative daughter
113 Float_t fPosMaxProbPid; // Maximum PID probability for the positive daughter
114
b594a020 115private:
116 AliEveV0(const AliEveV0&); // Not implemented
117 AliEveV0& operator=(const AliEveV0&); // Not implemented
118
119 ClassDef(AliEveV0, 0); // Visual representation of a AliEveV0.
120};
121
122
123/******************************************************************************/
124// AliEveV0List
125/******************************************************************************/
126
127class AliEveV0List : public TEveElementList
128{
ca8a6926 129 friend class AliEveV0ListEditor;
130
b594a020 131public:
132 AliEveV0List();
133 AliEveV0List(TEveTrackPropagator* rs);
134 AliEveV0List(const Text_t* name, TEveTrackPropagator* rs=0);
e6e8b28b 135 virtual ~AliEveV0List() {}
b594a020 136
137 virtual const Text_t* GetTitle() const { return fTitle; }
138 virtual void SetTitle(const Text_t* t) { fTitle = t; }
139 virtual void SetTracksColor(Color_t cNeg, Color_t cPos) {
140 fNegColor = cNeg; fPosColor = cPos;}
141
142 virtual Bool_t CanEditMainColor() const { return kTRUE; }
143
b594a020 144 void SetRnrStyle(TEveTrackPropagator* rst) { fRnrStyle = rst; }
145 TEveTrackPropagator* GetPropagator() { return fRnrStyle; }
146
147 Bool_t GetRnrV0vtx() const { return fRnrV0vtx; }
148 Bool_t GetRnrV0path() const { return fRnrV0path; }
149 Bool_t GetRnrDaughters() const { return fRnrDaughters; }
150
b594a020 151 void MakeV0s();
b594a020 152
ca8a6926 153 void FilterByRadius(Float_t minR, Float_t maxR);
e1bb28b4 154 void FilterByDaughterDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
155 void FilterByPt(Float_t minPt, Float_t maxPt);
2c7d7ac0 156 void FilterByCheckedPidMinProb(Int_t rFlag, Int_t rDaughter, Int_t rPid, Float_t rProb);
157 void SetNegCheckedPid(Int_t rNegCheckedPid) {fNegCheckedPid = rNegCheckedPid;}
158 void SetPosCheckedPid(Int_t rPosCheckedPid) {fPosCheckedPid = rPosCheckedPid;}
159 Int_t GetNegCheckedPid() {return fNegCheckedPid;}
160 Int_t GetPosCheckedPid() {return fPosCheckedPid;}
161
162 void SetNegCheckedProb(Float_t rNegCheckedProb) {fNegCheckedProb = rNegCheckedProb;}
163 void SetPosCheckedProb(Float_t rPosCheckedProb) {fPosCheckedProb = rPosCheckedProb;}
164 Float_t GetNegCheckedProb() {return fNegCheckedProb;}
165 Float_t GetPosCheckedProb() {return fPosCheckedProb;}
166
167 void FilterByInvariantMass(Float_t minPt, Float_t maxPt, Int_t nPdgCode, Int_t pPdgCode);
ca8a6926 168
b594a020 169protected:
170 TString fTitle;
171
172 TEveTrackPropagator *fRnrStyle;
173
174 Bool_t fRnrDaughters;
175 Bool_t fRnrV0vtx;
176 Bool_t fRnrV0path;
177
178 Color_t fNegColor;
179 Color_t fPosColor;
180
ca8a6926 181 Float_t fMinRCut;
182 Float_t fMaxRCut;
183
e1bb28b4 184 Float_t fMinDaughterDCA;
185 Float_t fMaxDaughterDCA;
186
187 Float_t fMinPt;
188 Float_t fMaxPt;
189
2c7d7ac0 190 Int_t fNegCheckedPid;
191 Int_t fPosCheckedPid;
192
193 Float_t fNegCheckedProb;
194 Float_t fPosCheckedProb;
195
196 Float_t fMinInvariantMass;
197 Float_t fMaxInvariantMass;
198
b594a020 199private:
e6e8b28b 200 void Init();
b594a020 201
202 AliEveV0List(const AliEveV0List&); // Not implemented
203 AliEveV0List& operator=(const AliEveV0List&); // Not implemented
204
205 ClassDef(AliEveV0List, 0); // A list of AliEveV0 objecs.
206};
207
208
209#endif