GCC Code Coverage Report


Directory: ./
File: src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.h
Date: 2025-01-05 09:03:17
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 3 4 75.0%
Branches: 5 12 41.7%

Line Branch Exec Source
1 #pragma once
2
3 #include "iguana/algorithms/Algorithm.h"
4 #include "iguana/algorithms/TypeDefs.h"
5
6 namespace iguana::clas12 {
7
8 /// @brief_algo Forward Tagger energy correction
9 ///
10 /// @begin_doc_algo{clas12::FTEnergyCorrection | Transformer}
11 /// @input_banks{RECFT::Particle}
12 /// @output_banks{RECFT::Particle}
13 /// @end_doc
14 class FTEnergyCorrection : public Algorithm {
15
16
5/12
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
7 DEFINE_IGUANA_ALGORITHM(FTEnergyCorrection, clas12::FTEnergyCorrection)
17
18 public:
19
20 void Start(hipo::banklist& banks) override;
21 void Run(hipo::banklist& banks) const override;
22 void Stop() override;
23
24 /// @action_function{scalar transformer}
25 /// Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger.
26 /// Currently only validated for Fall 2018 outbending data.
27 /// @param px @f$p_x@f$
28 /// @param py @f$p_y@f$
29 /// @param pz @f$p_z@f$
30 /// @param E @f$E@f$
31 /// @returns an electron 4-vector with the corrected energy for the Forward Tagger.
32 /// @see `FTEnergyCorrection::CorrectEnergy`
33 Momentum4 Transform(
34 vector_element_t const px,
35 vector_element_t const py,
36 vector_element_t const pz,
37 vector_element_t const E) const;
38
39 /// @action_function{scalar transformer}
40 /// @param E electron energy
41 /// @returns the corrected FT electron energy
42 /// @see `FTEnergyCorrection::Transform`
43 vector_element_t CorrectEnergy(vector_element_t const E) const;
44
45 private:
46
47 hipo::banklist::size_type b_ft_particle;
48 double electron_mass;
49
50 };
51
52 }
53