ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
HeavyIonPhys
HIEventUtils
HIEventUtils
HIEventShapeSummaryTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef HIEVENTUTILS_HIEVENTSHAPESUMMARYTOOL_H
6
#define HIEVENTUTILS_HIEVENTSHAPESUMMARYTOOL_H
7
8
#include "
AsgTools/AsgTool.h
"
9
#include "
HIEventUtils/IHIEventShapeSummaryTool.h
"
10
#include <functional>
11
#include <string>
12
#include <vector>
13
#include <map>
14
15
16
class
HIEventShapeSummaryTool
:
virtual
public
asg::AsgTool
,
virtual
public
IHIEventShapeSummaryTool
17
{
18
ASG_TOOL_CLASS
(
HIEventShapeSummaryTool
,
IHIEventShapeSummaryTool
)
19
public
:
20
HIEventShapeSummaryTool
(
const
std::string& n);
21
22
23
StatusCode
summarize
(
const
xAOD::HIEventShapeContainer
* in,
xAOD::HIEventShapeContainer
* out)
const override
;
24
StatusCode
initialize
()
override
;
25
std::string
dumpList
()
const override
;
26
27
private
:
28
typedef
std::function<bool (
const
xAOD::HIEventShape
*)>
function_t
;
29
struct
summary_info_t
30
{
31
std::string
name
;
32
float
eta_min
{};
33
float
eta_max
{};
34
int
layer
{};
35
function_t
func
;
36
37
summary_info_t
(
const
std::string& n,
float
emin,
float
emax,
int
ll,
function_t
ff) :
name
(n),
eta_min
(emin),
eta_max
(emax),
layer
(ll),
func
(
std
::move(ff)) {};
38
};
39
40
41
std::vector<std::string>
m_samp_names
;
42
std::vector<std::string>
m_subcalo_names
;
43
bool
m_do_sides
{};
44
45
//using map instead of unordered version, really do want entries sorted by key
46
std::map<std::string,summary_info_t>
m_summary_list
;
47
48
int
getSubCaloLayer
(
const
std::vector<int>& samps)
const
;
49
float
getSubCaloEtaMin
(
const
std::vector<int>& samps)
const
;
50
float
getSubCaloEtaMax
(
const
std::vector<int>& samps)
const
;
51
float
roundToTenth
(
float
v)
const
;
52
53
static
const
std::vector<std::string>
s_SubCaloNames
;
54
static
const
std::vector<std::initializer_list<int> >
s_SubCaloLists
;
55
56
};
57
58
59
#endif
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
IHIEventShapeSummaryTool.h
HIEventShapeSummaryTool::getSubCaloLayer
int getSubCaloLayer(const std::vector< int > &samps) const
Definition
HIEventShapeSummaryTool.cxx:148
HIEventShapeSummaryTool::HIEventShapeSummaryTool
HIEventShapeSummaryTool(const std::string &n)
Definition
HIEventShapeSummaryTool.cxx:28
HIEventShapeSummaryTool::m_samp_names
std::vector< std::string > m_samp_names
Definition
HIEventShapeSummaryTool.h:41
HIEventShapeSummaryTool::s_SubCaloNames
static const std::vector< std::string > s_SubCaloNames
Definition
HIEventShapeSummaryTool.h:14
HIEventShapeSummaryTool::s_SubCaloLists
static const std::vector< std::initializer_list< int > > s_SubCaloLists
Definition
HIEventShapeSummaryTool.h:15
HIEventShapeSummaryTool::function_t
std::function< bool(const xAOD::HIEventShape *)> function_t
Definition
HIEventShapeSummaryTool.h:28
HIEventShapeSummaryTool::getSubCaloEtaMin
float getSubCaloEtaMin(const std::vector< int > &samps) const
Definition
HIEventShapeSummaryTool.cxx:126
HIEventShapeSummaryTool::summarize
StatusCode summarize(const xAOD::HIEventShapeContainer *in, xAOD::HIEventShapeContainer *out) const override
Definition
HIEventShapeSummaryTool.cxx:36
HIEventShapeSummaryTool::m_do_sides
bool m_do_sides
Definition
HIEventShapeSummaryTool.h:43
HIEventShapeSummaryTool::m_summary_list
std::map< std::string, summary_info_t > m_summary_list
Definition
HIEventShapeSummaryTool.h:46
HIEventShapeSummaryTool::m_subcalo_names
std::vector< std::string > m_subcalo_names
Definition
HIEventShapeSummaryTool.h:42
HIEventShapeSummaryTool::getSubCaloEtaMax
float getSubCaloEtaMax(const std::vector< int > &samps) const
Definition
HIEventShapeSummaryTool.cxx:137
HIEventShapeSummaryTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
HIEventShapeSummaryTool.cxx:53
HIEventShapeSummaryTool::roundToTenth
float roundToTenth(float v) const
Definition
HIEventShapeSummaryTool.cxx:175
HIEventShapeSummaryTool::dumpList
std::string dumpList() const override
Definition
HIEventShapeSummaryTool.cxx:155
IHIEventShapeSummaryTool
Definition
IHIEventShapeSummaryTool.h:11
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
std
STL namespace.
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
HIEventShapeSummaryTool::summary_info_t::func
function_t func
Definition
HIEventShapeSummaryTool.h:35
HIEventShapeSummaryTool::summary_info_t::name
std::string name
Definition
HIEventShapeSummaryTool.h:31
HIEventShapeSummaryTool::summary_info_t::layer
int layer
Definition
HIEventShapeSummaryTool.h:34
HIEventShapeSummaryTool::summary_info_t::summary_info_t
summary_info_t(const std::string &n, float emin, float emax, int ll, function_t ff)
Definition
HIEventShapeSummaryTool.h:37
HIEventShapeSummaryTool::summary_info_t::eta_min
float eta_min
Definition
HIEventShapeSummaryTool.h:32
HIEventShapeSummaryTool::summary_info_t::eta_max
float eta_max
Definition
HIEventShapeSummaryTool.h:33
Generated on
for ATLAS Offline Software by
1.17.0