CMS 3D CMS Logo

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 29 of file makeParticle.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, info(), ResonanceBuilder::mass, source_particleGun_cfi::ParticleID, and unchecked_makeParticle().

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

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

Definition at line 41 of file makeParticle.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, info(), ResonanceBuilder::mass, source_particleGun_cfi::ParticleID, and unchecked_makeParticle().

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