12 if (unpackAfterwards) {
13 delete p4_.exchange(
nullptr);
14 delete p4c_.exchange(
nullptr);
24 float pz = std::tanh(y)*
std::sqrt((m*m+pt*pt)/(1.-std::tanh(y)*std::tanh(y)));
27 eta = std::asinh(pz/pt);
29 double shift = (pt<1. ? 0.1*pt : 0.1/
pt);
30 double sign = ( (
int(pt*10) % 2 == 0 ) ? 1 : -1 );
32 auto p4 = std::make_unique<PolarLorentzVector>(
pt,
eta,
phi,
m);
34 if(
p4_.compare_exchange_strong(expectp4,
p4.get())) {
37 auto p4c = std::make_unique<LorentzVector>(*p4_);
39 if(
p4c_.compare_exchange_strong(expectp4c,p4c.get())) {
64 <<
"this Candidate has no master clone reference." 65 <<
"Can't call masterClone() method.\n";
79 <<
"this Candidate has no master clone ptr." 80 <<
"Can't call masterClonePtr() method.\n";
107 <<
"This Candidate type does not implement daughter(std::string). " 108 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
113 <<
"This Candidate type does not implement daughter(std::string). " 114 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
137 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
142 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
virtual double pz() const
z coordinate of momentum vector
Point vertex_
vertex position
virtual void fillVertexCovariance(CovarianceMatrix &v) const
fill SMatrix
bool isNonnull() const
Checks for non-null.
CovarianceMatrix vertexCovariance() const
return SMatrix
virtual size_t numberOfMothers() const
number of mothers
virtual double vertexNdof() const
Sin< T >::type sin(const T &t)
virtual bool isTrackerMuon() 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)
virtual bool isElectron() const
get a component
virtual bool isPhoton() const
static float float16to32(uint16_t h)
std::atomic< LorentzVector * > p4c_
void pack(bool unpackAfterwards=true)
virtual double phi() const
momentum azimuthal angle
virtual double vertexNormalizedChi2() const
chi-squared divided by n.d.o.f.
virtual double p() const
magnitude of momentum vector
reco::GenParticleRef mother_
Ref to first mother.
virtual double eta() const
momentum pseudorapidity
virtual bool isMuon() const
virtual const Point & vertex() const
vertex position
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
virtual bool longLived() const
is long lived?
static uint16_t float32to16(float x)
virtual const reco::CandidateBaseRef & masterClone() const
virtual double vertexChi2() const
chi-squares
virtual size_t numberOfDaughters() const
number of daughters
Cos< T >::type cos(const T &t)
virtual const LorentzVector & p4() const
four-momentum Lorentz vecto r
virtual bool isStandAloneMuon() const
virtual const reco::CandidatePtr & masterClonePtr() const
T const * get() const
Returns C++ pointer to the item.
virtual bool hasMasterClonePtr() const
virtual double y() const
rapidity
virtual bool overlap(const reco::Candidate &) const
check overlap with another Candidate
std::atomic< PolarLorentzVector * > p4_
the four vector
virtual bool hasMasterClone() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual bool isCaloMuon() const
virtual int charge() const =0
electric charge
virtual bool isGlobalMuon() const
virtual const reco::Candidate * mother(size_type) const
return mother at a given position (throws an exception)
virtual int charge() const
electric charge
virtual bool isConvertedPhoton() const
static unsigned int const shift
math::XYZPoint Point
point in the space
virtual bool massConstraint() const
do mass constraint?
virtual const Point & vertex() const =0
vertex position
virtual float dz() const
dz with respect to the PV ref
virtual float dxy() const
dxy with respect to the PV ref
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.