50 auto const& geom = *(lar::providerFrom<geo::Geometry>());
54 auto allmclists = evt.
getMany<std::vector<simb::MCTruth>>();
56 bool inCryostatNu =
false;
57 for (
auto const& mclistHandle : allmclists) {
62 auto const&
part = mct.GetParticle(
ipart);
64 if (absPDGID == 12 || absPDGID == 14 || absPDGID == 16) {
65 const TLorentzVector& end4 =
part.EndPosition();
66 if (geom.PositionToCryostatPtr({end4.X(), end4.Y(), end4.Z()}) !=
nullptr) {
Utilities related to art service access.
constexpr auto abs(T v)
Returns the absolute value of the argument.
Access the description of detector geometry.
#define DEFINE_ART_MODULE(klass)
FilterCryostatNus(fhicl::ParameterSet const &pset)
bool filter(art::Event &) override
EDFilter(fhicl::ParameterSet const &pset)
Event generator information.
art framework interface to geometry description
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const