Definition at line 40 of file MARLEYGen_module.cc.
evgen::MarleyGen::MarleyGen |
( |
const Parameters & |
p | ) |
|
|
explicit |
Definition at line 105 of file MARLEYGen_module.cc.
106 : EDProducer{
p.get_PSet() },
114 art::ServiceHandle<art::TFileService const>
tfs;
115 fEventTree = tfs->make<TTree>(
"MARLEY_event_tree",
116 "Neutrino events generated by MARLEY");
126 produces< std::vector<simb::MCTruth> >();
virtual void reconfigure(const Parameters &p)
produces< sumdata::RunData, art::InRun >()
uint_fast32_t fSubRunNumber
uint_fast32_t fEventNumber
art::ServiceHandle< art::TFileService > tfs
std::unique_ptr< marley::Event > fEvent
void evgen::MarleyGen::beginRun |
( |
art::Run & |
run | ) |
|
|
overridevirtual |
Definition at line 131 of file MARLEYGen_module.cc.
133 art::ServiceHandle<geo::Geometry const> geo;
134 run.put(std::make_unique<sumdata::RunData>(geo->DetectorName()));
void evgen::MarleyGen::produce |
( |
art::Event & |
e | ) |
|
|
overridevirtual |
Definition at line 138 of file MARLEYGen_module.cc.
145 std::unique_ptr< std::vector<simb::MCTruth> >
146 truthcol(
new std::vector<simb::MCTruth>);
149 art::ServiceHandle<geo::Geometry const> geo;
150 TLorentzVector vertex_pos =
fVertexSampler->sample_vertex_pos(*geo);
154 simb::MCTruth truth =
fMarleyHelper->create_MCTruth(vertex_pos,
160 truthcol->push_back(truth);
162 e.put(std::move(truthcol));
std::unique_ptr< evgen::MARLEYHelper > fMarleyHelper
uint_fast32_t fSubRunNumber
std::unique_ptr< evgen::ActiveVolumeVertexSampler > fVertexSampler
uint_fast32_t fEventNumber
std::unique_ptr< marley::Event > fEvent
void evgen::MarleyGen::reconfigure |
( |
const Parameters & |
p | ) |
|
|
virtual |
Definition at line 166 of file MARLEYGen_module.cc.
168 const auto& seed_service = art::ServiceHandle<rndm::NuRandomService>();
169 const auto& geom_service = art::ServiceHandle<geo::Geometry const>();
173 fVertexSampler = std::make_unique<evgen::ActiveVolumeVertexSampler>(
174 p().vertex_, *seed_service, *geom_service,
"MARLEY_Vertex_Sampler");
177 fhicl::ParameterSet marley_pset =
p.get_PSet().get< fhicl::ParameterSet >(
178 "marley_parameters" );
180 *seed_service,
"MARLEY" );
std::unique_ptr< evgen::MARLEYHelper > fMarleyHelper
std::unique_ptr< evgen::ActiveVolumeVertexSampler > fVertexSampler
std::unique_ptr<marley::Event> evgen::MarleyGen::fEvent |
|
private |
uint_fast32_t evgen::MarleyGen::fEventNumber |
|
private |
TTree* evgen::MarleyGen::fEventTree |
|
private |
uint_fast32_t evgen::MarleyGen::fRunNumber |
|
private |
uint_fast32_t evgen::MarleyGen::fSubRunNumber |
|
private |
The documentation for this class was generated from the following file: