Belle II Software development
TimeExtractionUtils Class Reference

Helper class to perform all kind of track extrapolations using the methods from arXiv:0810.2241. More...

#include <TimeExtractionUtils.h>

Static Public Member Functions

static std::pair< double, double > getChi2WithFit (const std::vector< RecoTrack * > &recoTracks, bool setDirtyFlag)
 Fit the tracks and extract the reduced chi2.
 
static std::pair< double, double > getExtractedTimeAndUncertaintyWithFit (const std::vector< RecoTrack * > &recoTracks, bool setDirtyFlag)
 Fit the tracks and extract the chi2 derivatives.
 
static void addEventT0WithQuality (const std::vector< RecoTrack * > &recoTracks, StoreObjPtr< EventT0 > &eventT0, std::vector< EventT0::EventT0Component > &eventT0WithQualityIndex)
 Append an event-t0 value with quality information.
 
static double extractReducedChi2 (const RecoTrack &recoTrack)
 Small helper function to extract the reduced chi^2 (chi^2/ndf). Returns NaN if ndf is 0.
 
static std::pair< double, double > getChi2Derivatives (const RecoTrack &recoTrack)
 Extract the derivatives d chi^2 / d alpha and d^2 chi^2 / (d alpha)^2 from the reco track by calculating the full residual covariance matrix, where alpha is the global event time.
 

Static Private Member Functions

static std::vector< int > getMeasurementDimensions (const RecoTrack &recoTrack)
 Get a list of dimensions for each measurement in the reco track.
 
static bool buildFullCovarianceMatrix (const RecoTrack &recoTrack, TMatrixDSym &fullCovariance)
 Build the full covariance matrix of the given reco track and fills it into the given TMatrixDSym.
 
static bool buildFullResidualCovarianceMatrix (const RecoTrack &recoTrack, const std::vector< int > &vDimMeas, const TMatrixDSym &fullCovariance, TMatrixDSym &fullResidualCovariance, TMatrixDSym &inverseFullMeasurementCovariance)
 Build the full covariance matrix of the residuals of the measurements out of the full covariance matrix of the track states.
 
static void buildResidualsAndTimeDerivative (const RecoTrack &recoTrack, const std::vector< int > &vDimMeas, TVectorD &residuals, TVectorD &residualTimeDerivative)
 Calculate the weighted residuals (weighted with the DAF weight) of each hit and the time derivative of the residuals by calling the timeDerivativesMeasurementsOnPlane method of the CDCRecoHits.
 

Detailed Description

Helper class to perform all kind of track extrapolations using the methods from arXiv:0810.2241.

The event time is calculated as one would calculate an alignment parameter. We follow the prescription in arXiv:0810.2241 [physics.ins-det] to build the full covariance matrix for the Kalman-fitted track (DAF counts as Kalman). We then evaluate the change in event time that minimizes the sum of chi^2s of the tracks following the same procedure that is decribed in loc.cit.

Unlike the case of alignment, we only have one free parameter (time), and therefore there are no large matrices to invert. The necessary timeshift is calculated from the estimated derivatives of chi2^2 in the linear approximation as dchi^2 /d^2chi^2 delta t = - -----— / -----— . dt / dt^2 Here division replaces a matrix inverse (this is loc.cit. Eq. (8)).

Time-dependence of the fit result comes from the CDC hits, where a later time of particle passage corresponds to a greater drift circle.

Definition at line 48 of file TimeExtractionUtils.h.

Member Function Documentation

◆ addEventT0WithQuality()

void addEventT0WithQuality ( const std::vector< RecoTrack * > &  recoTracks,
StoreObjPtr< EventT0 > &  eventT0,
std::vector< EventT0::EventT0Component > &  eventT0WithQualityIndex 
)
static

Append an event-t0 value with quality information.

Definition at line 76 of file TimeExtractionUtils.cc.

