4 #include "fhiclcpp/ParameterSet.h"
5 #include "gallery/ValidHandle.h"
6 #include "canvas/Utilities/InputTag.h"
7 #include "nusimdata/SimulationBase/MCTruth.h"
8 #include "nusimdata/SimulationBase/MCNeutrino.h"
23 fhicl::ParameterSet pconfig = config->get<fhicl::ParameterSet>(
"SBNOsc");
26 fTruthTag = { pconfig.get<std::string>(
"MCTruthTag",
"generator") };
39 <<
"(" <<
fNuCount <<
" neutrinos selected)"
45 auto const& mctruths = \
46 *ev.getValidHandle<std::vector<simb::MCTruth> >(
fTruthTag);
49 for (
size_t i=0; i<mctruths.size(); i++) {
50 auto const& mctruth = mctruths.at(i);
51 const simb::MCNeutrino&
nu = mctruth.GetNeutrino();
53 if (nu.CCNC() ==
simb::kCC && nu.Mode() == 0 && nu.Nu().PdgCode() == 12) {
55 reco.push_back(interaction);
59 bool selected = !reco.empty();
void Initialize(fhicl::ParameterSet *config=NULL)
unsigned fNuCount
Count selected events.
process_name opflashCryoW ana
Charged-current interactions.
Contains truth level information and additional fields for selection-defined reconstruction informati...
process_name standard_reco_uboone reco
unsigned fEventCounter
Count processed events.
#define DECLARE_SBN_PROCESSOR(classname)
Electron neutrino event selection.
bool ProcessEvent(const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)
art::InputTag fTruthTag
art tag for MCTruth information
BEGIN_PROLOG could also be cout