1 #ifndef Candidate_LeafCandidate_h
2 #define Candidate_LeafCandidate_h
38 static double magd(
GlobalVector v) {
return std::sqrt(
double(v.x())*
double(v.x()) +
double(v.y())*
double(v.y()) +
double(v.z())*
double(v.z()) );}
56 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
64 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
71 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
75 if ( integerCharge )
qx3_ *= 3;
79 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
83 if ( integerCharge )
qx3_ *= 3;
88 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
90 vertex_( vtx ),
pdgId_(
pdgId ),
status_(
status ),
p4Polar_(
pt_,
eta_,
phi_,
mass_),
p4Cartesian_(p3.
x(),p3.
y(),p3.
z(), massless ?
magd(p3) : iEnergy),
92 if ( integerCharge )
qx3_ *= 3;
98 int pdgId = 0,
int status = 0,
bool integerCharge =
true ) :
100 vertex_( vtx ),
pdgId_(
pdgId ),
status_(
status ),
p4Polar_(
pt_,
eta_,
phi_,
mass_),
p4Cartesian_(p3.
x(),p3.
y(),p3.
z(), iEnergy),
102 if ( integerCharge )
qx3_ *= 3;
292 template<
typename Ref>
296 template<
typename T>
T get()
const {
298 else return reco::get<T>( * this );
301 template<
typename T,
typename Tag>
T get()
const {
303 else return reco::get<T, Tag>( * this );
308 else return reco::get<T>( *
this,
i );
313 else return reco::get<T, Tag>( *
this,
i );
318 else return reco::numberOf<T>( * this );
323 else return reco::numberOf<T, Tag>( * this );
328 typedef boost::filter_iterator<S, const_iterator>
type;
333 return boost::make_filter_iterator(s,
begin(),
end());
337 return boost::make_filter_iterator(s,
end(),
end());
342 virtual bool isMuon()
const;
349 virtual bool isJet()
const;
388 template<
typename,
typename,
typename>
friend struct component;
389 friend class ::OverlapChecker;
virtual void setLongLived() GCC11_FINAL
set long lived flag
virtual double energy() const GCC11_FINAL
energy
int Charge
electric charge type
virtual double et() const GCC11_FINAL
transverse energy
static const unsigned int longLivedTag
long lived flag
virtual void setCharge(Charge q) GCC11_FINAL
set electric charge
edm::Ref< Container > Ref
LorentzVector p4Cartesian_
internal cache for p4
virtual bool longLived() const GCC11_FINAL
is long lived?
void clearCache() const
clear internal cache
daughter_iterator< S >::type endFilter(const S &s) const
math::XYZVector Vector
point in the space
virtual double p() const GCC11_FINAL
magnitude of momentum vector
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
candidate::const_iterator const_iterator
size_type numberOf() const
number of components
virtual double vertexChi2() const
chi-squares
int pdgId_
PDG identifier.
virtual const Point & vertex() const
vertex position (overwritten by PF...)
size_type numberOf() const
number of components
virtual int pdgId() const GCC11_FINAL
PDG identifier.
virtual bool isConvertedPhoton() const
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
daughter_iterator< S >::type beginFilter(const S &s) const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
CandidateCollection daughters
collection of daughter candidates
float pt_
four-momentum Lorentz vector
virtual bool isPhoton() const
virtual bool isStandAloneMuon() const
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
virtual double theta() const GCC11_FINAL
momentum polar angle
virtual void setMass(double m) GCC11_FINAL
set particle mass
candidate::iterator_imp_specific< daughters > iterator_imp_specific
Point vertex_
vertex position
LeafCandidate(Charge q, const GlobalVector &p3, float iEnergy, bool massless, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
virtual double vy() const
y coordinate of vertex position
virtual double pz() const GCC11_FINAL
z coordinate of momentum vector
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
virtual bool isMuon() const
static const unsigned int massConstraintTag
do mass constraint flag
virtual size_t numberOfDaughters() const
number of daughters
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
virtual bool massConstraint() const GCC11_FINAL
do mass constraint?
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
static double magd(GlobalVector v)
virtual bool isGlobalMuon() const
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual const CandidatePtr & masterClonePtr() const
virtual const Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
virtual double rapidity() const GCC11_FINAL
rapidity
virtual ~LeafCandidate()
destructor
virtual void setStatus(int status) GCC11_FINAL
set status word
virtual int status() const GCC11_FINAL
status word
virtual bool hasMasterClone() const
Ref masterRef() const
cast master clone reference to a concrete type
LeafCandidate(const Candidate &c)
virtual void setMassConstraint() GCC11_FINAL
set mass constraint flag
LeafCandidate(Charge q, const GlobalVector &p3, float iEnergy, float imass, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
virtual CandidatePtr sourceCandidatePtr(size_type i) const
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
virtual double vertexNormalizedChi2() const
chi-squared divided by n.d.o.f.
LeafCandidate(Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
static double dmass(GlobalVector v, double e)
virtual double mt() const GCC11_FINAL
transverse mass
LeafCandidate(Charge q, const PtEtaPhiMass &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
virtual bool overlap(const Candidate &) const
check overlap with another Candidate
virtual double vz() const
z coordinate of vertex position
virtual Vector boostToCM() const GCC11_FINAL
virtual bool hasMasterClonePtr() const
virtual const_iterator begin() const
first daughter const_iterator
virtual void setVertex(const Point &vertex)
set vertex
virtual bool isElectron() const
virtual double y() const GCC11_FINAL
rapidity
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
virtual bool isCaloMuon() const
virtual void setThreeCharge(Charge qx3) GCC11_FINAL
set electric charge
virtual float mass() const GCC11_FINAL
mass
candidate::iterator iterator
LeafCandidate(Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from values
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
virtual size_t numberOfSourceCandidatePtrs() const
virtual bool isTrackerMuon() const
virtual const PolarLorentzVector & polarP4() const GCC11_FINAL
four-momentum Lorentz vector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual int charge() const GCC11_FINAL
electric charge
XYZPointD XYZPoint
point in space with cartesian internal representation
void cacheCartesian() const
set internal cache
CovarianceMatrix vertexCovariance() const GCC11_FINAL
return SMatrix
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
virtual void setP4(const PolarLorentzVector &p4) GCC11_FINAL
set 4-momentum
virtual bool isJet() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
LeafCandidate()
default constructor
virtual double mtSqr() const GCC11_FINAL
transverse mass squared
LeafCandidate(Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
constructor from Any values
virtual float massSqr() const GCC11_FINAL
mass squared
T perp() const
Magnitude of transverse component.
virtual size_t numberOfMothers() const
number of mothers
virtual const CandidateBaseRef & masterClone() const
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
math::XYZVector Vector
point in the space
virtual int threeCharge() const GCC11_FINAL
electric charge
virtual double vx() const
x coordinate of vertex position
math::XYZPoint Point
point in the space
bool cachePolarFixed_
has cache been set?
volatile std::atomic< bool > shutdown_flag false
virtual LeafCandidate * clone() const
returns a clone of the Candidate object
virtual void setPz(double pz) GCC11_FINAL
virtual float pt() const GCC11_FINAL
transverse momentum
virtual void setPdgId(int pdgId) GCC11_FINAL
value_type const * get() const
virtual const_iterator end() const
last daughter const_iterator
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
virtual double vertexNdof() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
bool cacheCartesianFixed_
int Charge
electric charge type
Charge qx3_
electric charge
virtual const Candidate * mother(size_type) const
return mother at a given position (throws an exception)
boost::filter_iterator< S, const_iterator > type
math::XYZPoint Point
point in the space
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.