New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend TrackBase and Track to include time and velocity #24465
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24465/6305 |
A new Pull Request was created by @lgray (Lindsey Gray) for master. It involves the following packages: DataFormats/GsfTrackReco @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
signed char nloops = 0, uint8_t stopReason = 0); | ||
signed char nloops = 0, uint8_t stopReason = 0, | ||
double t0 = 0, double beta = 0, | ||
double covt0t0 = -1., double covbetabeta = -1.); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please match the indentation
- it looks like the new arguments should be floats (with correspondingly float defaults)
TrackAlgorithm = undefAlgorithm, TrackQuality quality = undefQuality); | ||
TrackAlgorithm = undefAlgorithm, TrackQuality quality = undefQuality, | ||
double t0 = 0, double beta = 0, | ||
double covt0t0 = -1., double covbetabeta = -1.); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please match the indentation
- it looks like the new arguments should be floats (with correspondingly float defaults)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm the indentation was matched in my text editor....
Changed to double... Ditto for the other similar comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the "usual" mixture of tabs and spaces, works with one tab width but not others.
@@ -50,7 +52,7 @@ class Track : public TrackBase | |||
bool innerOk() const { | |||
return extra_->innerOk(); | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the empty space change is not necessary
// Velocity at the reference point on the track | ||
inline double TrackBase::beta() const | ||
{ | ||
return beta_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an absolute velocity, or is it normalized to c? Please clarify in the comments.
// error on beta | ||
inline double TrackBase::betaError() const | ||
{ | ||
return std::sqrt(covbetabeta_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should also be a way to get these without sqrt.
Perhaps covarianceT0T0 and covarianceBetaBeta.
BTW, are the two strictly related by a track-dependent constant or is there a T0Beta term?
DataFormats/TrackReco/src/Track.cc
Outdated
double covt0t0, double covbetabeta) : | ||
TrackBase(chi2, ndof, vertex, momentum, charge, cov, algo, quality, | ||
0,0, // nloops and stop reason | ||
t0,beta,covt0t0,covbetabeta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
@@ -89,10 +89,15 @@ TrackBase::TrackBase() : | |||
|
|||
TrackBase::TrackBase(double chi2, double ndof, const Point &vertex, const Vector &momentum, | |||
int charge, const CovarianceMatrix &cov, TrackAlgorithm algorithm, | |||
TrackQuality quality, signed char nloops, uint8_t stopReason): | |||
TrackQuality quality, signed char nloops, uint8_t stopReason, | |||
double t0, double beta, double covt0t0, double covbetabeta): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
|
||
/// norm of the particle velocity at innermost point on track | ||
/// can multiply by momentum_.Unit() to get velocity vector | ||
float beta_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please define default values here or in the default constructor.
I can't recall now if they also should be specified in the ioread rules (it's easy to check by reading an old file and checking what's in covt0t0_ )
@lgray |
I'll update this by the end of today. |
@lgray |
@slava77 working on it now! |
Comparison is ready Comparison Summary:
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
please test workflow 22434.0 |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
Add time, velocity, and corresponding diagonal covariance terms to reco::TrackBase.
These (in addition to #24419) are the minimal changes needed for MTD development.
This is purely technical, getting it in place so that we can ease development.