20#include "marley/EventProcessor.hh"
21#include "marley/RotationMatrix.hh"
29 using ThreeVector = std::array<double, 3>;
45 inline const ThreeVector& projectile_direction()
const
48 inline void set_projectile_direction(
const ThreeVector& dir ) {
49 dir_vec_ = marley::RotationMatrix::normalize( dir );
55 void set_randomize_directions(
bool do_sampling );
Stores event-related information.
The MARLEY Event generator.
ThreeVector last_pdir_
Stores the direction 3-vector for the last projectile that triggered a recalculation of the rotation ...
virtual void process_event(HepMC3::GenEvent &ev, marley::Generator &gen) override
Rotates all 3-momenta in the input event so that the projectile 3-momentum lies along dir_vec_ in the...
bool randomize_projectile_direction_
Flag that indicates whether the (rotated) projectile direction should be sampled isotropically for ea...
ThreeVector dir_vec_
3-vector that points in the desired direction of the projectile
ProjectileDirectionRotator(const ThreeVector &dir={0., 0., 1.})
marley::RotationMatrix rot_matrix_
RotationMatrix used to rotate the coordinate system of the input GenEvent.
void rotate_event(HepMC3::GenEvent &ev)
Helper function that does the coordinate system rotation.
Simple rotation matrix implementation used to reorient Particle objects based on the incident neutrin...