Skip to content

Commit

Permalink
fix: move Lorentz vector types to iguana namespace in common header (
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Jan 23, 2024
1 parent 10eda27 commit c67fc66
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/iguana/algorithms/TypeDefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// @file
/// @brief Type definitions for common objects used in algorithms

#include <tuple>

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<lorentz_element_t, lorentz_element_t, lorentz_element_t, lorentz_element_t>;

}
2 changes: 1 addition & 1 deletion src/iguana/algorithms/clas12/LorentzTransformer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 1 addition & 7 deletions src/iguana/algorithms/clas12/LorentzTransformer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "iguana/algorithms/Algorithm.h"
#include <tuple>
#include "iguana/algorithms/TypeDefs.h"

namespace iguana::clas12 {

Expand All @@ -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<lorentz_element_t, lorentz_element_t, lorentz_element_t, lorentz_element_t>;

void Start(hipo::banklist& banks) override;
void Run(hipo::banklist& banks) const override;
void Stop() override;
Expand Down
1 change: 1 addition & 0 deletions src/iguana/algorithms/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ algo_public_headers = [
'Algorithm.h',
'AlgorithmBoilerplate.h',
'AlgorithmSequence.h',
'TypeDefs.h',
'example/ExampleAlgorithm.h',
'clas12/EventBuilderFilter.h',
'clas12/LorentzTransformer.h',
Expand Down

0 comments on commit c67fc66

Please sign in to comment.