Skip to content

Commit 995df92

Browse files
authored
Merge pull request #1655 from sdifalco/cellfix
initialize electron mass
2 parents 362f688 + 594395a commit 995df92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

EventGenerator/src/LeadingLog_module.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "Offline/SeedService/inc/SeedService.hh"
2828
#include "Offline/GlobalConstantsService/inc/GlobalConstantsHandle.hh"
29+
#include "Offline/GlobalConstantsService/inc/ParticleDataList.hh"
2930
#include "Offline/GlobalConstantsService/inc/PhysicsParams.hh"
3031
#include "Offline/DataProducts/inc/PDGCode.hh"
3132
#include "Offline/MCDataProducts/inc/StageParticle.hh"
@@ -63,6 +64,8 @@ namespace mu2e {
6364
void addParticles(StageParticleCollection* output, art::Ptr<SimParticle> mustop, double time);
6465
//----------------------------------------------------------------
6566
private:
67+
const PDGCode::type electronId_ = PDGCode::e_minus; // for mass only
68+
6669
double muonLifeTime_;
6770
art::ProductToken<SimParticleCollection> const simsToken_;
6871
unsigned verbosity_;
@@ -90,8 +93,8 @@ namespace mu2e {
9093
, eng_{createEngine(art::ServiceHandle<SeedService>()->getSeed())}
9194
, randExp_{eng_}
9295
, pdgId_(conf().pdgId())
96+
,_mass(GlobalConstantsHandle<ParticleDataList>()->particle(electronId_).mass())
9397
, spectrum_(BinnedSpectrum(conf().spectrum.get<fhicl::ParameterSet>()))
94-
9598
{
9699
produces<mu2e::StageParticleCollection>();
97100
pid_ = static_cast<PDGCode::type>(pdgId_);
@@ -140,7 +143,6 @@ namespace mu2e {
140143
CLHEP::Hep3Vector p3 = randomUnitSphere_->fire(p);
141144
CLHEP::HepLorentzVector fourmom(p3, energy);
142145

143-
144146
output->emplace_back(mustop,
145147
process_,
146148
pid_,

0 commit comments

Comments
 (0)