* AliEveEventManager - make sure each AOD friend is only registered
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveHF.h
CommitLineData
fa3634bd 1// $Id$
2// Main author: Davide Caffarri 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
10#ifndef AliEveHF_H
11#define AliEveHF_H
12
13#include "AliAODRecoDecay.h"
14#include "AliEveTrack.h"
15
16#include <TEveVSDStructs.h>
17#include <TPolyLine3D.h>
18
19#include <TPDGCode.h>
20
21
22class TH1F;
23class TH2F;
24
25
26class AliEveHFList;
27
28class AliEveHF : public TEvePointSet
29{
30 friend class AliEveHFList;
31 friend class AliEveHFEditor;
32
33public:
34 AliEveHF();
35 AliEveHF(TEveRecTrack* tNeg, TEveRecTrack* tPos, Double_t primVtx[3], AliAODRecoDecay* aodObj, Double_t firstPointTrack[3], TEveTrackPropagator* rs);
36 virtual ~AliEveHF();
37
38 void MakeHF();
39
40 virtual void SetMainColor(Color_t col)
41 {
42 TEvePointSet::SetMainColor(col);
43 fPointingLine->SetLineColor(fMarkerColor);
44 }
45
46 void SetRnrStyle(TEveTrackPropagator* rs) { fRnrStyle = rs; }
47
48 //HF Property
49
50 Float_t GetPhi() { return fRecDecayHF.Phi(); }
51 Float_t GetEta() { return fRecDecayP_HF.Eta(); }
52 Float_t GetRadius() { return fRecDecayHF.Perp(); }
53 Float_t GetPt() { return fRecDecayP_HF.Perp(); }
54
55 Double_t GetInvariantMassPart() { CalculateInvMass(fDecay); return fInvariantMassPart; }
56 Double_t GetInvariantMassAntiPart() { CalculateInvMass(fDecay); return fInvariantMassAntiPart; }
57
58 Float_t GetChi2Vtx() { return fChi2SecondVtx; }
59 Float_t GetCosPointingAngle() {return fPointingAngleHF; }
60
61 AliAODRecoDecay *GetAODobj() {return fAODobj; }
f8d5a389 62
fa3634bd 63 Int_t GetAODIndex() const { return fAODIndex; }
64 void SetAODIndex(Int_t ind) { fAODIndex = ind;}
65
66 virtual const Text_t* GetName() const { return Form("AOD_HF_%i",fAODIndex); }
67 virtual const Text_t* GetTitle() const { return Form("AOD_HF_%i",fAODIndex); }
f8d5a389 68
fa3634bd 69 //Prongs Property
70
71 Double_t GetProngDCA(Int_t iProng) { return fProngDCA[iProng]; }
72 void SetProngDCA() const ;
73
74 Double_t Getd0Prong(Int_t iProng) { return fProngd0[iProng]; }
75 void Setd0Prong() const ;
f8d5a389 76
fa3634bd 77 void CalculateInvMass(Int_t decay);
78
79 Bool_t SelectInvMass(Int_t decay, Float_t decayCuts);
f8d5a389 80
fa3634bd 81 void SetMaxProbPdgPid();
82 Int_t GetPdgProngMaxProb(Int_t iProng) { return fProngMaxProbPdg[iProng]; }
83 Double_t GetPidProngMaxProb(Int_t iProng) { return fProngMaxProbPid[iProng]; }
f8d5a389 84
fa3634bd 85 TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
86
87 TEveTrack* GetNegTrack() { return fNegTrack; }
88 TEveTrack* GetPosTrack() { return fPosTrack; }
89
90 TEveLine* GetPointingLine() { return fPointingLine; }
91
92protected:
93
f8d5a389 94 AliAODRecoDecay *fAODobj;
fa3634bd 95
96 TEveVector fRecBirthHF; // Reconstucted birth point of neutral particle
97 TEveVector fRecDecayHF; // Point of closest approach
98 TEveVector fRecDecayP_HF;
f8d5a389 99 Double_t fPointingAngleHF; // Track Pointing Angle
fa3634bd 100
101 TEveTrack *fNegTrack;
102 TEveTrack *fPosTrack;
103
104 TEveTrackPropagator *fRnrStyle;
105
106 TEveLine *fPointingLine;
107
108 Int_t fnProng; // Number of Prong.
109 Int_t fAODIndex; // Index in HF loop array.
110 Double_t fChi2SecondVtx; //Secondary Vertex Chi-square.
111
f8d5a389 112 Double_t *fProngDCA;//[fnProng] Distance at the point of closest approach.
113 Double_t *fProngd0;//[fnProng] Impact Paramter if each prong.
fa3634bd 114 Int_t *fProngMaxProbPdg;//[fnProng] Maximum PDG probability for the negative daughter
115 Double_t *fProngMaxProbPid;//[fnProng] Maximum PID probability for the negative daughter
f8d5a389 116
fa3634bd 117 Double_t fInvariantMassPart;
118 Double_t fInvariantMassAntiPart;
119
120 Int_t fDecay;
f8d5a389 121
fa3634bd 122 private:
123 AliEveHF(const AliEveHF&); // Not implemented
124 AliEveHF& operator=(const AliEveHF&); // Not implemented
f8d5a389 125
fa3634bd 126 ClassDef(AliEveHF,0); // Visual representation of a AliEveHF.
127};
128
129
130/******************************************************************************/
131// AliEveHFList
132/******************************************************************************/
133class AliEveHFList : public TEveElementList
134{
135 friend class AliEveHFListEditor;
136 // friend class AliEveHF;
137
138public:
139 AliEveHFList();
140 AliEveHFList(TEveTrackPropagator* rs);
141 AliEveHFList(const Text_t* name, TEveTrackPropagator* rs=0);
142 virtual ~AliEveHFList() {}
143
144 virtual const Text_t* GetTitle() const { return fTitle; }
145 virtual void SetTitle(const Text_t* t) { fTitle = t; }
f8d5a389 146 virtual void SetTracksColor(Color_t cNeg, Color_t cPos, Int_t ip)
fa3634bd 147 {fProngColor[ip] = cNeg; fProngColor[ip++] = cPos;}
148
149 virtual Bool_t CanEditMainColor() const { return kTRUE; }
150
151 void SetRnrStyle(TEveTrackPropagator* rst) { fRnrStyle = rst; }
152 TEveTrackPropagator* GetPropagator() { return fRnrStyle; }
153
154 Bool_t GetRnrHFvtx() const { return fRnrHFvtx; }
155 Bool_t GetRnrHFpath() const { return fRnrHFpath; }
156 Bool_t GetRnrDaughters() const { return fRnrDaughters; }
157
158 void MakeHFs();
159
160 void FilterByPt(Float_t minPt, Float_t maxPt);
161 void FilterByRadius(Float_t minR, Float_t maxR);
162 void FilterByCosPointingAngle(Float_t minCosPointingAngle, Float_t maxCosPointingAngle);
163 void FilterByDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
164 void FilterByd0(Float_t mind0, Float_t maxd0);
165 //void FilterByCheckedPidMinProb(Int_t rFlag, Int_t rDaughter, Int_t rPid, Float_t rProb);
f8d5a389 166
fa3634bd 167 // void SetProngCheckedPid(Int_t rProngCheckedPid) const;
168 Int_t GetProngCheckedPid(Int_t iProng) {return fProngCheckedPid[iProng];}
169 // void SetProngCheckedProb(Float_t rProngCheckedProb) const;
170 // Float_t GetProngCheckedProb(Int_t iProng) const { return fProngCheckedProb[iProng]; }
171
172 void FilterByInvariantMass (Int_t decay, Float_t deltaInvariantMass);
173
174protected:
175 TString fTitle;
176
177 TEveTrackPropagator *fRnrStyle;
178
179 Bool_t fRnrDaughters;
180 Bool_t fRnrHFvtx;
181 Bool_t fRnrHFpath;
182
183 Color_t* fProngColor;//[fnProng]
184
185 Float_t fMinRCut;
186 Float_t fMaxRCut;
187
188 Float_t fMinDaughterDCA;
189 Float_t fMaxDaughterDCA;
190
191 Float_t fMinPt;
192 Float_t fMaxPt;
193
194 Float_t fMinCosPointingAngle;
195 Float_t fMaxCosPointingAngle;
f8d5a389 196
fa3634bd 197 Float_t fMind0;
198 Float_t fMaxd0;
199
200 Int_t* fProngCheckedPid;//[fnProng]
201
202 Float_t* fProngCheckedProb;//[fnProng]
f8d5a389 203
fa3634bd 204 Float_t fDeltaInvariantMass;
205 Int_t fDecay;
206
207private:
208 void Init();
209
210 AliEveHFList(const AliEveHFList&); // Not implemented
211 AliEveHFList& operator=(const AliEveHFList&); // Not implemented
212
213 ClassDef(AliEveHFList,0); // A list of AliEveHF objecs.
214};
215
216
217#endif