CMS 3D CMS Logo

TrackTimeLifeInfo.h
Go to the documentation of this file.
1 #ifndef DataFormats_VertexReco_TrackTimeLifeInfo_h
2 #define DataFormats_VertexReco_TrackTimeLifeInfo_h
3 
17 
19 public:
22 
23  // Secondary vertex
25  sv_ = sv;
26  hasSV_ = true;
27  }
28  const reco::Vertex& sv() const { return sv_; }
29  bool hasSV() const { return hasSV_; }
30  void setFlightVector(GlobalVector flight_vec, GlobalError flight_cov) {
31  flight_vec_ = flight_vec;
32  flight_cov_ = flight_cov;
33  }
34  // Flight-path
35  const GlobalVector& flightVector() const { return flight_vec_; }
36  const GlobalError& flightCovariance() const { return flight_cov_; }
38  const Measurement1D& flightLength() const { return flightLength_; }
39  // Point of closest approach
40  void setPCA(GlobalPoint pca, GlobalError pca_cov) {
41  pca_ = pca;
42  pca_cov_ = pca_cov;
43  }
44  const GlobalPoint& pca() const { return pca_; }
45  const GlobalError& pcaCovariance() const { return pca_cov_; }
46  // Impact parameter
47  void setIP(GlobalVector ip_vec, GlobalError ip_cov) {
48  ip_vec_ = ip_vec;
49  ip_cov_ = ip_cov;
50  }
51  const GlobalVector& ipVector() const { return ip_vec_; }
52  const GlobalError& ipCovariance() const { return ip_cov_; }
54  const Measurement1D& ipLength() const { return ipLength_; }
55  // Track
56  void setTrack(const reco::Track* track) {
57  if (track != nullptr) {
58  track_ = *track;
59  hasTrack_ = true;
60  } else {
61  track_ = reco::Track();
62  hasTrack_ = false;
63  }
64  }
65  const reco::Track* track() const { return &track_; }
66  bool hasTrack() const { return hasTrack_; }
68  float bField_z() const { return bField_z_; }
69 
70 private:
78  float bField_z_;
79 };
80 
81 #endif
void setFlightVector(GlobalVector flight_vec, GlobalError flight_cov)
GlobalVector flight_vec_
void setIPLength(Measurement1D ipLength)
void setBField_z(float bField_z)
GlobalError flight_cov_
bool hasTrack() const
const GlobalVector & flightVector() const
const GlobalError & ipCovariance() const
const GlobalError & pcaCovariance() const
void setIP(GlobalVector ip_vec, GlobalError ip_cov)
const GlobalVector & ipVector() const
void setTrack(const reco::Track *track)
float bField_z() const
void setPCA(GlobalPoint pca, GlobalError pca_cov)
const Measurement1D & ipLength() const
const reco::Vertex & sv() const
Measurement1D ipLength_
void setSV(reco::Vertex sv)
Measurement1D flightLength_
const GlobalPoint & pca() const
GlobalVector ip_vec_
const GlobalError & flightCovariance() const
void setFlightLength(Measurement1D flightLength)
const Measurement1D & flightLength() const
Structure to hold time-life information.
const reco::Track * track() const