79{
80 if (not eventT0->hasEventT0()) {
81 B2DEBUG(25, "No event t0 is set. Not testing.");
82 return;
83 }
84
85 // As we do not know what happened before, we have to set the dirty flag here to force a refit.
86 const auto& chi2_with_ndf = TimeExtractionUtils::getChi2WithFit(recoTracks, true);
87 const double quality = chi2_with_ndf.second;
88
89 if (std::isnan(quality)) {
90 B2DEBUG(25, "The calculated quality is nan. Not using this EventT0 of " << eventT0->getEventT0());
91 return;
92 }
93
94 B2DEBUG(25, "The iteration gave a result of " << quality << " for " << eventT0->getEventT0());
95 EventT0::EventT0Component eventT0Component = *(eventT0->getEventT0Component());
96 eventT0Component.quality = quality;
97 eventT0WithQualityIndex.emplace_back(eventT0Component);
98 eventT0->addTemporaryEventT0(eventT0Component);
99 eventT0->setEventT0(eventT0Component);
100}
static std::pair< double, double > getChi2WithFit(const std::vector< RecoTrack * > &recoTracks, bool setDirtyFlag)
Fit the tracks and extract the reduced chi2.
Structure for storing the extracted event t0s together with its detector and its uncertainty.
Definition: EventT0.h:33
double quality
Storage for the internal quality estimation for a single algorithm. Only comparable for all temporari...
Definition: EventT0.h:56

◆ buildFullCovarianceMatrix()

bool buildFullCovarianceMatrix ( const RecoTrack recoTrack,
TMatrixDSym &  fullCovariance 
)
staticprivate

Build the full covariance matrix of the given reco track and fills it into the given TMatrixDSym.

Needed for the derivatives.

The full covariance contains the covariances of the different states of the reco track at different hits, this means is connects the calculates state at one measurement to one at another measurement. This is why it has the dimension number of hits * dimensionality of the track state. The diagonal blocks are filled with the covariance matrices at a single measurement whereas the off diagonal elements connect different measurements.

The off-diagnal elements are calculated, by either using one prediction step forward (because the two hits are neighbors), by using the fact that if thei are not neighbors they can be connected by a finite number of forward predictions which breaks this down to the first case and some multiplications again or by using symmetry aspects (e.g. no background prediction is needed).

The notation follows 0810.2241.

Returns false if something strange happened, otherwise true.

Definition at line 272 of file TimeExtractionUtils.cc.

274{
275 const auto* kfs = dynamic_cast<const genfit::KalmanFitStatus*>(recoTrack.getTrackFitStatus());
276
277 if (!kfs) {
278 B2ERROR("Track not fitted with a Kalman fitter.");
279 return false;
280 }
281
282 if (!kfs->isFitConverged()) {
283 B2ERROR("Track fit didn't converge.");
284 return false;
285 }
286
287 if (!kfs->isFittedWithReferenceTrack()) {
288 B2ERROR("No reference track.");
289 return false;
290 }
291
292 const auto& hitPoints = recoTrack.getHitPointsWithMeasurement();
293 const unsigned int nPoints = hitPoints.size();
294 const genfit::AbsTrackRep* rep = recoTrack.getCardinalRepresentation();
295 const int nDim = rep->getDim();
296
297 fullCovariance.ResizeTo(nPoints * nDim, nPoints * nDim);
298 std::vector<TMatrixD> vFitterGain;
299 vFitterGain.reserve(nPoints);
300 for (unsigned int i = 0; i < nPoints; ++i) {
301 const genfit::TrackPoint* tp = hitPoints[i];
302 const genfit::KalmanFitterInfo* fi = tp->getKalmanFitterInfo();
303 if (!fi) {
304 B2DEBUG(25, "Missing KalmanFitterInfo - skipping track");
305 return false;
306 }
307
308 // Diagonal part of the full covariance matrix are the covariances
309 // of the smoothed states.
310 const genfit::MeasuredStateOnPlane& mop = fi->getFittedState();
311 setSubOnDiagonal(fullCovariance, i * nDim, mop.getCov());
312
313 // Build the corresponding smoother gain matrix.
314 if (i + 1 < nPoints) {
315 const genfit::TrackPoint* tpNext = hitPoints[i + 1];
316 const genfit::KalmanFitterInfo* fiNext = tpNext->getKalmanFitterInfo();
317 if (!fiNext) {
318 B2DEBUG(25, "Missing next KalmanFitterInfo - skipping track");
319 return false;
320 }
321
322 // update at i
323 const genfit::MeasuredStateOnPlane* update = fi->getForwardUpdate();
324 // transport to i+1 prediction at i+1
325 const genfit::ReferenceStateOnPlane* rsop = fiNext->getReferenceState();
326 if (rsop) {
327 const genfit::MeasuredStateOnPlane* pred = fiNext->getForwardPrediction();
328
329 // Evaluate (C^i_i+1)^-1 F_i
330 TDecompChol decomp(pred->getCov());
331 TMatrixD F = rsop->getForwardTransportMatrix();
332 decomp.MultiSolve(F);
333
334 // Calculate gain matrix as
335 // C_i F_i^T (C^i_i+1)^-1 = C_i ((C^i_i+1)^-1 F_i)^T
336 // in the notation of 0810.2241
337 vFitterGain.emplace_back(TMatrixD(update->getCov(),
338 TMatrixD::kMultTranspose, F));
339 } else {
340 B2DEBUG(150, "No reference state, substituting empty fitter gain matrix.");
341 vFitterGain.emplace_back(TMatrixD(5, 5));
342 }
343 }
344
345 // Build the off-diagonal elements.
346 TMatrixD offDiag = mop.getCov();
347 for (int j = i - 1; j >= 0; --j) {
348 offDiag = TMatrixD(vFitterGain[j], TMatrixD::kMult, offDiag);
349 setSubOffDiagonal(fullCovariance, j * nDim, i * nDim, offDiag);
350 }
351 }
352
353 return true;
354}
genfit::AbsTrackRep * getCardinalRepresentation() const
Get a pointer to the cardinal track representation. You are not allowed to modify or delete it!
Definition: RecoTrack.h:631
const genfit::FitStatus * getTrackFitStatus(const genfit::AbsTrackRep *representation=nullptr) const
Return the track fit status for the given representation or for the cardinal one. You are not allowed...
Definition: RecoTrack.h:621
const std::vector< genfit::TrackPoint * > & getHitPointsWithMeasurement() const
Return a list of measurements and track points, which can be used e.g. to extrapolate....
Definition: RecoTrack.h:708

