ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
HeavyIonPhys
HIEventUtils
HIEventUtils
HIEventShapeSummaryUtils.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef HIEVENTUTILS_HIEVENTSHAPESUMMARYUTILS_H
6
#define HIEVENTUTILS_HIEVENTSHAPESUMMARYUTILS_H
7
8
#include "
xAODHIEvent/HIEventShapeContainer.h
"
9
#include "
xAODHIEvent/HIEventShape.h
"
10
#include <functional>
11
#include <vector>
12
#include <set>
13
14
namespace
HI
15
{
16
17
void
fillSummary
(
const
xAOD::HIEventShapeContainer
* in,
xAOD::HIEventShape
* out,
18
const
std::function<
bool
(
const
xAOD::HIEventShape
*)>& incFunction,
19
const
std::function<
void
(
xAOD::HIEventShape
*,
const
xAOD::HIEventShape
*)>& addFunction);
20
21
void
fillSummary
(
const
xAOD::HIEventShapeContainer
* in,
xAOD::HIEventShape
* out,
22
const
std::function<
bool
(
const
xAOD::HIEventShape
*)>& incFunction);
23
24
25
void
fillSummary
(
const
xAOD::HIEventShapeContainer
* in,
xAOD::HIEventShape
* out,
26
const
std::set<unsigned int>& indices,
27
const
std::function<
void
(
xAOD::HIEventShape
*,
const
xAOD::HIEventShape
*)>& addFunction);
28
29
struct
AddEventShape
30
{
31
32
bool
match_num_harmonics
;
33
34
AddEventShape
(
float
ww) :
match_num_harmonics
(true),
m_weight
(ww){};
35
constexpr
AddEventShape
() :
match_num_harmonics
(true),
m_weight
(1){};
36
void
operator()
(
xAOD::HIEventShape
* slice,
const
xAOD::HIEventShape
* in_slice)
const
;
37
38
private
:
39
float
m_weight
;
40
};
41
42
constexpr
AddEventShape
AddES
=
AddEventShape
();
43
44
45
// Predicates
46
47
struct
ByLayer
48
{
49
int
layer
;
50
ByLayer
(
int
ll) :
layer
(ll){};
51
bool
operator()
(
const
xAOD::HIEventShape
* in_slice) {
return
(in_slice->
layer
()==
layer
);};
52
};
53
54
struct
ByLayers
55
{
56
std::initializer_list<int>
layers
;
57
constexpr
ByLayers
(std::initializer_list<int> ll) :
layers
(ll) {};
58
bool
operator()
(
const
xAOD::HIEventShape
* in_slice)
59
{
60
for
(
int
i :
layers
)
61
{
62
if
(i==in_slice->
layer
())
return
true
;
63
}
64
return
false
;
65
};
66
};
67
68
struct
ByEtaRange
69
{
70
float
eta_min
;
71
float
eta_max
;
72
constexpr
ByEtaRange
(
float
eta_min_i,
float
eta_max_i) :
eta_min
(eta_min_i),
eta_max
(eta_max_i){};
73
bool
operator()
(
const
xAOD::HIEventShape
* in_slice) {
return
(in_slice->
etaMin
() >
eta_min
&& in_slice->
etaMax
() <
eta_max
);};
74
};
75
76
struct
ByLayersWithEtaRange
77
{
78
ByLayers
layers_sel
;
79
ByEtaRange
range_sel
;
80
81
constexpr
ByLayersWithEtaRange
(
ByLayers
& ll,
float
eta_min_i,
float
eta_max_i) :
layers_sel
(ll),
range_sel
(eta_min_i,eta_max_i){};
82
bool
operator()
(
const
xAOD::HIEventShape
* in_slice) {
return
(
layers_sel
(in_slice) &&
range_sel
(in_slice));};
83
};
84
85
struct
ByLayersP
86
{
87
ByLayers
layers_sel
;
88
ByEtaRange
range_sel
;
89
constexpr
ByLayersP
(std::initializer_list<int> ll) :
layers_sel
(ll),
range_sel
(-1e-4,1000){};
90
bool
operator()
(
const
xAOD::HIEventShape
* in_slice) {
return
(
layers_sel
(in_slice) &&
range_sel
(in_slice));};
91
};
92
93
struct
ByLayersN
94
{
95
ByLayers
layers_sel
;
96
ByEtaRange
range_sel
;
97
constexpr
ByLayersN
(std::initializer_list<int> ll) :
layers_sel
(ll),
range_sel
(-1000,1e-4){};
98
bool
operator()
(
const
xAOD::HIEventShape
* in_slice) {
return
(
layers_sel
(in_slice) &&
range_sel
(in_slice));};
99
};
100
101
float
getModulation
(
const
xAOD::HIEventShape
* es,
const
std::vector<unsigned int>& harmonics,
float
phi
);
102
int
setHarmonics
(std::vector<unsigned int>& in);
103
}
104
105
#endif
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
HIEventShapeContainer.h
HIEventShape.h
xAOD::HIEventShape_v2::etaMax
float etaMax() const
eta slice "right" edge
xAOD::HIEventShape_v2::layer
int layer() const
calorimeter layer for which the quantities were calculated 0 - all calorimeter depth others numbers a...
xAOD::HIEventShape_v2::etaMin
float etaMin() const
eta slice "left" edge
HI
Definition
HIEventDefs.h:14
HI::fillSummary
void fillSummary(const xAOD::HIEventShapeContainer *in, xAOD::HIEventShape *out, const std::function< bool(const xAOD::HIEventShape *)> &incFunction, const std::function< void(xAOD::HIEventShape *, const xAOD::HIEventShape *)> &addFunction)
Definition
HIEventShapeSummaryUtils.cxx:53
HI::AddES
constexpr AddEventShape AddES
Definition
HIEventShapeSummaryUtils.h:42
HI::setHarmonics
int setHarmonics(std::vector< unsigned int > &in)
Definition
HIEventShapeSummaryUtils.cxx:90
HI::getModulation
float getModulation(const xAOD::HIEventShape *es, const std::vector< unsigned int > &harmonics, float phi)
Definition
HIEventShapeSummaryUtils.cxx:80
xAOD::HIEventShapeContainer
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
Definition
HIEventShapeContainer.h:17
xAOD::HIEventShape
HIEventShape_v2 HIEventShape
Definition of the latest event info version.
Definition
HIEventShape.h:16
HI::AddEventShape
Definition
HIEventShapeSummaryUtils.h:30
HI::AddEventShape::match_num_harmonics
bool match_num_harmonics
Definition
HIEventShapeSummaryUtils.h:32
HI::AddEventShape::AddEventShape
constexpr AddEventShape()
Definition
HIEventShapeSummaryUtils.h:35
HI::AddEventShape::m_weight
float m_weight
Definition
HIEventShapeSummaryUtils.h:39
HI::AddEventShape::operator()
void operator()(xAOD::HIEventShape *slice, const xAOD::HIEventShape *in_slice) const
Definition
HIEventShapeSummaryUtils.cxx:10
HI::AddEventShape::AddEventShape
AddEventShape(float ww)
Definition
HIEventShapeSummaryUtils.h:34
HI::ByEtaRange
Definition
HIEventShapeSummaryUtils.h:69
HI::ByEtaRange::eta_min
float eta_min
Definition
HIEventShapeSummaryUtils.h:70
HI::ByEtaRange::eta_max
float eta_max
Definition
HIEventShapeSummaryUtils.h:71
HI::ByEtaRange::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:73
HI::ByEtaRange::ByEtaRange
constexpr ByEtaRange(float eta_min_i, float eta_max_i)
Definition
HIEventShapeSummaryUtils.h:72
HI::ByLayer::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:51
HI::ByLayer::layer
int layer
Definition
HIEventShapeSummaryUtils.h:49
HI::ByLayer::ByLayer
ByLayer(int ll)
Definition
HIEventShapeSummaryUtils.h:50
HI::ByLayersN::ByLayersN
constexpr ByLayersN(std::initializer_list< int > ll)
Definition
HIEventShapeSummaryUtils.h:97
HI::ByLayersN::layers_sel
ByLayers layers_sel
Definition
HIEventShapeSummaryUtils.h:95
HI::ByLayersN::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:98
HI::ByLayersN::range_sel
ByEtaRange range_sel
Definition
HIEventShapeSummaryUtils.h:96
HI::ByLayersP::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:90
HI::ByLayersP::ByLayersP
constexpr ByLayersP(std::initializer_list< int > ll)
Definition
HIEventShapeSummaryUtils.h:89
HI::ByLayersP::layers_sel
ByLayers layers_sel
Definition
HIEventShapeSummaryUtils.h:87
HI::ByLayersP::range_sel
ByEtaRange range_sel
Definition
HIEventShapeSummaryUtils.h:88
HI::ByLayersWithEtaRange::range_sel
ByEtaRange range_sel
Definition
HIEventShapeSummaryUtils.h:79
HI::ByLayersWithEtaRange::ByLayersWithEtaRange
constexpr ByLayersWithEtaRange(ByLayers &ll, float eta_min_i, float eta_max_i)
Definition
HIEventShapeSummaryUtils.h:81
HI::ByLayersWithEtaRange::layers_sel
ByLayers layers_sel
Definition
HIEventShapeSummaryUtils.h:78
HI::ByLayersWithEtaRange::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:82
HI::ByLayers
Definition
HIEventShapeSummaryUtils.h:55
HI::ByLayers::layers
std::initializer_list< int > layers
Definition
HIEventShapeSummaryUtils.h:56
HI::ByLayers::operator()
bool operator()(const xAOD::HIEventShape *in_slice)
Definition
HIEventShapeSummaryUtils.h:58
HI::ByLayers::ByLayers
constexpr ByLayers(std::initializer_list< int > ll)
Definition
HIEventShapeSummaryUtils.h:57
Generated on
for ATLAS Offline Software by
1.17.0