3 #include "art/Framework/Core/EDFilter.h"
4 #include "art/Framework/Core/ModuleMacros.h"
5 #include "art/Framework/Principal/Event.h"
10 #include "nusimdata/SimulationBase/MCParticle.h"
18 virtual bool filter(art::Event&
e)
override;
33 double EnergyInTPC(
const art::Ptr<simb::MCParticle> particle);
59 art::Handle<std::vector<simb::MCParticle> > particles;
64 for (
unsigned int part_i = 0; part_i < particles->size(); part_i++){
66 const art::Ptr<simb::MCParticle> particle(particles, part_i);
69 double time = particle->T() * 1e-3;
94 if(particle->StatusCode() != 1)
return false;
97 int pdg = particle->PdgCode();
98 if(!(pdg==11 || pdg==13 || pdg==211 || pdg==321 || pdg==2212))
return false;
116 int npts = particle->NumberTrajectoryPoints();
117 for (
int i = 1; i < npts; i++){
118 TVector3 pos(particle->Vx(i), particle->Vy(i), particle->Vz(i));
120 if (pos[0] >= xmin && pos[0] <= xmax && pos[1] >= ymin && pos[1] <= ymax && pos[2] >= zmin && pos[2] <= zmax){
121 e_dep += particle->E(i-1) - particle->E(i);
Utilities related to art service access.
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
void reconfigure(fhicl::ParameterSet const &pset)
bool IsInterestingParticle(const art::Ptr< simb::MCParticle > particle)
std::string fLArG4ModuleName
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
Access the description of detector geometry.
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
virtual void beginJob() override
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
Description of geometry of one entire detector.
geo::GeometryCore const * fGeometryService
LArG4FakeTriggerFilter(fhicl::ParameterSet const &pset)
double EnergyInTPC(const art::Ptr< simb::MCParticle > particle)
art framework interface to geometry description
virtual bool filter(art::Event &e) override