1 #ifndef __DataFormats_PatCandidates_PackedCandidate_h__
2 #define __DataFormats_PatCandidates_PackedCandidate_h__
31 :
p4_(0,0,0,0),
p4c_(0,0,0,0),
vertex_(0,0,0),
dphi_(0),
pdgId_(0),
qualityFlags_(0),
unpacked_(
false),
unpackedVtx_(
true),
unpackedTrk_(
false),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
dptdpt_(0),
detadeta_(0),
dphidphi_(0),
packedHits_(0),
normalizedChi2_(0) { }
33 :
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),
unpackedTrk_(
false),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
dptdpt_(0),
detadeta_(0),
dphidphi_(0),
packedHits_(0),
normalizedChi2_(0) {
packBoth(); }
36 :
p4_(p4),
p4c_(
p4_),
vertex_(vtx),
dphi_(
reco::
deltaPhi(phiAtVtx,
p4_.
phi())),
pdgId_(pdgId),
qualityFlags_(0),
pvRef_(pv),
unpacked_(
true),
unpackedVtx_(
true),
unpackedTrk_(
false),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
dptdpt_(0),
detadeta_(0),
dphidphi_(0),
packedHits_(0),
normalizedChi2_(0) {
packBoth(); }
39 :
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),
unpackedTrk_(
false),
dxydxy_(0),
dzdz_(0),
dxydz_(0),
dlambdadz_(0),
dphidxy_(0),
dptdpt_(0),
detadeta_(0),
dphidphi_(0),
packedHits_(0),
normalizedChi2_(0) {
packBoth(); }
100 double et()
const {
return (
pt()<=0) ? 0 :
p4c_.Et(); }
102 double et2()
const {
return (
pt()<=0) ? 0 :
p4c_.Et2(); }
126 while (ret >
float(
M_PI)) ret -= 2*float(
M_PI);
127 while (ret < -
float(
M_PI)) ret += 2*float(
M_PI);
167 dzdz_ = covariance(4,4);
176 if (numberOfPixelHits_ > 7) numberOfPixelHits_ = 7;
178 if (numberOfStripHits_ > 31) numberOfStripHits_ = 31;
179 packedHits_ = (numberOfPixelHits_&0x7) | (numberOfStripHits_ << 3);
228 virtual float dxy(
const Point &
p)
const ;
230 virtual float dz(
const Point &
p)
const ;
267 int lost = hits;
if (lost > 2) lost = 2;
273 int16_t muonFlags = isStandAlone | (2*isGlobal);
335 template<
typename Ref>
339 virtual bool isMuon()
const {
return false; }
346 virtual bool isJet()
const {
return false; }
359 void pack(
bool unpackAfterwards=
true) ;
361 void packVtx(
bool unpackAfterwards=
true) ;
398 template<
typename,
typename,
typename>
friend struct component;
399 friend class ::OverlapChecker;
float puppiWeight() const
Set both weights at once (with option for only full PUPPI)
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
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 void setPdgId(int pdgId)
math::XYZVector Vector
point in the space
float puppiWeightNoLep() const
Weight from full PUPPI.
void setPuppiWeight(float p, float p_nolep=0.0)
virtual float dzError() const
uncertainty on dz
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
virtual const reco::Track * bestTrack() const
return a pointer to the track if present. otherwise, return a null pointer
PackedCandidate(const PolarLorentzVector &p4, const Point &vtx, float phiAtVtx, int pdgId, const reco::VertexRef &pv)
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 double pt() const
transverse momentum
virtual void setStatus(int status)
set status word
key_type key() const
Accessor for product key.
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
virtual double eta() const
momentum pseudorapidity
int8_t packedCovarianceDptDpt_
virtual void setP4(const PolarLorentzVector &p4)
set 4-momentum
const reco::VertexRef vertexRef() const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
uint16_t packedCovarianceDzDz_
int8_t packedCovarianceDetaDeta_
uint16_t packedPt_
Weight from PUPPI removing leptons.
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)
virtual double phi() const
momentum azimuthal angle
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 double mass() const
mass
virtual bool isConvertedPhoton() const
virtual void setMassConstraint()
set mass constraint flag
virtual bool isMuon() const
reco::Track track_
reco::Track
const PVAssociationQuality pvAssociationQuality() const
virtual PackedCandidate * clone() const
returns a clone of the Candidate object
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const PVAssoc fromPV(size_t ipv=0) const
CovarianceMatrix covariance() const
return track covariance matrix
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
int8_t packedPuppiweight_
virtual double energy() const
energy
double et2() const
transverse energy squared (use this for cuts)!
Abs< T >::type abs(const T &t)
virtual bool isJet() const
virtual int charge() const
electric charge
virtual const reco::Track & pseudoTrack() const
Return reference to a pseudo track made with candidate kinematics, parameterized error for eta...
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
int8_t packedCovarianceDlambdaDz_
virtual void setPz(double pz)
virtual double mt() const
transverse mass
virtual float dzAssociatedPV() const
dz with respect to the PV ref
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_
PVAssoc
This refers to the association to PV=ipv. >=PVLoose corresponds to JME definition, >=PVTight to isolation definition.
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
int8_t packedPuppiweightNoLepDiff_
PackedCandidate(const LorentzVector &p4, const Point &vtx, float phiAtVtx, int pdgId, const reco::VertexRef &pv)
virtual bool massConstraint() const
do mass constraint?
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
float dxydxy_
IP covariance.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual double massSqr() const
mass squared
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
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
static int position[264][3]
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
double et() const
transverse energy
virtual double px() const
x coordinate of momentum vector
volatile std::atomic< bool > shutdown_flag false
virtual float dxy() const
dxy with respect to the PV ref
virtual double vertexChi2() const
chi-squares
void setTrackHighPurity(bool highPurity)
set to true if the track had the highPurity quality bit
virtual ~PackedCandidate()
destructor
virtual int pdgId() const
PDG identifier.
virtual double pz() const
z coordinate of momentum vector
virtual float dxyError() const
uncertainty on dxy
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)
C const * product() const
Accessor for product collection.
void setAssociationQuality(PVAssociationQuality q)
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.