◆ buildFullResidualCovarianceMatrix()

bool buildFullResidualCovarianceMatrix ( const RecoTrack recoTrack,
const std::vector< int > &  vDimMeas,
const TMatrixDSym &  fullCovariance,
TMatrixDSym &  fullResidualCovariance,
TMatrixDSym &  inverseFullMeasurementCovariance 
)
staticprivate

Build the full covariance matrix of the residuals of the measurements out of the full covariance matrix of the track states.

The returned matrix has the dimensionality of the number of measurements * their dimensionality and relates the residuals of each measurements to each other residuals of an (other) measurement.

This can easily be done using the full covariance matrix of the states, which is calculated using the buildFullCovarianceMatrix method. The ful covariance matrix of the residuals and their inverse is returned.

The fullResidualCovariance is eq. (17) in 0810.2241.

Definition at line 356 of file TimeExtractionUtils.cc.

361{
362 const auto& hitPoints = recoTrack.getHitPointsWithMeasurement();
363 const unsigned int nPoints = hitPoints.size();
364 const genfit::AbsTrackRep* rep = recoTrack.getCardinalRepresentation();
365 const int nDim = rep->getDim();
366 int measurementDimensions = std::accumulate(vDimMeas.begin(), vDimMeas.end(), 0);
367 fullResidualCovariance.ResizeTo(measurementDimensions, measurementDimensions);
368 inverseFullMeasurementCovariance.ResizeTo(measurementDimensions, measurementDimensions);
369
370 // Put together the parts containing the track covariances.
371 std::vector<TMatrixD> HMatrices;
372 HMatrices.reserve(nPoints);
373 for (unsigned int i = 0, index = 0; i < nPoints; ++i) {
374 const genfit::TrackPoint* tp = hitPoints[i];
375 const genfit::AbsMeasurement* meas = tp->getRawMeasurement(0);
376 std::unique_ptr<const genfit::AbsHMatrix> pH(meas->constructHMatrix(rep));
377 const TMatrixD& H = pH->getMatrix();
378 int nDimMeas = vDimMeas[i];
379 TMatrixDSym cov = fullCovariance.GetSub(i * nDim, (i + 1) * nDim - 1,
380 i * nDim, (i + 1) * nDim - 1);
381 pH->HMHt(cov);
382 setSubOnDiagonal(fullResidualCovariance, index, cov);
383
384 int indexOffDiag = index;
385 for (int j = i - 1; j >= 0; --j) {
386 int nDimMeasJ = HMatrices[j].GetNrows();
387 indexOffDiag -= nDimMeasJ;
388
389 TMatrixD offDiag(HMatrices[j], TMatrixD::kMult,
390 TMatrixD(fullCovariance.GetSub(nDim * j, nDim * (j + 1) - 1,
391 nDim * i, nDim * (i + 1) - 1),
392 TMatrixD::kMultTranspose, H));
393
394 setSubOffDiagonal(fullResidualCovariance, indexOffDiag, index, offDiag);
395 }
396
397 index += nDimMeas;
398 HMatrices.push_back(H);
399 }
400
401 // Add the measurment covariances, also calculate their full
402 // (block-diagonal) inverse covariance matrix.
403 fullResidualCovariance *= -1;
404 inverseFullMeasurementCovariance = 0;
405 for (unsigned int i = 0, index = 0; i < nPoints; ++i) {
406 const genfit::TrackPoint* tp = hitPoints[i];
407 const genfit::KalmanFitterInfo* fi = tp->getKalmanFitterInfo();
408 const genfit::MeasurementOnPlane& mop = fi->getAvgWeightedMeasurementOnPlane();
409 TMatrixDSym cov = mop.getCov();
410 const int dim = cov.GetNrows();
411 setSubOnDiagonal(fullResidualCovariance, index,
412 cov + fullResidualCovariance.GetSub(index, index + dim - 1,
413 index, index + dim - 1));
414
415 genfit::tools::invertMatrix(cov);
416 setSubOnDiagonal(inverseFullMeasurementCovariance, index, cov);
417
418 index += dim;
419 }
420
421 return true;
422}

