ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/DecayPart.h
Revision: 1.14
Committed: Tue Dec 15 23:27:34 2009 UTC (15 years, 4 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, HEAD
Branch point for: Mit_025c_branch
Changes since 1.13: +6 -1 lines
Log Message:
Add shared layer mask

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.14 // $Id: DecayPart.h,v 1.13 2009/03/20 17:13:33 loizides 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 loizides 1.13 void addDecayChild (DecayData &decay) { decayChildren_.push_back(decay); }
47 bendavid 1.11 void addStableChild (StableData &stable) { stableChildren_.push_back(stable); }
48    
49 loizides 1.13 const BasePartPtr getDaughterPtr(int i) const { return getDaughterData(i).originalPtr(); }
50 bendavid 1.11
51     const DaughterData &getDaughterData(int i) const;
52 loizides 1.13 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 bendavid 1.11
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 bendavid 1.14 const reco::HitPattern &sharedHits() const { return sharedHits_; }
146     void setSharedHits(const reco::HitPattern &hits) { sharedHits_=hits; }
147    
148 bendavid 1.11 private:
149     // Decay type (either fast of slow)
150 loizides 1.13 DecayType decayType_; //type of decay
151 bendavid 1.11 // Fit quality
152 loizides 1.13 double prob_; //fit probability
153     double chi2_; //chi2 value
154     int ndof_; //degrees of freedom
155 bendavid 1.11 // Base vertex fit info
156 loizides 1.13 double fittedMass_; //mass from fit
157     double fittedMassError_; //mass error from fit
158     double normalizedMass_; //normalized mass
159     double lxy_; //lxy
160     double lxyError_; //lxy error
161     double lxyToPv_; //lxy wrt primary vertex
162     double lxyToPvError_; //error on lxy wrt primary vertex
163     double dxy_; //dxy
164     double dxyError_; //dxy error
165     double dxyToPv_; //dxy wrt primary vertex
166     double dxyToPvError_; //error on dxy wrt primary vertex
167     double lz_; //lz
168     double lzError_; //lz error
169     double lzToPv_; //lz wrt primary vertex
170     double lzToPvError_; //error on lz wrt primary vertex
171     double cTau_; //ctau
172     double cTauError_; //error on ctau
173     double pt_; //pt
174     double ptError_; //error on pt
175     FourVector fourMomentum_; //momentum at vertex
176 bendavid 1.11 // Extended vertex fit info
177 loizides 1.13 ThreeVector position_; //vertex position
178     ThreeSymMatrix error_; //error matrix
179     SevenSymMatrix bigError_; //error matrix
180 bendavid 1.14
181     reco::HitPattern sharedHits_; //hit pattern of daughter hits with shared clusters
182 loizides 1.13
183     VertexPtr primaryVertex_; //primary vertex
184 loizides 1.1
185 bendavid 1.11 // Contents of the decay
186 loizides 1.13 std::vector<StableData> stableChildren_; //stable daughter
187     std::vector<DecayData> decayChildren_; //decay children
188 loizides 1.1 };
189     }
190 bendavid 1.11
191     //--------------------------------------------------------------------------------------------------
192     inline const mitedm::DaughterData &mitedm::DecayPart::getDaughterData(int i) const
193     {
194     if (i < nStableChild())
195     return getStableData(i);
196     else
197     return getDecayData(i-nStableChild());
198     }
199 loizides 1.1 #endif