|
26 | 26 |
|
27 | 27 | #include "Offline/SeedService/inc/SeedService.hh" |
28 | 28 | #include "Offline/GlobalConstantsService/inc/GlobalConstantsHandle.hh" |
| 29 | +#include "Offline/GlobalConstantsService/inc/ParticleDataList.hh" |
29 | 30 | #include "Offline/GlobalConstantsService/inc/PhysicsParams.hh" |
30 | 31 | #include "Offline/DataProducts/inc/PDGCode.hh" |
31 | 32 | #include "Offline/MCDataProducts/inc/StageParticle.hh" |
@@ -63,6 +64,8 @@ namespace mu2e { |
63 | 64 | void addParticles(StageParticleCollection* output, art::Ptr<SimParticle> mustop, double time); |
64 | 65 | //---------------------------------------------------------------- |
65 | 66 | private: |
| 67 | + const PDGCode::type electronId_ = PDGCode::e_minus; // for mass only |
| 68 | + |
66 | 69 | double muonLifeTime_; |
67 | 70 | art::ProductToken<SimParticleCollection> const simsToken_; |
68 | 71 | unsigned verbosity_; |
@@ -90,8 +93,8 @@ namespace mu2e { |
90 | 93 | , eng_{createEngine(art::ServiceHandle<SeedService>()->getSeed())} |
91 | 94 | , randExp_{eng_} |
92 | 95 | , pdgId_(conf().pdgId()) |
| 96 | + ,_mass(GlobalConstantsHandle<ParticleDataList>()->particle(electronId_).mass()) |
93 | 97 | , spectrum_(BinnedSpectrum(conf().spectrum.get<fhicl::ParameterSet>())) |
94 | | - |
95 | 98 | { |
96 | 99 | produces<mu2e::StageParticleCollection>(); |
97 | 100 | pid_ = static_cast<PDGCode::type>(pdgId_); |
@@ -140,7 +143,6 @@ namespace mu2e { |
140 | 143 | CLHEP::Hep3Vector p3 = randomUnitSphere_->fire(p); |
141 | 144 | CLHEP::HepLorentzVector fourmom(p3, energy); |
142 | 145 |
|
143 | | - |
144 | 146 | output->emplace_back(mustop, |
145 | 147 | process_, |
146 | 148 | pid_, |
|
0 commit comments