diff --git a/src/iguana/algorithms/TypeDefs.h b/src/iguana/algorithms/TypeDefs.h new file mode 100644 index 00000000..25082fb2 --- /dev/null +++ b/src/iguana/algorithms/TypeDefs.h @@ -0,0 +1,14 @@ +/// @file +/// @brief Type definitions for common objects used in algorithms + +#include + +namespace iguana { + + /// Lorentz vector element type, matching that of `REC::Particle` momentum components + using lorentz_element_t = float; + + /// Generic Lorentz vector container type + using lorentz_vector_t = std::tuple; + +} diff --git a/src/iguana/algorithms/clas12/LorentzTransformer.cc b/src/iguana/algorithms/clas12/LorentzTransformer.cc index feaefcc9..60125388 100644 --- a/src/iguana/algorithms/clas12/LorentzTransformer.cc +++ b/src/iguana/algorithms/clas12/LorentzTransformer.cc @@ -43,7 +43,7 @@ namespace iguana::clas12 { } - LorentzTransformer::lorentz_vector_t LorentzTransformer::Transform( + lorentz_vector_t LorentzTransformer::Transform( lorentz_element_t px, lorentz_element_t py, lorentz_element_t pz, diff --git a/src/iguana/algorithms/clas12/LorentzTransformer.h b/src/iguana/algorithms/clas12/LorentzTransformer.h index 21e8e02b..306a9b66 100644 --- a/src/iguana/algorithms/clas12/LorentzTransformer.h +++ b/src/iguana/algorithms/clas12/LorentzTransformer.h @@ -1,7 +1,7 @@ #pragma once #include "iguana/algorithms/Algorithm.h" -#include +#include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { @@ -15,12 +15,6 @@ namespace iguana::clas12 { public: - /// Lorentz vector element type, matching that of `REC::Particle` momentum components - using lorentz_element_t = float; - - /// Generic Lorentz vector container type - using lorentz_vector_t = std::tuple; - void Start(hipo::banklist& banks) override; void Run(hipo::banklist& banks) const override; void Stop() override; diff --git a/src/iguana/algorithms/meson.build b/src/iguana/algorithms/meson.build index aa361ddc..a10f9e8e 100644 --- a/src/iguana/algorithms/meson.build +++ b/src/iguana/algorithms/meson.build @@ -11,6 +11,7 @@ algo_public_headers = [ 'Algorithm.h', 'AlgorithmBoilerplate.h', 'AlgorithmSequence.h', + 'TypeDefs.h', 'example/ExampleAlgorithm.h', 'clas12/EventBuilderFilter.h', 'clas12/LorentzTransformer.h',