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().

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