65 std::vector<double> pos_{-666., -666.,
67 std::vector<double> mom_{-666., -666.,
77 std::vector<double> pos_mom_cov_;
78 TrackStateType ts_type_;
100 void setNhits(
int nhits) { n_hits_ = nhits; }
101 int getNhits()
const {
return n_hits_; }
103 std::optional<TrackState> getTrackState(TrackStateType tstype)
const {
104 for (
auto ts : track_states_)
105 if (ts.ts_type_ == tstype)
return std::optional<TrackState>(ts);
113 void setNoutliers(
int nout) { n_outliers_ = nout; }
114 int getNoutliers()
const {
return n_outliers_; }
116 void setNdf(
int ndf) { ndf_ = ndf; }
117 int getNdf()
const {
return ndf_; };
119 void setNsharedHits(
int nsh) { n_shared_hits_ = nsh; }
120 int getNsharedHits()
const {
return n_shared_hits_; }
122 void setChi2(
double chi2) { chi2_ = chi2; }
123 double getChi2()
const {
return chi2_; }
125 void setTrackID(
int trackid) { track_id_ = trackid; };
126 int getTrackID()
const {
return track_id_; };
128 void setTruthProb(
double truthProb) { truth_prob_ = truthProb; };
129 double getTruthProb()
const {
return truth_prob_; };
131 void setPdgID(
int pdgID) { pdg_id_ = pdgID; };
132 int getPdgID()
const {
return pdg_id_; };
139 void addDedxMeasurement(
float path_length) {
140 dedx_measurements_.push_back(path_length);
142 std::vector<float> getDedxMeasurements()
const {
return dedx_measurements_; }
144 void addMeasurementIndex(
unsigned int measIdx) {
145 meas_idxs_.push_back(measIdx);
147 std::vector<unsigned int> getMeasurementsIdxs()
const {
return meas_idxs_; }
149 void addOutlierIndex(
unsigned int measIdx) {
150 outlier_idxs_.push_back(measIdx);
152 std::vector<unsigned int> getOutlierIdxs()
const {
return outlier_idxs_; }
154 void addHoleIndex(
unsigned int measIdx) { hole_idxs_.push_back(measIdx); }
155 std::vector<unsigned int> getHoleIdxs()
const {
return hole_idxs_; }
157 void addSharedIndex(
unsigned int measIdx) { shared_idxs_.push_back(measIdx); }
158 std::vector<unsigned int> getSharedIdxs()
const {
return shared_idxs_; }
166 void addSmoothedLoc0(
float loc0,
float cov_loc0) {
167 smoothed_loc0_.push_back(loc0);
168 smoothed_cov_loc0_.push_back(cov_loc0);
170 const std::vector<float>& getSmoothedLoc0()
const {
return smoothed_loc0_; }
171 const std::vector<float>& getSmoothedCovLoc0()
const {
172 return smoothed_cov_loc0_;
175 void setCharge(
int q) { charge_ = q; }
176 double getCharge()
const {
return charge_; }
178 void setTime(
double time) { time_ = time; }
179 double getTime()
const {
return time_; }
182 void setPerigeeParameters(
const std::vector<double>& par) {
185 std::vector<double> getPerigeeParameters()
const {
return perigee_pars_; }
187 void setPerigeeCov(
const std::vector<double>& cov) { perigee_cov_ = cov; }
188 std::vector<double> getPerigeeCov()
const {
return perigee_cov_; }
190 void setPerigeeLocation(
const std::vector<double>& perigee) {
193 void setPerigeeLocation(
const double& x,
const double& y,
const double& z) {
198 std::vector<double> getPerigeeLocation()
const {
return perigee_; }
199 double getPerigeeX()
const {
return perigee_[0]; }
200 double getPerigeeY()
const {
return perigee_[1]; }
201 double getPerigeeZ()
const {
return perigee_[2]; }
203 double getD0()
const {
return perigee_pars_[0]; }
204 double getZ0()
const {
return perigee_pars_[1]; }
205 double getPhi()
const {
return perigee_pars_[2]; }
206 double getTheta()
const {
return perigee_pars_[3]; }
207 double getQoP()
const {
return perigee_pars_[4]; }
208 double getT()
const {
return perigee_pars_[5]; }
211 track_states_.push_back(ts);
214 std::vector<TrackState> getTrackStates()
const {
return track_states_; }
219 for (
const auto& ts : track_states_)
220 if (ts.ts_type_ == AtTarget)
return ts.mom_;
227 for (
const auto& ts : track_states_)
228 if (ts.ts_type_ == AtTarget)
return ts.pos_;
236 for (
const auto& ts : track_states_)
237 if (ts.ts_type_ == tstype)
return ts.mom_;
245 for (
const auto& ts : track_states_)
246 if (ts.ts_type_ == tstype)
return ts.pos_;
255 for (
const auto& ts : track_states_)
256 if (ts.ts_type_ == tstype)
return ts.pos_mom_cov_;
264 int n_shared_hits_{0};
277 std::vector<double> perigee_pars_{0., 0., 0., 0., 0., 0.};
278 std::vector<double> perigee_cov_;
279 std::vector<double> perigee_{0., 0.,
283 std::vector<float> dedx_measurements_{};
286 std::vector<unsigned int> meas_idxs_{};
289 std::vector<unsigned int> outlier_idxs_{};
292 std::vector<unsigned int> hole_idxs_{};
295 std::vector<unsigned int> shared_idxs_{};
299 std::vector<float> smoothed_loc0_{};
300 std::vector<float> smoothed_cov_loc0_{};
306 double truth_prob_{0.};
315 double time_{-666.0};
318 std::vector<TrackState> track_states_;
std::vector< double > getCovariance(TrackStateType tstype) const
Returns the 21-element upper-triangular covariance vector over (x, y, z, px, py, pz) in LDMX global c...