If needed, rotates the coordinate system of an Event so that the projectile 3-momentum lies along a desired direction.
More...
#include <ProjectileDirectionRotator.hh>
|
| ProjectileDirectionRotator (const ThreeVector &dir={0., 0., 1.}) |
|
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 new coordinate system.
|
|
const ThreeVector & | projectile_direction () const |
|
ThreeVector | sample_isotropic_direction (marley::Generator &gen) const |
|
void | set_projectile_direction (const ThreeVector &dir) |
|
void | set_randomize_directions (bool do_sampling) |
|
|
ThreeVector | dir_vec_ = {{ 0., 0., 1. }} |
| 3-vector that points in the desired direction of the projectile
|
|
ThreeVector | last_pdir_ = {{ 0., 0., 1. }} |
| Stores the direction 3-vector for the last projectile that triggered a recalculation of the rotation matrix. More...
|
|
bool | randomize_projectile_direction_ = false |
| Flag that indicates whether the (rotated) projectile direction should be sampled isotropically for each event (true) or kept fixed across all events (false)
|
|
marley::RotationMatrix | rot_matrix_ |
| RotationMatrix used to rotate the coordinate system of the input Event.
|
|
If needed, rotates the coordinate system of an Event so that the projectile 3-momentum lies along a desired direction.
◆ ProjectileDirectionRotator()
marley::ProjectileDirectionRotator::ProjectileDirectionRotator |
( |
const ThreeVector & |
dir = {0., 0., 1.} | ) |
|
- Parameters
-
dir | A 3-vector pointing in the desired direction of the projectile in the rotated coordinate system |
◆ rotate_event()
void marley::ProjectileDirectionRotator::rotate_event |
( |
marley::Event & |
ev | ) |
|
|
protected |
Helper function that does the coordinate system rotation.
- Parameters
-
◆ last_pdir_
ThreeVector marley::ProjectileDirectionRotator::last_pdir_ = {{ 0., 0., 1. }} |
|
protected |
Stores the direction 3-vector for the last projectile that triggered a recalculation of the rotation matrix.
Using this information avoids unnecessary recalculations
The documentation for this class was generated from the following files: