]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveCascade.h
Coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveCascade.h
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
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
23 class TH1F;
24 class TH2F;
25 class TVector3;
26
27 class TEveVSDStructs;
28 class TEveTrackPropagator;
29 class TEveLine;
30
31 #include <TEveVector.h>
32 #include <TEveVSDStructs.h>
33 #include <TEvePointSet.h>
34 #include <TPDGCode.h>
35
36  
37 class AliEveCascadeList;
38
39 #include "AliEveTrack.h"
40
41
42 class AliEveCascade : public TEvePointSet
43 {
44   friend class AliEveCascadeList;
45   friend class AliEveCascadeEditor;
46
47 public:
48   AliEveCascade();
49   AliEveCascade(TEveRecTrack*        tBac, 
50                 TEveRecTrack*        tNeg, 
51                 TEveRecTrack*        tPos, 
52                 TEveRecV0*           v0, 
53                 TEveRecCascade*      cascade, 
54                 TEveTrackPropagator* rs);
55   virtual ~AliEveCascade();
56
57   void MakeCascade();
58
59   virtual void  SetMainColor(Color_t col)
60   {
61     TEvePointSet::SetMainColor(col);
62     fPointingCurve->SetLineColor(fMarkerColor);
63     fV0Path->SetLineColor(fMarkerColor);
64   }
65
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); }
97   virtual const Text_t* GetTitle() const   { return Form("ESDcascade_%i",fESDIndex); }
98
99   TEveTrackPropagator* GetPropagator() const  { return fRnrStyle; }
100
101   AliEveTrack*  GetBacTrack()      const { return fBacTrack; }
102   AliEveTrack*  GetNegTrack()      const { return fNegTrack; }
103   AliEveTrack*  GetPosTrack()      const { return fPosTrack; }
104
105   TEveLine*     GetPointingCurve() const { return fPointingCurve; }
106   TEveLine*     GetV0Path()        const { return fV0Path; }
107
108    
109 protected:
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
130
131 private:
132   AliEveCascade(const AliEveCascade&);            // Not implemented
133   AliEveCascade& operator=(const AliEveCascade&); // Not implemented
134
135   ClassDef(AliEveCascade, 1); // Visual representation of a AliEveCascade.
136 };
137
138
139 /******************************************************************************/
140 // AliEveCascadeList
141 /******************************************************************************/
142
143 class AliEveCascadeList : public TEveElementList
144 {
145   friend class AliEveCascadeListEditor;
146
147 public:
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
159   void  SetRnrStyle(TEveTrackPropagator* const rst ) { fRnrStyle = rst; }
160   TEveTrackPropagator* GetPropagator()   const       { return fRnrStyle; }
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
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; }
176
177 protected:
178   TString              fTitle;                  // title
179
180   TEveTrackPropagator *fRnrStyle;               //! Rnr Style
181
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
185
186   Color_t              fBacColor;               // Color of the bachelor track
187
188   Float_t              fMinRCut;                // Min transv. radius allowed for cascade selection
189   Float_t              fMaxRCut;                // Max transv. radius allowed for cascade selection
190
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
193
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
201
202 private:
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