ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayParticle.h
Revision: 1.10
Committed: Fri Aug 1 11:19:04 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: MITHEP_2_0_x
Changes since 1.9: +8 -5 lines
Log Message:
comments

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.10 // $Id: DecayParticle.h,v 1.9 2008/07/29 22:51:56 bendavid Exp $
3 loizides 1.1 //
4     // Decay Particle
5     //
6 bendavid 1.7 // Decay Particle for use in vertexing based analyses.
7 bendavid 1.10 // Stores vertex fit information (including four momentum) and links to daughters.
8 loizides 1.1 //
9 bendavid 1.10 // Note that Charge is still computed as a recursive loop over daughters, as inherited from
10     // CompositeParticle, but momentum is returned from the internally stored four vector
11     //
12     // Authors: Ch.Paus, J.Bendavid...
13 loizides 1.1 //--------------------------------------------------------------------------------------------------
14    
15     #ifndef DATATREE_DECAYPARTICLE_H
16     #define DATATREE_DECAYPARTICLE_H
17    
18 bendavid 1.7 #include <TDatabasePDG.h>
19     #include <TParticlePDG.h>
20 loizides 1.1 #include "MitAna/DataTree/interface/CompositeParticle.h"
21 bendavid 1.7 #include "MitAna/DataTree/interface/Types.h"
22 loizides 1.1
23     namespace mithep
24     {
25     class DecayParticle : public CompositeParticle
26     {
27     public:
28 bendavid 1.7 // Decay type
29     enum DecayType {Fast, Slow};
30    
31 loizides 1.2 DecayParticle() {}
32 bendavid 1.7 DecayParticle(Int_t absPdgId, DecayType decayType) :
33     fAbsPdgId(absPdgId),
34     fDecayType(decayType),
35     fChi2(0),
36     fNdof(0),
37     fFittedMass(0),
38     fFittedMassError(0),
39     fNormalizedMass(0),
40     fLxy(0),
41     fLxyError(0),
42     fLxyToPv(0),
43     fLxyToPvError(0),
44     fDxy(0),
45     fDxyError(0),
46     fDxyToPv(0),
47     fDxyToPvError(0),
48     fLz(0),
49     fLzError(0),
50     fLzToPv(0),
51     fLzToPvError(0),
52     fCTau(0),
53     fCTauError(0),
54     fPt(0),
55     fPtError(0),
56     fPosition(0,0,0) {}
57 loizides 1.1 ~DecayParticle() {}
58 bendavid 1.7
59     UInt_t AbsPdgId() const { return fAbsPdgId; }
60     void SetAbsPdgId(UInt_t absPdgId) { fAbsPdgId=absPdgId; }
61     TParticlePDG *ParticlePdgEntry() const;
62    
63     Double_t PdgMass() const;
64    
65     Double_t Prob() const { return TMath::Prob(fChi2,fNdof); }
66     Double_t Chi2() const { return fChi2; }
67     Int_t Ndof() const { return fNdof; }
68     void SetChi2(Double_t chi2) { fChi2 = chi2;}
69     void SetNdof(Int_t ndof) { fNdof = ndof;}
70    
71     // Fitted Mass
72     Double_t FittedMass() const { return fFittedMass; }
73     void SetFittedMass(Double_t fittedMass) { fFittedMass = fittedMass;}
74     // Fitted Mass Error
75     Double_t FittedMassError() const { return fFittedMassError; }
76     void SetFittedMassError(Double_t fittedMassError) { fFittedMassError = fittedMassError;}
77     // Lxy
78     Double_t Lxy() const { return fLxy; }
79     void SetLxy(Double_t lxy) { fLxy = lxy;}
80     // Lxy Error
81     Double_t LxyError() const { return fLxyError; }
82     void SetLxyError(Double_t lxyError) { fLxyError = lxyError;}
83     // LxyToPv (length to primary vertex)
84     Double_t LxyToPv() const { return fLxyToPv; }
85     void SetLxyToPv(Double_t lxyToPv) { fLxyToPv = lxyToPv;}
86     // LxyToPv Error
87     Double_t LxyToPvError() const { return fLxyToPvError; }
88     void SetLxyToPvError(Double_t lxyToPvError) { fLxyToPvError = lxyToPvError;}
89     // Dxy (two dimensional impact parameter)
90     Double_t Dxy() const { return fDxy; }
91     void SetDxy(Double_t dxy) { fDxy = dxy;}
92     // Dxy Error
93     Double_t DxyError() const { return fDxyError; }
94     void SetDxyError(Double_t dxyError) { fDxyError = dxyError;}
95     // DxyToPv (two dimensional impact parameter with respect to primary vertex)
96     Double_t DxyToPv() const { return fDxyToPv; }
97     void SetDxyToPv(Double_t dxyToPv) { fDxyToPv = dxyToPv;}
98     // DlxyToPv Error
99     Double_t DxyToPvError() const { return fDxyToPvError; }
100     void SetDxyToPvError(Double_t dxyToPvError) { fDxyToPvError = dxyToPvError;}
101     // Lz
102     Double_t Lz() const { return fLz; }
103     void SetLz(Double_t lz) { fLz = lz;}
104     // Lz Error
105     Double_t LzError() const { return fLzError; }
106     void SetLzError(Double_t lzError) { fLzError = lzError;}
107     // LzToPv (length to primary vertex)
108     Double_t LzToPv() const { return fLzToPv; }
109     void SetLzToPv(Double_t lzToPv) { fLzToPv = lzToPv;}
110     // LzToPv Error
111     Double_t LzToPvError() const { return fLzToPvError; }
112     void SetLzToPvError(Double_t lzToPvError) { fLzToPvError = lzToPvError;}
113     // CTau
114     Double_t CTau() const { return fCTau; }
115     void SetCTau(Double_t cTau) { fCTau = cTau;}
116     // CTau Error
117     Double_t CTauError() const { return fCTauError; }
118     void SetCTauError(Double_t cTauError) { fCTauError = cTauError;}
119     // Pt
120     Double_t Pt() const { return fPt; }
121     void SetPt(Double_t pt) { fPt = pt;}
122     // Pt Error
123     Double_t PtError() const { return fPtError; }
124     void SetPtError(Double_t ptError) { fPtError = ptError;}
125     //----------------------------------------------------------------------------------------------
126     // Accessors/Setter: Extended Vertex fit info from this level
127     //----------------------------------------------------------------------------------------------
128     // Position
129 bendavid 1.9 const ThreeVector &Position() const { return fPosition; }
130     void SetPosition(const ThreeVector &position) { fPosition = position; }
131 bendavid 1.7 // Error
132 bendavid 1.9 const ThreeSymMatrix &Error() const { return fError; }
133     void SetError(const ThreeSymMatrix &error) { fError = error; }
134 bendavid 1.7 // Big 7x7 Error Matrix
135 bendavid 1.9 const SevenSymMatrix &BigError() const { return fBigError; }
136     void SetBigError(const SevenSymMatrix &bigError) { fBigError = bigError; }
137 bendavid 1.7 // void setBigError(const SevenMatrix &bigError) { fBigError = bigError; }
138    
139 bendavid 1.10 //Momentum Accessors/setter
140 bendavid 1.8 FourVector Mom() const { return fMomentum; }
141 bendavid 1.9 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
142     void SetMom(const FourVector &p) { fMomentum = p; }
143 bendavid 1.8
144 loizides 1.1 protected:
145 bendavid 1.7 UInt_t fAbsPdgId;
146     DecayType fDecayType; // Decay type (either fast of slow)
147     // Fit quality
148     Double_t fChi2;
149     Int_t fNdof;
150     // Base vertex fit info
151     Double_t fFittedMass;
152     Double_t fFittedMassError;
153     Double_t fNormalizedMass;
154     Double_t fLxy;
155     Double_t fLxyError;
156     Double_t fLxyToPv;
157     Double_t fLxyToPvError;
158     Double_t fDxy;
159     Double_t fDxyError;
160     Double_t fDxyToPv;
161     Double_t fDxyToPvError;
162     Double_t fLz;
163     Double_t fLzError;
164     Double_t fLzToPv;
165     Double_t fLzToPvError;
166     Double_t fCTau;
167     Double_t fCTauError;
168     Double_t fPt;
169     Double_t fPtError;
170     // Extended vertex fit info
171     ThreeVector fPosition;
172     ThreeSymMatrix fError;
173     SevenSymMatrix fBigError;
174 bendavid 1.8 // momentum
175 bendavid 1.10 FourVector fMomentum; //momentum fourvector
176 loizides 1.1
177 paus 1.6 ClassDef(DecayParticle, 1) // Decay particle class
178 loizides 1.1 };
179     }
180 bendavid 1.7
181     //--------------------------------------------------------------------------------------------------
182     inline TParticlePDG *mithep::DecayParticle::ParticlePdgEntry() const
183     {
184     // Return entry to pdg database for the PARTICLE.
185    
186     return TDatabasePDG::Instance()->GetParticle(fAbsPdgId);
187     }
188 bendavid 1.8
189     //--------------------------------------------------------------------------------------------------
190     inline void mithep::DecayParticle::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
191     {
192     // Set four vector.
193    
194     fMomentum.SetXYZT(px, py, pz, e);
195     }
196 loizides 1.1 #endif