Line | Branch | Exec | Source |
---|---|---|---|
1 | #pragma once | ||
2 | |||
3 | #include "iguana/algorithms/Algorithm.h" | ||
4 | #include <Math/Vector3D.h> | ||
5 | #include <Math/Vector4D.h> | ||
6 | |||
7 | namespace iguana::physics { | ||
8 | |||
9 | /// @brief_algo Calculate semi-inclusive hadron kinematic quantities | ||
10 | /// | ||
11 | /// @begin_doc_algo{physics::SingleHadronKinematics | Creator} | ||
12 | /// @input_banks{REC::Particle, %physics::InclusiveKinematics} | ||
13 | /// @output_banks{%physics::SingleHadronKinematics} | ||
14 | /// @end_doc | ||
15 | /// | ||
16 | /// @begin_doc_config{physics/SingleHadronKinematics} | ||
17 | /// @config_param{hadron_list | list[int] | calculate kinematics for these hadron PDGs} | ||
18 | /// @end_doc | ||
19 | /// | ||
20 | /// The output bank `%physics::SingleHadronKinematics` will have the same number of rows as the input particle bank `REC::Particle` | ||
21 | /// - we want the output bank to have the same number of rows and ordering as the input | ||
22 | /// particle bank, so that banks which reference the input particle bank's rows (usually via `pindex`) can be used to | ||
23 | /// reference the output bank's rows too | ||
24 | /// - rows of the input particle bank which were filtered upstream will also be filtered out here, and all the values of the | ||
25 | /// corresponding row in the output bank will be zeroed, since no calculations are performed for | ||
26 | /// those particles | ||
27 | /// - particles which are not listed in the configuration parameter `hadron_list` will also be filtered out and zeroed | ||
28 | /// | ||
29 | /// @creator_note | ||
30 | class SingleHadronKinematics : public Algorithm | ||
31 | { | ||
32 | |||
33 |
5/12✓ Branch 0 (2→3) taken 2002 times.
✗ Branch 1 (2→6) not taken.
✓ Branch 2 (7→8) taken 4 times.
✗ Branch 3 (7→18) not taken.
✓ Branch 4 (8→9) taken 2 times.
✗ Branch 5 (8→11) not taken.
✓ Branch 6 (11→12) taken 2 times.
✗ Branch 7 (11→22) not taken.
✓ Branch 8 (14→15) taken 2 times.
✗ Branch 9 (14→22) not taken.
✗ Branch 10 (18→19) not taken.
✗ Branch 11 (18→21) not taken.
|
2016 | DEFINE_IGUANA_ALGORITHM(SingleHadronKinematics, physics::SingleHadronKinematics) |
34 | |||
35 | public: | ||
36 | |||
37 | void Start(hipo::banklist& banks) override; | ||
38 | void Run(hipo::banklist& banks) const override; | ||
39 | void Stop() override; | ||
40 | |||
41 | private: | ||
42 | |||
43 | // banklist indices | ||
44 | hipo::banklist::size_type b_particle; | ||
45 | hipo::banklist::size_type b_inc_kin; | ||
46 | hipo::banklist::size_type b_result; | ||
47 | |||
48 | // `b_result` bank item indices | ||
49 | int i_pindex; | ||
50 | int i_pdg; | ||
51 | int i_z; | ||
52 | int i_PhPerp; | ||
53 | int i_MX2; | ||
54 | int i_xF; | ||
55 | int i_yB; | ||
56 | int i_phiH; | ||
57 | int i_xi; | ||
58 | |||
59 | // config options | ||
60 | std::set<int> o_hadron_pdgs; | ||
61 | |||
62 | }; | ||
63 | |||
64 | } | ||
65 |