1#ifndef ALGORITHM_ANALYZERS_H
2#define ALGORITHM_ANALYZERS_H
7#include "edm4hep/ReconstructedParticleData.h"
12#include "Math/Minimizer.h"
13#include "ROOT/RVec.hxx"
29 const ROOT::VecOps::RVec<float> & arg_py,
30 const ROOT::VecOps::RVec<float> & arg_pz);
34 ROOT::VecOps::RVec<float>
_px;
35 ROOT::VecOps::RVec<float>
_py;
36 ROOT::VecOps::RVec<float>
_pz;
44 std::string arg_algoname=
"Migrad",
45 int arg_maxcalls=100000,
46 float arg_tolerance=0.001);
47 ROOT::VecOps::RVec<float>
operator()(
const ROOT::VecOps::RVec<float> & px,
48 const ROOT::VecOps::RVec<float> & py,
49 const ROOT::VecOps::RVec<float> & pz);
56 ROOT::Math::Minimizer *
_min;
57 double _step[3]={0.001,0.001,0.001};
65 thrustFit(
const ROOT::VecOps::RVec<float> & arg_px,
66 const ROOT::VecOps::RVec<float> & arg_py,
67 const ROOT::VecOps::RVec<float> & arg_pz);
71 ROOT::VecOps::RVec<float>
_px;
72 ROOT::VecOps::RVec<float>
_py;
73 ROOT::VecOps::RVec<float>
_pz;
80 std::string arg_algoname=
"Migrad",
81 int arg_maxcalls=100000,
82 float arg_tolerance=0.001);
83 ROOT::VecOps::RVec<float>
operator()(
const ROOT::VecOps::RVec<float> & px,
84 const ROOT::VecOps::RVec<float> & py,
85 const ROOT::VecOps::RVec<float> & pz);
92 ROOT::Math::Minimizer *
_min;
93 double _step[3]={0.001,0.001,0.001};
100 ROOT::VecOps::RVec<float>
operator()(
const ROOT::VecOps::RVec<float>& px,
101 const ROOT::VecOps::RVec<float>& py,
102 const ROOT::VecOps::RVec<float>& pz);
105 inline void mag2(
float (&vec)[4]);
106 inline float dot(
float vec1[4],
float vec2[4]);
107 inline void cross(
float (&vec)[4],
float vec1[4],
float vec2[4]);
108 inline void unit(
float (&vec)[4]);
109 inline void plus(
float (&vec)[4],
float vecIn1[4],
float vecIn2[4]);
110 inline void minus(
float (&vecOut)[4],
float vecIn1[4],
float vecIn2[4]);
111 inline void copy(
float (&vecOut)[4],
float vecIn[4]);
119 float operator() (
const ROOT::VecOps::RVec<float> & angle,
120 const ROOT::VecOps::RVec<float> & charge,
121 const ROOT::VecOps::RVec<float> & px,
122 const ROOT::VecOps::RVec<float> & py,
123 const ROOT::VecOps::RVec<float> & pz);
134 float operator() (
const ROOT::VecOps::RVec<float> & angle,
135 const ROOT::VecOps::RVec<float> & energy,
136 const ROOT::VecOps::RVec<float> & px,
137 const ROOT::VecOps::RVec<float> & py,
138 const ROOT::VecOps::RVec<float> & pz);
148 ROOT::VecOps::RVec<float>
operator() (
const ROOT::VecOps::RVec<float> & angle,
149 const ROOT::VecOps::RVec<float> & charge,
150 const ROOT::VecOps::RVec<float> & energy);
160 ROOT::VecOps::RVec<int>
operator() (
const ROOT::VecOps::RVec<float> & angle,
161 const ROOT::VecOps::RVec<float> & charge);
171 ROOT::VecOps::RVec<float>
operator() (
const ROOT::VecOps::RVec<float> & in,
172 const ROOT::VecOps::RVec<float> & rp_e,
173 const ROOT::VecOps::RVec<float> & thrust);
180 ROOT::VecOps::RVec<float>
getAxisCosTheta(
const ROOT::VecOps::RVec<float> & axis,
181 const ROOT::VecOps::RVec<float> & px,
182 const ROOT::VecOps::RVec<float> & py,
183 const ROOT::VecOps::RVec<float> & pz);
192 float getMass(
const ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> & in);
200 const ROOT::VecOps::RVec<float> & RP_px,
201 const ROOT::VecOps::RVec<float> & RP_py,
202 const ROOT::VecOps::RVec<float> & RP_pz,
203 const ROOT::VecOps::RVec<float> & RP_e,
204 const ROOT::VecOps::RVec<float> & RP_costheta ) ;
ROOT::VecOps::RVec< float > getAxisCosTheta(const ROOT::VecOps::RVec< float > &axis, const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Get the angle cosTheta between particles and an axis.
Definition Algorithms.cc:434
float getMass(const ROOT::VecOps::RVec< edm4hep::ReconstructedParticleData > &in)
Get the invariant mass from a list of reconstructed particles.
Definition Algorithms.cc:423
FCC analyzers collection.
Definition Algorithms.h:15
Calculates the thrust axis by looping over all possible combinations.
Definition Algorithms.h:98
void cross(float(&vec)[4], float vec1[4], float vec2[4])
Definition Algorithms.cc:279
void copy(float(&vecOut)[4], float vecIn[4])
Definition Algorithms.cc:304
void minus(float(&vecOut)[4], float vecIn1[4], float vecIn2[4])
Definition Algorithms.cc:298
calculate_thrust()
Definition Algorithms.h:99
void mag2(float(&vec)[4])
Definition Algorithms.cc:271
void plus(float(&vec)[4], float vecIn1[4], float vecIn2[4])
Definition Algorithms.cc:292
ROOT::VecOps::RVec< float > operator()(const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Definition Algorithms.cc:168
void unit(float(&vec)[4])
Definition Algorithms.cc:285
float dot(float vec1[4], float vec2[4])
Definition Algorithms.cc:275
Get the weighted charge in a given hemisphere (defined by it's angle wrt to axis)....
Definition Algorithms.h:115
float operator()(const ROOT::VecOps::RVec< float > &angle, const ROOT::VecOps::RVec< float > &charge, const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Definition Algorithms.cc:317
float _power
Which hemisphere to select, false/0=cosTheta<0 true/1=cosTheta>0. Default=0.
Definition Algorithms.h:126
getAxisCharge(bool arg_pos=0, float arg_power=1)
Definition Algorithms.cc:312
bool _pos
Definition Algorithms.h:125
Get the energy in a given hemisphere (defined by it's angle wrt to axis). Returns 3 values: total,...
Definition Algorithms.h:145
ROOT::VecOps::RVec< float > operator()(const ROOT::VecOps::RVec< float > &angle, const ROOT::VecOps::RVec< float > &charge, const ROOT::VecOps::RVec< float > &energy)
Definition Algorithms.cc:356
bool _pos
Definition Algorithms.h:152
getAxisEnergy(bool arg_pos=0)
Definition Algorithms.cc:353
Get the invariant mass in a given hemisphere (defined by it's angle wrt to axis).
Definition Algorithms.h:131
float operator()(const ROOT::VecOps::RVec< float > &angle, const ROOT::VecOps::RVec< float > &energy, const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Definition Algorithms.cc:337
getAxisMass(bool arg_pos=0)
Definition Algorithms.cc:334
bool _pos
Definition Algorithms.h:140
Get the number of particles in a given hemisphere (defined by it's angle wrt to axis)....
Definition Algorithms.h:157
bool _pos
Definition Algorithms.h:163
getAxisN(bool arg_pos=0)
Definition Algorithms.cc:376
ROOT::VecOps::RVec< int > operator()(const ROOT::VecOps::RVec< float > &angle, const ROOT::VecOps::RVec< float > &charge)
Definition Algorithms.cc:379
Make the thrust axis points to hemisphere with maximum or minimum energy.
Definition Algorithms.h:168
getThrustPointing(float arg_dir=1.)
Definition Algorithms.cc:397
ROOT::VecOps::RVec< float > operator()(const ROOT::VecOps::RVec< float > &in, const ROOT::VecOps::RVec< float > &rp_e, const ROOT::VecOps::RVec< float > &thrust)
Definition Algorithms.cc:400
float _dir
Definition Algorithms.h:175
make "jets" by splitting the events into two hemisphere transverse to the thrust axis.
Definition Algorithms.h:195
jets_TwoHemispheres(int arg_sorted, int arg_recombination)
Definition Algorithms.cc:462
JetClustering::FCCAnalysesJet operator()(const ROOT::VecOps::RVec< float > &RP_px, const ROOT::VecOps::RVec< float > &RP_py, const ROOT::VecOps::RVec< float > &RP_pz, const ROOT::VecOps::RVec< float > &RP_e, const ROOT::VecOps::RVec< float > &RP_costheta)
Definition Algorithms.cc:469
int m_recombination
E_scheme=0, pt_scheme=1, pt2_scheme=2, Et_scheme=3, Et2_scheme=4, BIpt_scheme=5, BIpt2_scheme=6,...
Definition Algorithms.h:197
int m_sorted
pT ordering=0, E ordering=1
Definition Algorithms.h:196
Calculates the sphericity axis based on a list of px, py, pz.
Definition Algorithms.h:41
char const * _algoname
Minimizer to use, Minuit2 default.
Definition Algorithms.h:53
ROOT::Math::Minimizer * _min
Tolerance for minimization, default=0.001.
Definition Algorithms.h:56
float _tolerance
Maximum call to minimization function, default=100000.
Definition Algorithms.h:55
char const * _minname
Definition Algorithms.h:52
double _step[3]
internal ROOT minimizer
Definition Algorithms.h:57
int _maxcalls
Optimisation algorithm, Migrad default.
Definition Algorithms.h:54
ROOT::VecOps::RVec< float > operator()(const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Definition Algorithms.cc:62
double _variable[3]
Definition Algorithms.h:58
minimize_sphericity(std::string arg_minname="Minuit2", std::string arg_algoname="Migrad", int arg_maxcalls=100000, float arg_tolerance=0.001)
Definition Algorithms.cc:47
Finds the thrust axis based on a list of px, py, pz.
Definition Algorithms.h:78
double _variable[3]
Definition Algorithms.h:94
minimize_thrust(std::string arg_minname="Minuit2", std::string arg_algoname="Migrad", int arg_maxcalls=100000, float arg_tolerance=0.001)
Definition Algorithms.cc:116
char const * _minname
Definition Algorithms.h:88
double _step[3]
internal ROOT minimizer
Definition Algorithms.h:93
ROOT::Math::Minimizer * _min
Tolerance for minimization, default=0.001.
Definition Algorithms.h:92
ROOT::VecOps::RVec< float > operator()(const ROOT::VecOps::RVec< float > &px, const ROOT::VecOps::RVec< float > &py, const ROOT::VecOps::RVec< float > &pz)
Definition Algorithms.cc:131
float _tolerance
Maximum call to minimization function, default=100000.
Definition Algorithms.h:91
char const * _algoname
Minimizer to use, Minuit2 default.
Definition Algorithms.h:89
int _maxcalls
Optimisation algorithm, Migrad default.
Definition Algorithms.h:90
Function that runs the fit for the sphericity axis determination.
Definition Algorithms.h:26
sphericityFit(const ROOT::VecOps::RVec< float > &arg_px, const ROOT::VecOps::RVec< float > &arg_py, const ROOT::VecOps::RVec< float > &arg_pz)
Definition Algorithms.cc:21
ROOT::VecOps::RVec< float > _pz
vector of py
Definition Algorithms.h:36
float operator()(const double *par)
Definition Algorithms.cc:28
ROOT::VecOps::RVec< float > _py
vector of px
Definition Algorithms.h:35
ROOT::VecOps::RVec< float > _px
Definition Algorithms.h:34
Function that runs the fit for the thrust axis determination.
Definition Algorithms.h:63
ROOT::VecOps::RVec< float > _pz
vector of py
Definition Algorithms.h:73
float operator()(const double *par)
Definition Algorithms.cc:98
thrustFit(const ROOT::VecOps::RVec< float > &arg_px, const ROOT::VecOps::RVec< float > &arg_py, const ROOT::VecOps::RVec< float > &arg_pz)
Definition Algorithms.cc:91
ROOT::VecOps::RVec< float > _px
Definition Algorithms.h:71
ROOT::VecOps::RVec< float > _py
vector of px
Definition Algorithms.h:72
Structure to keep useful informations for the jets.
Definition JetClustering.h:22