|
|
Go to the documentation of this file. 1 #ifndef __AnalysisDataFormats_PackedGenParticle_h__
2 #define __AnalysisDataFormats_PackedGenParticle_h__
16 class testPackedGenParticle;
21 friend class ::testPackedGenParticle;
105 p4_.store(
p4_.exchange(
nullptr));
111 if (
this != &iOther) {
117 delete p4_.exchange(iOther.p4_.exchange(
nullptr));
118 delete p4c_.exchange(iOther.p4c_.exchange(
nullptr));
120 delete p4_.exchange(
nullptr);
121 delete p4c_.exchange(
nullptr);
126 dphi_ = iOther.dphi_;
155 if (
mother_->numberOfMothers() > 0)
203 return p4c_.load()->Vect();
210 return p4c_.load()->BoostToCM();
213 double p()
const override {
216 return p4c_.load()->P();
222 return p4c_.load()->E();
225 double et()
const override {
return (
pt() <= 0) ? 0 :
p4c_.load()->Et(); }
227 double et2()
const override {
return (
pt() <= 0) ? 0 :
p4c_.load()->Et2(); }
232 return p4_.load()->M();
238 return p4_.load()->M() *
p4_.load()->M();
242 double mt()
const override {
245 return p4_.load()->Mt();
251 return p4_.load()->Mt2();
254 double px()
const override {
257 return p4c_.load()->Px();
260 double py()
const override {
263 return p4c_.load()->Py();
266 double pz()
const override {
269 return p4c_.load()->Pz();
272 double pt()
const override {
275 return p4_.load()->Pt();
278 double phi()
const override {
281 return p4_.load()->Phi();
287 return p4_.load()->Theta();
290 double eta()
const override {
293 return p4_.load()->Eta();
299 return p4_.load()->Rapidity();
302 double y()
const override {
305 return p4_.load()->Rapidity();
348 virtual float dxy()
const {
353 virtual float dz()
const {
360 virtual float dz(
const Point&
p)
const;
367 int status()
const override {
return 1; }
422 template <
typename Ref>
429 bool isMuon()
const override;
436 bool isJet()
const override;
478 void pack(
bool unpackAfterwards =
true);
482 mutable std::atomic<PolarLorentzVector*>
p4_;
483 mutable std::atomic<LorentzVector*>
p4c_;
498 template <
typename,
typename,
typename>
500 friend class ::OverlapChecker;
PackedGenParticle(const reco::GenParticle &c, const edm::Ref< reco::GenParticleCollection > &mother)
const reco::CandidatePtr & masterClonePtr() const override
bool longLived() const override
is long lived?
const reco::CandidateBaseRef & masterClone() const override
PackedGenParticle & operator=(PackedGenParticle &&iOther)
math::XYZVector Vector
point in the space
void setMassConstraint() override
set mass constraint flag
CovarianceMatrix vertexCovariance() const override
return SMatrix
const reco::GenStatusFlags & statusFlags() const
double p() const override
magnitude of momentum vector
size_t numberOfDaughters() const override
number of daughters
int pdgId() const override
PDG identifier.
double phi() const override
momentum azimuthal angle
bool isConvertedPhoton() const override
void setLongLived() override
set long lived flag
Point vertex_
vertex position
bool hasMasterClone() const override
bool isDirectPromptTauDecayProductFinalState() const
void setPdgId(int pdgId) override
double mtSqr() const override
transverse mass squared
PackedGenParticle()
default constructor
bool isDirectHardProcessTauDecayProductFinalState() const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
bool isDirectPromptTauDecayProduct() const
reco::CandidateCollection daughters
collection of daughter candidates
bool isCaloMuon() const override
bool isJet() const override
friend class ShallowCloneCandidate
double mass() const override
mass
virtual float dz() const
dz with respect to the PV ref
virtual float dxy() const
dxy with respect to the PV ref
double vy() const override
y coordinate of vertex position
reco::GenStatusFlags statusFlags_
reco::GenParticleRef mother_
Ref to first mother.
bool isPhoton() const override
const PolarLorentzVector & polarP4() const override
four-momentum Lorentz vector
Ref masterRef() const
cast master clone reference to a concrete type
double theta() const override
momentum polar angle
bool isTrackerMuon() const override
double energy() const override
energy
bool isGlobalMuon() const override
double massSqr() const override
mass squared
double pt() const override
transverse momentum
void setMass(double m) override
set particle mass
math::XYZVector Vector
point in the space
edm::RefVector< pat::PackedGenParticleCollection > PackedGenParticleRefVector
~PackedGenParticle() override
destructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double mt() const override
transverse mass
std::vector< pat::PackedGenParticle > PackedGenParticleCollection
PackedGenParticle(const reco::GenParticle &c)
void setVertex(const Point &vertex) override
set vertex
double px() const override
x coordinate of momentum vector
static const unsigned int massConstraintTag
do mass constraint flag
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
bool fromHardProcessFinalState() const
bool isPromptFinalState() const
XYZPointD XYZPoint
point in space with cartesian internal representation
void setP4(const PolarLorentzVector &p4) override
set 4-momentum
static const unsigned int longLivedTag
long lived flag
double py() const override
y coordinate of momentum vector
bool isNonnull() const
Checks for non-null.
double et2() const override
transverse energy squared (use this for cuts)!
double vz() const override
z coordinate of vertex position
const reco::GenParticleRef & lastPrunedRef() const
last surviving in pruned
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PackedGenParticle(PackedGenParticle &&iOther)
const reco::Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
int pdgId_
PDG identifier.
double et() const override
transverse energy
int charge() const override
electric charge
PackedGenParticle * clone() const override
returns a clone of the Candidate object
const reco::Candidate * mother(size_type) const override
return mother at a given position (throws an exception)
bool isElectron() const override
get a component
int threeCharge() const override
electric charge
Vector boostToCM() const override
bool massConstraint() const override
do mass constraint?
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
double vertexNdof() const override
edm::Ref< pat::PackedGenParticleCollection > PackedGenParticleRef
PackedGenParticle(const PackedGenParticle &iOther)
std::atomic< PolarLorentzVector * > p4_
the four vector
int status() const override
status word
double y() const override
rapidity
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::Ref< Container > Ref
std::atomic< LorentzVector * > p4c_
double vx() const override
x coordinate of vertex position
void setP4(const LorentzVector &p4) override
set 4-momentum
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
friend class ShallowClonePtrCandidate
Vector momentum() const override
spatial momentum vector
bool fromHardProcess() const
void setStatus(int status) override
set status word
bool isDirectHardProcessTauDecayProduct() const
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
math::XYZPoint Point
point in the space
void setCharge(int charge) override
set electric charge
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
PackedGenParticle & operator=(PackedGenParticle const &iOther)
reco::CandidatePtr sourceCandidatePtr(size_type i) const override
void pack(bool unpackAfterwards=true)
void setPz(double pz) override
const Point & vertex() const override
vertex position
math::XYZTLorentzVector LorentzVector
Lorentz vector.
bool hasMasterClonePtr() const override
double pz() const override
z coordinate of momentum vector
double rapidity() const override
rapidity
double eta() const override
momentum pseudorapidity
reco::GenStatusFlags & statusFlags()
double vertexChi2() const override
chi-squares
reco::GenParticleRef motherRef() const
direct access to the mother reference (may be null)
void setThreeCharge(int threecharge) override
set electric charge
size_t numberOfSourceCandidatePtrs() const override
bool overlap(const reco::Candidate &) const override
check overlap with another Candidate