1 #ifndef TrackReco_TrackBase_h 2 #define TrackReco_TrackBase_h 182 float covbetabeta = -1.
f);
206 double theta()
const;
276 double dxy(
const Point &myBeamSpot)
const;
282 double dsz(
const Point &myBeamSpot)
const;
285 double dz(
const Point &myBeamSpot)
const;
306 double error(
int i)
const;
378 template <
typename C>
381 template <
typename I>
445 signed char nLoops()
const;
531 template <
typename I>
536 template <
typename C>
542 int a = (
i <=
j ?
i :
j);
543 int b = (
i <=
j ?
j :
i);
544 return b * (
b + 1) / 2 +
a;
576 return "undefQuality";
583 return "undefAlgorithm";
615 const auto thept =
pt();
616 const auto thepinv = 1 /
p();
617 const auto theptoverp = thept * thepinv;
618 return vz() * theptoverp - (
vx() *
px() +
vy() *
py()) / thept *
pz() * thepinv;
623 const auto thept2inv = 1 /
pt2();
624 return vz() - (
vx() *
px() +
vy() *
py()) *
pz() * thept2inv;
682 return (-(
vx() - myBeamSpot.x()) *
py() + (
vy() - myBeamSpot.y()) *
px()) /
pt();
694 const auto thept =
pt();
695 const auto thepinv = 1 /
p();
696 const auto theptoverp = thept * thepinv;
697 return (
vz() - myBeamSpot.z()) * theptoverp -
698 ((
vx() - myBeamSpot.x()) *
px() + (
vy() - myBeamSpot.y()) *
py()) / thept *
pz() * thepinv;
705 const auto theptinv2 = 1 /
pt2();
706 return (
vz() - myBeamSpot.z()) -
707 ((
vx() - myBeamSpot.x()) *
px() + (
vy() - myBeamSpot.y()) *
py()) *
pz() * theptinv2;
736 const auto thecharge =
charge();
738 if (thecharge != 0) {
739 const auto thept2 =
pt2();
740 const auto thep2 =
p2();
741 const auto thepz =
pz();
742 const auto ptimespt =
sqrt(thep2 * thept2);
743 const auto oneovercharge = 1 / thecharge;
822 const auto tot =
valid + lost + lostIn + lostOut;
bool quality(const TrackQuality) const
Track quality.
int numberOfLostTrackerHits(HitCategory category) const
bool appendMuonHitPattern(const DetId &id, TrackingRecHit::Type hitType)
uint8_t stopReason_
Stop Reason.
double qoverp() const
q / p
void setQualityMask(int qualMask)
double validFraction() const
fraction of valid hits on the track
double dszError() const
error on dsz
void setQuality(const TrackQuality)
int numberOfLostHits(HitCategory category) const
static std::string qualityName(TrackQuality)
unsigned int index
index type
int numberOfValidHits() const
bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo)
static index covIndex(index i, index j)
covariance matrix index in array
double lambda() const
Lambda angle.
uint8_t quality_
track quality
double betaError() const
error on beta
uint8_t originalAlgorithm_
track algorithm
double qoverpError() const
error on signed transverse curvature
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
unsigned short numberOfValidHits() const
number of valid hits found
AlgoMask algoMask() const
const Point & position() const
position
TrackBase()
default constructor
double t0Error() const
error on t0
double vx() const
x coordinate of the reference point on track
double covt0t0() const
error on t0
TrackQuality
track quality
char charge_
electric charge
double px() const
x coordinate of momentum vector
double p() const
momentum vector magnitude
Point vertex_
innermost (reference) point on track
double thetaError() const
error on theta
double py() const
y coordinate of momentum vector
double lambdaError() const
error on lambda
const Point & referencePoint() const
Reference point on the track.
math::Vector< dimension >::type ParameterVector
parameter vector
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
int missingOuterHits() const
number of hits expected from outer track extrapolation but missing
signed char nLoops_
number of loops made during the building of the trajectory of a looper particle
TrackAlgorithm
track algorithm
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
void setNLoops(signed char value)
double pt() const
track transverse momentum
void setOriginalAlgorithm(const TrackAlgorithm a)
TrackAlgorithm originalAlgo() const
double ndof() const
number of degrees of freedom of the fit
int charge() const
track electric charge
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
int missingInnerHits() const
number of hits expected from inner track extrapolation but missing
CovarianceMatrix covariance() const
return track covariance matrix
static const std::string qualityNames[]
void setStopReason(uint8_t value)
double dxyError() const
error on dxy
double vz() const
z coordinate of the reference point on track
bool appendTrackerHitPattern(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
unsigned long long algoMaskUL() const
double dzError() const
error on dz
std::bitset< algoSize > algoMask_
algo mask, bit set for the algo where it was reconstructed + each algo a track was found overlapping ...
TrackBase::TrackAlgorithm TrackAlgorithm
bool isAlgoInMask(TrackAlgorithm a) const
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
const std::complex< double > I
double phi() const
azimuthal angle of momentum vector
Covariance3DMatrix rotatedCovariance3D() const
void resetHitPattern()
Sets HitPattern as empty.
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
math::XYZPoint Point
point in the space
double covBetaBeta() const
error on beta
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
void setAlgoMask(AlgoMask a)
uint8_t stopReason() const
bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
std::string algoName() const
double error(int i) const
error on specified element
double eta() const
pseudorapidity of momentum vector
std::bitset< algoSize > AlgoMask
algo mask
TrackAlgorithm algo() const
static TrackQuality qualityByName(const std::string &name)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
float covt0t0_
errors for time and velocity (separate from cov for now)
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
double p2() const
momentum vector magnitude square
virtual ~TrackBase()
virtual destructor
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
double pz() const
z coordinate of momentum vector
double chi2() const
chi-squared of the fit
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
This class analyses the reconstruction quality for a given track.
signed char nLoops() const
reco::TrackBase::ParameterVector ParameterVector
float ndof_
number of degrees of freedom
double pt2() const
track transverse momentum square
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
static const std::string algoNames[]
double ptError2() const
error on Pt (set to 1000**2 TeV**2 if charge==0 for safety)
const Vector & momentum() const
track momentum vector
void setAlgorithm(const TrackAlgorithm a)
Track algorithm.
float t0_
time at the reference point on track
double theta() const
polar angle
float covariance_[covarianceSize]
perigee 5x5 covariance matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
HitPattern hitPattern_
hit pattern
double vy() const
y coordinate of the reference point on track
double beta() const
velocity at the reference point in natural units
static TrackAlgorithm algoByName(const std::string &name)
bool isTimeOk() const
return true if timing measurement is usable
Vector momentum_
momentum vector at innermost point
CovarianceMatrix & fill(CovarianceMatrix &v) const
fill SMatrix
ParameterVector parameters() const
Track parameters with one-to-one correspondence to the covariance matrix.
uint8_t algorithm_
track algorithm
double d0Error() const
error on d0
double phiError() const
error on phi
math::XYZVector Vector
spatial vector
int numberOfValidTrackerHits() const
bool appendHits(const C &c, const TrackerTopology &ttopo)
append hit patterns from vector of hit references
double etaError() const
error on eta
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
bool appendMuonHit(const DetId &id, TrackingRecHit::Type hitType)
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
double t0() const
time at the reference point