26 #include "TGeoManager.h" 27 #include "TLorentzVector.h" 70 auto const& mctruths =
81 geoManager->SetCurrentPoint(particle.
Vx(), particle.
Vy(), particle.
Vz());
82 TVector3 unitMom=particle.
Momentum().Vect().Unit();
83 geoManager->SetCurrentDirection(unitMom.X(), unitMom.Y(), unitMom.Z());
84 geoManager->FindNextBoundaryAndStep();
86 while(!geoManager->IsOutside()){
87 geoManager->FindNextBoundaryAndStep();
88 if(TString(geoManager->GetPath()).Contains(volumeName))
return true;
TGeoManager * ROOTGeoManager() const
Access to the ROOT geometry description manager.
art framework interface to geometry description
bool intersectsVolume(const simb::MCParticle &particle, const char *volumeName) const
#define DEFINE_ART_MODULE(klass)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
double Vx(const int i=0) const
CosmicFilter(fhicl::ParameterSet const &p)
const TLorentzVector & Momentum(const int i=0) const
EDFilter(fhicl::ParameterSet const &pset)
double Vz(const int i=0) const
CosmicFilter & operator=(CosmicFilter const &)=delete
Event generator information.
art::ServiceHandle< geo::Geometry > geom
bool filter(art::Event &e) override
double Vy(const int i=0) const