64 bool interactionDesired(
false);
66 art::ServiceHandle<geo::Geometry const> geom;
69 art::Handle< std::vector<simb::MCTruth> > mctruthListHandle;
70 std::vector<art::Ptr<simb::MCTruth> > mclist;
71 art::Handle<std::vector<simb::MCParticle> > mcpHandle;
76 art::fill_ptr_vector(mclist, mctruthListHandle);
81 std::set<art::Ptr<simb::MCTruth> > mctSetGENIE;
82 for(
size_t i=0; i<mctruthListHandle->size(); ++i)
84 art::Ptr<simb::MCTruth> mct_ptr(mctruthListHandle,i);
85 if( mctSetGENIE.find(mct_ptr) == mctSetGENIE.end() ) mctSetGENIE.insert(mct_ptr);
89 art::FindOneP<simb::MCTruth> assMCT(mcpHandle,
evt,
"largeant");
101 xmin = geom->DetHalfWidth() - geom->CryostatHalfWidth();
102 xmax = geom->DetHalfWidth() + geom->CryostatHalfWidth();
103 ymin = -geom->CryostatHalfHeight();
104 ymax = geom->CryostatHalfHeight();
105 zmin = geom->DetLength()/2. - geom->DetLength()/2.;
106 zmax = geom->DetLength()/2. + geom->DetLength()/2.;
112 xmax = 2.*geom->DetHalfWidth();
113 ymin = -geom->DetHalfHeight();
114 ymax = geom->DetHalfHeight();
116 zmax = geom->DetLength();
122 for(
size_t i=0; i < mcpHandle->size() && !inTPC; ++i)
124 const art::Ptr<simb::MCParticle> mcp_ptr(mcpHandle,i);
125 const art::Ptr<simb::MCTruth> &mct = assMCT.at(i);
126 if( mctSetGENIE.find(mct) == mctSetGENIE.end() )
135 const simb::MCParticle* part(&mcpHandle->at(i));
142 int n = part->NumberTrajectoryPoints();
143 for(
int j = 0; j < n && !inTPC; ++j)
147 TVector3 pos = part->Position(j).Vect();
148 if(pos.X() >= xmin &&
155 interactionDesired =
true;
157 std::cout <<
"FilterNoDirtNeutrinos: Genie daughter found in TPC. G4Particle " << std::endl ;
164 return interactionDesired;
std::string fLArG4ModuleLabel
std::string fGenModuleLabel
bool fKeepCryostatNeutrinos
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
BEGIN_PROLOG could also be cout