165 art::ValidHandle<std::vector<simb::MCTruth>>
const & ev_mct =
166 e.getValidHandle<std::vector<simb::MCTruth>>(
"generator");
175 for(
size_t ith = 0; ith < ev_mct->size(); ++ith) {
177 simb::MCTruth
const & mct = ev_mct->at(ith);
179 if(mct.GetNeutrino().CCNC() != 1)
continue;
181 std::vector<size_t> exiting_photon_parents;
182 for(
int jth = 0; jth < mct.NParticles(); ++jth) {
183 simb::MCParticle
const & mcp = mct.GetParticle(jth);
186 if(
abs(mcp.Vx())>210 ||
abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){
187 std::cout<<
"OUTSIDE TPC x y z ="<<mcp.Vx()<<
" "<<mcp.Vy()<<
" "<<mcp.Vz()<<std::endl;
191 if(mcp.TrackId() != jth) {
192 std::cout <<
"ERROR: " << __LINE__ <<
" " << __PRETTY_FUNCTION__ <<
"\nTrackId does not match index\n";
195 if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22))
continue;
196 exiting_photon_parents.push_back(mcp.Mother());
200 std::vector<size_t> in_nucleus_photons;
201 for(
size_t const s : exiting_photon_parents) {
202 simb::MCParticle
const & mcp = mct.GetParticle(
s);
204 if(
abs(mcp.PdgCode()) != 2114 &&
abs(mcp.PdgCode()) != 2214 ) {
209 std::cout<<
"\nYES a resonant evt: "<<mcp.PdgCode()<<std::endl;
211 }
else if(mcp.PdgCode() == 22) {
212 in_nucleus_photons.push_back(mcp.Mother());
216 for(
size_t const s : in_nucleus_photons) {
217 simb::MCParticle
const & mcp = mct.GetParticle(
s);
218 if(
abs(mcp.PdgCode()) != 2114 &&
abs(mcp.PdgCode()) != 2214) {
221 std::cout<<
"\nYES a resonant evt with 2 photons: "<<mcp.PdgCode()<<std::endl;
void cout_stuff(art::Event &e, bool passed)
then echo File list $list not found else cat $list while read file do echo $file sed s
BEGIN_PROLOG could also be cout