4 #include "TGeoManager.h"
6 #include "art/Framework/Core/EDFilter.h"
7 #include "art/Framework/Core/ModuleMacros.h"
8 #include "art/Framework/Principal/Event.h"
9 #include "nusimdata/SimulationBase/MCTruth.h"
10 #include "nusimdata/SimulationBase/MCNeutrino.h"
17 explicit GenNuFilter(fhicl::ParameterSet
const & pset);
18 virtual bool filter(art::Event&
e)
override;
42 fLepPDGs = pset.get<std::vector<int>>(
"LepPDGs");
43 fCC = pset.get<
bool>(
"CC");
44 fNC = pset.get<
bool>(
"NC");
51 auto mclists = e.getMany< std::vector<simb::MCTruth> >();
52 for (
unsigned int i = 0; i < mclists.size() ; i++){
53 for (
unsigned int j = 0; j < mclists[i]->size(); j++){
55 const art::Ptr<simb::MCTruth> mc_truth(mclists[i],j);
56 if(mc_truth->Origin() == simb::kBeamNeutrino){
57 simb::MCNeutrino
nu = mc_truth->GetNeutrino();
59 double vtxX = nu.Nu().Vx();
60 double vtxY = nu.Nu().Vy();
61 double vtxZ = nu.Nu().Vz();
62 TVector3 vtx(vtxX, vtxY, vtxZ);
70 int lepPdg = nu.Lepton().PdgCode();
std::vector< int > fLepPDGs
GenNuFilter(fhicl::ParameterSet const &pset)
virtual bool filter(art::Event &e) override
Charged-current interactions.
void reconfigure(fhicl::ParameterSet const &pset)
Neutral-current interactions.
virtual void beginJob() override
bool IsInsideTPC(TVector3 position, double distance_buffer)