◆ buildResidualsAndTimeDerivative()

void buildResidualsAndTimeDerivative ( const RecoTrack recoTrack,
const std::vector< int > &  vDimMeas,
TVectorD &  residuals,
TVectorD &  residualTimeDerivative 
)
staticprivate

Calculate the weighted residuals (weighted with the DAF weight) of each hit and the time derivative of the residuals by calling the timeDerivativesMeasurementsOnPlane method of the CDCRecoHits.

The residuals as well as the residualTimeDerivative are returned by reference to a vector as large as there are measurements in the reco track (exactly: number of measurements * dimensionality of each measurement).

Definition at line 425 of file TimeExtractionUtils.cc.

429{
430 // The residuals and their derivatives WRT the event time.
431
432 int measurementDimensions = std::accumulate(vDimMeas.begin(), vDimMeas.end(), 0);
433 residuals.ResizeTo(measurementDimensions);
434 residualTimeDerivative.ResizeTo(measurementDimensions);
435
436 const auto& hitPoints = recoTrack.getHitPointsWithMeasurement();
437 const unsigned int nPoints = hitPoints.size();
438 for (unsigned int i = 0, index = 0; i < nPoints; ++i) {
439 const genfit::TrackPoint* tp = hitPoints[i];
440 const genfit::KalmanFitterInfo* fi = tp->getKalmanFitterInfo();
441
442 const std::vector<double>& weights = fi->getWeights();
443 TVectorD weightedResidual(vDimMeas[i]);
444 for (size_t iMeas = 0; iMeas < fi->getNumMeasurements(); ++iMeas) {
445 weightedResidual += weights[iMeas] * fi->getResidual(iMeas).getState();
446 }
447 residuals.SetSub(index, weightedResidual);
448 if (dynamic_cast<const CDCRecoHit*>(tp->getRawMeasurement(0))) {
449 const CDCRecoHit* hit = static_cast<const CDCRecoHit*>(tp->getRawMeasurement(0));
450 std::vector<double> deriv = hit->timeDerivativesMeasurementsOnPlane(fi->getFittedState());
451
452 double weightedDeriv = weights[0] * deriv[0] + weights[1] * deriv[1];
453 residualTimeDerivative[index] = weightedDeriv;
454 }
455 index += vDimMeas[i];
456 }
457}
This class is used to transfer CDC information to the track fit.
Definition: CDCRecoHit.h:32

◆ extractReducedChi2()

double extractReducedChi2 ( const RecoTrack recoTrack)
static

Small helper function to extract the reduced chi^2 (chi^2/ndf). Returns NaN if ndf is 0.

Definition at line 186 of file TimeExtractionUtils.cc.

187{
188 const double chi2 = recoTrack.getTrackFitStatus()->getChi2();
189 const double ndf = recoTrack.getTrackFitStatus()->getNdf();
190
191 if (ndf == 0) {
192 return NAN;
193 }
194
195 return chi2 / ndf;
196}

◆ getChi2Derivatives()

std::pair< double, double > getChi2Derivatives ( const RecoTrack recoTrack)
static

