GCC Code Coverage Report


Directory: ./
File: src/iguana/algorithms/clas12/FiducialFilter/Validator.h
Date: 2025-09-03 22:39:58
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 4 4 100.0%
Branches: 12 26 46.2%

Line Branch Exec Source
1 #pragma once
2
3 #include "iguana/algorithms/TypeDefs.h"
4 #include "iguana/algorithms/Validator.h"
5 #include "Algorithm.h"
6 #include "iguana/algorithms/clas12/EventBuilderFilter/Algorithm.h"
7 #include "iguana/algorithms/clas12/TrajLinker/Algorithm.h"
8 #include "iguana/algorithms/clas12/CalorimeterLinker/Algorithm.h"
9
10 #include <TCanvas.h>
11 #include <TFile.h>
12 #include <TH2.h>
13
14 namespace iguana::clas12 {
15
16 /// @brief `iguana::clas12::FiducialFilter` validator
17 class FiducialFilterValidator : public Validator
18 {
19
20
12/26
✓ 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→38) 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→73) not taken.
✓ Branch 10 (18→19) taken 1 times.
✗ Branch 11 (18→70) not taken.
✓ Branch 12 (19→20) taken 1 times.
✗ Branch 13 (19→68) not taken.
✓ Branch 14 (20→21) taken 1 times.
✗ Branch 15 (20→66) not taken.
✓ Branch 16 (21→22) taken 1 times.
✗ Branch 17 (21→64) not taken.
✓ Branch 18 (22→23) taken 1 times.
✗ Branch 19 (22→60) not taken.
✓ Branch 20 (23→24) taken 1 times.
✗ Branch 21 (23→46) not taken.
✓ Branch 22 (30→31) taken 1 times.
✗ Branch 23 (30→46) not taken.
✗ Branch 24 (38→39) not taken.
✗ Branch 25 (38→45) not taken.
10 DEFINE_IGUANA_VALIDATOR(FiducialFilterValidator, clas12::FiducialFilterValidator)
21
22 public:
23
24 void Start(hipo::banklist& banks) override;
25 void Run(hipo::banklist& banks) const override;
26 void Stop() override;
27
28 private:
29
30 iguana::clas12::EventBuilderFilter m_algo_eb;
31 iguana::clas12::TrajLinker m_algo_traj;
32 iguana::clas12::CalorimeterLinker m_algo_cal;
33 iguana::clas12::FiducialFilter m_algo_fidu;
34
35 hipo::banklist::size_type b_particle;
36 hipo::banklist::size_type b_traj;
37 hipo::banklist::size_type b_cal;
38
39 double const DC1xleft = -200;
40 double const DC1xright = 200;
41 double const DC1ybottom = -200;
42 double const DC1ytop = 200;
43 double const DC2xleft = -200;
44 double const DC2xright = 200;
45 double const DC2ybottom = -200;
46 double const DC2ytop = 200;
47 double const DC3xleft = -200;
48 double const DC3xright = 200;
49 double const DC3ybottom = -200;
50 double const DC3ytop = 200;
51
52 std::vector<int> const u_pdg_list = {
53 particle::PDG::electron,
54 particle::PDG::pi_plus,
55 particle::PDG::pi_minus,
56 particle::PDG::proton};
57
58 TString m_output_file_basename;
59 TFile* m_output_file;
60 mutable std::unordered_map<int, TH2D*> u_DC1_before;
61 mutable std::unordered_map<int, TH2D*> u_DC2_before;
62 mutable std::unordered_map<int, TH2D*> u_DC3_before;
63
64 mutable std::unordered_map<int, TH2D*> u_DC1_after;
65 mutable std::unordered_map<int, TH2D*> u_DC2_after;
66 mutable std::unordered_map<int, TH2D*> u_DC3_after;
67 };
68
69 }
70