79 auto hepmc3_col =
event.getObject<std::vector<ldmx::HepMC3GenEvent> >(
82 if (hepmc3_col.size() < 1) {
87 auto const& hepmc3_ev = hepmc3_col.at(0).getHepMCGenEvent();
90 auto interaction_type_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
91 "GENIE.Interaction.InteractionType");
92 if (interaction_type_ptr)
93 ntuple_.
setVar<
int>(
"interaction_type", interaction_type_ptr->value());
94 auto scattering_type_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
95 "GENIE.Interaction.ScatteringType");
96 if (scattering_type_ptr)
97 ntuple_.
setVar<
int>(
"scattering_type", scattering_type_ptr->value());
98 auto rescatter_code_ptr =
99 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.RescatterCode");
100 if (rescatter_code_ptr)
101 ntuple_.
setVar<
int>(
"rescatter_code", rescatter_code_ptr->value());
104 auto kvar_labels_ptr = hepmc3_ev.attribute<HepMC3::VectorIntAttribute>(
105 "GENIE.Interaction.KineVarLabels");
106 auto kvar_values_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
107 "GENIE.Interaction.KineVarValues");
108 if (kvar_labels_ptr && kvar_values_ptr) {
109 auto kvar_labels = kvar_labels_ptr->value();
110 auto kvar_values = kvar_values_ptr->value();
111 for (
size_t i = 0; i < kvar_labels.size(); ++i) {
112 if (kvar_labels[i] == genie::EKineVar::kKVSelx)
114 else if (kvar_labels[i] == genie::EKineVar::kKVSely)
116 else if (kvar_labels[i] == genie::EKineVar::kKVSelQ2)
118 else if (kvar_labels[i] == genie::EKineVar::kKVSelW)
125 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.Interaction.ProbePDG");
126 if (lep_pdg_ptr)
ntuple_.
setVar<
int>(
"lep_pdg", lep_pdg_ptr->value());
128 auto lep_i_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
129 "GENIE.Interaction.ProbeP4");
130 if (lep_i_4vec_ptr) {
131 auto lep_i_4vec = lep_i_4vec_ptr->value();
137 auto lep_f_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
138 "GENIE.Interaction.FSLeptonP4");
139 if (lep_f_4vec_ptr) {
140 auto lep_f_4vec = lep_f_4vec_ptr->value();
149 hepmc3_ev.attribute<HepMC3::IntAttribute>(
"GENIE.Interaction.TargetPDG");
150 if (tgt_pdg_ptr)
ntuple_.
setVar<
int>(
"tgt_pdg", tgt_pdg_ptr->value());
152 auto tgt_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
153 "GENIE.Interaction.TargetP4");
155 auto tgt_4vec = tgt_4vec_ptr->value();
163 auto hnuc_pdg_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
164 "GENIE.Interaction.HitNucleonPDG");
165 if (hnuc_pdg_ptr)
ntuple_.
setVar<
int>(
"hnuc_pdg", hnuc_pdg_ptr->value());
167 auto hitnuc_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
168 "GENIE.Interaction.HitNucleonP4");
169 if (hitnuc_4vec_ptr) {
170 auto hitnuc_4vec = hitnuc_4vec_ptr->value();
178 auto hqrkpdg_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
179 "GENIE.Interaction.HitQuarkPDG");
180 if (hqrkpdg_ptr)
ntuple_.
setVar<
int>(
"hqrk_pdg", hqrkpdg_ptr->value());
181 auto hqrksea_ptr = hepmc3_ev.attribute<HepMC3::IntAttribute>(
182 "GENIE.Interaction.HitSeaQuark");
183 if (hqrksea_ptr)
ntuple_.
setVar<
int>(
"hqrk_sea", hqrksea_ptr->value());
185 auto hadsys_4vec_ptr = hepmc3_ev.attribute<HepMC3::VectorDoubleAttribute>(
186 "GENIE.Interaction.HadSystP4");
187 if (hadsys_4vec_ptr) {
188 auto hadsys_4vec = hadsys_4vec_ptr->value();