66 std::vector<double> pos_{-666., -666.,
68 std::vector<double> mom_{-666., -666.,
78 std::vector<double> pos_mom_cov_;
79 TrackStateType ts_type_;
101 void setNhits(
int nhits) { n_hits_ = nhits; }
102 int getNhits()
const {
return n_hits_; }
104 std::optional<TrackState> getTrackState(TrackStateType tstype)
const {
105 for (
auto ts : track_states_)
106 if (ts.ts_type_ == tstype)
return std::optional<TrackState>(ts);
114 void setNoutliers(
int nout) { n_outliers_ = nout; }
115 int getNoutliers()
const {
return n_outliers_; }
117 void setNdf(
int ndf) { ndf_ = ndf; }
118 int getNdf()
const {
return ndf_; };
120 void setNsharedHits(
int nsh) { n_shared_hits_ = nsh; }
121 int getNsharedHits()
const {
return n_shared_hits_; }
123 void setChi2(
double chi2) { chi2_ = chi2; }
124 double getChi2()
const {
return chi2_; }
126 void setTrackID(
int trackid) { track_id_ = trackid; };
127 int getTrackID()
const {
return track_id_; };
129 void setTruthProb(
double truthProb) { truth_prob_ = truthProb; };
130 double getTruthProb()
const {
return truth_prob_; };
132 void setPdgID(
int pdgID) { pdg_id_ = pdgID; };
133 int getPdgID()
const {
return pdg_id_; };
140 void addDedxMeasurement(
float path_length) {
141 dedx_measurements_.push_back(path_length);
143 std::vector<float> getDedxMeasurements()
const {
return dedx_measurements_; }
145 void addMeasurementIndex(
unsigned int measIdx) {
146 meas_idxs_.push_back(measIdx);
148 std::vector<unsigned int> getMeasurementsIdxs()
const {
return meas_idxs_; }
150 void addOutlierIndex(
unsigned int measIdx) {
151 outlier_idxs_.push_back(measIdx);
153 std::vector<unsigned int> getOutlierIdxs()
const {
return outlier_idxs_; }
155 void addHoleIndex(
unsigned int measIdx) { hole_idxs_.push_back(measIdx); }
156 std::vector<unsigned int> getHoleIdxs()
const {
return hole_idxs_; }
158 void addSharedIndex(
unsigned int measIdx) { shared_idxs_.push_back(measIdx); }
159 std::vector<unsigned int> getSharedIdxs()
const {
return shared_idxs_; }
167 void addSmoothedLoc0(
float loc0,
float cov_loc0) {
168 smoothed_loc0_.push_back(loc0);
169 smoothed_cov_loc0_.push_back(cov_loc0);
171 const std::vector<float>& getSmoothedLoc0()
const {
return smoothed_loc0_; }
172 const std::vector<float>& getSmoothedCovLoc0()
const {
173 return smoothed_cov_loc0_;
176 void setCharge(
int q) { charge_ = q; }
177 double getCharge()
const {
return charge_; }
179 void setTime(
double time) { time_ = time; }
180 double getTime()
const {
return time_; }
183 void setPerigeeParameters(
const std::vector<double>& par) {
186 std::vector<double> getPerigeeParameters()
const {
return perigee_pars_; }
188 void setPerigeeCov(
const std::vector<double>& cov) { perigee_cov_ = cov; }
189 std::vector<double> getPerigeeCov()
const {
return perigee_cov_; }
191 void setPerigeeLocation(
const std::vector<double>& perigee) {
194 void setPerigeeLocation(
const double& x,
const double& y,
const double& z) {
200 std::vector<double> getPerigeeLocation()
const {
return perigee_; }
201 double getPerigeeX()
const {
return perigee_[0]; }
202 double getPerigeeY()
const {
return perigee_[1]; }
203 double getPerigeeZ()
const {
return perigee_[2]; }
205 double getD0()
const {
return perigee_pars_[0]; }
206 double getZ0()
const {
return perigee_pars_[1]; }
207 double getPhi()
const {
return perigee_pars_[2]; }
208 double getTheta()
const {
return perigee_pars_[3]; }
209 double getQoP()
const {
return perigee_pars_[4]; }
210 double getT()
const {
return perigee_pars_[5]; }
213 track_states_.push_back(ts);
216 std::vector<TrackState> getTrackStates()
const {
return track_states_; }
221 for (
const auto& ts : track_states_)
222 if (ts.ts_type_ == AtTarget)
return ts.mom_;
229 for (
const auto& ts : track_states_)
230 if (ts.ts_type_ == AtTarget)
return ts.pos_;
238 for (
const auto& ts : track_states_)
239 if (ts.ts_type_ == tstype)
return ts.mom_;
247 for (
const auto& ts : track_states_)
248 if (ts.ts_type_ == tstype)
return ts.pos_;
257 for (
const auto& ts : track_states_)
258 if (ts.ts_type_ == tstype)
return ts.pos_mom_cov_;
266 int n_shared_hits_{0};
279 std::vector<double> perigee_pars_{0., 0., 0., 0., 0., 0.};
280 std::vector<double> perigee_cov_;
281 std::vector<double> perigee_{0., 0.,
285 std::vector<float> dedx_measurements_{};
288 std::vector<unsigned int> meas_idxs_{};
291 std::vector<unsigned int> outlier_idxs_{};
294 std::vector<unsigned int> hole_idxs_{};
297 std::vector<unsigned int> shared_idxs_{};
301 std::vector<float> smoothed_loc0_{};
302 std::vector<float> smoothed_cov_loc0_{};
308 double truth_prob_{0.};
317 double time_{-666.0};
320 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...