Iguana
1.0.0
Implementation Guardian of Analysis Algorithms
Toggle main menu visibility
Loading...
Searching...
No Matches
iguana_ex_cpp_ROOT_macro.C
Go to the documentation of this file.
1
10
11
#include <TSystem.h>
12
#include <iguana/algorithms/physics/InclusiveKinematics/Algorithm.h>
13
15
void
iguana_ex_cpp_ROOT_macro
()
16
{
17
18
// load the iguana algorithms library
19
gSystem->Load(
"libIguanaAlgorithms"
);
20
21
// start the inclusive kinematics algorithm
22
iguana::physics::InclusiveKinematics
algo;
23
algo.
Start
();
24
25
// run the inclusive kinematics action function for a scattered electron lepton momentum,
26
// and print out the resulting inclusive kinematics
27
auto
key = algo.
PrepareEvent
(5032);
28
auto
result = algo.
ComputeFromLepton
(0.3, 0.3, 5.0, key);
29
std::cout <<
"kinematics:"
30
<<
"\n Q2 = "
<< result.
Q2
31
<<
"\n x = "
<< result.x
32
<<
"\n W = "
<< result.W
33
<< std::endl;
34
35
// stop the algorithm
36
algo.
Stop
();
37
}
iguana::physics::InclusiveKinematics
Algorithm: Calculate inclusive kinematics quantities
Definition
Algorithm.h:20
iguana::physics::InclusiveKinematics::Stop
void Stop() override
Finalize this algorithm after all events are processed.
iguana::physics::InclusiveKinematics::Start
void Start(hipo::banklist &banks) override
Initialize this algorithm before any events are processed, with the intent to process banks.
iguana::physics::InclusiveKinematics::ComputeFromLepton
InclusiveKinematicsVars ComputeFromLepton(vector_element_t const lepton_px, vector_element_t const lepton_py, vector_element_t const lepton_pz, concurrent_key_t const key) const
Action Function: compute kinematics from the scattered lepton.
iguana::physics::InclusiveKinematics::PrepareEvent
concurrent_key_t PrepareEvent(int const runnum, double const beam_energy=-1) const
Action Function: prepare the event
iguana_ex_cpp_ROOT_macro
void iguana_ex_cpp_ROOT_macro()
example ROOT macro function
Definition
iguana_ex_cpp_ROOT_macro.C:15
iguana::physics::InclusiveKinematicsVars::Q2
double Q2
(GeV )
Definition
BankDefs.h:48
iguana_v1.0.0
examples
iguana_ex_cpp_ROOT_macro.C
Generated by
1.18.0