ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/DecayPart.h
Revision: 1.2
Committed: Tue Jul 29 22:52:54 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.1: +16 -15 lines
Log Message:
Added proper edm references to producers

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.2 // $Id: DecayPart.h,v 1.1 2008/07/29 13:16:22 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     // Author List: Ch.Paus
11     //--------------------------------------------------------------------------------------------------
12    
13     #ifndef MITEDM_DECAYPART_H
14     #define MITEDM_DECAYPART_H
15    
16     #include <iostream>
17     #include <vector>
18     #include "CLHEP/Vector/LorentzVector.h"
19     #include "CLHEP/Geometry/Point3D.h"
20     #include "CLHEP/Matrix/SymMatrix.h"
21     #include "MitEdm/DataFormats/interface/Types.h"
22     #include "MitEdm/DataFormats/interface/BasePart.h"
23 bendavid 1.2 #include "MitEdm/DataFormats/interface/BasePartFwd.h"
24 loizides 1.1
25     namespace mitedm
26     {
27     class BasePartAction;
28     class DecayPart : public BasePart
29     {
30    
31     public:
32     // Decay type
33     enum DecayType {Fast, Slow};
34    
35     // Type definitions
36 bendavid 1.2 //typedef std::vector<BasePart*> PartColl;
37     //typedef std::vector<BasePart*>::iterator Iter;
38     //typedef std::vector<BasePart*>::const_iterator ConstIter;
39 loizides 1.1
40     // Constructors
41     DecayPart() {}
42 bendavid 1.2 //DecayPart(const mitedm::DecayPart &d);
43 loizides 1.1 DecayPart(int pid) {}
44     DecayPart(int pid, double mass);
45     DecayPart(int pid, double mass, DecayType dType);
46    
47     // Accessors
48     DecayType decayType () const { return decayType_; }
49    
50     // Override recursion helper method
51     virtual void doAction (BasePartAction *action) const;
52     virtual double charge () const { return 0.; }
53    
54     // Extend the particle contents
55 bendavid 1.2 void addChild (BasePartBaseRef partRef) { children_.push_back(partRef); }
56 loizides 1.1
57 bendavid 1.2 const BasePart* getChild (int i) const { return children_.at(i).get(); }
58     const BasePartBaseRef getChildRef (int i) const { return children_.at(i); }
59 loizides 1.1 int nChild () const { return children_.size(); }
60    
61     virtual void print (std::ostream& os = std::cout) const;
62    
63     //----------------------------------------------------------------------------------------------
64     // Accessors/Setter: Base Vertex fit info from this level
65     //----------------------------------------------------------------------------------------------
66     // Fit quality (does not belong here)
67     double prob() const { return prob_; }
68     double chi2() const { return chi2_; }
69     int ndof() const { return ndof_; }
70     void setProb(double prob) { prob_ = prob;}
71     void setChi2(double chi2) { chi2_ = chi2;}
72     void setNdof(int ndof) { ndof_ = ndof;}
73    
74     // Fitted Mass
75     double fittedMass() const { return fittedMass_; }
76     void setFittedMass(double fittedMass) { fittedMass_ = fittedMass;}
77     // Fitted Mass Error
78     double fittedMassError() const { return fittedMassError_; }
79     void setFittedMassError(double fittedMassError) { fittedMassError_ = fittedMassError;}
80     // Lxy
81     double lxy() const { return lxy_; }
82     void setLxy(double lxy) { lxy_ = lxy;}
83     // Lxy Error
84     double lxyError() const { return lxyError_; }
85     void setLxyError(double lxyError) { lxyError_ = lxyError;}
86     // LxyToPv (length to primary vertex)
87     double lxyToPv() const { return lxyToPv_; }
88     void setLxyToPv(double lxyToPv) { lxyToPv_ = lxyToPv;}
89     // LxyToPv Error
90     double lxyToPvError() const { return lxyToPvError_; }
91     void setLxyToPvError(double lxyToPvError) { lxyToPvError_ = lxyToPvError;}
92     // Dxy (two dimensional impact parameter)
93     double dxy() const { return dxy_; }
94     void setDxy(double dxy) { dxy_ = dxy;}
95     // Dxy Error
96     double dxyError() const { return dxyError_; }
97     void setDxyError(double dxyError) { dxyError_ = dxyError;}
98     // DxyToPv (two dimensional impact parameter with respect to primary vertex)
99     double dxyToPv() const { return dxyToPv_; }
100     void setDxyToPv(double dxyToPv) { dxyToPv_ = dxyToPv;}
101     // DlxyToPv Error
102     double dxyToPvError() const { return dxyToPvError_; }
103     void setDxyToPvError(double dxyToPvError) { dxyToPvError_ = dxyToPvError;}
104     // Lz
105     double lz() const { return lz_; }
106     void setLz(double lz) { lz_ = lz;}
107     // Lz Error
108     double lzError() const { return lzError_; }
109     void setLzError(double lzError) { lzError_ = lzError;}
110     // LzToPv (length to primary vertex)
111     double lzToPv() const { return lzToPv_; }
112     void setLzToPv(double lzToPv) { lzToPv_ = lzToPv;}
113     // LzToPv Error
114     double lzToPvError() const { return lzToPvError_; }
115     void setLzToPvError(double lzToPvError) { lzToPvError_ = lzToPvError;}
116     // CTau
117     double cTau() const { return cTau_; }
118     void setCTau(double cTau) { cTau_ = cTau;}
119     // CTau Error
120     double cTauError() const { return cTauError_; }
121     void setCTauError(double cTauError) { cTauError_ = cTauError;}
122     // Pt
123     double pt() const { return pt_; }
124     void setPt(double pt) { pt_ = pt;}
125     // Pt Error
126     double ptError() const { return ptError_; }
127     void setPtError(double ptError) { ptError_ = ptError;}
128     // Four momentum
129     const FourVector &fourMomentum() const { return fourMomentum_; }
130     void setFourMomentum(const FourVector &fourMomentum)
131     { fourMomentum_ = fourMomentum;}
132     //----------------------------------------------------------------------------------------------
133     // Accessors/Setter: Extended Vertex fit info from this level
134     //----------------------------------------------------------------------------------------------
135     // Position
136     const ThreeVector &position() const { return position_; }
137     void setPosition(const ThreeVector &position) { position_ = position; }
138     // Error
139 bendavid 1.2 const ThreeSymMatrix &error() const { return error_; }
140     void setError(const ThreeSymMatrix &error) { error_ = error; }
141 loizides 1.1 // Big 7x7 Error Matrix
142 bendavid 1.2 const SevenSymMatrix &bigError() const { return bigError_; }
143     void setBigError(const SevenSymMatrix &bigError) { bigError_ = bigError; }
144 loizides 1.1
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 bendavid 1.2 ThreeSymMatrix error_;
176     SevenSymMatrix bigError_;
177 loizides 1.1
178     // Contents of the decay
179 bendavid 1.2 BasePartBaseRefVector children_;
180 loizides 1.1
181     //ClassDef(DecayPart, 1)
182     };
183     }
184     #endif