test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackKinematics.h
Go to the documentation of this file.
1 #ifndef RecoBTag_SecondaryVertex_TrackKinematics_h
2 #define RecoBTag_SecondaryVertex_TrackKinematics_h
3 
4 #include <vector>
5 
11 
12 namespace reco {
13 
15  public:
17  TrackKinematics(const std::vector<reco::Track> &tracks);
19  TrackKinematics(const reco::Vertex &vertex);
21  n(vertex.numberOfSourceCandidatePtrs()), sumWeights(vertex.numberOfSourceCandidatePtrs()),
22  sum(vertex.p4()),weightedSum(vertex.p4()){}
23 
25 
26  void add(const reco::Track &track, double weight = 1.0);
27 
30  { TrackKinematics copy = *this; copy += other; return copy; }
31 
32  inline unsigned int numberOfTracks() const { return n; }
33  inline double sumOfWeights() const { return sumWeights; }
34 
35  inline const math::XYZTLorentzVector &vectorSum() const
36  { return sum; }
38  { return weightedSum; }
39 
40  private:
41  unsigned int n;
42  double sumWeights;
45 };
46 
47 } // namespace reco
48 
49 #endif // RecoBTag_SecondaryVertex_TrackKinematics_h
const math::XYZTLorentzVector & weightedVectorSum() const
math::XYZTLorentzVector weightedSum
TrackKinematics & operator+=(const TrackKinematics &other)
void add(const reco::Track &track, double weight=1.0)
double sumOfWeights() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double p4[4]
Definition: TauolaWrapper.h:92
unsigned int numberOfTracks() const
tuple tracks
Definition: testEve_cfg.py:39
TrackKinematics operator+(const TrackKinematics &other)
const math::XYZTLorentzVector & vectorSum() const
math::XYZTLorentzVector sum
TrackKinematics(const reco::VertexCompositePtrCandidate &vertex)