Extract the derivatives d chi^2 / d alpha and d^2 chi^2 / (d alpha)^2 from the reco track by calculating the full residual covariance matrix, where alpha is the global event time.

The two derivatives are returned as a pair.

Definition at line 199 of file TimeExtractionUtils.cc.

200{
201 // Check if track is ready to be used.
202 if (recoTrack.getNumberOfCDCHits() == 0) {
203 B2DEBUG(200, "No CDC hits in track.");
204 return {NAN, NAN};
205 }
206
207 if (recoTrack.wasFitSuccessful()) {
208 const genfit::FitStatus* fs = recoTrack.getTrackFitStatus();
209 if (!fs)
210 return {NAN, NAN};
211 if (fs->isTrackPruned()) {
212 B2WARNING("Skipping pruned track");
213 return {NAN, NAN};
214 }
215 }
216
217 try {
218 const std::vector<int>& vDimMeas = TimeExtractionUtils::getMeasurementDimensions(recoTrack);
219
220 TMatrixDSym fullCovariance;
221 bool success = buildFullCovarianceMatrix(recoTrack, fullCovariance);
222 if (!success) {
223 // Error printed inside.
224 return {NAN, NAN};
225 }
226 TMatrixDSym fullResidualCovariance;
227 TMatrixDSym inverseFullMeasurementCovariance;
228 buildFullResidualCovarianceMatrix(recoTrack, vDimMeas, fullCovariance, fullResidualCovariance,
229 inverseFullMeasurementCovariance);
230
231 TVectorD residuals;
232 TVectorD residualsTimeDerivative;
233 buildResidualsAndTimeDerivative(recoTrack, vDimMeas, residuals, residualsTimeDerivative);
234
235 // Equations with their numbers from 0810.2241:
236 // 2 At V^-1 (V - HCHt) V^-1 r (9)
237 // = 2 At V^-1 r for fitted tracks (12)
238 const double dchi2da = 2. * residualsTimeDerivative * (inverseFullMeasurementCovariance * residuals);
239
240 // (2 At V^-1 (V - HCHt) V^-1 A)^-1, note that this should be (10)
241 // SimilarityT(...) if (...) were a matrix.
242 const double d2chi2da2 = 2. * fullResidualCovariance.Similarity(inverseFullMeasurementCovariance * residualsTimeDerivative);
243
244
245 if (d2chi2da2 > 20) {
246 B2DEBUG(200, "Track with bad second derivative");
247 return {NAN, NAN};
248 }
249 return {dchi2da, d2chi2da2};
250 } catch (...) {
251 B2DEBUG(25, "Failed time extraction - skipping track");
252 return {NAN, NAN};
253 }
254}
bool wasFitSuccessful(const genfit::AbsTrackRep *representation=nullptr) const
Returns true if the last fit with the given representation was successful.
Definition: RecoTrack.cc:336
unsigned int getNumberOfCDCHits() const
Return the number of cdc hits.
Definition: RecoTrack.h:427
static void buildResidualsAndTimeDerivative(const RecoTrack &recoTrack, const std::vector< int > &vDimMeas, TVectorD &residuals, TVectorD &residualTimeDerivative)
Calculate the weighted residuals (weighted with the DAF weight) of each hit and the time derivative o...
static bool buildFullCovarianceMatrix(const RecoTrack &recoTrack, TMatrixDSym &fullCovariance)
Build the full covariance matrix of the given reco track and fills it into the given TMatrixDSym.
static std::vector< int > getMeasurementDimensions(const RecoTrack &recoTrack)
Get a list of dimensions for each measurement in the reco track.
static bool buildFullResidualCovarianceMatrix(const RecoTrack &recoTrack, const std::vector< int > &vDimMeas, const TMatrixDSym &fullCovariance, TMatrixDSym &fullResidualCovariance, TMatrixDSym &inverseFullMeasurementCovariance)
Build the full covariance matrix of the residuals of the measurements out of the full covariance matr...

◆ getChi2WithFit()

std::pair< double, double > getChi2WithFit ( const std::vector< RecoTrack * > &  recoTracks,
bool  setDirtyFlag 
)
static

Fit the tracks and extract the reduced chi2.

Definition at line 103 of file TimeExtractionUtils.cc.

