8 using namespace logintpack;
15 if (unpackAfterwards)
unpack();
19 Point pv = pvRef_.isNonnull() ? pvRef_->position() :
Point();
20 float dxPV = vertex_.X() - pv.X(), dyPV = vertex_.Y() - pv.Y();
22 dxy_ = - dxPV * s + dyPV *
c;
26 float pzpt = p4_.Pz()/p4_.Pt();
27 dz_ = vertex_.Z() - pv.Z() - (dxPV*c + dyPV*
s) * pzpt;
39 packedCovarianceDetaDeta_ =
pack8logCeil(detadeta_,-20,-5);
40 packedCovarianceDphiDphi_ =
pack8logCeil(dphidphi_,-15,0);
41 packedCovarianceDphiDxy_ =
pack8log(dphidxy_,-17,-4);
42 packedCovarianceDlambdaDz_ =
pack8log(dlambdadz_,-17,-4);
60 if (unpackAfterwards) unpackVtx();
75 Point pv = pvRef_.isNonnull() ? pvRef_->position() :
Point();
77 vertex_ =
Point(pv.X() - dxy_ *
s,
83 dphidxy_ =
unpack8log(packedCovarianceDphiDxy_,-17,-4);
84 dlambdadz_ =
unpack8log(packedCovarianceDlambdaDz_,-17,-4);
85 dptdpt_ =
unpack8log(packedCovarianceDptDpt_,-15,0);
86 detadeta_ =
unpack8log(packedCovarianceDetaDeta_,-20,-5);
87 dphidphi_ =
unpack8log(packedCovarianceDphiDphi_,-15,0);
116 return -(vertex_.X()-p.X()) *
std::sin(
float(p4_.Phi())) + (vertex_.Y()-p.Y()) *
std::cos(
float(p4_.Phi()));
120 return (vertex_.Z()-p.Z()) - ((vertex_.X()-p.X()) *
std::cos(
float(p4_.Phi())) + (vertex_.Y()-p.Y()) *
std::sin(
float(p4_.Phi()))) * p4_.Pz()/p4_.Pt();
129 m(0,0)=dptdpt_/
pt()/
pt();
131 m(2,2)=dphidphi_/
pt()/
pt();
141 int numberOfPixelHits_ = packedHits_ & 0x7 ;
142 int numberOfHits_ = (packedHits_>>3) + numberOfPixelHits_;
144 int ndof = numberOfHits_+numberOfPixelHits_-5;
149 case validHitInFirstPixelBarrelLayer:
153 case noLostInnerHits:
155 case oneLostInnerHit:
158 case moreLostInnerHits:
163 for(;i<numberOfPixelHits_; i++) {
166 for(;i<numberOfHits_;i++) {
171 tk.setTrackerExpectedHitsInner(hpExpIn);
196 <<
"this Candidate has no master clone reference."
197 <<
"Can't call masterClone() method.\n";
211 <<
"this Candidate has no master clone ptr."
212 <<
"Can't call masterClonePtr() method.\n";
238 <<
"This Candidate type does not implement daughter(std::string). "
239 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
244 <<
"This Candidate type does not implement daughter(std::string). "
245 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
268 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
273 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
virtual size_t numberOfMothers() const
number of mothers
virtual bool hasMasterClonePtr() const
virtual const_iterator begin() const
first daughter const_iterator
double unpack8log(int8_t i, double lmin, double lmax, uint8_t base=128)
int8_t pack8log(double x, double lmin, double lmax, uint8_t base=128)
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
Sin< T >::type sin(const T &t)
virtual double vertexNdof() const
void set(const I &begin, const I &end)
virtual bool overlap(const reco::Candidate &) const
check overlap with another Candidate
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
static float float16to32(uint16_t h)
int8_t pack8logCeil(double x, double lmin, double lmax, uint8_t base=128)
virtual const reco::Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
const T & max(const T &a, const T &b)
static uint16_t float32to16(float x)
Cos< T >::type cos(const T &t)
virtual const reco::CandidateBaseRef & masterClone() const
virtual const Point & vertex() const =0
vertex position
virtual double vertexNormalizedChi2() const
chi-squared divided by n.d.o.f.
virtual int charge() const =0
electric charge
virtual const reco::CandidatePtr & masterClonePtr() const
LostInnerHits
Enumerator specifying the.
void setHitPattern(const C &c)
set hit patterns from vector of hit references
virtual bool massConstraint() const
do mass constraint?
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual size_t numberOfDaughters() const
number of daughters
CovarianceMatrix vertexCovariance() const
return SMatrix
virtual bool longLived() const
is long lived?
virtual const reco::Candidate * mother(size_type) const
return mother at a given position (throws an exception)
void packVtx(bool unpackAfterwards=true)
math::XYZPoint Point
point in the space
void pack(bool unpackAfterwards=true)
virtual float dxy() const
dxy with respect to the PV ref
virtual const_iterator end() const
last daughter const_iterator
virtual double vertexChi2() const
chi-squares
virtual ~PackedCandidate()
destructor
virtual reco::Track pseudoTrack() const
Return by value (no caching heavy function) a pseudo track made with candidate kinematics, parameterized error for eta,phi,pt and full IP covariance.
virtual float dz() const
dz with respect to the PV ref
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
virtual bool hasMasterClone() const
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.