3#include "iguana/algorithms/Algorithm.h"
5#include "iguana/services/ConcurrentParam.h"
6#include "iguana/services/RCDBReader.h"
60 void Start(hipo::banklist& banks)
override;
61 void Run(hipo::banklist& banks)
const override;
93 int FindScatteredLepton(hipo::bank
const& particle_bank,
concurrent_key_t const key)
const;
95 void Reload(
int const runnum,
double const user_beam_energy,
concurrent_key_t key)
const;
98 hipo::banklist::size_type b_particle;
99 hipo::banklist::size_type b_config;
100 hipo::banklist::size_type b_result;
117 mutable std::unique_ptr<ConcurrentParam<int>> o_runnum;
118 mutable std::unique_ptr<ConcurrentParam<std::vector<double>>> o_target_PxPyPzM;
119 mutable std::unique_ptr<ConcurrentParam<std::vector<double>>> o_beam_PxPyPzM;
123 enum method_reconstruction { scattered_lepton };
124 enum method_lepton_finder { highest_energy_FD_trigger };
125 method_reconstruction o_method_reconstruction;
126 method_lepton_finder o_method_lepton_finder;
128 std::unique_ptr<RCDBReader> m_rcdb;
#define DEFINE_IGUANA_ALGORITHM(ALGO_NAME, ALGO_FULL_NAME)
Type definitions for common objects used in algorithms.
Base class for all algorithms to inherit from.
Algorithm: Calculate inclusive kinematics quantities defined in iguana::physics::InclusiveKinematicsV...
void Stop() override
Finalize this algorithm after all events are processed.
void Start(hipo::banklist &banks) override
Initialize this algorithm before any events are processed, with the intent to process banks
InclusiveKinematicsVars ComputeFromLepton(vector_element_t const lepton_px, vector_element_t const lepton_py, vector_element_t const lepton_pz, concurrent_key_t const key) const
Action Function: compute kinematics from the scattered lepton.
concurrent_key_t PrepareEvent(int const runnum, double const beam_energy=-1) const
Action Function: prepare the event
void Run(hipo::banklist &banks) const override
Run this algorithm for an event.
std::size_t concurrent_key_t
concurrent hash key type
double vector_element_t
Vector element type.
Set of inclusive kinematics variables.
vector_element_t qy
-component of virtual photon momentum
double targetM
target mass (GeV)
vector_element_t qE
-component of virtual photon momentum
vector_element_t qx
-component of virtual photon momentum
vector_element_t qz
-component of virtual photon momentum
int pindex
REC::Particle row (pindex) of the scattered electron
double beamPz
beam momentum -component (GeV)