CMS 3D CMS Logo

Functions
rawparticle Namespace Reference

Functions

RawParticle makeMuon (bool isParticle, const math::XYZTLorentzVector &p, const math::XYZTLorentzVector &xStart)
 

Function Documentation

RawParticle rawparticle::makeMuon ( bool  isParticle,
const math::XYZTLorentzVector p,
const math::XYZTLorentzVector xStart 
)

Create a particle with momentum 'p' at space-time point xStart The particle will be a muon if iParticle==true, else it will be an anti-muon.

Definition at line 20 of file makeMuon.cc.

References constexpr, and kMass.

Referenced by MuonSimHitProducer::applyMaterialEffects(), and CalorimetryManager::MuonMipSimulation().

20  {
21  constexpr double kMass = 0.10566; //taken from SimGeneral/HepPDTESSource/data/particle.tbl
22  if (isParticle) {
23  return RawParticle(13, p, xStart, kMass, -1.);
24  }
25  return RawParticle(-13, p, xStart, kMass, +1.);
26  }
const double kMass
#define constexpr