CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
makeParticle.h File Reference
#include "DataFormats/Math/interface/LorentzVector.h"
#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"

Go to the source code of this file.

Functions

RawParticle makeParticle (HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
 
RawParticle makeParticle (HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p, const math::XYZTLorentzVector &xStart)
 

Function Documentation

Definition at line 28 of file makeParticle.cc.

References RecoTauCleanerPlugins::charge, info(), ResonanceBuilder::mass, and unchecked_makeParticle().

Referenced by FBaseSimEvent::addParticles(), PairProductionSimulator::compute(), BremsstrahlungSimulator::compute(), NuclearInteractionSimulator::compute(), MuonBremsstrahlungSimulator::compute(), FastSimProducer::createFSimTrack(), FBaseSimEvent::fill(), PythiaDecays::particleDaughters(), and NuclearInteractionFTFSimulator::saveDaughter().

28  {
29  double charge = 0.;
30  double mass = 0.;
31  auto info = table->particle(HepPDT::ParticleID(id));
32  if (info) {
33  charge = info->charge();
34  mass = info->mass().value();
35  }
36 
37  return unchecked_makeParticle(id, p, mass, charge);
38 }
static const TGPicture * info(bool iBackgroundIsBlack)
RawParticle unchecked_makeParticle(int id, const math::XYZTLorentzVector &p, double mass, double charge)
Definition: makeParticle.cc:19
RawParticle makeParticle ( HepPDT::ParticleDataTable const *  ,
int  id,
const math::XYZTLorentzVector p,
const math::XYZTLorentzVector xStart 
)

Definition at line 40 of file makeParticle.cc.

References RecoTauCleanerPlugins::charge, info(), ResonanceBuilder::mass, and unchecked_makeParticle().

43  {
44  double charge = 0.;
45  double mass = 0.;
46  auto info = table->particle(HepPDT::ParticleID(id));
47  if (info) {
48  charge = info->charge();
49  mass = info->mass().value();
50  }
51  return unchecked_makeParticle(id, p, xStart, mass, charge);
52 }
static const TGPicture * info(bool iBackgroundIsBlack)
RawParticle unchecked_makeParticle(int id, const math::XYZTLorentzVector &p, double mass, double charge)
Definition: makeParticle.cc:19