Fix enums as reported by coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveKink.h
CommitLineData
4711ad43 1// $Id$
2// Main authors: Paraskevi Ganoti: 2009
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 AliEveKink_H
10#define AliEveKink_H
11
3e3a768d 12#include <TEvePointSet.h>
d05591ca 13#include <TEveVSDStructs.h>
4711ad43 14
3e3a768d 15class TEveTrack;
16class TEveTrackPropagator;
4711ad43 17
18class TH1F;
19class TH2F;
20
21class AliEveKinkList;
22
3e3a768d 23//------------------------------------------------------------------------------
24// AliEveKink
25//
26// Graphical representation of a kink.
27//------------------------------------------------------------------------------
28
4711ad43 29class AliEveKink : public TEvePointSet
30{
31 friend class AliEveKinkList;
32 friend class AliEveKinkEditor;
33
34public:
35 AliEveKink();
36 AliEveKink(TEveRecTrack* tMoth, TEveRecTrack* tDaug, TEveRecKink* kink, TEveTrackPropagator* rsMoth, TEveTrackPropagator* rsDaugh);
37 virtual ~AliEveKink();
38
39 void MakeKink();
40
41 virtual void SetMainColor(Color_t col)
42 {
43 TEvePointSet::SetMainColor(col);
4711ad43 44 }
45
3e3a768d 46 void SetRnrStyleMother(TEveTrackPropagator* rsMoth) { fRnrStyleMoth = rsMoth; }
47 void SetRnrStyleDaughter(TEveTrackPropagator* rsDaugh) { fRnrStyleDaugh = rsDaugh; }
4711ad43 48 Double_t GetKinkAngle(Int_t i) const { return fKinkAngle[i]; }
3e3a768d 49 void SetKinkAngle(Int_t i, Double_t anglekink) { fKinkAngle[i] = anglekink; }
50
4711ad43 51 Float_t GetKinkRadius() const { return fRecKinkPosition.Perp(); }
3e3a768d 52
53 Float_t GetKinkPMother() const { return fMotherMomentum.Mag(); }
54 Float_t GetKinkPMotherPerp() const { return fMotherMomentum.Perp(); }
55 Float_t GetKinkPDaughter() const { return fDaughterMomentum.Mag(); }
56
4711ad43 57 Float_t GetInvMass(Int_t dPdgCode) const;
58 Float_t GetQt() const;
3e3a768d 59
4711ad43 60 void SetMaxProbPdgPid(Int_t rPdg, Float_t rPid);
61 Int_t GetDaugMaxProbPdg() const { return fDaugMaxProbPdg; }
62 Float_t GetDaugMaxProbPid() const { return fDaugMaxProbPid; }
63
64 Int_t GetESDKinkIndex() const { return fESDKinkIndex; }
65 void SetESDKinkIndex(Int_t ind) { fESDKinkIndex = ind;}
66
3e3a768d 67 virtual const Text_t* GetName() const { return Form("ESDkink_%i",fESDKinkIndex); }
68 virtual const Text_t* GetTitle() const { return Form("ESDkink_%i",fESDKinkIndex); }
4711ad43 69
3e3a768d 70 TEveTrack* GetMotherTrack() const { return fMotherTrack; }
71 TEveTrack* GetDaughterTrack() const { return fDaughterTrack; }
4711ad43 72
73protected:
3e3a768d 74 TEveVector fRecKinkPosition; // Reconstructed position of kink.
75 TEveVector fMotherMomentum; // Momentum of mother track.
76 TEveVector fDaughterMomentum; // Momentum of daugter track.
77
78 TEveTrack *fMotherTrack; // Graphical representation of mother track.
79 TEveTrack *fDaughterTrack; // Graphical representation of daughter track.
4711ad43 80
3e3a768d 81 TEveTrackPropagator *fRnrStyleMoth; // Track-propagator for mother track.
82 TEveTrackPropagator *fRnrStyleDaugh; // Track-propagator for daughter track.
4711ad43 83
4711ad43 84 Int_t fESDKinkIndex; // Index in ESD Kink array.
3e3a768d 85 Double_t fKinkAngle[3]; // TODO
86
87 Int_t fDaugMaxProbPdg; // Maximum PDG probability for the daughter
88 Float_t fDaugMaxProbPid; // Maximum PID probability for the daughter
4711ad43 89
90private:
91 AliEveKink(const AliEveKink&); // Not implemented
92 AliEveKink& operator=(const AliEveKink&); // Not implemented
93
94 ClassDef(AliEveKink, 0); // Visual representation of a AliEveKink.
95};
96
97
3e3a768d 98//------------------------------------------------------------------------------
4711ad43 99// AliEveKinkList
3e3a768d 100//
101// Container for AliEveKink objects
102// Provides managmenet methods for setting cuts and common visualization
103// parameters.
104//------------------------------------------------------------------------------
4711ad43 105
106class AliEveKinkList : public TEveElementList
107{
108 friend class AliEveKinkListEditor;
109
110public:
111 AliEveKinkList();
112 AliEveKinkList(TEveTrackPropagator* rsMoth, TEveTrackPropagator* rsDaugh);
113 AliEveKinkList(const Text_t* name, TEveTrackPropagator* rsMoth=0, TEveTrackPropagator* rsDaugh=0);
114 virtual ~AliEveKinkList() {}
115
3e3a768d 116 virtual void SetTracksColor(Color_t cMoth, Color_t cDaug)
117 { fMothColor = cMoth; fDaugColor = cDaug; }
4711ad43 118
119 virtual Bool_t CanEditMainColor() const { return kTRUE; }
120
121 void SetRnrStyleMoth(TEveTrackPropagator* rstMoth) { fRnrStyleMoth = rstMoth; }
3e3a768d 122 TEveTrackPropagator* GetPropagatorMoth() const { return fRnrStyleMoth; }
123
4711ad43 124 void SetRnrStyleDaugh(TEveTrackPropagator* rstDaugh) { fRnrStyleDaugh = rstDaugh; }
3e3a768d 125 TEveTrackPropagator* GetPropagatorDaugh() const { return fRnrStyleDaugh; }
4711ad43 126
3e3a768d 127 Bool_t GetRnrKinkvtx() const { return fRnrKinkvtx; }
4711ad43 128 Bool_t GetRnrKinkDaughter() const { return fRnrKinkDaughter; } //not yet be sure about this!!!
129
130 void MakeKinks();
131
132 void FilterByRadius(Float_t minR, Float_t maxR);
133 void FilterByKinkAngle(Float_t minKinkAngle, Float_t maxKinkAngle);
134 void FilterByPt(Float_t minPt, Float_t maxPt);
135 void FilterByInvariantMass(Float_t minPt, Float_t maxPt, Int_t dPdgCode);
3e3a768d 136
4711ad43 137 void FilterByCheckedPidMinProb(Int_t rFlag, Int_t rPid, Float_t rProb);
3e3a768d 138 void SetDaugCheckedPid(Int_t dcpid) { fDaugCheckedPid = dcpid; }
139 Int_t GetDaugCheckedPid() const { return fDaugCheckedPid; }
4711ad43 140
3e3a768d 141 void SetDaugCheckedProb(Float_t dcprob) { fDaugCheckedProb = dcprob; }
142 Float_t GetDaugCheckedProb() const { return fDaugCheckedProb; }
4711ad43 143
144
145protected:
3e3a768d 146 TEveTrackPropagator *fRnrStyleMoth; // Default track-propagator for mother tracks.
147 TEveTrackPropagator *fRnrStyleDaugh; // Default track-propagator for daughter tracks.
4711ad43 148
3e3a768d 149 Bool_t fRnrKinkDaughter; // Flag - show daughter tracks.
150 Bool_t fRnrKinkvtx; // Flag - show kink vertex.
4711ad43 151
3e3a768d 152 Color_t fMothColor; // Color of mother tracks.
153 Color_t fDaugColor; // Color of daughter tracks.
4711ad43 154
3e3a768d 155 Float_t fMinRCut; // Cut - minimum kink radius.
156 Float_t fMaxRCut; // Cut - maximum kink radius.
4711ad43 157
3e3a768d 158 Float_t fMinKinkAngle; // Cut - minimum kink angle.
159 Float_t fMaxKinkAngle; // Cut - maximum kink angle.
4711ad43 160
3e3a768d 161 Float_t fMinPt; // Cut - minimum pT of mother track.
162 Float_t fMaxPt; // Cut - maximum pT of mother track.
4711ad43 163
3e3a768d 164 Float_t fMinInvariantMass; // Cut - minimum invariant mass.
165 Float_t fMaxInvariantMass; // Cut - maximum invariant mass.
4711ad43 166
3e3a768d 167 Int_t fDaugCheckedPid; // Cut - PID of daughter track.
168 Float_t fDaugCheckedProb; // Cut - min PID probability of the daughter track.
4711ad43 169
170private:
171 void Init();
172
173 AliEveKinkList(const AliEveKinkList&); // Not implemented
174 AliEveKinkList& operator=(const AliEveKinkList&); // Not implemented
175
176 ClassDef(AliEveKinkList, 0); // A list of AliEveKink objecs.
177};
178
179
180#endif