LArSoft
v06_85_00
Liquid Argon Software toolkit - http://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... | |
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 > |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = ProducerBase::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
MarleyTimeGen (const Parameters &p) | |
virtual | ~MarleyTimeGen () |
virtual void | produce (art::Event &e) override |
virtual void | beginRun (art::Run &run) override |
virtual void | reconfigure (const Parameters &p) |
template<typename PROD , BranchType B = InEvent> | |
ProductID | getProductID (std::string const &instanceName={}) const |
template<typename PROD , BranchType B> | |
ProductID | getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const |
bool | modifiesEvent () const |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ProductToken< T > | consumes (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ViewToken< T > | consumesView (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ProductToken< T > | mayConsume (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ViewToken< T > | mayConsumeView (InputTag const &it) |
base_engine_t & | createEngine (seed_t seed) |
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
Static Public Member Functions | |
static cet::exempt_ptr< Consumer > | non_module_context () |
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... | |
CurrentProcessingContext const * | currentContext () const |
void | validateConsumedProduct (BranchType const bt, ProductInfo const &pi) |
void | prepareForJob (fhicl::ParameterSet const &pset) |
void | showMissingConsumes () const |
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 115 of file MARLEYTimeGen_module.cc.
Definition at line 120 of file MARLEYTimeGen_module.cc.
|
inherited |
Definition at line 34 of file EDProducer.h.
Definition at line 119 of file MARLEYTimeGen_module.cc.
Definition at line 227 of file MARLEYTimeGen_module.cc.
|
inherited |
Definition at line 43 of file EDProducer.h.
|
inherited |
Definition at line 35 of file EDProducer.h.
|
strongprotected |
Enumerated type that defines the pinching parameter conventions that are understood by this module.
Enumerator | |
---|---|
ALPHA | |
BETA |
Definition at line 466 of file MARLEYTimeGen_module.cc.
|
strongprotected |
Enumerated type that defines the allowed neutrino spectrum input file formats.
Enumerator | |
---|---|
RootTH2D | |
FIT |
Definition at line 487 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 435 of file MARLEYTimeGen_module.cc.
|
explicit |
Definition at line 531 of file MARLEYTimeGen_module.cc.
References fEvent, fEventNumber, fEventTree, fRunNumber, fSubRunNumber, fTNu, fWeight, art::TFileDirectory::make(), and reconfigure().
|
virtual |
Definition at line 561 of file MARLEYTimeGen_module.cc.
|
overridevirtual |
Reimplemented from art::EDProducer.
Definition at line 566 of file MARLEYTimeGen_module.cc.
References geo::GeometryCore::DetectorName(), and art::Run::put().
|
inherited |
|
inherited |
Definition at line 147 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inherited |
Definition at line 162 of file Consumer.h.
|
inherited |
|
inherited |
Definition at line 172 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
protected |
Create simb::MCTruth and sim::SupernovaTruth objects using spectrum information from a ROOT TH2D.
Definition at line 576 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 1054 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(), max, source_from_time_fit(), UNIFORM_ENERGY, and UNIFORM_TIME.
Referenced by produce().
|
inherited |
Definition at line 26 of file EngineCreator.cc.
References art::EngineCreator::rng().
Referenced by evgen::CosmicsGen::CosmicsGen(), rndm::NuRandomService::createEngine(), cluster::fuzzyCluster::fuzzyCluster(), cluster::HoughLineFinder::HoughLineFinder(), art::MixFilter< T >::initEngine_(), larg4::LArG4::LArG4(), evgen::LightSource::LightSource(), evgen::NeutronOsc::NeutronOsc(), evgen::NucleonDecay::NucleonDecay(), opdet::OpMCDigi::OpMCDigi(), opdet::OptDetDigitizer::OptDetDigitizer(), phot::PhotonLibraryPropagation::PhotonLibraryPropagation(), detsim::SimDriftElectrons::SimDriftElectrons(), evgen::SingleGen::SingleGen(), evgen::SNNueAr40CCGen::SNNueAr40CCGen(), ToyOneShowerGen::ToyOneShowerGen(), and trkf::Track3DKalman::Track3DKalman().
|
inherited |
Definition at line 32 of file EngineCreator.cc.
References art::EngineCreator::rng().
|
inherited |
Definition at line 40 of file EngineCreator.cc.
References art::EngineCreator::rng().
|
protectedinherited |
|
inherited |
Definition at line 49 of file EngineCreator.cc.
References fhicl::ParameterSet::get().
Referenced by art::MixFilter< T >::initEngine_().
|
inlineinherited |
|
inherited |
Definition at line 56 of file ProducerBase.h.
References B, and art::ModuleDescription::moduleLabel().
Referenced by art::ProducerBase::modifiesEvent().
|
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 1269 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 1278 of file MARLEYTimeGen_module.cc.
References DEFINE_ART_MODULE, f, fTimeFits, evgen::MarleyTimeGen::TimeFit::GetFitParameters(), evgen::MarleyTimeGen::FitParameters::Luminosity(), art::TFileDirectory::make(), 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 1222 of file MARLEYTimeGen_module.cc.
References fEvent, and fMarleyHelper.
Referenced by create_truths_th2d(), and create_truths_time_fit().
|
inherited |
|
inherited |
Definition at line 190 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inherited |
Definition at line 205 of file Consumer.h.
|
inherited |
|
inherited |
Definition at line 215 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inlineinherited |
Definition at line 40 of file ProducerBase.h.
References art::ProducerBase::getProductID().
|
staticinherited |
Definition at line 76 of file Consumer.cc.
Referenced by art::RootOutput::beginSubRun(), art::OutputModule::doBeginRun(), art::OutputModule::doBeginSubRun(), art::OutputModule::doEndRun(), art::OutputModule::doEndSubRun(), art::ProducingService::doPostReadEvent(), art::ProducingService::doPostReadRun(), art::ProducingService::doPostReadSubRun(), art::OutputModule::doWriteEvent(), art::ProcessPackage< L >::postScheduleSignal(), art::BeginEndPackage< Level::Run >::Begin::postScheduleSignal(), art::BeginEndPackage< Level::Run >::End::postScheduleSignal(), art::BeginEndPackage< Level::SubRun >::Begin::postScheduleSignal(), art::BeginEndPackage< Level::SubRun >::End::postScheduleSignal(), art::ProcessPackage< L >::preScheduleSignal(), art::BeginEndPackage< Level::Run >::Begin::preScheduleSignal(), art::BeginEndPackage< Level::SubRun >::Begin::preScheduleSignal(), art::EventProcessor::readEvent(), art::EventProcessor::readRun(), art::EmptyEvent::readRun_(), art::EventProcessor::readSubRun(), and art::EmptyEvent::readSubRun_().
|
protectedinherited |
Definition at line 89 of file Consumer.cc.
References fhicl::ParameterSet::get_if_present().
Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().
|
overridevirtual |
Implements art::EDProducer.
Definition at line 717 of file MARLEYTimeGen_module.cc.
References create_truths_th2d(), create_truths_time_fit(), util::CreateAssn(), 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 784 of file MARLEYTimeGen_module.cc.
References ALPHA, BETA, fFitEmax, fFitEmin, fFluxAveragedCrossSection, FIT, fMarleyHelper, fNeutrinosPerEvent, fPinchType, fSamplingMode, fSpectrumFileFormat, fSpectrumHist, fTimeFits, fVertexSampler, evgen::MarleyTimeGen::TimeFit::GetFitParameters(), HISTOGRAM, LOG_INFO, LOG_WARNING, evgen::MarleyTimeGen::FitParameters::Luminosity(), make_final_timefit(), make_nu_emission_histograms(), RootTH2D, s, source_from_time_fit(), UNIFORM_ENERGY, and UNIFORM_TIME.
Referenced by MarleyTimeGen().
|
protectedinherited |
Definition at line 125 of file Consumer.cc.
Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().
|
protected |
Create a MARLEY neutrino source object using a set of fit parameters for a particular time bin.
Definition at line 1195 of file MARLEYTimeGen_module.cc.
References evgen::MarleyTimeGen::FitParameters::Alpha(), ALPHA, beta, BETA, evgen::MarleyTimeGen::FitParameters::Emean(), fFitEmax, fFitEmin, fPinchType, and evgen::MarleyTimeGen::TimeFit::GetFitParameters().
Referenced by create_truths_time_fit(), and reconfigure().
|
protectedinherited |
Definition at line 101 of file Consumer.cc.
References art::errors::ProductRegistrationFailure.
|
protected |
unique_ptr to the current event created by MARLEY
Definition at line 406 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 503 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 496 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 527 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 523 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 515 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), and reconfigure().
|
protected |
Object that provides an interface to the MARLEY event generator.
Definition at line 399 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 519 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 470 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 499 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 439 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 490 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 412 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), and reconfigure().
|
protected |
Subrun number from the art::Event being processed.
Definition at line 501 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 418 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 507 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 403 of file MARLEYTimeGen_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
Statistical weight for the current MARLEY neutrino vertex.
Definition at line 510 of file MARLEYTimeGen_module.cc.
Referenced by create_truths_th2d(), create_truths_time_fit(), and MarleyTimeGen().