ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/DecayPart.h
Revision: 1.1
Committed: Tue Jul 29 13:16:22 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Log Message:
Have our dedicated edm classes in MitEdm/DataFormats.

File Contents

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