1 #include "fhiclcpp/ParameterSet.h"
2 #include "art/Framework/Core/ModuleMacros.h"
3 #include "art/Framework/Core/EDProducer.h"
4 #include "art/Framework/Principal/Event.h"
17 explicit BlipMaker(fhicl::ParameterSet
const& pset);
48 , m_head {pset.get< std::vector<double> >(
"Head", {100.,0.,0.})}
49 ,
m_tail {pset.get< std::vector<double> >(
"Tail", {50.,10.,50.})}
50 ,
m_time {pset.get<
double >(
"Time", 0.0)}
51 ,
m_charge {pset.get<
double >(
"ElectronPerCm", 50000)}
52 , m_step {pset.get<
double >(
"StepSize", 0.1)}
54 produces< std::vector<sim::SimEnergyDeposit> >(
instance);
62 std::cout <<
"head: " << m_head.at(0) <<
" " << m_head.at(1) <<
" " << m_head.at(2) << std::endl;
66 auto out = std::make_unique< std::vector<sim::SimEnergyDeposit> >();
70 const double mevpercm = 2.0;
79 const auto vdiff = end-start;
80 const auto vlen = sqrt(vdiff.Mag2());
81 const auto vdir = vdiff.unit();
83 const double stepsize = m_step;
84 const int nsteps = vlen/stepsize;
87 const double ns = 1.0;
94 for (
double jump : {
m_time * ns} ) {
96 for (
int istep=1; istep<nsteps; ++istep) {
100 stepsize * nelepercm,
105 jump + t1, trackid));
110 std::cerr <<
"BlipMaker making " << out->size() <<
" depos to instance: " <<
instance << std::endl;
113 event.put(std::move(out),
instance);
118 DEFINE_ART_MODULE(BlipMaker)
std::vector< double > m_head
BEGIN_PROLOG could also be cerr
const std::string instance
auto end(FixedBins< T, C > const &) noexcept
std::vector< double > m_tail
void produce(art::Event &evt)
contains information for a single step in the detector simulation
Energy deposition in the active material.
BEGIN_PROLOG could also be cout
BlipMaker(fhicl::ParameterSet const &pset)