81 auto hepmc3_col =
event.getObject<std::vector<ldmx::HepMC3GenEvent> >(
84 if (hepmc3_col.size() < 1) {
89 auto const& hepmc3_ev = hepmc3_col.at(0).getHepMCGenEvent();
92 auto interaction_type_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
93 "GENIE.Interaction.InteractionType");
94 if (interaction_type_ptr)
95 ntuple_.
setVar<
int>(
"interaction_type", interaction_type_ptr->value());
96 auto scattering_type_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
97 "GENIE.Interaction.ScatteringType");
98 if (scattering_type_ptr)
99 ntuple_.
setVar<
int>(
"scattering_type", scattering_type_ptr->value());
100 auto rescatter_code_ptr =
101 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.RescatterCode");
102 if (rescatter_code_ptr)
103 ntuple_.
setVar<
int>(
"rescatter_code", rescatter_code_ptr->value());
106 auto kvar_labels_ptr = hepmc3_ev.attribute<HepMC3::VectorIntAttribute>(
107 "GENIE.Interaction.KineVarLabels");
108 auto kvar_values_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
109 "GENIE.Interaction.KineVarValues");
110 if (kvar_labels_ptr && kvar_values_ptr) {
111 auto kvar_labels = kvar_labels_ptr->value();
112 auto kvar_values = kvar_values_ptr->value();
113 for (
size_t i = 0; i < kvar_labels.size(); ++i) {
114 if (kvar_labels[i] == genie::EKineVar::kKVSelx)
116 else if (kvar_labels[i] == genie::EKineVar::kKVSely)
118 else if (kvar_labels[i] == genie::EKineVar::kKVSelQ2)
120 else if (kvar_labels[i] == genie::EKineVar::kKVSelW)
127 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.Interaction.ProbePDG");
128 if (lep_pdg_ptr)
ntuple_.
setVar<
int>(
"lep_pdg", lep_pdg_ptr->value());
130 auto lep_i_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
131 "GENIE.Interaction.ProbeP4");
132 if (lep_i_4vec_ptr) {
133 auto lep_i_4vec = lep_i_4vec_ptr->value();
139 auto lep_f_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
140 "GENIE.Interaction.FSLeptonP4");
141 if (lep_f_4vec_ptr) {
142 auto lep_f_4vec = lep_f_4vec_ptr->value();
151 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.Interaction.TargetPDG");
152 if (tgt_pdg_ptr)
ntuple_.
setVar<
int>(
"tgt_pdg", tgt_pdg_ptr->value());
154 auto tgt_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
155 "GENIE.Interaction.TargetP4");
157 auto tgt_4vec = tgt_4vec_ptr->value();
165 auto hnuc_pdg_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
166 "GENIE.Interaction.HitNucleonPDG");
167 if (hnuc_pdg_ptr)
ntuple_.
setVar<
int>(
"hnuc_pdg", hnuc_pdg_ptr->value());
169 auto hitnuc_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
170 "GENIE.Interaction.HitNucleonP4");
171 if (hitnuc_4vec_ptr) {
172 auto hitnuc_4vec = hitnuc_4vec_ptr->value();
180 auto hqrkpdg_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
181 "GENIE.Interaction.HitQuarkPDG");
182 if (hqrkpdg_ptr)
ntuple_.
setVar<
int>(
"hqrk_pdg", hqrkpdg_ptr->value());
183 auto hqrksea_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
184 "GENIE.Interaction.HitSeaQuark");
185 if (hqrksea_ptr)
ntuple_.
setVar<
int>(
"hqrk_sea", hqrksea_ptr->value());
187 auto hadsys_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
188 "GENIE.Interaction.HadSystP4");
189 if (hadsys_4vec_ptr) {
190 auto hadsys_4vec = hadsys_4vec_ptr->value();