10 if (unpackAfterwards) {
11 delete p4_.exchange(
nullptr);
12 delete p4c_.exchange(
nullptr);
24 eta = std::asinh(pz /
pt);
27 double sign = ((
int(
pt * 10) % 2 == 0) ? 1 : -1);
30 auto p4 = std::make_unique<PolarLorentzVector>(
pt,
eta,
phi,
m);
32 if (p4_.compare_exchange_strong(expectp4, p4.get())) {
35 auto p4c = std::make_unique<LorentzVector>(*p4_);
37 if (p4c_.compare_exchange_strong(expectp4c, p4c.get())) {
49 return -(vertex_.X() -
p.X()) *
std::sin(
float(p4_.load()->Phi())) +
50 (vertex_.Y() -
p.Y()) *
std::cos(
float(p4_.load()->Phi()));
54 return (vertex_.Z() -
p.X()) - ((vertex_.X() -
p.X()) *
std::cos(
float(p4_.load()->Phi())) +
55 (vertex_.Y() -
p.Y()) *
std::sin(
float(p4_.load()->Phi()))) *
56 p4_.load()->Pz() / p4_.load()->Pt();
62 throw cms::Exception(
"Invalid Reference") <<
"this Candidate has no master clone reference." 63 <<
"Can't call masterClone() method.\n";
71 throw cms::Exception(
"Invalid Reference") <<
"this Candidate has no master clone ptr." 72 <<
"Can't call masterClonePtr() method.\n";
78 if (motherRef().isNonnull())
84 return p4() ==
o.p4() &&
vertex() ==
o.vertex() &&
charge() ==
o.charge();
94 <<
"This Candidate type does not implement daughter(std::string). " 95 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
100 <<
"This Candidate type does not implement daughter(std::string). " 101 <<
"Please use CompositeCandidate or NamedCompositeCandidate.\n";
114 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
119 <<
"reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
bool hasMasterClone() const override
bool isStandAloneMuon() const override
void tanh(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in])
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
bool isCaloMuon() const override
bool longLived() const override
is long lived?
T get() const
get a component
virtual float dz() const
dz with respect to the PV ref
double vertexNdof() const override
Sin< T >::type sin(const T &t)
size_t numberOfDaughters() const override
number of daughters
bool isJet() const override
static float float16to32(uint16_t h)
std::atomic< LorentzVector * > p4c_
void pack(bool unpackAfterwards=true)
virtual float dxy() const
dxy with respect to the PV ref
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
bool hasMasterClonePtr() const override
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
size_t numberOfMothers() const override
number of mothers
double vertexChi2() const override
chi-squares
static uint16_t float32to16(float x)
bool overlap(const reco::Candidate &) const override
check overlap with another Candidate
Cos< T >::type cos(const T &t)
~PackedGenParticle() override
destructor
bool isElectron() const override
get a component
const reco::CandidatePtr & masterClonePtr() const override
bool massConstraint() const override
do mass constraint?
const reco::CandidateBaseRef & masterClone() const override
std::atomic< PolarLorentzVector * > p4_
the four vector
bool isConvertedPhoton() const override
const reco::Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const reco::Candidate * mother(size_type) const override
return mother at a given position (throws an exception)
Structure Point Contains parameters of Gaussian fits to DMRs.
bool isGlobalMuon() const override
static unsigned int const shift
bool isTrackerMuon() const override
bool isPhoton() const override
CovarianceMatrix vertexCovariance() const override
return SMatrix
bool isMuon() const override
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.