GCC Code Coverage Report


Directory: ./
File: src/iguana/algorithms/clas12/MomentumCorrection/Validator.h
Date: 2025-06-06 22:09:53
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 4 4 100.0%
Branches: 8 18 44.4%

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 {
11
12 /// @brief `iguana::clas12::MomentumCorrection` validator
13 class MomentumCorrectionValidator : public Validator
14 {
15
16
8/18
✓ Branch 0 (2→3) taken 1 times.
✗ Branch 1 (2→6) not taken.
✗ Branch 2 (5→7) not taken.
✓ Branch 3 (5→8) taken 1 times.
✓ Branch 4 (9→10) taken 1 times.
✗ Branch 5 (9→34) not taken.
✓ Branch 6 (10→11) taken 1 times.
✗ Branch 7 (10→17) not taken.
✓ Branch 8 (17→18) taken 1 times.
✗ Branch 9 (17→50) not taken.
✓ Branch 10 (18→19) taken 1 times.
✗ Branch 11 (18→46) not taken.
✓ Branch 12 (19→20) taken 1 times.
✗ Branch 13 (19→42) not taken.
✓ Branch 14 (26→27) taken 1 times.
✗ Branch 15 (26→42) not taken.
✗ Branch 16 (34→35) not taken.
✗ Branch 17 (34→41) not taken.
10 DEFINE_IGUANA_VALIDATOR(MomentumCorrectionValidator, clas12::MomentumCorrectionValidator)
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 private:
25
26 hipo::banklist::size_type b_particle;
27 hipo::banklist::size_type b_sector;
28
29 double const m_p_max = 12.0;
30 double const m_deltaP_max = 1.0;
31 double const m_deltaP_zoom = 0.2;
32
33 std::vector<int> const u_pdg_list = {
34 particle::PDG::electron,
35 particle::PDG::pi_plus,
36 particle::PDG::pi_minus,
37 particle::PDG::proton};
38
39 TString m_output_file_basename;
40 TFile* m_output_file;
41 mutable std::unordered_map<int, std::vector<TH2D*>> u_deltaPvsP;
42 };
43
44 }
45