Public Member Functions | |
TextFileGen (fhicl::ParameterSet const &p) | |
void | produce (art::Event &e) override |
void | beginJob () override |
void | beginRun (art::Run &run) override |
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 | |
Producer & | operator= (Producer const &)=delete |
Producer & | operator= (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 | |
Modifier & | operator= (Modifier const &)=delete |
Modifier & | operator= (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 ¤t_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 Attributes | |
std::ifstream * | fInputFile |
std::string | fInputFileName |
Name of text file containing events to simulate. More... | |
double | fMoveY |
Project particles to a new y plane. More... | |
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 | |
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 () |
This module assumes that the input file has the hepevt format for each event to be simulated. See
http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node39.html
for details on the format. In brief each event contains at least two lines. The first line contains two entries, the event number (which is ignored in ART/LArSoft) and the number of particles in the event. Each following line containes 15 entries to describe each particle. The entries are:
For example, if you want to simulate a single muon with a 5 GeV energy moving only in the z direction, the entry would be
There are some assumptions that go into using this format that may not be obvious. The first is that only particles with status code = 1 are tracked in the LArSoft/Geant4 combination making the mother daughter relations somewhat irrelevant. That also means that you should let Geant4 handle any decays.
The units in LArSoft are cm for distances and ns for time. The use of TLorentzVector
below does not imply space and time have the same units (do not use TLorentzVector::Boost()
).
Definition at line 79 of file TextFileGen_module.cc.
|
explicit |
Definition at line 95 of file TextFileGen_module.cc.
|
overridevirtual |
Reimplemented from art::EDProducer.
Definition at line 111 of file TextFileGen_module.cc.
|
overridevirtual |
Reimplemented from art::EDProducer.
Definition at line 123 of file TextFileGen_module.cc.
|
overridevirtual |
Implements art::EDProducer.
Definition at line 130 of file TextFileGen_module.cc.
|
private |
Definition at line 89 of file TextFileGen_module.cc.
|
private |
Name of text file containing events to simulate.
Definition at line 90 of file TextFileGen_module.cc.
|
private |
Project particles to a new y plane.
Definition at line 91 of file TextFileGen_module.cc.