Public Types | |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = ProducerBase::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
XnuePID (fhicl::ParameterSet const &pset) | |
virtual | ~XnuePID () |
void | beginJob () |
void | produce (art::Event &evt) |
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 |
Protected Attributes | |
std::string | fXnueWeightFile |
Xnue weight file name. More... | |
std::string | fSliceLabel |
Label for slices. More... | |
std::string | fProngLabel |
Label for prong. More... | |
std::string | fInstLabel3D |
Instance label for 3d prongs. More... | |
std::string | fInstLabel2D |
Instance label for 2d prongs. More... | |
std::string | fVertexLabel |
Label for vertex. More... | |
std::vector< Float_t > | fInputVarsXnue |
Vector of the variables that are input for TMVA. More... | |
TMVA::Reader * | fbdtXnue |
Reader for Xnue15. More... | |
std::string | fbdtXnueMethodName |
Private Member Functions | |
rb::RecoHit | MakeRecoHit (art::Ptr< rb::CellHit > const &chit, float const &w) |
bool | bookVariables (const std::string &weight_file, TMVA::Reader &xnue, std::string &method_name) |
Book xnue reader. More... | |
std::vector< std::string > | getVarNamesFromXML (const std::string weights_file_name) const |
Method to get Variable names from XML. More... | |
std::string | getMethodNameFromXML (const std::string weights_file_name, const bool get_full_name=true) const |
Get TMVA method name from XML. More... | |
Definition at line 54 of file XnuePID_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 |
Reserve the number of variables to be something big
Expand fcl input path to BDTs
Add BDT path to the files
Definition at line 94 of file XnuePID_module.cc.
References util::EnvExpansion(), fInputVarsXnue, fInstLabel2D, fInstLabel3D, fProngLabel, fSliceLabel, fVertexLabel, fXnueWeightFile, fhicl::ParameterSet::get(), and string.
|
virtual |
|
virtual |
Need to set Weight file
Need to set Weight file
Reimplemented from art::EDProducer.
Definition at line 125 of file XnuePID_module.cc.
References bookVariables(), fbdtXnue, fbdtXnueMethodName, and fXnueWeightFile.
|
private |
Book xnue reader.
Get all variable names from the weight XML
Number of variables
Add variables to TMVA
Extract method name and add it to the current name
Book TMVA
Definition at line 471 of file XnuePID_module.cc.
References fInputVarsXnue, getMethodNameFromXML(), getVarNamesFromXML(), MECModelEnuComparisons::i, and nvars.
Referenced by beginJob().
|
inherited |
|
inherited |
Definition at line 146 of file Consumer.h.
References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.
|
inherited |
|
inherited |
|
inherited |
Definition at line 171 of file Consumer.h.
References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.
|
inherited |
Referenced by evgen::CosmicPionGen::CosmicPionGen(), evgen::CosmicsGen::CosmicsGen(), fuzz::FuzzyKVertex::FuzzyKVertex(), g4n::G4Gen::G4Gen(), photrans::ImprovedTransport::ImprovedTransport(), art::MixFilter< T >::initEngine_(), evgen::IsoGen::IsoGen(), rsim::MakeNoiseSpectrumFile::MakeNoiseSpectrumFile(), photrans::PhotonSystRewriter::PhotonSystRewriter(), photrans::PhotonTransport::PhotonTransport(), rsim::ReadoutSim::ReadoutSim(), evgen::SingleGen::SingleGen(), and evgen::SupernovaGen::SupernovaGen().
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
Referenced by art::MixFilter< T >::initEngine_().
|
private |
Get TMVA method name from XML.
System command to read out variables
d
< stream from system
Perform a system call of cmd with the output stream going to data
Replace stuff
If getting a full name, return now Full name is, for instance, "BDT::BDTG" Short name would be "BDTG"
Getting the short name from the full name
Tokenize the string, with a separator ";"
If the size is non-zero, add the string to the vector of arguments
Definition at line 497 of file XnuePID_module.cc.
References run_hadd::cmd, MAX_BUFFER, gen_hdf5record::names, cet::replace_all(), sep, runNovaSAM::stream, string, confusionMatrixTree::t, parsePQSLOutput::tokens, and make_true_q0q3_plots::weights_file_name.
Referenced by bookVariables().
|
inlineinherited |
Definition at line 123 of file EDProducer.h.
References art::EDProducer::moduleDescription_.
Referenced by skim::NueSkimmer::CopyMichelSlice(), and skim::NueSkimmer::CopyMichelTrack().
|
inherited |
Definition at line 56 of file ProducerBase.h.
References art::ModuleDescription::moduleLabel().
Referenced by art::ProducerBase::modifiesEvent().
|
private |
Method to get Variable names from XML.
System command to read out variables
d
< stream from system
Perform a system call of cmd with the output stream going to data
Replace stuff
After the replacement the string of variables have variables separated by ";"
Output vector of variables in the XML file
Tokenize the string, with a separator ";"
If the size is non-zero, add the string to the vector of arguments
Definition at line 559 of file XnuePID_module.cc.
References run_hadd::cmd, DEFINE_ART_MODULE(), ConvertToSnowGlobesInput::file_name, MAX_BUFFER, cet::replace_all(), sep, runNovaSAM::stream, string, confusionMatrixTree::t, parsePQSLOutput::tokens, and vars.
Referenced by bookVariables().
|
private |
Definition at line 140 of file XnuePID_module.cc.
References calib::Calibrator::MakeRecoHit().
|
inherited |
|
inherited |
Definition at line 189 of file Consumer.h.
References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.
|
inherited |
|
inherited |
|
inherited |
Definition at line 214 of file Consumer.h.
References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.
|
inlineinherited |
Definition at line 40 of file ProducerBase.h.
References art::ProducerBase::getProductID(), and string.
|
staticinherited |
Referenced by art::RootOutput::beginSubRun(), 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::EmptyEvent::readRun_(), and art::EmptyEvent::readSubRun_().
|
protectedinherited |
|
virtual |
Slice for the PID
Implements art::EDProducer.
Definition at line 150 of file XnuePID_module.cc.
References util::CreateAssn(), stan::math::fabs(), fbdtXnue, fbdtXnueMethodName, fInputVarsXnue, fInstLabel2D, fInstLabel3D, check_time_usage::float, fProngLabel, fSliceLabel, fVertexLabel, art::DataViewImpl::getByLabel(), rb::RecoHit::GeV(), MECModelEnuComparisons::i, ip, rb::RecoHit::IsCalibrated(), rb::IsFiltered(), rb::Cluster::IsNoise(), calib::j, geo::kXorY, nplanes, nprongs, BlessedPlots::pid, rb::CellHit::Plane(), art::Event::put(), xnue::Xnue::SetEfrac10p(), xnue::Xnue::SetEfrac2sig(), xnue::Xnue::SetEfracp2(), xnue::Xnue::SetEfracp3(), xnue::Xnue::SetEfracp4(), xnue::Xnue::SetEmaxfrac6p(), xnue::Xnue::SetP1Energy(), xnue::Xnue::SetP1Fmip(), xnue::Xnue::SetP2Fmip(), rb::PID::SetPdg(), rb::PID::SetVal(), rb::RecoHit::X(), and rb::RecoHit::Y().
|
protectedinherited |
Referenced by art::RootOutput::endJob().
|
protectedinherited |
|
protected |
Reader for Xnue15.
Definition at line 88 of file XnuePID_module.cc.
Referenced by beginJob(), produce(), and ~XnuePID().
|
protected |
Definition at line 89 of file XnuePID_module.cc.
Referenced by beginJob(), and produce().
|
protected |
Vector of the variables that are input for TMVA.
Definition at line 86 of file XnuePID_module.cc.
Referenced by bookVariables(), produce(), and XnuePID().
|
protected |
Instance label for 2d prongs.
Definition at line 83 of file XnuePID_module.cc.
|
protected |
Instance label for 3d prongs.
Definition at line 82 of file XnuePID_module.cc.
|
protected |
Label for prong.
Definition at line 81 of file XnuePID_module.cc.
|
protected |
Label for slices.
Definition at line 80 of file XnuePID_module.cc.
|
protected |
Label for vertex.
Definition at line 84 of file XnuePID_module.cc.
|
protected |
Xnue weight file name.
Definition at line 79 of file XnuePID_module.cc.
Referenced by beginJob(), and XnuePID().