ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayParticle.h
Revision: 1.7
Committed: Tue Jul 29 12:29:47 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.6: +152 -11 lines
Log Message:
Revamped implementation of decay tree classes, started to remove use of Vertex and FitVertex to prepare for removal of these classes

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 loizides 1.1
137     protected:
138 bendavid 1.7 UInt_t fAbsPdgId;
139     DecayType fDecayType; // Decay type (either fast of slow)
140     // Fit quality
141     Double_t fChi2;
142     Int_t fNdof;
143     // Base vertex fit info
144     Double_t fFittedMass;
145     Double_t fFittedMassError;
146     Double_t fNormalizedMass;
147     Double_t fLxy;
148     Double_t fLxyError;
149     Double_t fLxyToPv;
150     Double_t fLxyToPvError;
151     Double_t fDxy;
152     Double_t fDxyError;
153     Double_t fDxyToPv;
154     Double_t fDxyToPvError;
155     Double_t fLz;
156     Double_t fLzError;
157     Double_t fLzToPv;
158     Double_t fLzToPvError;
159     Double_t fCTau;
160     Double_t fCTauError;
161     Double_t fPt;
162     Double_t fPtError;
163     // Extended vertex fit info
164     ThreeVector fPosition;
165     ThreeSymMatrix fError;
166     SevenSymMatrix fBigError;
167 loizides 1.1
168 paus 1.6 ClassDef(DecayParticle, 1) // Decay particle class
169 loizides 1.1 };
170     }
171 bendavid 1.7
172     //--------------------------------------------------------------------------------------------------
173     inline TParticlePDG *mithep::DecayParticle::ParticlePdgEntry() const
174     {
175     // Return entry to pdg database for the PARTICLE.
176    
177     return TDatabasePDG::Instance()->GetParticle(fAbsPdgId);
178     }
179 loizides 1.1 #endif