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;
int Charge
electric charge type
virtual int pdgId() const
PDG identifier.
virtual double p() const
magnitude of momentum vector
static const unsigned int longLivedTag
long lived flag
virtual void setMassConstraint()
set mass constraint flag
edm::Ref< Container > Ref
virtual float massSqr() const
mass squared
LorentzVector p4Cartesian_
internal cache for p4
void clearCache() const
clear internal cache
daughter_iterator< S >::type endFilter(const S &s) const
math::XYZVector Vector
point in the space
virtual float pt() const
transverse momentum
virtual double et() const
transverse energy
candidate::const_iterator const_iterator
virtual void setCharge(Charge q)
set electric charge
size_type numberOf() const
number of components
virtual double vertexChi2() const
chi-squares
int pdgId_
PDG identifier.
virtual void setStatus(int status)
set status word
virtual const Point & vertex() const
vertex position (overwritten by PF...)
size_type numberOf() const
number of components
virtual int status() const
status word
virtual bool isConvertedPhoton() const
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
virtual float phi() const
momentum azimuthal angle
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 Vector momentum() const
spatial momentum vector
virtual bool isPhoton() const
virtual double y() const
rapidity
virtual bool isStandAloneMuon() const
virtual void setP4(const LorentzVector &p4)
set 4-momentum
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
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 bool longLived() const
is long lived?
virtual bool isMuon() const
virtual void setP4(const PolarLorentzVector &p4)
set 4-momentum
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.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
static double magd(GlobalVector v)
virtual bool isGlobalMuon() const
virtual double energy() const
energy
virtual const CandidatePtr & masterClonePtr() const
virtual const Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
CovarianceMatrix vertexCovariance() const
return SMatrix
virtual ~LeafCandidate()
destructor
virtual void setThreeCharge(Charge qx3)
set electric charge
virtual bool hasMasterClone() const
Ref masterRef() const
cast master clone reference to a concrete type
virtual float eta() const
momentum pseudorapidity
LeafCandidate(const Candidate &c)
virtual int charge() const
electric charge
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 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 int threeCharge() const
electric charge
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 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 theta() const
momentum polar angle
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
boost::filter_iterator< S, const_iterator > type
virtual bool isCaloMuon() const
virtual void setPz(double pz)
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 double px() const
x coordinate of momentum vector
virtual void setLongLived()
set long lived flag
virtual bool isTrackerMuon() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual double mt() const
transverse mass
void cacheCartesian() const
set internal cache
virtual bool isJet() const
double S(const TLorentzVector &, const TLorentzVector &)
virtual double pz() const
z coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
LeafCandidate()
default constructor
virtual double rapidity() const
rapidity
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 Vector boostToCM() const
T perp() const
Magnitude of transverse component.
virtual const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
virtual size_t numberOfMothers() const
number of mothers
virtual const CandidateBaseRef & masterClone() const
virtual void setPdgId(int pdgId)
math::XYZVector Vector
point in the space
virtual double mtSqr() const
transverse mass squared
virtual double vx() const
x coordinate of vertex position
math::XYZPoint Point
point in the space
virtual float mass() const
mass
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 setMass(double m)
set particle mass
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual bool massConstraint() const
do mass constraint?
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.
virtual double py() const
y coordinate of momentum 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)
math::XYZPoint Point
point in the space
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.