1 #ifndef __AnalysisDataFormats_PackedGenParticle_h__
2 #define __AnalysisDataFormats_PackedGenParticle_h__
34 :
p4_(0,0,0,0),
p4c_(0,0,0,0),
vertex_(0,0,0),
pdgId_(0),
charge_(0),
unpacked_(
false) { }
36 :
p4_(c.
pt(), c.
eta(), c.
phi(), c.
mass()),
p4c_(
p4_),
vertex_(0,0,0),
pdgId_(c.
pdgId()),
charge_(c.
charge()),
mother_(c.
motherRef(0)),
unpacked_(
true),
39 :
p4_(c.
pt(), c.
eta(), c.
phi(), c.
mass()),
p4c_(
p4_),
vertex_(0,0,0),
pdgId_(c.
pdgId()),
charge_(c.
charge()),
mother_(mother),
unpacked_(
true),
95 double et()
const {
return (
pt()<=0) ? 0 :
p4c_.Et(); }
97 double et2()
const {
return (
pt()<=0) ? 0 :
p4c_.Et2(); }
168 virtual float dxy(
const Point &
p)
const ;
170 virtual float dz(
const Point &
p)
const ;
231 template<
typename Ref>
236 virtual bool isMuon()
const;
243 virtual bool isJet()
const;
282 void pack(
bool unpackAfterwards=
true) ;
304 template<
typename,
typename,
typename>
friend struct component;
305 friend class ::OverlapChecker;
virtual PackedGenParticle * clone() const
returns a clone of the Candidate object
virtual double vx() const
x coordinate of vertex position
virtual void setStatus(int status)
set status word
virtual double pz() const
z coordinate of momentum vector
Point vertex_
vertex position
virtual Vector boostToCM() const
edm::Ref< Container > Ref
reco::GenStatusFlags & statusFlags()
edm::Ref< pat::PackedGenParticleCollection > PackedGenParticleRef
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
static const unsigned int longLivedTag
long lived flag
CovarianceMatrix vertexCovariance() const
return SMatrix
virtual size_t numberOfMothers() const
number of mothers
math::XYZVector Vector
point in the space
friend class ShallowCloneCandidate
virtual void setVertex(const Point &vertex)
set vertex
virtual double vertexNdof() const
virtual int threeCharge() const
electric charge
int pdgId_
PDG identifier.
virtual void setP4(const PolarLorentzVector &p4)
set 4-momentum
bool isDirectPromptTauDecayProduct() const
virtual void setP4(const LorentzVector &p4)
set 4-momentum
bool fromHardProcessFinalState() const
virtual double vy() const
y coordinate of vertex position
virtual int status() const
status word
virtual bool isTrackerMuon() const
virtual reco::CandidatePtr sourceCandidatePtr(size_type i) const
bool isDirectHardProcessTauDecayProduct() const
virtual bool isJet() const
virtual ~PackedGenParticle()
destructor
virtual double pt() const
transverse momentum
virtual const reco::Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
friend class ShallowClonePtrCandidate
virtual double mtSqr() const
transverse mass squared
virtual size_t numberOfSourceCandidatePtrs() const
PackedGenParticle()
default constructor
virtual bool isElectron() const
get a component
virtual double theta() const
momentum polar angle
virtual bool isPhoton() const
PolarLorentzVector p4_
the four vector
void pack(bool unpackAfterwards=true)
virtual double phi() const
momentum azimuthal angle
bool fromHardProcess() const
virtual Vector momentum() const
spatial momentum vector
math::XYZPoint Point
point in the space
virtual double vertexNormalizedChi2() const
chi-squared divided by n.d.o.f.
virtual double p() const
magnitude of momentum vector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void setLongLived()
set long lived flag
PackedGenParticle(const reco::GenParticle &c)
virtual void setThreeCharge(int threecharge)
set electric charge
virtual double massSqr() const
mass squared
bool isDirectPromptTauDecayProductFinalState() const
virtual void setPz(double pz)
reco::GenParticleRef mother_
Ref to first mother.
virtual void setMassConstraint()
set mass constraint flag
virtual double eta() const
momentum pseudorapidity
bool isDirectHardProcessTauDecayProductFinalState() const
virtual bool isMuon() const
virtual const Point & vertex() const
vertex position
virtual bool longLived() const
is long lived?
math::XYZVector Vector
point in the space
virtual const reco::CandidateBaseRef & masterClone() const
virtual double vertexChi2() const
chi-squares
virtual size_t numberOfDaughters() const
number of daughters
virtual const LorentzVector & p4() const
four-momentum Lorentz vecto r
virtual bool isStandAloneMuon() const
bool isPromptFinalState() const
virtual const reco::CandidatePtr & masterClonePtr() const
virtual double mt() const
transverse mass
virtual bool hasMasterClonePtr() const
const reco::GenParticleRef & motherRef() const
direct access to the mother reference (may be null)
PackedGenParticle(const reco::GenParticle &c, const edm::Ref< reco::GenParticleCollection > &mother)
virtual void setPdgId(int pdgId)
virtual double y() const
rapidity
static const unsigned int massConstraintTag
do mass constraint flag
virtual int pdgId() const
PDG identifier.
reco::CandidateCollection daughters
collection of daughter candidates
virtual bool overlap(const reco::Candidate &) const
check overlap with another Candidate
virtual const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
virtual bool hasMasterClone() const
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< pat::PackedGenParticle > PackedGenParticleCollection
const reco::GenStatusFlags & statusFlags() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual double energy() const
energy
virtual bool isCaloMuon() const
virtual bool isGlobalMuon() const
virtual const reco::Candidate * mother(size_type) const
return mother at a given position (throws an exception)
virtual double rapidity() const
rapidity
virtual double mass() const
mass
virtual int charge() const
electric charge
virtual bool isConvertedPhoton() const
reco::GenStatusFlags statusFlags_
math::XYZPoint Point
point in the space
virtual bool massConstraint() const
do mass constraint?
double et2() const
transverse energy squared (use this for cuts)!
virtual void setCharge(int charge)
set electric charge
virtual double py() const
y coordinate of momentum vector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
volatile std::atomic< bool > shutdown_flag false
double et() const
transverse energy
virtual void setMass(double m)
set particle mass
virtual double px() const
x coordinate of momentum vector
Ref masterRef() const
cast master clone reference to a concrete type
edm::RefVector< pat::PackedGenParticleCollection > PackedGenParticleRefVector
virtual float dz() const
dz with respect to the PV ref
virtual float dxy() const
dxy with respect to the PV ref
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual double vz() const
z coordinate of vertex position
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.