LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
A module to check the results from the Monte Carlo generator. More...
Public Types | |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = ProducerBase::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
GENIEGen (fhicl::ParameterSet const &pset) | |
virtual | ~GENIEGen () |
void | produce (art::Event &evt) |
void | beginJob () |
void | beginRun (art::Run &run) |
void | endSubRun (art::SubRun &sr) |
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 Member Functions | |
CurrentProcessingContext const * | currentContext () const |
void | validateConsumedProduct (BranchType const bt, ProductInfo const &pi) |
void | prepareForJob (fhicl::ParameterSet const &pset) |
void | showMissingConsumes () const |
Private Member Functions | |
std::string | ParticleStatus (int StatusCode) |
std::string | ReactionChannel (int ccnc, int mode) |
void | FillHistograms (simb::MCTruth mc) |
Private Attributes | |
evgb::GENIEHelper * | fGENIEHelp |
GENIEHelper object. More... | |
bool | fDefinedVtxHistRange |
std::vector< double > | fVtxPosHistRange |
use defined hist range; it is useful to have for asymmetric ranges like in DP FD. More... | |
int | fPassEmptySpills |
whether or not to kill evnets with no interactions More... | |
TStopwatch | fStopwatch |
double | fGlobalTimeOffset |
keep track of how long it takes to run the job More... | |
double | fRandomTimeOffset |
The start of a simulated "beam gate". More... | |
::sim::BeamType_t | fBeamType |
The width of a simulated "beam gate". More... | |
TH1F * | fGenerated [6] |
The type of beam. More... | |
TH1F * | fVertexX |
vertex location of generated events in x More... | |
TH1F * | fVertexY |
vertex location of generated events in y More... | |
TH1F * | fVertexZ |
vertex location of generated events in z More... | |
TH2F * | fVertexXY |
vertex location in xy More... | |
TH2F * | fVertexXZ |
vertex location in xz More... | |
TH2F * | fVertexYZ |
vertex location in yz More... | |
TH1F * | fDCosX |
direction cosine in x More... | |
TH1F * | fDCosY |
direction cosine in y More... | |
TH1F * | fDCosZ |
direction cosine in z More... | |
TH1F * | fMuMomentum |
momentum of outgoing muons More... | |
TH1F * | fMuDCosX |
direction cosine of outgoing mu in x More... | |
TH1F * | fMuDCosY |
direction cosine of outgoing mu in y More... | |
TH1F * | fMuDCosZ |
direction cosine of outgoing mu in z More... | |
TH1F * | fEMomentum |
momentum of outgoing electrons More... | |
TH1F * | fEDCosX |
direction cosine of outgoing e in x More... | |
TH1F * | fEDCosY |
direction cosine of outgoing e in y More... | |
TH1F * | fEDCosZ |
direction cosine of outgoing e in z More... | |
TH1F * | fCCMode |
CC interaction mode. More... | |
TH1F * | fNCMode |
CC interaction mode. More... | |
TH1F * | fDeltaE |
difference in neutrino energy from MCTruth::Enu() vs TParticle More... | |
TH1F * | fECons |
histogram to determine if energy is conserved in the event More... | |
A module to check the results from the Monte Carlo generator.
GENIE uses a TRandom generator for its purposes. Since art's RandomNumberGenerator service only provides CLHEP::HepRandomEngine
, the standard LArSoft/art mechanism for handling the random stream can't be used. GENIEHelper, interface to GENIE provided by nutools, creates a TRandom that GENIE can use. It initializes it with a random seed read from RandomSeed configuration parameter. This and all the other parameters are inherited from the art module (that is, GENIEGen
) configuration. LArSoft meddles with this mechanism to provide support for the standard "Seed" parameter and NuRandomService service.
As custom, if the random seed is not provided by the configuration, one is fetched from NuRandomService
(if available), with the behaviour in lar::util::FetchRandomSeed().
Definition at line 90 of file GENIEGen_module.cc.
|
inherited |
Definition at line 34 of file EDProducer.h.
|
inherited |
Definition at line 43 of file EDProducer.h.
|
inherited |
Definition at line 35 of file EDProducer.h.
|
explicit |
Definition at line 154 of file GENIEGen_module.cc.
References fBeamType, fGENIEHelp, fStopwatch, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_if_present(), sim::kBNB, sim::kNuMI, geo::kUnknown, fhicl::ParameterSet::put(), geo::GeometryCore::ROOTFile(), geo::GeometryCore::ROOTGeoManager(), seed, and geo::GeometryCore::TotalMass().
|
virtual |
Definition at line 214 of file GENIEGen_module.cc.
References fGENIEHelp, and fStopwatch.
|
virtual |
Reimplemented from art::EDProducer.
Definition at line 222 of file GENIEGen_module.cc.
References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), geo::GeometryCore::DetLength(), fCCMode, fDCosX, fDCosY, fDCosZ, fDefinedVtxHistRange, fDeltaE, fECons, fEDCosX, fEDCosY, fEDCosZ, fEMomentum, fGenerated, fGENIEHelp, fMuDCosX, fMuDCosY, fMuDCosZ, fMuMomentum, fNCMode, fVertexX, fVertexXY, fVertexXZ, fVertexY, fVertexYZ, fVertexZ, fVtxPosHistRange, evgb::GENIEHelper::Initialize(), art::TFileDirectory::make(), x, y, and z.
|
virtual |
Reimplemented from art::EDProducer.
Definition at line 298 of file GENIEGen_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().
|
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 |
|
virtual |
Reimplemented from art::EDProducer.
Definition at line 311 of file GENIEGen_module.cc.
References fGENIEHelp, art::SubRun::put(), evgb::GENIEHelper::TotalExposure(), sumdata::POTSummary::totgoodpot, and sumdata::POTSummary::totpot.
|
private |
< fill the vertex histograms from the neutrino - that is always particle 0 in the list
look for the outgoing lepton in the particle stack just interested in the first one
Definition at line 474 of file GENIEGen_module.cc.
References simb::MCNeutrino::CCNC(), DEFINE_ART_MODULE, simb::MCParticle::E(), energy, fCCMode, fDCosX, fDCosY, fDCosZ, fECons, fEDCosX, fEDCosY, fEDCosZ, fEMomentum, fGenerated, fMuDCosX, fMuDCosY, fMuDCosZ, fMuMomentum, fNCMode, fVertexX, fVertexXY, fVertexXZ, fVertexY, fVertexYZ, fVertexZ, simb::MCTruth::GetNeutrino(), simb::MCTruth::GetParticle(), simb::kCC, art::left(), LOG_DEBUG, simb::MCNeutrino::Mode(), simb::MCTruth::NParticles(), simb::MCNeutrino::Nu(), simb::MCParticle::P(), part, ParticleStatus(), simb::MCParticle::PdgCode(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), ReactionChannel(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().
Referenced by produce().
|
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().
|
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_().
|
private |
Definition at line 403 of file GENIEGen_module.cc.
References sim::ParticleStatusName().
Referenced by FillHistograms().
|
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().
|
virtual |
Implements art::EDProducer.
Definition at line 325 of file GENIEGen_module.cc.
References util::CreateAssn(), sim::dump::DumpGTruth(), sim::dump::DumpMCTruth(), fBeamType, fGENIEHelp, fGlobalTimeOffset, FillHistograms(), fPassEmptySpills, fRandomTimeOffset, simb::MCTruth::GetNeutrino(), simb::MCNeutrino::InteractionType(), simb::kNuanceOffset, LOG_DEBUG, simb::MCTruth::NeutrinoSet(), art::Event::put(), evgb::GENIEHelper::Sample(), and evgb::GENIEHelper::Stop().
|
private |
|
protectedinherited |
Definition at line 125 of file Consumer.cc.
Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().
|
protectedinherited |
Definition at line 101 of file Consumer.cc.
References art::errors::ProductRegistrationFailure.
|
private |
The width of a simulated "beam gate".
Definition at line 116 of file GENIEGen_module.cc.
Referenced by GENIEGen(), and produce().
|
private |
CC interaction mode.
Definition at line 142 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine in x
Definition at line 128 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine in y
Definition at line 129 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine in z
Definition at line 130 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
Definition at line 108 of file GENIEGen_module.cc.
Referenced by beginJob().
|
private |
difference in neutrino energy from MCTruth::Enu() vs TParticle
Definition at line 145 of file GENIEGen_module.cc.
Referenced by beginJob().
|
private |
histogram to determine if energy is conserved in the event
Definition at line 146 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine of outgoing e in x
Definition at line 138 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine of outgoing e in y
Definition at line 139 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine of outgoing e in z
Definition at line 140 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
momentum of outgoing electrons
Definition at line 137 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
The type of beam.
Spectra as generated
Definition at line 118 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
GENIEHelper object.
Definition at line 107 of file GENIEGen_module.cc.
Referenced by beginJob(), endSubRun(), GENIEGen(), produce(), and ~GENIEGen().
|
private |
keep track of how long it takes to run the job
Definition at line 114 of file GENIEGen_module.cc.
Referenced by produce().
|
private |
direction cosine of outgoing mu in x
Definition at line 133 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine of outgoing mu in y
Definition at line 134 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
direction cosine of outgoing mu in z
Definition at line 135 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
momentum of outgoing muons
Definition at line 132 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
CC interaction mode.
Definition at line 143 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
whether or not to kill evnets with no interactions
Definition at line 111 of file GENIEGen_module.cc.
Referenced by produce().
|
private |
The start of a simulated "beam gate".
Definition at line 115 of file GENIEGen_module.cc.
Referenced by produce().
|
private |
Definition at line 112 of file GENIEGen_module.cc.
Referenced by GENIEGen(), and ~GENIEGen().
|
private |
vertex location of generated events in x
Definition at line 120 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
vertex location in xy
Definition at line 124 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
vertex location in xz
Definition at line 125 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
vertex location of generated events in y
Definition at line 121 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
vertex location in yz
Definition at line 126 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
vertex location of generated events in z
Definition at line 122 of file GENIEGen_module.cc.
Referenced by beginJob(), and FillHistograms().
|
private |
use defined hist range; it is useful to have for asymmetric ranges like in DP FD.
Definition at line 109 of file GENIEGen_module.cc.
Referenced by beginJob().