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 );
Container for ingoing and outgoing momentum 4-vectors from a reaction.
Definition: Event.hh:66
Abstract base class for entities that take a marley::Event as input and possibly modify it.
Definition: EventProcessor.hh:27
The MARLEY Event generator.
Definition: Generator.hh:42
If needed, rotates the coordinate system of an Event so that the projectile 3-momentum lies along a d...
Definition: ProjectileDirectionRotator.hh:27
ThreeVector last_pdir_
Stores the direction 3-vector for the last projectile that triggered a recalculation of the rotation ...
Definition: ProjectileDirectionRotator.hh:66
bool randomize_projectile_direction_
Flag that indicates whether the (rotated) projectile direction should be sampled isotropically for ea...
Definition: ProjectileDirectionRotator.hh:79
ThreeVector dir_vec_
3-vector that points in the desired direction of the projectile
Definition: ProjectileDirectionRotator.hh:61
ProjectileDirectionRotator(const ThreeVector &dir={0., 0., 1.})
Definition: ProjectileDirectionRotator.cc:23
marley::RotationMatrix rot_matrix_
RotationMatrix used to rotate the coordinate system of the input Event.
Definition: ProjectileDirectionRotator.hh:70
void rotate_event(marley::Event &ev)
Helper function that does the coordinate system rotation.
Definition: ProjectileDirectionRotator.cc:71
virtual void process_event(marley::Event &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...
Definition: ProjectileDirectionRotator.cc:34
Simple rotation matrix implementation used to reorient Particle objects based on the incident neutrin...
Definition: RotationMatrix.hh:29