GCC Code Coverage Report


Directory: ./
File: src/iguana/algorithms/clas12/rga/FTEnergyCorrection/Algorithm.h
Date: 2025-11-25 17:57:04
Coverage Exec Excl Total
Lines: 75.0% 3 0 4
Functions: 100.0% 3 0 3
Branches: 42.9% 6 0 14

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::rga {
7
8 /// @algo_brief{Forward Tagger energy correction}
9 /// @algo_type_transformer
10 ///
11 /// This has been validated only for RG-A Fall 2018 Outbending data. It _may_ also be
12 /// appropriate for Pass-2 data from RG-A, RG-B, and RG-K, but they should
13 /// be validated.
14 class FTEnergyCorrection : public Algorithm
15 {
16
17
6/14
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 6 not taken.
✗ Branch 5 → 7 not taken.
✓ Branch 5 → 8 taken 1 time.
✓ Branch 9 → 10 taken 1 time.
✗ Branch 9 → 32 not taken.
✓ Branch 10 → 11 taken 1 time.
✗ Branch 10 → 17 not taken.
✓ Branch 17 → 18 taken 1 time.
✗ Branch 17 → 40 not taken.
✓ Branch 24 → 25 taken 1 time.
✗ Branch 24 → 40 not taken.
✗ Branch 32 → 33 not taken.
✗ Branch 32 → 39 not taken.
8 DEFINE_IGUANA_ALGORITHM(FTEnergyCorrection, clas12::rga::FTEnergyCorrection)
18
19 public:
20
21 void Start(hipo::banklist& banks) override;
22 bool Run(hipo::banklist& banks) const override;
23 void Stop() override;
24
25 /// @run_function
26 /// @param [in,out] ftParticleBank `RECFT::Particle`, which will have the correction applied
27 /// @run_function_returns_true
28 bool Run(hipo::bank& ftParticleBank) const;
29
30 /// @action_function{scalar transformer}
31 /// Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger.
32 /// Currently only validated for Fall 2018 outbending data.
33 /// @param px @f$p_x@f$
34 /// @param py @f$p_y@f$
35 /// @param pz @f$p_z@f$
36 /// @param E @f$E@f$
37 /// @returns an electron 4-vector with the corrected energy for the Forward Tagger.
38 /// @see `FTEnergyCorrection::CorrectEnergy`
39 Momentum4 Transform(
40 vector_element_t const px,
41 vector_element_t const py,
42 vector_element_t const pz,
43 vector_element_t const E) const;
44
45 /// @action_function{scalar transformer}
46 /// @param E electron energy
47 /// @returns the corrected FT electron energy
48 /// @see `FTEnergyCorrection::Transform`
49 vector_element_t CorrectEnergy(vector_element_t const E) const;
50
51 private:
52
53 hipo::banklist::size_type b_ft_particle;
54 double electron_mass;
55 };
56
57 }
58