Calculate final PID variables from match details. More...
Public Types | |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
MakePID (const fhicl::ParameterSet &pset) | |
~MakePID () | |
virtual void | beginJob () |
virtual void | beginRun (art::Run &run) |
virtual void | produce (art::Event &evt) |
virtual void | reconfigure (const fhicl::ParameterSet &pset) |
std::string | workerType () const |
void | doBeginJob () |
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) |
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) |
Protected Types | |
enum | WeightScheme { kUnweighted, kSimple, kExp, kSigOnly, kSigOnlyExp, kBkgOnly, kBkgOnlyExp, kSig50Only, kSig90Only, kPi0Only } |
enum | MatchVar { kSigFrac, kBkgFrac, kNumuFrac, kY, kQFrac, kSigFrac50, kSigFrac90, kL0, kL1, kTrueEVis, kQESigFrac, kResSigFrac, kDISSigFrac, kQENCFrac, kResNCFrac, kDISNCFrac, kQENumuFrac, kResNumuFrac, kDISNumuFrac } |
Protected Member Functions | |
void | AvgAndFit (const std::vector< MatchSummary > &matches, WeightScheme weightScheme, MatchVar matchVar, double &mean, double &fit) const |
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 () |
Protected Attributes | |
bool | fScaleCalE |
std::vector< double > | fExpTable |
double | fNCScale |
double | fSigScale |
double | fEnrichScale |
double | fExpLength |
double | fExpPow |
bool | fTrimMatchLists |
bool | fUseFitInput |
bool | fPositionalWeight |
std::string | fMatchesLabel |
std::string | fSummarizeLabel |
TMVA::Reader * | fReader |
dec::Forest * | fForest |
TH1 * | fFlatHist |
Calculate final PID variables from match details.
Definition at line 48 of file MakePID_module.cc.
|
inherited |
Definition at line 17 of file EDProducer.h.
|
inherited |
Definition at line 25 of file Producer.h.
|
inherited |
Definition at line 18 of file EDProducer.h.
|
protected |
Enumerator | |
---|---|
kSigFrac | |
kBkgFrac | |
kNumuFrac | |
kY | |
kQFrac | |
kSigFrac50 | |
kSigFrac90 | |
kL0 | |
kL1 | |
kTrueEVis | |
kQESigFrac | |
kResSigFrac | |
kDISSigFrac | |
kQENCFrac | |
kResNCFrac | |
kDISNCFrac | |
kQENumuFrac | |
kResNumuFrac | |
kDISNumuFrac |
Definition at line 75 of file MakePID_module.cc.
|
protected |
Enumerator | |
---|---|
kUnweighted | |
kSimple | |
kExp | |
kSigOnly | |
kSigOnlyExp | |
kBkgOnly | |
kBkgOnlyExp | |
kSig50Only | |
kSig90Only | |
kPi0Only |
Definition at line 62 of file MakePID_module.cc.
|
explicit |
Definition at line 124 of file MakePID_module.cc.
References ana::assert(), om::cout, allTimeWatchdog::endl, util::EnvExpansion(), fFlatHist, fForest, fReader, lem::dec::Forest::FromFile(), fhicl::ParameterSet::get(), gJunk, gTMVAVar, path, reconfigure(), and string.
lem::MakePID::~MakePID | ( | ) |
|
protected |
Definition at line 236 of file MakePID_module.cc.
References abs(), plot_validation_datamc::c, lem::MatchSummary::ccnc, fExpLength, fExpPow, fExpTable, fPositionalWeight, MECModelEnuComparisons::i, makeTrainCVSamples::int, lem::MatchSummary::isSig, kBkgFrac, kBkgOnly, kBkgOnlyExp, simb::kCC, simb::kDIS, kDISNCFrac, kDISNumuFrac, kDISSigFrac, kExp, kL0, kL1, simb::kNC, kNumuFrac, kPi0Only, simb::kQE, kQENCFrac, kQENumuFrac, kQESigFrac, kQFrac, simb::kRes, kResNCFrac, kResNumuFrac, kResSigFrac, kSig50Only, kSig90Only, kSigFrac, kSigFrac50, kSigFrac90, kSigOnly, kSigOnlyExp, kTrueEVis, kUnweighted, kY, util::LinFit(), util::LinFitUnweighted(), m, cafExposure::match, lem::MatchSummary::mode, lem::MatchSummary::pdg, lem::MatchSummary::photE0, lem::MatchSummary::photE1, lem::MatchSummary::photL0, lem::MatchSummary::photL1, lem::MatchSummary::potential, cet::pow(), lem::MatchSummary::qFrac, PandAna.Demos.pi0_spectra::tot, lem::MatchSummary::trueEVis, w, lem::MatchSummary::weight, and lem::MatchSummary::y.
Referenced by produce().
|
virtual |
Reimplemented from art::EDProducer.
Definition at line 209 of file MakePID_module.cc.
References fExpLength, fExpPow, fExpTable, MECModelEnuComparisons::i, lem::kMaxNumMatches, and cet::pow().
Reimplemented from art::EDProducer.
Definition at line 218 of file MakePID_module.cc.
References ana::assert(), om::cout, art::Handle< T >::failedToGet(), fEnrichScale, fMatchesLabel, fNCScale, fSigScale, art::DataViewImpl::getByLabel(), lem::LibrarySummary::nSwapNC, lem::LibrarySummary::nTrueNC, lem::LibrarySummary::totBkg, lem::LibrarySummary::totEnrich, and lem::LibrarySummary::totSig.
|
protectedinherited |
Definition at line 55 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.
|
protectedinherited |
|
protectedinherited |
Definition at line 69 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.
|
protectedinherited |
|
inherited |
Definition at line 62 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Definition at line 76 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.
|
protectedinherited |
Definition at line 90 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.
|
protectedinherited |
|
inherited |
Definition at line 83 of file ModuleBase.h.
References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.
|
inherited |
|
virtual |
Implements art::EDProducer.
Definition at line 327 of file MakePID_module.cc.
References ana::assert(), AvgAndFit(), plot_validation_datamc::c, lem::dec::Forest::Classify(), util::CreateAssn(), DEFINE_ART_MODULE(), e, lem::PIDExtraVars::fAvgExpE, lem::PIDExtraVars::fAvgInvE, lem::PIDExtraVars::fAvgSigE, lem::PIDExtraVars::fBestBkgPotential, lem::PIDExtraVars::fBestEnrichPotential, lem::PIDExtraVars::fBestSigPotential, lem::PIDExtraVars::fChiBkg, lem::PIDExtraVars::fChiBkgExp, lem::PIDExtraVars::fChiSig, lem::PIDExtraVars::fChiSigExp, lem::PIDExtraVars::fDecTreePID, lem::PIDExtraVars::fDISNCFracExp, lem::PIDExtraVars::fDISNumuFracExp, lem::PIDExtraVars::fDISSigFracExp, lem::PIDExtraVars::fEnergyDiff, lem::PIDExtraVars::fEnergyDiffExp, lem::PIDExtraVars::fEnrichFrac, lem::PIDExtraVars::fEnrichFracExp, lem::PIDExtraVars::fEnrichFracFit, lem::PIDExtraVars::fEnrichQFrac, lem::PIDExtraVars::fEnrichQFracExp, lem::PIDExtraVars::fEnrichQFracFit, fEnrichScale, fExpLength, fExpPow, fExpTable, fFlatHist, fForest, fMatchesLabel, lem::PIDExtraVars::fMeanL0Exp, lem::PIDExtraVars::fMeanL0Fit, lem::PIDExtraVars::fMeanL0PiOnlyExp, lem::PIDExtraVars::fMeanL0PiOnlyFit, lem::PIDExtraVars::fMeanL1Exp, lem::PIDExtraVars::fMeanL1Fit, lem::PIDExtraVars::fMeanL1PiOnlyExp, lem::PIDExtraVars::fMeanL1PiOnlyFit, lem::PIDExtraVars::fMeanMatchEExp, lem::PIDExtraVars::fMeanQFrac, lem::PIDExtraVars::fMeanQFracBkg, lem::PIDExtraVars::fMeanQFracBkgExp, lem::PIDExtraVars::fMeanQFracBkgFit, lem::PIDExtraVars::fMeanQFracExp, lem::PIDExtraVars::fMeanQFracFit, lem::PIDExtraVars::fMeanQFracSig, lem::PIDExtraVars::fMeanQFracSigExp, lem::PIDExtraVars::fMeanQFracSigFit, lem::PIDExtraVars::fMeanQFracSigY50Fit, lem::PIDExtraVars::fMeanQFracSigY90Fit, lem::PIDExtraVars::fMeanY, lem::PIDExtraVars::fMeanYExp, lem::PIDExtraVars::fMeanYFit, lem::PIDExtraVars::fMeanYSig, lem::PIDExtraVars::fMeanYSigExp, lem::PIDExtraVars::fMeanYSigFit, lem::PIDExtraVars::fMeanYSigY50Fit, lem::PIDExtraVars::fMeanYSigY90Fit, PandAna.Demos.pi0_spectra::fmt, fNCScale, lem::PIDExtraVars::fPIDExp, lem::PIDExtraVars::fPIDExpFit, lem::PIDExtraVars::fPIDFit, lem::PIDExtraVars::fPIDFitUnweight, lem::PIDExtraVars::fPIDFracNumuFit, lem::PIDExtraVars::fPIDy50Fit, lem::PIDExtraVars::fPIDy90Fit, fPositionalWeight, lem::PIDExtraVars::fQENCFracExp, lem::PIDExtraVars::fQENumuFracExp, lem::PIDExtraVars::fQESigFracExp, fReader, lem::PIDExtraVars::fResNCFracExp, lem::PIDExtraVars::fResNumuFracExp, lem::PIDExtraVars::fResSigFracExp, fScaleCalE, fSigScale, fSummarizeLabel, lem::PIDExtraVars::fTMVABDT, lem::PIDExtraVars::fTMVABDTD, lem::PIDExtraVars::fTMVABDTG, lem::PIDExtraVars::fTMVABDTG_CC, lem::PIDExtraVars::fTMVABDTMF, lem::PIDExtraVars::fTMVAMLP, lem::PIDExtraVars::fTMVAMLP_CC, fTrimMatchLists, fUseFitInput, art::DataViewImpl::getByLabel(), gTMVAVar, MECModelEnuComparisons::i, dumpEventsToText::inputs, kBkgFrac, kBkgOnly, kBkgOnlyExp, kDISNCFrac, kDISNumuFrac, kDISSigFrac, kExp, kL0, kL1, kNumuFrac, kPi0Only, kQENCFrac, kQENumuFrac, kQESigFrac, kQFrac, kResNCFrac, kResNumuFrac, kResSigFrac, kSig50Only, kSig90Only, kSigFrac, kSigFrac50, kSigFrac90, kSigOnly, kSigOnlyExp, kSimple, kTrueEVis, kUnweighted, kY, m, lem::MatchList::matches, overlay_prestage_def::matches, lem::PIDDetails::matchList, num, BlessedPlots::pid, cet::pow(), art::DataViewImpl::put(), util::sqr(), lem::dec::Evt::vars, lem::PIDDetails::vars, vars, and w.
|
virtual |
Definition at line 195 of file MakePID_module.cc.
References fExpLength, fExpPow, fMatchesLabel, fPositionalWeight, fScaleCalE, fSummarizeLabel, fTrimMatchLists, fUseFitInput, fhicl::ParameterSet::get(), and string.
Referenced by MakePID().
|
inherited |
|
inherited |
|
inherited |
Referenced by art::EDProducer::EDProducer().
|
protected |
Definition at line 105 of file MakePID_module.cc.
Referenced by beginRun(), and produce().
|
protected |
Definition at line 107 of file MakePID_module.cc.
Referenced by AvgAndFit(), beginJob(), produce(), and reconfigure().
|
protected |
Definition at line 107 of file MakePID_module.cc.
Referenced by AvgAndFit(), beginJob(), produce(), and reconfigure().
|
protected |
Definition at line 101 of file MakePID_module.cc.
Referenced by AvgAndFit(), beginJob(), and produce().
|
protected |
Definition at line 120 of file MakePID_module.cc.
|
protected |
Definition at line 118 of file MakePID_module.cc.
Referenced by MakePID(), produce(), and ~MakePID().
|
protected |
Definition at line 114 of file MakePID_module.cc.
Referenced by beginRun(), produce(), and reconfigure().
|
protected |
Definition at line 103 of file MakePID_module.cc.
Referenced by beginRun(), and produce().
|
protected |
Definition at line 113 of file MakePID_module.cc.
Referenced by AvgAndFit(), produce(), and reconfigure().
|
protected |
Definition at line 117 of file MakePID_module.cc.
Referenced by MakePID(), produce(), and ~MakePID().
|
protected |
Definition at line 60 of file MakePID_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
Definition at line 104 of file MakePID_module.cc.
Referenced by beginRun(), and produce().
|
protected |
Definition at line 115 of file MakePID_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
Definition at line 111 of file MakePID_module.cc.
Referenced by produce(), and reconfigure().
|
protected |
Definition at line 112 of file MakePID_module.cc.
Referenced by produce(), and reconfigure().