Public Member Functions | Private Member Functions | Private Attributes | List of all members
evgen::SNNueAr40CCGen Class Reference
Inheritance diagram for evgen::SNNueAr40CCGen:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Member Functions

 SNNueAr40CCGen (fhicl::ParameterSet const &pset)
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
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)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void beginRun (art::Run &run) override
 
void produce (art::Event &event) override
 

Private Attributes

CLHEP::HepRandomEngine & fEngine
 
evgen::NueAr40CCGenerator fGenerator
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

Module producing electrons and gammas from supernova neutrino interactions with liquid argon (based on SingleGen)

Definition at line 36 of file SNNueAr40CCGen_module.cc.

Constructor & Destructor Documentation

evgen::SNNueAr40CCGen::SNNueAr40CCGen ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 49 of file SNNueAr40CCGen_module.cc.

50  : EDProducer{pset}
51  // Create a default random engine: obtain the random seed
52  // freom NuRandomService, unless overriden in configuration with key "Seed"
53  , fEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*this, pset, "Seed"))
54  , fGenerator{pset.get< fhicl::ParameterSet >("GeneratorAlg")}
55  {
56  produces< std::vector< simb::MCTruth > >();
57  produces< sumdata::RunData, art::InRun >();
58  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
evgen::NueAr40CCGenerator fGenerator
CLHEP::HepRandomEngine & fEngine

Member Function Documentation

void evgen::SNNueAr40CCGen::beginRun ( art::Run run)
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 61 of file SNNueAr40CCGen_module.cc.

62  {
63  // Store information about the geometry we are using in run information
65  run.put(std::make_unique<sumdata::RunData>(geo->DetectorName()));
66  }
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
LArSoft geometry interface.
Definition: ChannelGeo.h:16
void evgen::SNNueAr40CCGen::produce ( art::Event event)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 69 of file SNNueAr40CCGen_module.cc.

70  {
71  event.put(std::make_unique<std::vector<simb::MCTruth>>(fGenerator.Generate(fEngine)));
72  }
evgen::NueAr40CCGenerator fGenerator
std::vector< simb::MCTruth > Generate(CLHEP::HepRandomEngine &engine)
CLHEP::HepRandomEngine & fEngine

Member Data Documentation

CLHEP::HepRandomEngine& evgen::SNNueAr40CCGen::fEngine
private

Definition at line 44 of file SNNueAr40CCGen_module.cc.

evgen::NueAr40CCGenerator evgen::SNNueAr40CCGen::fGenerator
private

Definition at line 45 of file SNNueAr40CCGen_module.cc.


The documentation for this class was generated from the following file: