|
|
Go to the documentation of this file.
10 if (unpackAfterwards) {
11 delete p4_.exchange(
nullptr);
12 delete p4c_.exchange(
nullptr);
21 float pz = std::tanh(
y) *
std::sqrt((
m *
m +
pt *
pt) / (1. - std::tanh(
y) * std::tanh(
y)));
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())
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";
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
const reco::CandidatePtr & masterClonePtr() const override
bool longLived() const override
is long lived?
const reco::CandidateBaseRef & masterClone() const override
CovarianceMatrix vertexCovariance() const override
return SMatrix
size_t numberOfDaughters() const override
number of daughters
bool isConvertedPhoton() const override
bool hasMasterClone() const override
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
bool isCaloMuon() const override
bool isJet() const override
T get() const
get a component
virtual float dz() const
dz with respect to the PV ref
virtual float dxy() const
dxy with respect to the PV ref
bool isPhoton() const override
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
bool isTrackerMuon() const override
bool isGlobalMuon() const override
~PackedGenParticle() override
destructor
bool isMuon() const override
Structure Point Contains parameters of Gaussian fits to DMRs.
bool isStandAloneMuon() const override
size_t numberOfMothers() const override
number of mothers
static float float16to32(uint16_t h)
const reco::Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
const reco::Candidate * mother(size_type) const override
return mother at a given position (throws an exception)
bool isElectron() const override
get a component
bool massConstraint() const override
do mass constraint?
double vertexNdof() const override
static unsigned const int shift
std::atomic< PolarLorentzVector * > p4_
the four vector
std::atomic< LorentzVector * > p4c_
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
void pack(bool unpackAfterwards=true)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
bool hasMasterClonePtr() const override
double vertexChi2() const override
chi-squares
static uint16_t float32to16(float x)
bool overlap(const reco::Candidate &) const override
check overlap with another Candidate