ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayParticle.h
Revision: 1.8
Committed: Tue Jul 29 13:32:49 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.7: +14 -1 lines
Log Message:
Added StableDaughter class

File Contents

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