Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
Algorithm.h
1#pragma once
2
3#include "iguana/algorithms/Algorithm.h"
5#include <Math/Vector3D.h>
6#include <Math/Vector4D.h>
7
8namespace iguana::physics {
9
17 int pdg_a;
19 int pdg_b;
21 double Mh;
23 double z;
25 double PhPerp;
27 double MX;
29 double xF;
32 double phiH;
35 double phiR;
38 double theta;
39 };
40
71 {
72
74
75 public:
76
77 void Start(hipo::banklist& banks) override;
78 void Run(hipo::banklist& banks) const override;
79 void Stop() override;
80
84 std::vector<std::pair<int,int>> PairHadrons(hipo::bank const& particle_bank) const;
85
86 private:
87
88 // banklist indices
89 hipo::banklist::size_type b_particle;
90 hipo::banklist::size_type b_inc_kin;
91 hipo::banklist::size_type b_result;
92
93 // `b_result` bank item indices
94 int i_pindex_a;
95 int i_pindex_b;
96 int i_pdg_a;
97 int i_pdg_b;
98 int i_Mh;
99 int i_z;
100 int i_PhPerp;
101 int i_MX;
102 int i_xF;
103 int i_phiH;
104 int i_phiR;
105 int i_theta;
106
107 // config options
108 std::set<int> o_hadron_a_pdgs;
109 std::set<int> o_hadron_b_pdgs;
110 std::string o_phi_r_method;
111 std::string o_theta_method;
112 enum {e_RT_via_covariant_kT} m_phi_r_method;
113 enum {e_hadron_a} m_theta_method;
114
115 // storage for a single hadron
116 struct Hadron {
117 int row;
118 int pdg;
119 ROOT::Math::PxPyPzMVector p;
120 double z;
121 std::optional<ROOT::Math::XYZVector> p_perp;
122 };
123
124 };
125
126}
#define DEFINE_IGUANA_ALGORITHM(ALGO_NAME, ALGO_FULL_NAME)
Base class for all algorithms to inherit from.
Definition Algorithm.h:40
Algorithm: Calculate semi-inclusive dihadron kinematic quantities defined in iguana::physics::Dihadro...
Definition Algorithm.h:71
void Stop() override
Finalize this algorithm after all events are processed.
void Run(hipo::banklist &banks) const override
Run this algorithm for an event.
std::vector< std::pair< int, int > > PairHadrons(hipo::bank const &particle_bank) const
form dihadrons by pairing hadrons
void Start(hipo::banklist &banks) override
Initialize this algorithm before any events are processed, with the intent to process banks
Physics algorithms.
Definition Algorithm.h:8
Set of dihadron kinematics variables.
Definition Algorithm.h:11
double PhPerp
: transverse momentum of the dihadron in the -frame (transverse to )
Definition Algorithm.h:25
double z
: Momentum fraction of the fragmenting parton carried by the dihadron
Definition Algorithm.h:23
double Mh
: Invariant mass of the dihadron
Definition Algorithm.h:21
double theta
: The "decay" angle of hadron A in the dihadron rest frame, with respect; to the dihadron momentum di...
Definition Algorithm.h:38
double phiR
: -azimuthal angle between the lepton-scattering plane and dihadron plane; if the value is tools::UND...
Definition Algorithm.h:35
double xF
: Feynman-x of the dihadron
Definition Algorithm.h:29
double MX
: Missing mass of the dihadron
Definition Algorithm.h:27
int pdg_b
PDG code of hadron B.
Definition Algorithm.h:19
int pindex_a
REC::Particle row (pindex) of hadron A
Definition Algorithm.h:13
double phiH
: -azimuthal angle between the lepton-scattering plane and the plane; if the value is tools::UNDEF,...
Definition Algorithm.h:32
int pindex_b
REC::Particle row (pindex) of hadron B
Definition Algorithm.h:15
int pdg_a
PDG code of hadron A.
Definition Algorithm.h:17