test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFTrajectoryPoint.h
Go to the documentation of this file.
1 #ifndef DataFormats_ParticleFlowReco_PFTrajectoryPoint_h
2 #define DataFormats_ParticleFlowReco_PFTrajectoryPoint_h
3 
5 #include <vector>
6 #include <map>
7 #include <iosfwd>
8 
10 #include "Rtypes.h"
12 #include "Math/GenVector/PositionVector3D.h"
13 
14 namespace reco {
15 
27 
28  public:
29  // Next typedef uses double in ROOT 6 rather than Double32_t due to a bug in ROOT 5,
30  // which otherwise would make ROOT5 files unreadable in ROOT6. This does not increase
31  // the size on disk, because due to the bug, double was actually stored on disk in ROOT 5.
32  typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<double> > REPPoint;
33 
35  enum LayerType {
40  PS1 = 2,
42  PS2 = 3,
51  HCALExit = 7,
53  HOLayer = 8,
54 
55  NLayers = 9
56  };
57 
60 
64  int layer,
65  const math::XYZPoint& posxyz,
67 
70 
72  virtual ~PFTrajectoryPoint();
73 
74 
76  int detId() const { return detId_; }
77 
79  int layer() const { return layer_; }
80 
82  bool isValid() const {
83  if( layer_ == -1 && detId_ == -1 ) return false;
84  else return true;
85  }
86 
88  bool isTrackerLayer() const {
89  if(detId_ >= 0 ) return true;
90  else return false;
91  }
92 
94  const math::XYZPoint& position() const { return posxyz_; }
95 
97  const REPPoint& positionREP() const { return posrep_; }
98 
101  posrep_.SetCoordinates( posxyz_.Rho(), posxyz_.Eta(), posxyz_.Phi() );
102  }
103 
105  const math::XYZTLorentzVector& momentum() const { return momentum_; }
106 
107  bool operator==(const reco::PFTrajectoryPoint& other) const;
108 
109  friend std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint);
110 
111  private:
112 
116 
118  int detId_;
119 
121  int layer_;
122 
125 
128 
131 
132  };
133 
134  std::ostream& operator<<(std::ostream& out, const reco::PFTrajectoryPoint& trajPoint);
135 }
136 
137 #endif
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
bool operator==(const reco::PFTrajectoryPoint &other) const
int detId_
detid if measurement is corresponding to a tracker layer
const math::XYZPoint & position() const
cartesian position (x, y, z)
friend std::ostream & operator<<(std::ostream &out, const reco::PFTrajectoryPoint &trajPoint)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
math::XYZPoint posxyz_
cartesian position (x, y, z)
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
int layer() const
trajectory point layer
Point of closest approach from beam axis (initial point in the case of PFSimParticle) ...
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
void calculatePositionREP()
calculate posrep_ once and for all
bool isTrackerLayer() const
is this point corresponding to an intersection with a tracker layer ?
bool isTrackerLayer_
Is the measurement corresponding to a tracker layer? or was it obtained by propagating the track to a...
const math::XYZTLorentzVector & momentum() const
4-momenta quadrivector
int layer_
propagated layer
PFTrajectoryPoint()
default constructor. Set variables at default dummy values
bool isValid() const
is this point valid ?
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
math::XYZTLorentzVector momentum_
momentum quadrivector
virtual ~PFTrajectoryPoint()
destructor
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
LayerType
Define the different layers where the track can be propagated.
int detId() const
measurement detId
REPPoint posrep_
position in (rho, eta, phi) base (transient)