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

◆ makeParticle() [1/2]

◆ makeParticle() [2/2]

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

Definition at line 40 of file makeParticle.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, info(), EgHLTOffHistBins_cfi::mass, AlCaHLTBitMon_ParallelJobs::p, LHEGenericFilter_cfi::ParticleID, TableParser::table, 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