25 get_energies(std::vector<int>
const& particle_ids)
29 auto energies = std::make_unique<std::vector<double>>();
30 auto const energy_offset =
static_cast<double>(particle_ids.size());
32 particle_ids, back_inserter(*
energies), [&energy_offset](
auto const pid) {
42 using Parameters = EDProducer::Table<Config>;
43 explicit ParticleSimulator(Parameters
const&
config)
45 , genParticlesTkn_{consumes<std::vector<int>>(
config().inputTag())}
47 produces<std::vector<double>>(
"particleEnergies");
48 produces<arttest::Geometry, art::InRun>(
"Geometry");
55 r.
put(std::make_unique<arttest::Geometry>(r.
run()),
64 e.
put(get_energies(*genParticles),
"particleEnergies");
#define DEFINE_ART_MODULE(klass)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
auto transform_all(Container &, OutputIt, UnaryOp)
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)