GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 4 / 0 / 4
Functions: 100.0% 3 / 0 / 3
Branches: 44.4% 8 / 0 / 18

src/iguana/algorithms/clas12/rga/MomentumCorrection/Validator.h
Line Branch Exec Source
1 #pragma once
2
3 #include "iguana/algorithms/TypeDefs.h"
4 #include "iguana/algorithms/Validator.h"
5
6 #include <TCanvas.h>
7 #include <TFile.h>
8 #include <TH2.h>
9
10 namespace iguana::clas12::rga {
11
12 /// @brief `iguana::clas12::rga::MomentumCorrection` validator
13 class MomentumCorrectionValidator : public Validator
14 {
15
16
8/18
✓ 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 → 34 not taken.
✓ Branch 10 → 11 taken 1 time.
✗ Branch 10 → 17 not taken.
✓ Branch 17 → 18 taken 1 time.
✗ Branch 17 → 50 not taken.
✓ Branch 18 → 19 taken 1 time.
✗ Branch 18 → 46 not taken.
✓ Branch 19 → 20 taken 1 time.
✗ Branch 19 → 42 not taken.
✓ Branch 26 → 27 taken 1 time.
✗ Branch 26 → 42 not taken.
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 41 not taken.
10 DEFINE_IGUANA_VALIDATOR(MomentumCorrectionValidator, clas12::rga::MomentumCorrectionValidator)
17
18 private: // hooks
19 void StartHook(hipo::banklist& banks) override;
20 bool RunHook(hipo::banklist& banks) const override;
21 void StopHook() override;
22
23 private:
24
25 hipo::banklist::size_type b_particle;
26 hipo::banklist::size_type b_sector;
27
28 double const m_p_max = 12.0;
29 double const m_deltaP_max = 1.0;
30 double const m_deltaP_zoom = 0.2;
31
32 std::vector<int> const u_pdg_list = {
33 particle::PDG::electron,
34 particle::PDG::pi_plus,
35 particle::PDG::pi_minus,
36 particle::PDG::proton};
37
38 TString m_output_file_basename;
39 TFile* m_output_file;
40 mutable std::unordered_map<int, std::vector<TH2D*>> u_deltaPvsP;
41 };
42
43 }
44