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;
151 if(innerLost == validHitInFirstPixelBarrelLayer){
155 for(;i<numberOfPixelHits_; i++) {
159 for(;i<numberOfHits_;i++) {
164 case validHitInFirstPixelBarrelLayer:
166 case noLostInnerHits:
168 case oneLostInnerHit:
171 case moreLostInnerHits:
186 <<
"this Candidate has no master clone reference."
187 <<
"Can't call masterClone() method.\n";
201 <<
"this Candidate has no master clone ptr."
202 <<
"Can't call masterClonePtr() method.\n";
228 <<
"This Candidate type does not implement daughter(std::string). "
229 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
234 <<
"This Candidate type does not implement daughter(std::string). "
235 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
258 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
263 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
float puppiWeight() const
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
virtual size_t numberOfMothers() const
number of mothers
virtual bool hasMasterClonePtr() const
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
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)
int8_t pack8logClosed(double x, double lmin, double lmax, uint8_t base=128)
static uint16_t float32to16(float x)
Cos< T >::type cos(const T &t)
virtual const reco::CandidateBaseRef & masterClone() const
bool appendHitPattern(const TrackingRecHit &hit)
append a single hit to the HitPattern
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.
virtual bool massConstraint() const
do mass constraint?
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void setPuppiWeight(float p)
virtual size_t numberOfDaughters() const
number of daughters
CovarianceMatrix vertexCovariance() const
return SMatrix
double unpack8logClosed(int8_t i, double lmin, double lmax, uint8_t base=128)
reverse of pack8logClosed
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 double vertexChi2() const
chi-squares
virtual ~PackedCandidate()
destructor
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.