ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/DecayPart.h
Revision: 1.12
Committed: Fri Oct 3 23:53:46 2008 UTC (16 years, 7 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2, Mit_008pre1, Mit_006b, Mit_006a, Mit_006, Mit_005
Changes since 1.11: +1 -2 lines
Log Message:
Cosmetics and coding conventions.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.12 // $Id: DecayPart.h,v 1.11 2008/09/30 12:57:42 bendavid Exp $
3 loizides 1.1 //
4     // DecayPart
5     //
6     // Implementation of a decay particle class for use in vertexing based analyses. The contents of a
7     // decay particle is basically its link to the particles it decays to. This will be hopefully at
8     // some point a useful and good implementation. See the double dispatcher doAction(MyAction).
9     //
10 loizides 1.10 // Authors: C.Paus, J.Bendavid
11 loizides 1.1 //--------------------------------------------------------------------------------------------------
12    
13 loizides 1.10 #ifndef MITEDM_DATAFORMATS_DECAYPART_H
14     #define MITEDM_DATAFORMATS_DECAYPART_H
15 loizides 1.1
16     #include <iostream>
17     #include <vector>
18     #include "MitEdm/DataFormats/interface/Types.h"
19     #include "MitEdm/DataFormats/interface/BasePart.h"
20 bendavid 1.2 #include "MitEdm/DataFormats/interface/BasePartFwd.h"
21 bendavid 1.11 #include "MitEdm/DataFormats/interface/StableData.h"
22     #include "MitEdm/DataFormats/interface/DecayData.h"
23 loizides 1.1
24     namespace mitedm
25     {
26     class BasePartAction;
27 bendavid 1.11
28 loizides 1.1 class DecayPart : public BasePart
29     {
30    
31 loizides 1.10 public:
32     enum DecayType {Fast, Slow};
33 bendavid 1.11
34     DecayPart();
35     DecayPart(int pid);
36     DecayPart(int pid, DecayType dType);
37    
38     // Accessors
39     DecayType decayType () const { return decayType_; }
40 loizides 1.1
41 bendavid 1.11 // Override recursion helper method
42     virtual void doAction (BasePartAction *action) const;
43     virtual double charge () const { return 0.; }
44    
45     // Extend the particle contents
46     void addDecayChild (DecayData &decay) { decayChildren_.push_back(decay); }
47     void addStableChild (StableData &stable) { stableChildren_.push_back(stable); }
48    
49     const BasePartPtr getDaughterPtr(int i) const { return getDaughterData(i).originalPtr(); }
50    
51     const DaughterData &getDaughterData(int i) const;
52     const DecayData &getDecayData (int i) const { return decayChildren_.at(i); }
53     const StableData &getStableData (int i) const { return stableChildren_.at(i); }
54     int nDecayChild () const { return decayChildren_.size(); }
55     int nStableChild () const { return stableChildren_.size(); }
56     int nChild () const { return nStableChild() + nDecayChild(); }
57    
58     virtual void print (std::ostream& os = std::cout) const;
59    
60     //----------------------------------------------------------------------------------------------
61     // Accessors/Setter: Base Vertex fit info from this level
62     //----------------------------------------------------------------------------------------------
63     // Fit quality (does not belong here)
64     double prob() const { return prob_; }
65     double chi2() const { return chi2_; }
66     int ndof() const { return ndof_; }
67     void setProb(double prob) { prob_ = prob;}
68     void setChi2(double chi2) { chi2_ = chi2;}
69     void setNdof(int ndof) { ndof_ = ndof;}
70    
71     // Fitted Mass
72     double fittedMass() const { return fittedMass_; }
73     void setFittedMass(double fittedMass) { fittedMass_ = fittedMass;}
74     // Fitted Mass Error
75     double fittedMassError() const { return fittedMassError_; }
76     void setFittedMassError(double fittedMassError) { fittedMassError_ = fittedMassError;}
77     // Lxy
78     double lxy() const { return lxy_; }
79     void setLxy(double lxy) { lxy_ = lxy;}
80     // Lxy Error
81     double lxyError() const { return lxyError_; }
82     void setLxyError(double lxyError) { lxyError_ = lxyError;}
83     // LxyToPv (length to primary vertex)
84     double lxyToPv() const { return lxyToPv_; }
85     void setLxyToPv(double lxyToPv) { lxyToPv_ = lxyToPv;}
86     // LxyToPv Error
87     double lxyToPvError() const { return lxyToPvError_; }
88     void setLxyToPvError(double lxyToPvError) { lxyToPvError_ = lxyToPvError;}
89     // Dxy (two dimensional impact parameter)
90     double dxy() const { return dxy_; }
91     void setDxy(double dxy) { dxy_ = dxy;}
92     // Dxy Error
93     double dxyError() const { return dxyError_; }
94     void setDxyError(double dxyError) { dxyError_ = dxyError;}
95     // DxyToPv (two dimensional impact parameter with respect to primary vertex)
96     double dxyToPv() const { return dxyToPv_; }
97     void setDxyToPv(double dxyToPv) { dxyToPv_ = dxyToPv;}
98     // DlxyToPv Error
99     double dxyToPvError() const { return dxyToPvError_; }
100     void setDxyToPvError(double dxyToPvError) { dxyToPvError_ = dxyToPvError;}
101     // Lz
102     double lz() const { return lz_; }
103     void setLz(double lz) { lz_ = lz;}
104     // Lz Error
105     double lzError() const { return lzError_; }
106     void setLzError(double lzError) { lzError_ = lzError;}
107     // LzToPv (length to primary vertex)
108     double lzToPv() const { return lzToPv_; }
109     void setLzToPv(double lzToPv) { lzToPv_ = lzToPv;}
110     // LzToPv Error
111     double lzToPvError() const { return lzToPvError_; }
112     void setLzToPvError(double lzToPvError) { lzToPvError_ = lzToPvError;}
113     // CTau
114     double cTau() const { return cTau_; }
115     void setCTau(double cTau) { cTau_ = cTau;}
116     // CTau Error
117     double cTauError() const { return cTauError_; }
118     void setCTauError(double cTauError) { cTauError_ = cTauError;}
119     // Pt
120     double pt() const { return pt_; }
121     void setPt(double pt) { pt_ = pt;}
122     // Pt Error
123     double ptError() const { return ptError_; }
124     void setPtError(double ptError) { ptError_ = ptError;}
125     // Four momentum
126     const FourVector &fourMomentum() const { return fourMomentum_; }
127     void setFourMomentum(const FourVector &fourMomentum)
128     { fourMomentum_ = fourMomentum;}
129     //----------------------------------------------------------------------------------------------
130     // Accessors/Setter: Extended Vertex fit info from this level
131     //----------------------------------------------------------------------------------------------
132     // Position
133     const ThreeVector &position() const { return position_; }
134     void setPosition(const ThreeVector &position) { position_ = position; }
135     // Error
136     const ThreeSymMatrix &error() const { return error_; }
137     void setError(const ThreeSymMatrix &error) { error_ = error; }
138     // Big 7x7 Error Matrix
139     const SevenSymMatrix &bigError() const { return bigError_; }
140     void setBigError(const SevenSymMatrix &bigError) { bigError_ = bigError; }
141    
142     VertexPtr primaryVertex() const { return primaryVertex_; }
143     void setPrimaryVertex(VertexPtr ptr) { primaryVertex_ = ptr; }
144    
145     private:
146     // Decay type (either fast of slow)
147     DecayType decayType_;
148     // Fit quality
149     double prob_;
150     double chi2_;
151     int ndof_;
152     // Base vertex fit info
153     double fittedMass_;
154     double fittedMassError_;
155     double normalizedMass_;
156     double lxy_;
157     double lxyError_;
158     double lxyToPv_;
159     double lxyToPvError_;
160     double dxy_;
161     double dxyError_;
162     double dxyToPv_;
163     double dxyToPvError_;
164     double lz_;
165     double lzError_;
166     double lzToPv_;
167     double lzToPvError_;
168     double cTau_;
169     double cTauError_;
170     double pt_;
171     double ptError_;
172     FourVector fourMomentum_;
173     // Extended vertex fit info
174     ThreeVector position_;
175     ThreeSymMatrix error_;
176     SevenSymMatrix bigError_;
177    
178     VertexPtr primaryVertex_;
179 loizides 1.1
180 bendavid 1.11 // Contents of the decay
181     std::vector<StableData> stableChildren_;
182     std::vector<DecayData> decayChildren_;
183 loizides 1.1 };
184     }
185 bendavid 1.11
186     //--------------------------------------------------------------------------------------------------
187     inline const mitedm::DaughterData &mitedm::DecayPart::getDaughterData(int i) const
188     {
189     if (i < nStableChild())
190     return getStableData(i);
191     else
192     return getDecayData(i-nStableChild());
193     }
194 loizides 1.1 #endif