CMS 3D CMS Logo

PackedGenParticle.h
Go to the documentation of this file.
1 #ifndef __AnalysisDataFormats_PackedGenParticle_h__
2 #define __AnalysisDataFormats_PackedGenParticle_h__
3 
14 /* #include "DataFormats/Math/interface/PtEtaPhiMass.h" */
15 
16 class testPackedGenParticle;
17 
18 namespace pat {
20  public:
21  friend class ::testPackedGenParticle;
22 
33 
34  typedef unsigned int index;
35 
38  : packedPt_(0),
39  packedY_(0),
40  packedPhi_(0),
41  packedM_(0),
42  p4_(nullptr),
43  p4c_(nullptr),
44  vertex_(0, 0, 0),
45  pdgId_(0),
46  charge_(0) {}
48  : p4_(new PolarLorentzVector(c.pt(), c.eta(), c.phi(), c.mass())),
49  p4c_(new LorentzVector(*p4_)),
50  vertex_(0, 0, 0),
51  pdgId_(c.pdgId()),
52  charge_(c.charge()),
53  mother_(c.motherRef(0)),
55  pack();
56  }
58  : p4_(new PolarLorentzVector(c.pt(), c.eta(), c.phi(), c.mass())),
59  p4c_(new LorentzVector(*p4_)),
60  vertex_(0, 0, 0),
61  pdgId_(c.pdgId()),
62  charge_(c.charge()),
63  mother_(mother),
65  pack();
66  }
67 
69  : packedPt_(iOther.packedPt_),
70  packedY_(iOther.packedY_),
71  packedPhi_(iOther.packedPhi_),
72  packedM_(iOther.packedM_),
73  p4_(nullptr),
74  p4c_(nullptr),
75  vertex_(iOther.vertex_),
76  dxy_(iOther.dxy_),
77  dz_(iOther.dz_),
78  dphi_(iOther.dphi_),
79  pdgId_(iOther.pdgId_),
80  charge_(iOther.charge_),
81  mother_(iOther.mother_),
82  statusFlags_(iOther.statusFlags_) {
83  if (iOther.p4c_) {
84  p4_.store(new PolarLorentzVector(*iOther.p4_));
85  p4c_.store(new LorentzVector(*iOther.p4c_));
86  }
87  }
88 
90  : packedPt_(iOther.packedPt_),
91  packedY_(iOther.packedY_),
92  packedPhi_(iOther.packedPhi_),
93  packedM_(iOther.packedM_),
94  p4_(nullptr),
95  p4c_(nullptr),
96  vertex_(std::move(iOther.vertex_)),
97  dxy_(iOther.dxy_),
98  dz_(iOther.dz_),
99  dphi_(iOther.dphi_),
100  pdgId_(iOther.pdgId_),
101  charge_(iOther.charge_),
102  mother_(std::move(iOther.mother_)),
103  statusFlags_(iOther.statusFlags_) {
104  if (iOther.p4c_) {
105  p4_.store(p4_.exchange(nullptr));
106  p4c_.store(p4c_.exchange(nullptr));
107  }
108  }
109 
111  if (this != &iOther) {
112  packedPt_ = iOther.packedPt_;
113  packedY_ = iOther.packedY_;
114  packedPhi_ = iOther.packedPhi_;
115  packedM_ = iOther.packedM_;
116  if (p4c_) {
117  delete p4_.exchange(iOther.p4_.exchange(nullptr));
118  delete p4c_.exchange(iOther.p4c_.exchange(nullptr));
119  } else {
120  delete p4_.exchange(nullptr);
121  delete p4c_.exchange(nullptr);
122  }
123  vertex_ = std::move(iOther.vertex_);
124  dxy_ = iOther.dxy_;
125  dz_ = iOther.dz_;
126  dphi_ = iOther.dphi_;
127  pdgId_ = iOther.pdgId_;
128  charge_ = iOther.charge_;
129  mother_ = std::move(iOther.mother_);
130  statusFlags_ = iOther.statusFlags_;
131  }
132  return *this;
133  }
134 
136  PackedGenParticle c(iOther);
137  *this = std::move(c);
138  return *this;
139  }
140 
142  ~PackedGenParticle() override;
144  size_t numberOfDaughters() const override;
146  const reco::Candidate* daughter(size_type) const override;
148  size_t numberOfMothers() const override;
150  const reco::Candidate* mother(size_type) const override;
153  if (mother_.isNonnull() && mother_.isAvailable() &&
154  mother_->status() == 1) { //if pointing to the pruned version of myself
155  if (mother_->numberOfMothers() > 0)
156  return mother_->motherRef(0); // return my mother's (that is actually myself) mother
157  else
158  return edm::Ref<reco::GenParticleCollection>(); // return null ref
159  } else {
160  return mother_; //the stored ref is really my mother, or null, return that
161  }
162  }
164  const reco::GenParticleRef& lastPrunedRef() const { return mother_; }
165 
169  reco::Candidate* daughter(const std::string& s) override;
171  const reco::Candidate* daughter(const std::string& s) const override;
174  size_t numberOfSourceCandidatePtrs() const override { return 0; }
178 
180  int charge() const override { return charge_; }
182  void setCharge(int charge) override { charge_ = charge; }
184  int threeCharge() const override { return charge() * 3; }
186  void setThreeCharge(int threecharge) override {}
188  const LorentzVector& p4() const override {
189  if (!p4c_)
190  unpack();
191  return *p4c_;
192  }
194  const PolarLorentzVector& polarP4() const override {
195  if (!p4c_)
196  unpack();
197  return *p4_;
198  }
200  Vector momentum() const override {
201  if (!p4c_)
202  unpack();
203  return p4c_.load()->Vect();
204  }
207  Vector boostToCM() const override {
208  if (!p4c_)
209  unpack();
210  return p4c_.load()->BoostToCM();
211  }
213  double p() const override {
214  if (!p4c_)
215  unpack();
216  return p4c_.load()->P();
217  }
219  double energy() const override {
220  if (!p4c_)
221  unpack();
222  return p4c_.load()->E();
223  }
225  double et() const override { return (pt() <= 0) ? 0 : p4c_.load()->Et(); }
227  double et2() const override { return (pt() <= 0) ? 0 : p4c_.load()->Et2(); }
229  double mass() const override {
230  if (!p4c_)
231  unpack();
232  return p4_.load()->M();
233  }
235  double massSqr() const override {
236  if (!p4c_)
237  unpack();
238  return p4_.load()->M() * p4_.load()->M();
239  }
240 
242  double mt() const override {
243  if (!p4c_)
244  unpack();
245  return p4_.load()->Mt();
246  }
248  double mtSqr() const override {
249  if (!p4c_)
250  unpack();
251  return p4_.load()->Mt2();
252  }
254  double px() const override {
255  if (!p4c_)
256  unpack();
257  return p4c_.load()->Px();
258  }
260  double py() const override {
261  if (!p4c_)
262  unpack();
263  return p4c_.load()->Py();
264  }
266  double pz() const override {
267  if (!p4c_)
268  unpack();
269  return p4c_.load()->Pz();
270  }
272  double pt() const override {
273  if (!p4c_)
274  unpack();
275  return p4_.load()->Pt();
276  }
278  double phi() const override {
279  if (!p4c_)
280  unpack();
281  return p4_.load()->Phi();
282  }
284  double theta() const override {
285  if (!p4c_)
286  unpack();
287  return p4_.load()->Theta();
288  }
290  double eta() const override {
291  if (!p4c_)
292  unpack();
293  return p4_.load()->Eta();
294  }
296  double rapidity() const override {
297  if (!p4c_)
298  unpack();
299  return p4_.load()->Rapidity();
300  }
302  double y() const override {
303  if (!p4c_)
304  unpack();
305  return p4_.load()->Rapidity();
306  }
308  void setP4(const LorentzVector& p4) override {
309  unpack(); // changing px,py,pz changes also mapping between dxy,dz and x,y,z
310  *p4_ = PolarLorentzVector(p4.Pt(), p4.Eta(), p4.Phi(), p4.M());
311  pack();
312  }
314  void setP4(const PolarLorentzVector& p4) override {
315  unpack(); // changing px,py,pz changes also mapping between dxy,dz and x,y,z
316  *p4_ = p4;
317  pack();
318  }
320  void setMass(double m) override {
321  if (!p4c_)
322  unpack();
323  *p4_ = PolarLorentzVector(p4_.load()->Pt(), p4_.load()->Eta(), p4_.load()->Phi(), m);
324  pack();
325  }
326  void setPz(double pz) override {
327  unpack(); // changing px,py,pz changes also mapping between dxy,dz and x,y,z
328  *p4c_ = LorentzVector(p4c_.load()->Px(), p4c_.load()->Py(), pz, p4c_.load()->E());
329  *p4_ = PolarLorentzVector(p4c_.load()->Pt(), p4c_.load()->Eta(), p4c_.load()->Phi(), p4c_.load()->M());
330  pack();
331  }
333  const Point& vertex() const override {
334  return vertex_;
335  } //{ if (fromPV_) return Point(0,0,0); else return Point(0,0,100); }
337  double vx() const override { return vertex_.X(); } //{ return 0; }
339  double vy() const override { return vertex_.Y(); } //{ return 0; }
341  double vz() const override { return vertex_.Z(); } //{ if (fromPV_) return 0; else return 100; }
343  void setVertex(const Point& vertex) override { vertex_ = vertex; }
344 
345  enum PVAssoc { NoPV = 0, PVLoose = 1, PVTight = 2, PVUsedInFit = 3 };
346 
348  virtual float dxy() const {
349  unpack();
350  return dxy_;
351  }
353  virtual float dz() const {
354  unpack();
355  return dz_;
356  }
358  virtual float dxy(const Point& p) const;
360  virtual float dz(const Point& p) const;
361 
363  int pdgId() const override { return pdgId_; }
364  // set PDG identifier
365  void setPdgId(int pdgId) override { pdgId_ = pdgId; }
367  int status() const override { return 1; } /*FIXME*/
369  void setStatus(int status) override {} /*FIXME*/
371  static const unsigned int longLivedTag = 0; /*FIXME*/
373  void setLongLived() override {} /*FIXME*/
375  bool longLived() const override;
377  static const unsigned int massConstraintTag = 0; /*FIXME*/
379  void setMassConstraint() override {} /*FIXME*/
381  bool massConstraint() const override;
382 
384  PackedGenParticle* clone() const override { return new PackedGenParticle(*this); }
385 
387  double vertexChi2() const override;
394  double vertexNdof() const override;
396  double vertexNormalizedChi2() const override;
398  double vertexCovariance(int i, int j) const override;
403  return m;
404  }
406  void fillVertexCovariance(CovarianceMatrix& v) const override;
409  bool hasMasterClone() const override;
412  const reco::CandidateBaseRef& masterClone() const override;
415  bool hasMasterClonePtr() const override;
418 
419  const reco::CandidatePtr& masterClonePtr() const override;
420 
422  template <typename Ref>
423  Ref masterRef() const {
424  return masterClone().template castTo<Ref>();
425  }
427 
428  bool isElectron() const override;
429  bool isMuon() const override;
430  bool isStandAloneMuon() const override;
431  bool isGlobalMuon() const override;
432  bool isTrackerMuon() const override;
433  bool isCaloMuon() const override;
434  bool isPhoton() const override;
435  bool isConvertedPhoton() const override;
436  bool isJet() const override;
437 
438  const reco::GenStatusFlags& statusFlags() const { return statusFlags_; }
440 
442  //basic set of gen status flags accessible directly here
443  //the rest accessible through statusFlags()
444  //(see GenStatusFlags.h for their meaning)
445 
447  //these are robust, generator-independent functions for categorizing
448  //mainly final state particles, but also intermediate hadrons/taus
449 
450  //is particle prompt (not from hadron, muon, or tau decay) and final state
451  bool isPromptFinalState() const { return status() == 1 && statusFlags_.isPrompt(); }
452 
453  //this particle is a direct decay product of a prompt tau and is final state
454  //(eg an electron or muon from a leptonic decay of a prompt tau)
457  }
458 
460  //these are generator history-dependent functions for tagging particles
461  //associated with the hard process
462  //Currently implemented for Pythia 6 and Pythia 8 status codes and history
463  //and may not have 100% consistent meaning across all types of processes
464  //Users are strongly encouraged to stick to the more robust flags above,
465  //as well as the expanded set available in GenStatusFlags.h
466 
467  //this particle is the final state direct descendant of a hard process particle
468  bool fromHardProcessFinalState() const { return status() == 1 && statusFlags_.fromHardProcess(); }
469 
470  //this particle is a direct decay product of a hardprocess tau and is final state
471  //(eg an electron or muon from a leptonic decay of a tau from the hard process)
474  }
475 
476  protected:
478  void pack(bool unpackAfterwards = true);
479  void unpack() const;
480 
482  mutable std::atomic<PolarLorentzVector*> p4_;
483  mutable std::atomic<LorentzVector*> p4c_;
486  float dxy_, dz_, dphi_;
488  int pdgId_;
490  int8_t charge_;
493  //status flags
495 
497  bool overlap(const reco::Candidate&) const override;
498  template <typename, typename, typename>
499  friend struct component;
500  friend class ::OverlapChecker;
501  friend class ShallowCloneCandidate;
503  };
504 
505  typedef std::vector<pat::PackedGenParticle> PackedGenParticleCollection;
508 } // namespace pat
509 
510 #endif
pat::PackedGenParticle::PackedGenParticle
PackedGenParticle(const reco::GenParticle &c, const edm::Ref< reco::GenParticleCollection > &mother)
Definition: PackedGenParticle.h:57
pat::PackedGenParticle::masterClonePtr
const reco::CandidatePtr & masterClonePtr() const override
Definition: PackedGenParticle.cc:70
pat::PackedGenParticle::longLived
bool longLived() const override
is long lived?
Definition: PackedGenParticle.cc:140
pat::PackedGenParticle::masterClone
const reco::CandidateBaseRef & masterClone() const override
Definition: PackedGenParticle.cc:61
pat::PackedGenParticle::operator=
PackedGenParticle & operator=(PackedGenParticle &&iOther)
Definition: PackedGenParticle.h:110
reco::Candidate::Vector
math::XYZVector Vector
point in the space
Definition: Candidate.h:42
pat::PackedGenParticle::setMassConstraint
void setMassConstraint() override
set mass constraint flag
Definition: PackedGenParticle.h:379
mps_fire.i
i
Definition: mps_fire.py:428
pat::PackedGenParticle::vertexCovariance
CovarianceMatrix vertexCovariance() const override
return SMatrix
Definition: PackedGenParticle.h:400
pat::PackedGenParticle::statusFlags
const reco::GenStatusFlags & statusFlags() const
Definition: PackedGenParticle.h:438
pat::PackedGenParticle::p
double p() const override
magnitude of momentum vector
Definition: PackedGenParticle.h:213
pat::PackedGenParticle::numberOfDaughters
size_t numberOfDaughters() const override
number of daughters
Definition: PackedGenParticle.cc:75
pat::PackedGenParticle::pdgId
int pdgId() const override
PDG identifier.
Definition: PackedGenParticle.h:363
pat::PackedGenParticle::phi
double phi() const override
momentum azimuthal angle
Definition: PackedGenParticle.h:278
pat::PackedGenParticle::isConvertedPhoton
bool isConvertedPhoton() const override
Definition: PackedGenParticle.cc:136
pat::PackedGenParticle::setLongLived
void setLongLived() override
set long lived flag
Definition: PackedGenParticle.h:373
pat::PackedGenParticle::vertex_
Point vertex_
vertex position
Definition: PackedGenParticle.h:485
reco::GenParticle
Definition: GenParticle.h:21
pat::PackedGenParticle::hasMasterClone
bool hasMasterClone() const override
Definition: PackedGenParticle.cc:66
pat::PackedGenParticle::isDirectPromptTauDecayProductFinalState
bool isDirectPromptTauDecayProductFinalState() const
Definition: PackedGenParticle.h:455
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
deltaPhi.h
pat::PackedGenParticle::setPdgId
void setPdgId(int pdgId) override
Definition: PackedGenParticle.h:365
pat::PackedGenParticle::mtSqr
double mtSqr() const override
transverse mass squared
Definition: PackedGenParticle.h:248
pat::PackedGenParticle::PackedGenParticle
PackedGenParticle()
default constructor
Definition: PackedGenParticle.h:37
pat::PackedGenParticle::isDirectHardProcessTauDecayProductFinalState
bool isDirectHardProcessTauDecayProductFinalState() const
Definition: PackedGenParticle.h:472
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
reco::GenStatusFlags::isDirectPromptTauDecayProduct
bool isDirectPromptTauDecayProduct() const
Definition: GenStatusFlags.h:62
pat::PackedGenParticle::daughters
reco::CandidateCollection daughters
collection of daughter candidates
Definition: PackedGenParticle.h:24
pat::PackedGenParticle::isCaloMuon
bool isCaloMuon() const override
Definition: PackedGenParticle.cc:132
pat::PackedGenParticle::isJet
bool isJet() const override
Definition: PackedGenParticle.cc:138
pat::PackedGenParticle::ShallowCloneCandidate
friend class ShallowCloneCandidate
Definition: PackedGenParticle.h:501
pat::PackedGenParticle::mass
double mass() const override
mass
Definition: PackedGenParticle.h:229
CovarianceMatrix
Definition: CovarianceMatrix.h:27
edm::RefVector
Definition: EDProductfwd.h:27
pat::PackedGenParticle::dz_
float dz_
Definition: PackedGenParticle.h:486
pat::PackedGenParticle::dz
virtual float dz() const
dz with respect to the PV ref
Definition: PackedGenParticle.h:353
findQualityFiles.v
v
Definition: findQualityFiles.py:179
Association.h
GenStatusFlags.h
pat::PackedGenParticle::dxy
virtual float dxy() const
dxy with respect to the PV ref
Definition: PackedGenParticle.h:348
edm::Ref
Definition: AssociativeIterator.h:58
pat::PackedGenParticle::vy
double vy() const override
y coordinate of vertex position
Definition: PackedGenParticle.h:339
pat::PackedGenParticle::statusFlags_
reco::GenStatusFlags statusFlags_
Definition: PackedGenParticle.h:494
pat::PackedGenParticle::mother_
reco::GenParticleRef mother_
Ref to first mother.
Definition: PackedGenParticle.h:492
pat::PackedGenParticle::isPhoton
bool isPhoton() const override
Definition: PackedGenParticle.cc:134
GenParticle.h
CandidateFwd.h
pat::PackedGenParticle::polarP4
const PolarLorentzVector & polarP4() const override
four-momentum Lorentz vector
Definition: PackedGenParticle.h:194
pat::PackedGenParticle::masterRef
Ref masterRef() const
cast master clone reference to a concrete type
Definition: PackedGenParticle.h:423
alignCSCRings.s
s
Definition: alignCSCRings.py:92
pat::PackedGenParticle::unpack
void unpack() const
Definition: PackedGenParticle.cc:17
pat::PackedGenParticle::theta
double theta() const override
momentum polar angle
Definition: PackedGenParticle.h:284
pat::PackedGenParticle
Definition: PackedGenParticle.h:19
pat::PackedGenParticle::isTrackerMuon
bool isTrackerMuon() const override
Definition: PackedGenParticle.cc:130
pat::PackedGenParticle::energy
double energy() const override
energy
Definition: PackedGenParticle.h:219
pat::PackedGenParticle::isGlobalMuon
bool isGlobalMuon() const override
Definition: PackedGenParticle.cc:126
pat::PackedGenParticle::massSqr
double massSqr() const override
mass squared
Definition: PackedGenParticle.h:235
pat::PackedGenParticle::pt
double pt() const override
transverse momentum
Definition: PackedGenParticle.h:272
pat::PackedGenParticle::setMass
void setMass(double m) override
set particle mass
Definition: PackedGenParticle.h:320
pat::PackedGenParticle::PVAssoc
PVAssoc
Definition: PackedGenParticle.h:345
pat::PackedGenParticle::packedM_
uint16_t packedM_
Definition: PackedGenParticle.h:477
pat::PackedGenParticle::Vector
math::XYZVector Vector
point in the space
Definition: PackedGenParticle.h:32
pat::PackedGenParticleRefVector
edm::RefVector< pat::PackedGenParticleCollection > PackedGenParticleRefVector
Definition: PackedGenParticle.h:507
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
pat::PackedGenParticle::~PackedGenParticle
~PackedGenParticle() override
destructor
Definition: PackedGenParticle.cc:42
pat::PackedGenParticle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: PackedGenParticle.h:26
pat::PackedGenParticle::index
unsigned int index
Definition: PackedGenParticle.h:34
pat::PackedGenParticle::mt
double mt() const override
transverse mass
Definition: PackedGenParticle.h:242
GenParticleFwd.h
pat::PackedGenParticleCollection
std::vector< pat::PackedGenParticle > PackedGenParticleCollection
Definition: PackedGenParticle.h:505
pat::PackedGenParticle::PackedGenParticle
PackedGenParticle(const reco::GenParticle &c)
Definition: PackedGenParticle.h:47
pat::PackedGenParticle::setVertex
void setVertex(const Point &vertex) override
set vertex
Definition: PackedGenParticle.h:343
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
pat::PackedGenParticle::px
double px() const override
x coordinate of momentum vector
Definition: PackedGenParticle.h:254
pat::PackedGenParticle::massConstraintTag
static const unsigned int massConstraintTag
do mass constraint flag
Definition: PackedGenParticle.h:377
pat::PackedGenParticle::dphi_
float dphi_
Definition: PackedGenParticle.h:486
pat::PackedGenParticle::isMuon
bool isMuon() const override
Definition: PackedGenParticle.cc:124
pat::PackedGenParticle::PVUsedInFit
Definition: PackedGenParticle.h:345
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
pat::PackedGenParticle::isStandAloneMuon
bool isStandAloneMuon() const override
Definition: PackedGenParticle.cc:128
pat::PackedGenParticle::numberOfMothers
size_t numberOfMothers() const override
number of mothers
Definition: PackedGenParticle.cc:77
pat::PackedGenParticle::fromHardProcessFinalState
bool fromHardProcessFinalState() const
Definition: PackedGenParticle.h:468
pat::PackedGenParticle::isPromptFinalState
bool isPromptFinalState() const
Definition: PackedGenParticle.h:451
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
pat::PackedGenParticle::charge_
int8_t charge_
Charge.
Definition: PackedGenParticle.h:490
pat::PackedGenParticle::setP4
void setP4(const PolarLorentzVector &p4) override
set 4-momentum
Definition: PackedGenParticle.h:314
RefVector.h
pat::PackedGenParticle::longLivedTag
static const unsigned int longLivedTag
long lived flag
Definition: PackedGenParticle.h:371
pat::PackedGenParticle::py
double py() const override
y coordinate of momentum vector
Definition: PackedGenParticle.h:260
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
pat::PackedGenParticle::et2
double et2() const override
transverse energy squared (use this for cuts)!
Definition: PackedGenParticle.h:227
pat::PackedGenParticle::vz
double vz() const override
z coordinate of vertex position
Definition: PackedGenParticle.h:341
pat::PackedGenParticle::lastPrunedRef
const reco::GenParticleRef & lastPrunedRef() const
last surviving in pruned
Definition: PackedGenParticle.h:164
reco::GenStatusFlags
Definition: GenStatusFlags.h:15
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
pat::PackedGenParticle::packedY_
uint16_t packedY_
Definition: PackedGenParticle.h:477
pat::PackedGenParticle::PackedGenParticle
PackedGenParticle(PackedGenParticle &&iOther)
Definition: PackedGenParticle.h:89
pat::PackedGenParticle::packedPhi_
uint16_t packedPhi_
Definition: PackedGenParticle.h:477
pat::PackedGenParticle::daughter
const reco::Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
Definition: PackedGenParticle.cc:88
pat::PackedGenParticle::pdgId_
int pdgId_
PDG identifier.
Definition: PackedGenParticle.h:488
pat::PackedGenParticle::et
double et() const override
transverse energy
Definition: PackedGenParticle.h:225
pat::PackedGenParticle::charge
int charge() const override
electric charge
Definition: PackedGenParticle.h:180
pat::PackedGenParticle::clone
PackedGenParticle * clone() const override
returns a clone of the Candidate object
Definition: PackedGenParticle.h:384
pat
Definition: HeavyIon.h:7
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
pat::PackedGenParticle::mother
const reco::Candidate * mother(size_type) const override
return mother at a given position (throws an exception)
Definition: PackedGenParticle.cc:90
pat::PackedGenParticle::isElectron
bool isElectron() const override
get a component
Definition: PackedGenParticle.cc:122
pat::PackedGenParticle::threeCharge
int threeCharge() const override
electric charge
Definition: PackedGenParticle.h:184
pat::PackedGenParticle::packedPt_
uint16_t packedPt_
Definition: PackedGenParticle.h:477
pat::PackedGenParticle::component
friend struct component
Definition: PackedGenParticle.h:499
pat::PackedGenParticle::PVLoose
Definition: PackedGenParticle.h:345
edm::Ptr< Candidate >
reco::Candidate
Definition: Candidate.h:27
pat::PackedGenParticle::boostToCM
Vector boostToCM() const override
Definition: PackedGenParticle.h:207
reco::GenStatusFlags::isPrompt
bool isPrompt() const
Definition: GenStatusFlags.h:39
VertexFwd.h
pat::PackedGenParticle::massConstraint
bool massConstraint() const override
do mass constraint?
Definition: PackedGenParticle.cc:142
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
pat::PackedGenParticle::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: PackedGenParticle.h:28
pat::PackedGenParticle::vertexNdof
double vertexNdof() const override
Definition: PackedGenParticle.cc:108
pat::PackedGenParticleRef
edm::Ref< pat::PackedGenParticleCollection > PackedGenParticleRef
Definition: PackedGenParticle.h:506
pat::PackedGenParticle::PackedGenParticle
PackedGenParticle(const PackedGenParticle &iOther)
Definition: PackedGenParticle.h:68
pat::PackedGenParticle::p4_
std::atomic< PolarLorentzVector * > p4_
the four vector
Definition: PackedGenParticle.h:482
pat::PackedGenParticle::status
int status() const override
status word
Definition: PackedGenParticle.h:367
pat::PackedGenParticle::y
double y() const override
rapidity
Definition: PackedGenParticle.h:302
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition: JetExtendedAssociation.h:32
pat::PackedGenParticle::p4c_
std::atomic< LorentzVector * > p4c_
Definition: PackedGenParticle.h:483
pat::PackedGenParticle::vx
double vx() const override
x coordinate of vertex position
Definition: PackedGenParticle.h:337
pat::PackedGenParticle::setP4
void setP4(const LorentzVector &p4) override
set 4-momentum
Definition: PackedGenParticle.h:308
pat::PackedGenParticle::fillVertexCovariance
void fillVertexCovariance(CovarianceMatrix &v) const override
fill SMatrix
Definition: PackedGenParticle.cc:117
pat::PackedGenParticle::ShallowClonePtrCandidate
friend class ShallowClonePtrCandidate
Definition: PackedGenParticle.h:502
edm::RefToBase< Candidate >
pat::PackedGenParticle::momentum
Vector momentum() const override
spatial momentum vector
Definition: PackedGenParticle.h:200
reco::GenStatusFlags::fromHardProcess
bool fromHardProcess() const
Definition: GenStatusFlags.h:81
pat::PackedGenParticle::setStatus
void setStatus(int status) override
set status word
Definition: PackedGenParticle.h:369
pat::PackedGenParticle::PVTight
Definition: PackedGenParticle.h:345
reco::GenStatusFlags::isDirectHardProcessTauDecayProduct
bool isDirectHardProcessTauDecayProduct() const
Definition: GenStatusFlags.h:91
pat::PackedGenParticle::p4
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
Definition: PackedGenParticle.h:188
pat::PackedGenParticle::vertexNormalizedChi2
double vertexNormalizedChi2() const override
chi-squared divided by n.d.o.f.
Definition: PackedGenParticle.cc:110
pat::PackedGenParticle::Point
math::XYZPoint Point
point in the space
Definition: PackedGenParticle.h:30
pat::PackedGenParticle::setCharge
void setCharge(int charge) override
set electric charge
Definition: PackedGenParticle.h:182
math::PtEtaPhiMLorentzVector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
Candidate.h
reco::CandidatePtr
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
pat::PackedGenParticle::operator=
PackedGenParticle & operator=(PackedGenParticle const &iOther)
Definition: PackedGenParticle.h:135
pat::PackedGenParticle::NoPV
Definition: PackedGenParticle.h:345
pat::PackedGenParticle::sourceCandidatePtr
reco::CandidatePtr sourceCandidatePtr(size_type i) const override
Definition: PackedGenParticle.h:177
pat::PackedGenParticle::pack
void pack(bool unpackAfterwards=true)
Definition: PackedGenParticle.cc:5
pat::PackedGenParticle::setPz
void setPz(double pz) override
Definition: PackedGenParticle.h:326
pat::PackedGenParticle::vertex
const Point & vertex() const override
vertex position
Definition: PackedGenParticle.h:333
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
pat::PackedGenParticle::hasMasterClonePtr
bool hasMasterClonePtr() const override
Definition: PackedGenParticle.cc:68
pat::PackedGenParticle::pz
double pz() const override
z coordinate of momentum vector
Definition: PackedGenParticle.h:266
pat::PackedGenParticle::rapidity
double rapidity() const override
rapidity
Definition: PackedGenParticle.h:296
pat::PackedGenParticle::eta
double eta() const override
momentum pseudorapidity
Definition: PackedGenParticle.h:290
pat::PackedGenParticle::statusFlags
reco::GenStatusFlags & statusFlags()
Definition: PackedGenParticle.h:439
pat::PackedGenParticle::vertexChi2
double vertexChi2() const override
chi-squares
Definition: PackedGenParticle.cc:106
reco::Candidate::size_type
size_t size_type
Definition: Candidate.h:29
pat::PackedGenParticle::motherRef
reco::GenParticleRef motherRef() const
direct access to the mother reference (may be null)
Definition: PackedGenParticle.h:152
pat::PackedGenParticle::setThreeCharge
void setThreeCharge(int threecharge) override
set electric charge
Definition: PackedGenParticle.h:186
edm::OwnVector
Definition: OwnVector.h:24
pat::PackedGenParticle::numberOfSourceCandidatePtrs
size_t numberOfSourceCandidatePtrs() const override
Definition: PackedGenParticle.h:174
pat::PackedGenParticle::dxy_
float dxy_
Definition: PackedGenParticle.h:486
pat::PackedGenParticle::overlap
bool overlap(const reco::Candidate &) const override
check overlap with another Candidate
Definition: PackedGenParticle.cc:83