151 art::ValidHandle<std::vector<simb::MCTruth>>
const & ev_mct =
152 e.getValidHandle<std::vector<simb::MCTruth>>(
"generator");
154 for(
size_t i = 0; i < ev_mct->size(); ++i) {
156 simb::MCTruth
const & mct = ev_mct->at(i);
157 if(mct.GetNeutrino().CCNC() != 1)
continue;
159 std::vector<size_t> exiting_photon_parents;
160 for(
int i = 0; i < mct.NParticles(); ++i) {
161 simb::MCParticle
const & mcp = mct.GetParticle(i);
162 if(mcp.TrackId() != i) {
163 std::cout <<
"ERROR: " << __LINE__ <<
" " << __PRETTY_FUNCTION__ <<
"\nTrackId does not match index\n";
166 if(!(mcp.StatusCode() == 1 && mcp.PdgCode() == 22))
continue;
167 exiting_photon_parents.push_back(mcp.Mother());
170 std::vector<size_t> in_nucleus_photons;
171 for(
size_t const s : exiting_photon_parents) {
172 simb::MCParticle
const & mcp = mct.GetParticle(
s);
174 if(
abs(mcp.Vx())>210 ||
abs(mcp.Vy())>210||mcp.Vz()>510 || mcp.Vz()<-1){
175 std::cout<<
"OUTSIDE TPC x y z ="<<mcp.Vx()<<
" "<<mcp.Vy()<<
" "<<mcp.Vz()<<std::endl;
178 if(
abs(mcp.PdgCode()) == 2114 ||
abs(mcp.PdgCode()) == 2214) {
182 else if(mcp.PdgCode() == 22) {
183 in_nucleus_photons.push_back(mcp.Mother());
187 for(
size_t const s : in_nucleus_photons) {
188 simb::MCParticle
const & mcp = mct.GetParticle(
s);
189 if(
abs(mcp.PdgCode()) == 2114 ||
abs(mcp.PdgCode()) == 2214) {
void FillTree(art::Event &e, size_t const mct_index, size_t const parent_index, bool const is_nc_delta_radiative)
then echo File list $list not found else cat $list while read file do echo $file sed s
BEGIN_PROLOG could also be cout