CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackExtrapolation.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackReco_interface_TrackExtrapolation_h
2 #define DataFormats_TrackReco_interface_TrackExtrapolation_h
3 /* \class reco::TrackExtrapolation TrackExtrapolation.h DataFormats/TrackReco/interface/TrackExtrapolation.h
4 *
5 * This class represents the track state at several radii (specified by user in producer).
6 * It stores a TrackRef to the original track, as well as vectors of the positions and momenta
7 * of the track at the various radii.
8 *
9 * \author Salvatore Rappoccio, JHU
10 *
11 *
12 */
13 
18 
19 #include <vector>
20 
21 namespace reco {
23  // Next two typedefs use double in ROOT 6 rather than Double32_t due to a bug in ROOT 5,
24  // which otherwise would make ROOT5 files unreadable in ROOT6. This does not increase
25  // the size on disk, because due to the bug, double was actually stored on disk in ROOT 5.
26  typedef ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double> > Point;
27  typedef ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> > Vector;
28 
29  public:
31  TrackExtrapolation(reco::TrackRef const& track, std::vector<Point> const& pos, std::vector<Vector> const& mom)
32  : track_(track) {
33  pos_.resize(pos.size());
34  copy(pos.begin(), pos.end(), pos_.begin());
35  mom_.resize(mom.size());
36  copy(mom.begin(), mom.end(), mom_.begin());
37  }
38 
40 
41  reco::TrackRef const& track() const { return track_; }
42  std::vector<Point> const& positions() const { return pos_; }
43  std::vector<Vector> const& momenta() const { return mom_; }
44 
45  protected:
47  std::vector<Point> pos_;
48  std::vector<Vector> mom_;
49  };
50 } // namespace reco
51 
52 #endif
std::vector< Vector > const & momenta() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Vector
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double > > Point
TrackExtrapolation(reco::TrackRef const &track, std::vector< Point > const &pos, std::vector< Vector > const &mom)
reco::TrackRef const & track() const
std::vector< Point > pos_
std::vector< Vector > mom_
std::vector< Point > const & positions() const