Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move Lorentz vector types to iguana namespace in common header #87

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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