1 #ifndef __DataFormats_PatCandidates_PackedCandidate_h__
2 #define __DataFormats_PatCandidates_PackedCandidate_h__
32 :
p4_(0,0,0,0),
p4c_(0,0,0,0),
vertex_(0,0,0),
dphi_(0),
pdgId_(0),
qualityFlags_(0),
unpacked_(
false),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
packedHits_(0) { }
34 :
p4_(c.
pt(), c.
eta(), c.
phi(), c.
mass()),
p4c_(
p4_),
vertex_(c.
vertex()),
dphi_(0),
pdgId_(c.
pdgId()),
qualityFlags_(0),
pvRef_(pv),
unpacked_(
true) ,
unpackedVtx_(
true),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
packedHits_(0){
packBoth(); }
37 :
p4_(p4),
p4c_(
p4_),
vertex_(vtx),
dphi_(
reco::
deltaPhi(phiAtVtx,
p4_.
phi())),
pdgId_(pdgId),
qualityFlags_(0),
pvRef_(pv),
unpacked_(
true),
unpackedVtx_(
true),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
packedHits_(0) {
packBoth(); }
40 :
p4_(p4.
Pt(), p4.
Eta(), p4.
Phi(), p4.M()),
p4c_(p4),
vertex_(vtx),
dphi_(
reco::
deltaPhi(phiAtVtx,
p4_.
phi())),
pdgId_(pdgId),
qualityFlags_(0),
pvRef_(pv),
unpacked_(
true),
unpackedVtx_(
true),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
packedHits_(0) {
packBoth(); }
133 while (ret >
float(
M_PI)) ret -= 2*float(
M_PI);
134 while (ret < -
float(
M_PI)) ret += 2*float(
M_PI);
174 dzdz_ = covariance(4,4);
183 if (numberOfPixelHits_ > 7) numberOfPixelHits_ = 7;
185 if (numberOfStripHits_ > 31) numberOfStripHits_ = 31;
186 packedHits_ = (numberOfPixelHits_&0x7) | (numberOfStripHits_ << 3);
221 virtual float dxy(
const Point &
p)
const ;
223 virtual float dz(
const Point &
p)
const ;
250 int lost = hits;
if (lost > 2) lost = 2;
256 int16_t muonFlags = isStandAlone | (2*isGlobal);
318 template<
typename Ref>
368 virtual bool isMuon()
const {
return false; }
375 virtual bool isJet()
const {
return false; }
383 void pack(
bool unpackAfterwards=
true) ;
385 void packVtx(
bool unpackAfterwards=
true) ;
415 template<
typename,
typename,
typename>
friend struct component;
416 friend class ::OverlapChecker;
virtual void setP4(const LorentzVector &p4)
set 4-momentum
void setMuonID(bool isStandAlone, bool isGlobal)
virtual void setVertex(const Point &vertex)
set vertex
virtual void setTrackProperties(const reco::Track &tk, const reco::Track::CovarianceMatrix &covariance)
set impact parameters covariance
edm::Ref< Container > Ref
virtual size_t numberOfMothers() const
number of mothers
virtual bool hasMasterClonePtr() const
virtual float phi() const
momentum azimuthal angle
virtual void setPdgId(int pdgId)
virtual float massSqr() const
mass squared
math::XYZVector Vector
point in the space
virtual float dzError() const
uncertainty on dz
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void setFromPV(PVAssoc fromPV)
PackedCandidate(const PolarLorentzVector &p4, const Point &vtx, float phiAtVtx, int pdgId, const reco::VertexRef &pv)
candidate::const_iterator const_iterator
virtual const_iterator begin() const
first daughter const_iterator
virtual bool isCaloMuon() const
void maybeUnpackBoth() const
static const unsigned int longLivedTag
long lived flag
int numberOfValidHits() const
virtual double y() const
rapidity
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
static const unsigned int massConstraintTag
do mass constraint flag
virtual double mtSqr() const
transverse mass squared
std::vector< pat::PackedCandidate > PackedCandidateCollection
math::XYZPoint Point
point in the space
virtual double vertexNdof() const
int8_t packedCovarianceDphiDphi_
virtual void setStatus(int status)
set status word
virtual double vx() const
x coordinate of vertex position
virtual bool overlap(const reco::Candidate &) const
check overlap with another Candidate
virtual bool isPhoton() const
int8_t packedCovarianceDptDpt_
virtual void setP4(const PolarLorentzVector &p4)
set 4-momentum
virtual float pt() const
transverse momentum
const reco::VertexRef vertexRef() const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
CovarianceMatrix covariance() const
return track covariance matrix
uint16_t packedCovarianceDzDz_
int8_t packedCovarianceDetaDeta_
uint16_t packedCovarianceDxyDz_
Ref masterRef() const
cast master clone reference to a concrete type
PolarLorentzVector p4_
the four vector
void setVertexRef(const reco::VertexRef &vertexRef)
set reference to the primary vertex
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
reco::CandidateCollection daughters
collection of daughter candidates
virtual const reco::Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
qualityFlagsShiftsAndMasks
virtual void setTrackProperties(const reco::Track &tk)
virtual bool isTrackerMuon() const
virtual void setLongLived()
set long lived flag
virtual bool isConvertedPhoton() const
virtual void setMassConstraint()
set mass constraint flag
virtual bool isMuon() const
virtual PackedCandidate * clone() const
returns a clone of the Candidate object
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual double py() const
y coordinate of momentum vector
bool trackHighPurity() const
true if the track had the highPurity quality bit
LostInnerHits lostInnerHits() const
virtual int status() const
status word
PackedCandidate()
default constructor
virtual double rapidity() const
rapidity
virtual const reco::CandidateBaseRef & masterClone() const
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
friend class ShallowCloneCandidate
virtual double energy() const
energy
Abs< T >::type abs(const T &t)
virtual bool isJet() const
virtual int charge() const
electric charge
virtual double theta() const
momentum polar angle
virtual int threeCharge() const
electric charge
virtual double vertexNormalizedChi2() const
chi-squared divided by n.d.o.f.
Point vertex_
vertex position
virtual void setThreeCharge(int threecharge)
set electric charge
virtual double et() const
transverse energy
int8_t packedCovarianceDlambdaDz_
virtual void setPz(double pz)
virtual double mt() const
transverse mass
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int numberOfPixelHits() const
virtual const reco::CandidatePtr & masterClonePtr() const
virtual double vy() const
y coordinate of vertex position
virtual const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
LostInnerHits
Enumerator specifying the.
uint8_t normalizedChi2_
track quality information
int8_t packedCovarianceDphiDxy_
candidate::iterator iterator
virtual size_t numberOfSourceCandidatePtrs() const
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
virtual Vector momentum() const
spatial momentum vector
virtual bool isGlobalMuon() const
PackedCandidate(const LorentzVector &p4, const Point &vtx, float phiAtVtx, int pdgId, const reco::VertexRef &pv)
virtual bool massConstraint() const
do mass constraint?
float dxydxy_
IP covariance.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::RefVector< pat::PackedCandidateCollection > PackedCandidateRefVector
edm::Ref< reco::VertexCollection > pvRef_
Ref to primary vertex.
virtual Vector boostToCM() const
uint16_t packedCovarianceDxyDxy_
virtual double vz() const
z coordinate of vertex position
reco::candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
virtual void setMass(double m)
set particle mass
virtual reco::CandidatePtr sourceCandidatePtr(size_type i) const
virtual float phiAtVtx() const
momentum azimuthal angle from the track (normally identical to phi())
math::XYZTLorentzVector LorentzVector
Lorentz vector.
int pdgId_
PDG identifier.
virtual const Point & vertex() const
vertex position
virtual size_t numberOfDaughters() const
number of daughters
CovarianceMatrix vertexCovariance() const
return SMatrix
virtual bool isStandAloneMuon() const
friend class ShallowClonePtrCandidate
virtual bool longLived() const
is long lived?
virtual const reco::Candidate * mother(size_type) const
return mother at a given position (throws an exception)
virtual void setCharge(int charge)
set electric charge
virtual float mass() const
mass
void packVtx(bool unpackAfterwards=true)
void setLostInnerHits(LostInnerHits hits)
int numberOfValidPixelHits() const
virtual const LorentzVector & p4() const
four-momentum Lorentz vecto r
math::XYZPoint Point
point in the space
void pack(bool unpackAfterwards=true)
virtual bool isElectron() const
get a component
virtual double px() const
x coordinate of momentum vector
volatile std::atomic< bool > shutdown_flag false
virtual float eta() const
momentum pseudorapidity
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
void setTrackHighPurity(bool highPurity)
set to true if the track had the highPurity quality bit
const PVAssoc fromPV() const
virtual ~PackedCandidate()
destructor
virtual int pdgId() const
PDG identifier.
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 double pz() const
z coordinate of momentum vector
virtual float dxyError() const
uncertainty on dxy
reco::candidate::iterator_imp_specific< daughters > iterator_imp_specific
virtual float dz() const
dz with respect to the PV ref
math::XYZVector Vector
point in the space
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
virtual double p() const
magnitude of momentum vector
virtual bool hasMasterClone() const
PackedCandidate(const reco::Candidate &c, const reco::VertexRef &pv)
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.