Fix enums as reported by coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveCascade.h
CommitLineData
2991d609 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 ALIEVECASCADE_H
10#define ALIEVECASCADE_H
11
12/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
13 * See cxx source for full Copyright notice */
14
15
9851a663 16//----------------------------------------------------------------------------
17// This code defines the reconstructed cascade (ESD level) visualized with EVE
18//
19// Origin : Boris Hippolyte, IPHC (hippolyt@in2p3.fr)
20// Modified : Antonin Maire, April 2009, IPHC (antonin.maire@cern.ch)
21//----------------------------------------------------------------------------
22
23class TH1F;
24class TH2F;
25class TVector3;
26
27class TEveVSDStructs;
28class TEveTrackPropagator;
29class TEveLine;
2991d609 30
ce6c93f9 31#include <TEveVector.h>
2991d609 32#include <TEveVSDStructs.h>
9851a663 33#include <TEvePointSet.h>
34#include <TPDGCode.h>
2991d609 35
9851a663 36
0e33c639 37class AliEveCascadeList;
2991d609 38
9851a663 39#include "AliEveTrack.h"
40
2991d609 41
2991d609 42class AliEveCascade : public TEvePointSet
43{
44 friend class AliEveCascadeList;
9851a663 45 friend class AliEveCascadeEditor;
2991d609 46
47public:
48 AliEveCascade();
9851a663 49 AliEveCascade(TEveRecTrack* tBac,
50 TEveRecTrack* tNeg,
51 TEveRecTrack* tPos,
52 TEveRecV0* v0,
53 TEveRecCascade* cascade,
54 TEveTrackPropagator* rs);
2991d609 55 virtual ~AliEveCascade();
56
57 void MakeCascade();
58
59 virtual void SetMainColor(Color_t col)
60 {
61 TEvePointSet::SetMainColor(col);
73ce6137 62 fPointingCurve->SetLineColor(fMarkerColor);
63 fV0Path->SetLineColor(fMarkerColor);
2991d609 64 }
65
9851a663 66 void SetRnrStyle( TEveTrackPropagator* const rs) { fRnrStyle = rs; }
67
68 Float_t GetDaughterDCA() const { return fDaughterDCA; }
69 void SetDaughterDCA(Float_t dca) { fDaughterDCA = dca; }
70
71 Float_t GetRadius() const { return fRecDecayV.Perp(); }
72 Float_t GetPt() const { return fRecDecayP.Perp(); }
73 Float_t GetPtot() const { return fRecDecayP.Mag(); }
74
75 Float_t GetPhi() const { return fRecDecayP.Phi(); }
76 Float_t GetTheta() const { return fRecDecayP.Theta(); }
77 Float_t GetEta() const { return fRecDecayP.Eta(); }
78 Int_t GetCharge() const { return fBacTrack->GetCharge(); }
79
80 Double_t GetInvMass(Int_t cascadePdgCodeHyp) const;
81 Float_t GetXiMinusInvMass() const { return GetInvMass( kXiMinus); }
82 Float_t GetOmegaMinusInvMass() const { return GetInvMass( kOmegaMinus); }
83 Float_t GetXiPlusInvMass() const { return GetInvMass(-kXiMinus); }
84 Float_t GetOmegaPlusInvMass() const { return GetInvMass(-kOmegaMinus); }
85
86
87 Int_t GetESDIndex() const { return fESDIndex; }
88 void SetESDIndex(Int_t ind) { fESDIndex = ind;}
89
90 TVector3 GetLambdaP() const { return fLambdaP; }
91 void SetLambdaP(Double_t px, Double_t py, Double_t pz) { fLambdaP.SetXYZ(px, py, pz); }
92
93 TVector3 GetBachP() const { return fBachP; }
94 void SetBachP(Double_t px, Double_t py, Double_t pz) { fBachP.SetXYZ(px, py, pz); }
95
96 virtual const Text_t* GetName() const { return Form("ESDcascade_%i",fESDIndex); }
2991d609 97 virtual const Text_t* GetTitle() const { return Form("ESDcascade_%i",fESDIndex); }
98
99 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
100
9851a663 101 AliEveTrack* GetBacTrack() const { return fBacTrack; }
102 AliEveTrack* GetNegTrack() const { return fNegTrack; }
103 AliEveTrack* GetPosTrack() const { return fPosTrack; }
2991d609 104
9851a663 105 TEveLine* GetPointingCurve() const { return fPointingCurve; }
106 TEveLine* GetV0Path() const { return fV0Path; }
2991d609 107
9851a663 108
2991d609 109protected:
9851a663 110 TEveVector fRecBirthV; // Assumed birth point of cascade
111 TEveVector fRecDecayV; // Xi decay point : point of closest approach between the Xi daughters
112 TEveVector fRecDecayP; // Reconstructed momentum of the cascade, at the Xi decay
113 TEveVector fRecDecayV0; // Reconstructed birth point of neutral daughter
114
115
116 AliEveTrack *fBacTrack; //! Eve track for the bachelor of the cascade
117 AliEveTrack *fNegTrack; //! Eve track for the neg V0 dghter, within the cascade
118 AliEveTrack *fPosTrack; //! Eve track for the pos V0 dghter, within the cascade
119
120 TEveTrackPropagator *fRnrStyle; //! track propagator
121
122 TEveLine *fPointingCurve; //! Curve meant model the Xi trajectory
123 TEveLine *fV0Path; //! Line meant to model the V0 path of the cascade
124
125 Int_t fESDIndex; // Index in ESD Cascade array.
126 Float_t fDaughterDCA; // Distance at the point of closest approach, between both Xi daughters
127 Float_t fChi2Cascade; // Some Chi-square.
128 TVector3 fLambdaP; // Momentum of Lambda (V0 in cascade), at its decay point
129 TVector3 fBachP; // Momentum of Bachelor, at the Xi decay point
2991d609 130
131private:
132 AliEveCascade(const AliEveCascade&); // Not implemented
133 AliEveCascade& operator=(const AliEveCascade&); // Not implemented
134
9851a663 135 ClassDef(AliEveCascade, 1); // Visual representation of a AliEveCascade.
2991d609 136};
137
138
139/******************************************************************************/
140// AliEveCascadeList
141/******************************************************************************/
142
143class AliEveCascadeList : public TEveElementList
144{
145 friend class AliEveCascadeListEditor;
146
147public:
148 AliEveCascadeList();
149 AliEveCascadeList(TEveTrackPropagator* rs);
150 AliEveCascadeList(const Text_t* name, TEveTrackPropagator* rs=0);
151 virtual ~AliEveCascadeList() {}
152
153 virtual const Text_t* GetTitle() const { return fTitle; }
154 virtual void SetTitle(const Text_t* t) { fTitle = t; }
155 virtual void SetTracksColor(Color_t cBac) { fBacColor = cBac;}
156
157 virtual Bool_t CanEditMainColor() const { return kTRUE; }
158
9851a663 159 void SetRnrStyle(TEveTrackPropagator* const rst ) { fRnrStyle = rst; }
160 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
2991d609 161
162 Bool_t GetRnrCascadevtx() const { return fRnrCascadevtx; }
163 Bool_t GetRnrCascadepath() const { return fRnrCascadepath; }
164 Bool_t GetRnrDaughters() const { return fRnrDaughters; }
165
166 void MakeCascades();
167
9851a663 168 void FilterByRadius (Float_t minR, Float_t maxR);
169 void FilterByDaughterDCA (Float_t minDaughterDCA, Float_t maxDaughterDCA);
170 void FilterByPt (Float_t minPt, Float_t maxPt);
171 void FilterByInvariantMass (Float_t minInvariantMass, Float_t maxInvariantMass, Int_t cascadePdgCodeHyp);
172
173
174 void SetInvMassHyp (Int_t rInvMassHyp) {fInvMassHyp = rInvMassHyp;}
175 Int_t GetInvMassHyp() const { return fInvMassHyp; }
2991d609 176
177protected:
9851a663 178 TString fTitle; // title
2991d609 179
9851a663 180 TEveTrackPropagator *fRnrStyle; //! Rnr Style
2991d609 181
9851a663 182 Bool_t fRnrDaughters; // Render state for the cascade daughters
183 Bool_t fRnrCascadevtx; // Render state for the cascade decay point
184 Bool_t fRnrCascadepath; // Render state for the path between the prim. vertex and the "Xi" decay point
2991d609 185
9851a663 186 Color_t fBacColor; // Color of the bachelor track
2991d609 187
9851a663 188 Float_t fMinRCut; // Min transv. radius allowed for cascade selection
189 Float_t fMaxRCut; // Max transv. radius allowed for cascade selection
2991d609 190
9851a663 191 Float_t fMinDaughterDCA; // Min DCA between Xi daughters, allowed for cascade selection
192 Float_t fMaxDaughterDCA; // Max DCA between Xi daughters, allowed for cascade selection
2991d609 193
9851a663 194 Float_t fMinPt; // Min pt allowed for cascade selection
195 Float_t fMaxPt; // Max pt allowed for cascade selection
196
197 Int_t fInvMassHyp; // PdgCode of the inv. mass hypothesis for the cascade
198
199 Float_t fMinInvariantMass; // Minimum invariant mass cut.for cascade
200 Float_t fMaxInvariantMass; // Maximum invariant mass cut.for cascade
2991d609 201
202private:
203 void Init();
204
205 AliEveCascadeList(const AliEveCascadeList&); // Not implemented
206 AliEveCascadeList& operator=(const AliEveCascadeList&); // Not implemented
207
208 ClassDef(AliEveCascadeList, 0); // A list of AliEveCascade objecs.
209};
210
211
212#endif