CMS 3D CMS Logo

TrackKinematics.h

Go to the documentation of this file.
00001 #ifndef RecoBTag_SecondaryVertex_TrackKinematics_h
00002 #define RecoBTag_SecondaryVertex_TrackKinematics_h
00003 
00004 #include <vector>
00005 
00006 #include "DataFormats/Math/interface/LorentzVector.h"
00007 #include "DataFormats/TrackReco/interface/Track.h"
00008 #include "DataFormats/VertexReco/interface/Vertex.h"
00009 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00010 
00011 namespace reco {
00012 
00013 class TrackKinematics {
00014     public:
00015         TrackKinematics();
00016         TrackKinematics(const std::vector<reco::Track> &tracks);
00017         TrackKinematics(const reco::TrackRefVector &tracks);
00018         TrackKinematics(const reco::Vertex &vertex);
00019         ~TrackKinematics() {}
00020 
00021         void add(const reco::Track &track, double weight = 1.0);
00022 
00023         inline unsigned int numberOfTracks() const { return n; }
00024         inline double sumOfWeights() const { return sumWeights; }
00025 
00026         inline const math::XYZTLorentzVector &vectorSum() const
00027         { return sum; }
00028         inline const math::XYZTLorentzVector &weightedVectorSum() const
00029         { return weightedSum; }
00030 
00031     private:
00032         unsigned int            n;
00033         double                  sumWeights;
00034         math::XYZTLorentzVector sum;
00035         math::XYZTLorentzVector weightedSum;
00036 };
00037 
00038 } // namespace reco
00039 
00040 #endif // RecoBTag_SecondaryVertex_TrackKinematics_h

Generated on Tue Jun 9 17:43:04 2009 for CMSSW by  doxygen 1.5.4