LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Classes | |
struct | Config |
Collection of configuration parameters for the module. More... | |
class | FitParameters |
Stores parsed fit parameters from a single time bin and neutrino type in a "fit"-format spectrum file. More... | |
struct | KeysToIgnore |
class | TimeFit |
Stores fitting parameters for all neutrino types from a single time bin in a "fit"-format spectrum file. More... | |
Public Types | |
using | Name = fhicl::Name |
using | Comment = fhicl::Comment |
using | Parameters = art::EDProducer::Table< Config, KeysToIgnore > |
using | ModuleType = EDProducer |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
MarleyTimeGen (const Parameters &p) | |
virtual void | produce (art::Event &e) override |
virtual void | beginRun (art::Run &run) override |
virtual void | reconfigure (const Parameters &p) |
void | doBeginJob (SharedResources const &resources) |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
void | fillProductDescriptions () |
void | registerProducts (ProductDescriptions &productsToRegister) |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
std::unique_ptr< Worker > | makeWorker (WorkerParams const &wp) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
Protected Types | |
enum | TimeGenSamplingMode { TimeGenSamplingMode::HISTOGRAM, TimeGenSamplingMode::UNIFORM_TIME, TimeGenSamplingMode::UNIFORM_ENERGY } |
Enumerated type that defines the allowed ways that a neutrino's energy and arrival time may be sampled. More... | |
enum | PinchParamType { PinchParamType::ALPHA, PinchParamType::BETA } |
Enumerated type that defines the pinching parameter conventions that are understood by this module. More... | |
enum | SpectrumFileFormat { SpectrumFileFormat::RootTH2D, SpectrumFileFormat::FIT } |
Enumerated type that defines the allowed neutrino spectrum input file formats. More... | |
Protected Member Functions | |
simb::MCTruth | make_uniform_energy_mctruth (double E_min, double E_max, double &E_nu, const TLorentzVector &vertex_pos) |
Creates a simb::MCTruth object using a uniformly-sampled neutrino energy. More... | |
std::unique_ptr< marley::NeutrinoSource > | source_from_time_fit (const TimeFit &fit) |
Create a MARLEY neutrino source object using a set of fit parameters for a particular time bin. More... | |
void | create_truths_th2d (simb::MCTruth &mc_truth, sim::SupernovaTruth &sn_truth, const TLorentzVector &vertex_pos) |
Create simb::MCTruth and sim::SupernovaTruth objects using spectrum information from a ROOT TH2D. More... | |
void | create_truths_time_fit (simb::MCTruth &mc_truth, sim::SupernovaTruth &sn_truth, const TLorentzVector &vertex_pos) |
Create simb::MCTruth and sim::SupernovaTruth objects using a neutrino spectrum described by a previously-parsed "fit"-format file. More... | |
void | make_final_timefit (double time) |
Helper function that makes a final dummy TimeFit object so that the final real time bin can have a right edge. More... | |
void | make_nu_emission_histograms () const |
Makes ROOT histograms showing the emitted neutrinos in each time bin when using a "fit"-format spectrum file. More... | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
Protected Attributes | |
std::unique_ptr< evgen::MARLEYHelper > | fMarleyHelper |
Object that provides an interface to the MARLEY event generator. More... | |
std::unique_ptr< evgen::ActiveVolumeVertexSampler > | fVertexSampler |
Algorithm that allows us to sample vertex locations within the active volume(s) of the detector. More... | |
std::unique_ptr< marley::Event > | fEvent |
unique_ptr to the current event created by MARLEY More... | |
std::unique_ptr< TH2D > | fSpectrumHist |
ROOT TH2D that contains the time-dependent spectrum to use when sampling neutrino times and energies. More... | |
std::vector< TimeFit > | fTimeFits |
Vector that contains the fit parameter information for each time bin when using a "fit"-format spectrum file. More... | |
TimeGenSamplingMode | fSamplingMode |
Represents the sampling mode to use when selecting neutrino times and energies. More... | |
PinchParamType | fPinchType |
The pinching parameter convention to use when interpreting the time-dependent fits. More... | |
SpectrumFileFormat | fSpectrumFileFormat |
Format to assume for the neutrino spectrum input file. More... | |
TTree * | fEventTree |
The event TTree created by MARLEY. More... | |
uint_fast32_t | fRunNumber |
Run number from the art::Event being processed. More... | |
uint_fast32_t | fSubRunNumber |
Subrun number from the art::Event being processed. More... | |
uint_fast32_t | fEventNumber |
Event number from the art::Event being processed. More... | |
double | fTNu |
Time since the supernova core bounce for the current MARLEY neutrino vertex. More... | |
double | fWeight |
Statistical weight for the current MARLEY neutrino vertex. More... | |
double | fFluxAveragedCrossSection |
Flux-averaged total cross section (fm2, average is taken over all energies and times for all defined reactions) used by MARLEY to generate neutrino vertices. More... | |
unsigned int | fNeutrinosPerEvent |
The number of MARLEY neutrino vertices to generate in each art::Event. More... | |
double | fFitEmin |
Minimum neutrino energy to consider when using a "fit"-format spectrum file. More... | |
double | fFitEmax |
Maximum neutrino energy to consider when using a "fit"-format spectrum file. More... | |
Definition at line 114 of file MARLEYTimeGen_module.cc.
Definition at line 118 of file MARLEYTimeGen_module.cc.
|
inherited |
Definition at line 17 of file EDProducer.h.
Definition at line 117 of file MARLEYTimeGen_module.cc.
Definition at line 215 of file MARLEYTimeGen_module.cc.
|
inherited |
Definition at line 26 of file Producer.h.
|
strongprotected |
Enumerated type that defines the pinching parameter conventions that are understood by this module.
Enumerator | |
---|---|
ALPHA | |
BETA |
Definition at line 459 of file MARLEYTimeGen_module.cc.
|
strongprotected |
Enumerated type that defines the allowed neutrino spectrum input file formats.
Enumerator | |
---|---|
RootTH2D | |
FIT |
Definition at line 480 of file MARLEYTimeGen_module.cc.
|
strongprotected |
Enumerated type that defines the allowed ways that a neutrino's energy and arrival time may be sampled.
Enumerator | |
---|---|
HISTOGRAM | |
UNIFORM_TIME | |
UNIFORM_ENERGY |
Definition at line 428 of file MARLEYTimeGen_module.cc.
|
explicit |
Definition at line 524 of file MARLEYTimeGen_module.cc.
References fEvent, fEventNumber, fEventTree, fFluxAveragedCrossSection, fRunNumber, fSubRunNumber, fTNu, fWeight, art::ProducerTable< UserConfig, ImplicitConfig, UserKeysToIgnore >::get_PSet(), and reconfigure().
|
overridevirtual |
Reimplemented from art::EDProducer.
Definition at line 558 of file MARLEYTimeGen_module.cc.
References geo::GeometryCore::DetectorName(), art::fullRun(), and art::Run::put().
|
protectedinherited |
Definition at line 61 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().
|
protectedinherited |
|
protectedinherited |
Definition at line 75 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().
|
protectedinherited |
|
inherited |
Definition at line 68 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().
|
protected |
Create simb::MCTruth and sim::SupernovaTruth objects using spectrum information from a ROOT TH2D.
Definition at line 565 of file MARLEYTimeGen_module.cc.
References fEvent, fFluxAveragedCrossSection, fMarleyHelper, fSamplingMode, fSpectrumHist, fTNu, fWeight, HISTOGRAM, sim::kUnbiased, sim::kUniformEnergy, sim::kUniformTime, make_uniform_energy_mctruth(), UNIFORM_ENERGY, and UNIFORM_TIME.
Referenced by produce().
|
protected |
Create simb::MCTruth and sim::SupernovaTruth objects using a neutrino spectrum described by a previously-parsed "fit"-format file.
Definition at line 1042 of file MARLEYTimeGen_module.cc.
References fEvent, fFitEmax, fFitEmin, fFluxAveragedCrossSection, fMarleyHelper, fSamplingMode, fTimeFits, fTNu, fWeight, HISTOGRAM, sim::kUnbiased, sim::kUniformEnergy, sim::kUniformTime, evgen::MarleyTimeGen::TimeFit::make_FitParameters_iterator(), evgen::MarleyTimeGen::FitParameters::make_luminosity_iterator(), make_uniform_energy_mctruth(), source_from_time_fit(), UNIFORM_ENERGY, and UNIFORM_TIME.
Referenced by produce().
|
inherited |
Definition at line 22 of file Producer.cc.
References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().
|
inherited |
Definition at line 65 of file Producer.cc.
References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 85 of file Producer.cc.
References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().
|
inherited |
Definition at line 30 of file Producer.cc.
References art::detail::Producer::endJobWithFrame().
|
inherited |
Definition at line 75 of file Producer.cc.
References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 95 of file Producer.cc.
References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 105 of file Producer.cc.
References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 44 of file Producer.cc.
References art::detail::Producer::respondToCloseInputFileWithFrame().
|
inherited |
Definition at line 58 of file Producer.cc.
References art::detail::Producer::respondToCloseOutputFilesWithFrame().
|
inherited |
Definition at line 37 of file Producer.cc.
References art::detail::Producer::respondToOpenInputFileWithFrame().
|
inherited |
Definition at line 51 of file Producer.cc.
References art::detail::Producer::respondToOpenOutputFilesWithFrame().
|
inherited |
Definition at line 10 of file Modifier.cc.
References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().
|
inherited |
Definition at line 43 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().
|
protected |
Helper function that makes a final dummy TimeFit object so that the final real time bin can have a right edge.
Definition at line 1247 of file MARLEYTimeGen_module.cc.
References fTimeFits.
Referenced by reconfigure().
|
protected |
Makes ROOT histograms showing the emitted neutrinos in each time bin when using a "fit"-format spectrum file.
Definition at line 1256 of file MARLEYTimeGen_module.cc.
References DEFINE_ART_MODULE, f, fTimeFits, evgen::MarleyTimeGen::TimeFit::GetFitParameters(), evgen::MarleyTimeGen::FitParameters::Luminosity(), evgen::MarleyTimeGen::TimeFit::Time(), x_max, and x_min.
Referenced by reconfigure().
|
protected |
Creates a simb::MCTruth object using a uniformly-sampled neutrino energy.
This function samples a reacting neutrino energy uniformly from the full range of energies allowed by the incident spectrum and the currently defined reactions.
Definition at line 1198 of file MARLEYTimeGen_module.cc.
References fEvent, and fMarleyHelper.
Referenced by create_truths_th2d(), and create_truths_time_fit().
|
inherited |
Definition at line 37 of file ModuleBase.cc.
References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.
|
protectedinherited |
Definition at line 82 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().
|
protectedinherited |
Definition at line 96 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().
|
protectedinherited |
|
inherited |
Definition at line 89 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().
|
inherited |
Definition at line 13 of file ModuleBase.cc.
References art::errors::LogicError.
Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().
|
overridevirtual |
Implements art::EDProducer.
Definition at line 695 of file MARLEYTimeGen_module.cc.
References create_truths_th2d(), create_truths_time_fit(), art::Event::event(), fEventNumber, fEventTree, FIT, fNeutrinosPerEvent, fRunNumber, fSpectrumFileFormat, fSubRunNumber, fTNu, fVertexSampler, n, art::Event::put(), RootTH2D, art::Event::run(), and art::Event::subRun().
|
virtual |
Definition at line 762 of file MARLEYTimeGen_module.cc.
References ALPHA, BETA, fFitEmax, fFitEmin, fFluxAveragedCrossSection, FIT, fMarleyHelper, fNeutrinosPerEvent, fPinchType, fSamplingMode, fSpectrumFileFormat, fSpectrumHist, fTimeFits, fVertexSampler, art::ProducerTable< UserConfig, ImplicitConfig, UserKeysToIgnore >::get_PSet(), evgen::MarleyTimeGen::TimeFit::GetFitParameters(), HISTOGRAM, evgen::MarleyTimeGen::FitParameters::Luminosity(), make_final_timefit(), make_nu_emission_histograms(), MF_LOG_INFO, MF_LOG_WARNING, RootTH2D, source_from_time_fit(), UNIFORM_ENERGY, and UNIFORM_TIME.
Referenced by MarleyTimeGen().
|
inherited |
Definition at line 16 of file Modifier.cc.
References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().
|
inherited |
|
inherited |
Definition at line 49 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().
|
protected |
Create a MARLEY neutrino source object using a set of fit parameters for a particular time bin.
Definition at line 1170 of file MARLEYTimeGen_module.cc.
References evgen::MarleyTimeGen::FitParameters::Alpha(), ALPHA, BETA, evgen::MarleyTimeGen::FitParameters::Emean(), fFitEmax, fFitEmin, fPinchType, and evgen::MarleyTimeGen::TimeFit::GetFitParameters().
Referenced by create_truths_time_fit(), and reconfigure().
|
protected |
unique_ptr to the current event created by MARLEY
Definition at line 399 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), make_uniform_energy_mctruth(), and MarleyTimeGen().
|
protected |
Event number from the art::Event being processed.
Definition at line 496 of file MARLEYTimeGen_module.cc.
Referenced by MarleyTimeGen(), and produce().
|
protected |
The event TTree created by MARLEY.
This tree will be saved to the "hist" output file for validation purposes. The tree contains the same information as the generated simb::MCTruth objects, but in MARLEY's internal format
Definition at line 489 of file MARLEYTimeGen_module.cc.
Referenced by MarleyTimeGen(), and produce().
|
protected |
Maximum neutrino energy to consider when using a "fit"-format spectrum file.
Definition at line 520 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_time_fit(), reconfigure(), and source_from_time_fit().
|
protected |
Minimum neutrino energy to consider when using a "fit"-format spectrum file.
Definition at line 516 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_time_fit(), reconfigure(), and source_from_time_fit().
|
protected |
Flux-averaged total cross section (fm2, average is taken over all energies and times for all defined reactions) used by MARLEY to generate neutrino vertices.
Definition at line 508 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), MarleyTimeGen(), and reconfigure().
|
protected |
Object that provides an interface to the MARLEY event generator.
Definition at line 392 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), make_uniform_energy_mctruth(), and reconfigure().
|
protected |
The number of MARLEY neutrino vertices to generate in each art::Event.
Definition at line 512 of file MARLEYTimeGen_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
The pinching parameter convention to use when interpreting the time-dependent fits.
Definition at line 463 of file MARLEYTimeGen_module.cc.
Referenced by reconfigure(), and source_from_time_fit().
|
protected |
Run number from the art::Event being processed.
Definition at line 492 of file MARLEYTimeGen_module.cc.
Referenced by MarleyTimeGen(), and produce().
|
protected |
Represents the sampling mode to use when selecting neutrino times and energies.
Definition at line 432 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), and reconfigure().
|
protected |
Format to assume for the neutrino spectrum input file.
Definition at line 483 of file MARLEYTimeGen_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
ROOT TH2D that contains the time-dependent spectrum to use when sampling neutrino times and energies.
This member is only used when reading the spectrum from a ROOT file.
Definition at line 405 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), and reconfigure().
|
protected |
Subrun number from the art::Event being processed.
Definition at line 494 of file MARLEYTimeGen_module.cc.
Referenced by MarleyTimeGen(), and produce().
|
protected |
Vector that contains the fit parameter information for each time bin when using a "fit"-format spectrum file.
This member is unused when the spectrum is read from a ROOT file.
Definition at line 411 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_time_fit(), make_final_timefit(), make_nu_emission_histograms(), and reconfigure().
|
protected |
Time since the supernova core bounce for the current MARLEY neutrino vertex.
Definition at line 500 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), MarleyTimeGen(), and produce().
|
protected |
Algorithm that allows us to sample vertex locations within the active volume(s) of the detector.
Definition at line 396 of file MARLEYTimeGen_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
Statistical weight for the current MARLEY neutrino vertex.
Definition at line 503 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), and MarleyTimeGen().