31#include "marley/Reaction.hh"
46namespace marley_hepmc3 {
49 constexpr int NUHEPMC_MAJOR_VERSION = 1;
50 constexpr int NUHEPMC_MINOR_VERSION = 0;
51 constexpr int NUHEPMC_PATCH_VERSION = 0;
54 void prepare_process_metadata( HepMC3::GenRunInfo& run_info );
61 void prepare_vertex_status_metadata( HepMC3::GenRunInfo& run_info );
64 void prepare_particle_status_metadata( HepMC3::GenRunInfo& run_info );
67 void prepare_non_standard_pdg_code_metadata( HepMC3::GenRunInfo& run_info );
70 void apply_nuhepmc_runinfo_conventions( HepMC3::GenRunInfo& run_info,
71 const double flux_avg_xsec );
75 constexpr int NUHEPMC_PRIMARY_VERTEX = 1;
76 constexpr int NUHEPMC_HF_DECAY_VERTEX = 22;
77 constexpr int NUHEPMC_GAMMA_DECAY_VERTEX = 23;
81 constexpr int NUHEPMC_FINAL_STATE_STATUS = 1;
82 constexpr int NUHEPMC_PROJECTILE_STATUS = 4;
83 constexpr int NUHEPMC_TARGET_STATUS = 20;
84 constexpr int NUHEPMC_UNDECAYED_RESIDUE_STATUS = 27;
85 constexpr int NUHEPMC_INTERMEDIATE_RESIDUE_STATUS = 28;
87 constexpr double DUMMY_PARTICLE_MASS
88 = std::numeric_limits< double >::lowest();
90 void set_particle_charge( HepMC3::GenParticle& particle,
int charge );
92 int get_particle_charge( HepMC3::GenParticle& particle );
94 std::shared_ptr< HepMC3::GenParticle > make_particle(
95 const HepMC3::FourVector& mom4,
int pdg,
int status,
96 double mass = DUMMY_PARTICLE_MASS );
98 std::shared_ptr< HepMC3::GenParticle > make_particle(
99 int pdg,
double px,
double py,
double pz,
double E,
int status,
100 double mass = DUMMY_PARTICLE_MASS );
102 std::shared_ptr< HepMC3::GenParticle > make_particle(
103 int pdg,
double px,
double py,
double pz,
int status,
106 std::shared_ptr< HepMC3::GenParticle > make_particle(
107 int pdg,
int status,
double mass = DUMMY_PARTICLE_MASS );
110 std::vector< std::shared_ptr< HepMC3::GenVertex > >
111 get_vertices_with_status(
int status, HepMC3::GenEvent& ev );
113 std::vector< std::shared_ptr< HepMC3::GenParticle > >
114 get_particles_with_status(
int status, HepMC3::GenEvent& ev );
116 std::shared_ptr< HepMC3::GenParticle >
117 get_first_particle_with_status(
int status, HepMC3::GenEvent& ev );
119 std::shared_ptr< HepMC3::GenParticle > get_projectile(
120 HepMC3::GenEvent& ev );
122 std::shared_ptr< HepMC3::GenParticle > get_target(
123 HepMC3::GenEvent& ev );
125 std::shared_ptr< HepMC3::GenParticle > get_ejectile(
126 HepMC3::GenEvent& ev );
128 std::shared_ptr< HepMC3::GenParticle > get_residue(
129 HepMC3::GenEvent& ev );
135 void store_decay_time(
double partial_width, marley::Generator& gen,
136 std::shared_ptr< HepMC3::GenVertex >& decay_vtx,
137 const std::shared_ptr< HepMC3::GenParticle >& parent );
143 void print_event(
const HepMC3::GenEvent& ev, std::ostream& os = std::cout );
150 std::string check_run_info_compatibility(
151 const HepMC3::GenRunInfo& ref,
152 const HepMC3::GenRunInfo& candidate );
Stores additional information about cross-section.
Stores event-related information.
Stores particle-related information.
Stores run-related information.
Stores vertex-related information.
The MARLEY Event generator.
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.