104{
105 TrackFitter trackFitter;
106
107 double summedChi2 = 0;
108 double summedNDF = 0;
109 unsigned int numberOfFittableRecoTracks = 0;
110
111 for (RecoTrack* recoTrack : recoTracks) {
112 if (setDirtyFlag) {
113 recoTrack->setDirtyFlag();
114 }
115
116 if (not trackFitter.fit(*recoTrack)) {
117 continue;
118 }
119
120 const double chi2 = TimeExtractionUtils::extractReducedChi2(*recoTrack);
121 const double ndf = recoTrack->getTrackFitStatus()->getNdf();
122
123 if (std::isnan(chi2)) {
124 continue;
125 }
126
127 numberOfFittableRecoTracks++;
128 summedChi2 += chi2;
129 summedNDF += ndf;
130 }
131
132 if (numberOfFittableRecoTracks == 0) {
133 return {NAN, NAN};
134 }
135
136 return {summedChi2 / numberOfFittableRecoTracks, summedNDF / numberOfFittableRecoTracks};
137}
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
static double extractReducedChi2(const RecoTrack &recoTrack)
Small helper function to extract the reduced chi^2 (chi^2/ndf). Returns NaN if ndf is 0.
Algorithm class to handle the fitting of RecoTrack objects.
Definition: TrackFitter.h:121
bool fit(RecoTrack &recoTrack, genfit::AbsTrackRep *trackRepresentation, bool resortHits=false) const
Fit a reco track with a given non-default track representation.
Definition: TrackFitter.cc:108

◆ getExtractedTimeAndUncertaintyWithFit()

std::pair< double, double > getExtractedTimeAndUncertaintyWithFit ( const std::vector< RecoTrack * > &  recoTracks,
bool  setDirtyFlag 
)
static

Fit the tracks and extract the chi2 derivatives.

Definition at line 140 of file TimeExtractionUtils.cc.

142{
143 TrackFitter trackFitter;
144
145 double sumFirstDerivatives = 0;
146 double sumSecondDerivatives = 0;
147 unsigned int numberOfFittableRecoTracks = 0;
148
149 for (RecoTrack* recoTrack : recoTracks) {
150 if (setDirtyFlag) {
151 recoTrack->setDirtyFlag();
152 }
153
154 if (not trackFitter.fit(*recoTrack)) {
155 continue;
156 }
157
158 const auto& chi2Derivatives = TimeExtractionUtils::getChi2Derivatives(*recoTrack);
159 const double dchi2da = chi2Derivatives.first;
160 const double d2chi2da2 = chi2Derivatives.second;
161
162 if (std::isnan(dchi2da) or std::isnan(d2chi2da2)) {
163 continue;
164 }
165
166 if (d2chi2da2 > 20) {
167 B2DEBUG(25, "Track with bad second derivative");
168 continue;
169 }
170
171 numberOfFittableRecoTracks++;
172 sumFirstDerivatives += dchi2da;
173 sumSecondDerivatives += d2chi2da2;
174 }
175
176 if (numberOfFittableRecoTracks == 0) {
177 return {NAN, NAN};
178 }
179
180 const double extractedEventT0 = sumFirstDerivatives / sumSecondDerivatives;
181 const double extractedEventT0Uncertainty = std::sqrt(2 / sumSecondDerivatives);
182
183 return {extractedEventT0, extractedEventT0Uncertainty};
184}
static std::pair< double, double > getChi2Derivatives(const RecoTrack &recoTrack)
Extract the derivatives d chi^2 / d alpha and d^2 chi^2 / (d alpha)^2 from the reco track by calculat...

◆ getMeasurementDimensions()

std::vector< int > getMeasurementDimensions ( const RecoTrack recoTrack)
staticprivate

Get a list of dimensions for each measurement in the reco track.

Needed for the derivatives. E.g. the residuals vector is as large as the sum of the returned vector here.

Parameters
recoTrackThe reco track from which the measurements should be taken.
Returns
An std::vector with the number of dimensions for each measurement. Has as many entries as there are measurements in the reco track.

Definition at line 257 of file TimeExtractionUtils.cc.

258{
259 const auto& hitPoints = recoTrack.getHitPointsWithMeasurement();
260
261 std::vector<int> vDimMeas;
262 vDimMeas.reserve(hitPoints.size());
263
264 for (const auto& hit : hitPoints) {
265 vDimMeas.push_back(hit->getRawMeasurement(0)->getDim());
266 }
267
268 return vDimMeas;
269}

The documentation for this class was generated from the following files: