18 #include "cetlib_except/exception.h" 61 bool interactionDesired(
false);
67 std::vector<art::Ptr<simb::MCTruth>> mclist;
76 std::set<art::Ptr<simb::MCTruth>> mctSetGENIE;
77 for (
size_t i = 0; i < mctruthListHandle->size(); ++i) {
79 if (mctSetGENIE.find(mct_ptr) == mctSetGENIE.end()) mctSetGENIE.insert(mct_ptr);
114 for (
size_t i = 0; i < mcpHandle->size() && !inTPC; ++i) {
117 if (mctSetGENIE.find(mct) == mctSetGENIE.end()) {
131 int n =
part->NumberTrajectoryPoints();
132 for (
int j = 0; j < n && !inTPC; ++j) {
135 TVector3 pos =
part->Position(j).Vect();
136 if (pos.X() >= xmin && pos.X() <= xmax && pos.Y() >= ymin && pos.Y() <= ymax &&
137 pos.Z() >= zmin && pos.Z() <= zmax) {
138 interactionDesired =
true;
140 std::cout <<
"FilterNoDirtNeutrinos: Genie daughter found in TPC. G4Particle " 148 return interactionDesired;
std::string fLArG4ModuleLabel
Length_t DetHalfWidth(TPCID const &tpcid=tpc_zero) const
Returns the half width of the active volume of the specified TPC.
Length_t CryostatHalfWidth(CryostatID const &cid=cryostat_zero) const
Returns the half width of the cryostat (x direction)
Length_t CryostatHalfHeight(CryostatID const &cid=cryostat_zero) const
Returns the height of the cryostat (y direction)
Length_t DetLength(TPCID const &tpcid=tpc_zero) const
Returns the length of the active volume of the specified TPC.
std::string fGenModuleLabel
bool fKeepCryostatNeutrinos
#define DEFINE_ART_MODULE(klass)
FilterNoDirtNeutrinos(fhicl::ParameterSet const &pset)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
EDFilter(fhicl::ParameterSet const &pset)
Length_t DetHalfHeight(TPCID const &tpcid=tpc_zero) const
Returns the half height of the active volume of the specified TPC.
bool filter(art::Event &) override
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
art framework interface to geometry description