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 
10 
11 namespace reco {
12 
14  public:
16  TrackKinematics(const std::vector<reco::Track> &tracks);
18  TrackKinematics(const reco::Vertex &vertex);
20 
21  void add(const reco::Track &track, double weight = 1.0);
22 
25  { TrackKinematics copy = *this; copy += other; return copy; }
26 
27  inline unsigned int numberOfTracks() const { return n; }
28  inline double sumOfWeights() const { return sumWeights; }
29 
30  inline const math::XYZTLorentzVector &vectorSum() const
31  { return sum; }
33  { return weightedSum; }
34 
35  private:
36  unsigned int n;
37  double sumWeights;
40 };
41 
42 } // namespace reco
43 
44 #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
unsigned int numberOfTracks() const
tuple tracks
Definition: testEve_cfg.py:39
TrackKinematics operator+(const TrackKinematics &other)
const math::XYZTLorentzVector & vectorSum() const
int weight
Definition: histoStyle.py:50
math::XYZTLorentzVector sum