ATLAS Offline Software
HIEventShapeSummaryTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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"
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 {
19  public:
20  HIEventShapeSummaryTool(const std::string& n);
21 
22 
24  StatusCode initialize() override;
25  std::string dumpList() const override;
26 
27  private:
28  typedef std::function<bool (const xAOD::HIEventShape*)> function_t;
30  {
31  std::string name;
32  float eta_min;
33  float eta_max;
34  int layer;
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(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
HIEventShapeSummaryTool::summary_info_t::eta_min
float eta_min
Definition: HIEventShapeSummaryTool.h:32
IHIEventShapeSummaryTool.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
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::m_summary_list
std::map< std::string, summary_info_t > m_summary_list
Definition: HIEventShapeSummaryTool.h:46
HIEventShapeSummaryTool::summary_info_t::eta_max
float eta_max
Definition: HIEventShapeSummaryTool.h:33
HIEventShapeSummaryTool::roundToTenth
float roundToTenth(float v) const
Definition: HIEventShapeSummaryTool.cxx:175
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
HIEventShapeSummaryTool::getSubCaloEtaMin
float getSubCaloEtaMin(const std::vector< int > &samps) const
Definition: HIEventShapeSummaryTool.cxx:126
HIEventShapeSummaryTool::summary_info_t::layer
int layer
Definition: HIEventShapeSummaryTool.h:34
HIEventShapeSummaryTool::function_t
std::function< bool(const xAOD::HIEventShape *)> function_t
Definition: HIEventShapeSummaryTool.h:28
HIEventShapeSummaryTool::summary_info_t::func
function_t func
Definition: HIEventShapeSummaryTool.h:35
HIEventShapeSummaryTool::s_SubCaloNames
static const std::vector< std::string > s_SubCaloNames
Definition: HIEventShapeSummaryTool.h:53
HIEventShapeSummaryTool::HIEventShapeSummaryTool
HIEventShapeSummaryTool(const std::string &n)
Definition: HIEventShapeSummaryTool.cxx:28
xAOD::HIEventShape_v2
Interface class for the HI reconstruction EDM.
Definition: HIEventShape_v2.h:31
HIEventShapeSummaryTool::getSubCaloEtaMax
float getSubCaloEtaMax(const std::vector< int > &samps) const
Definition: HIEventShapeSummaryTool.cxx:137
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
HIEventShapeSummaryTool::getSubCaloLayer
int getSubCaloLayer(const std::vector< int > &samps) const
Definition: HIEventShapeSummaryTool.cxx:148
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HIEventShapeSummaryTool::summarize
StatusCode summarize(const xAOD::HIEventShapeContainer *in, xAOD::HIEventShapeContainer *out) const override
Definition: HIEventShapeSummaryTool.cxx:36
HIEventShapeSummaryTool::dumpList
std::string dumpList() const override
Definition: HIEventShapeSummaryTool.cxx:155
HIEventShapeSummaryTool::summary_info_t
Definition: HIEventShapeSummaryTool.h:30
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
HIEventShapeSummaryTool::m_samp_names
std::vector< std::string > m_samp_names
Definition: HIEventShapeSummaryTool.h:41
HIEventShapeSummaryTool::summary_info_t::name
std::string name
Definition: HIEventShapeSummaryTool.h:31
HIEventShapeSummaryTool::s_SubCaloLists
static const std::vector< std::initializer_list< int > > s_SubCaloLists
Definition: HIEventShapeSummaryTool.h:54
python.PyAthena.v
v
Definition: PyAthena.py:157
IHIEventShapeSummaryTool
Definition: IHIEventShapeSummaryTool.h:11
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
HIEventShapeSummaryTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HIEventShapeSummaryTool.cxx:53
HIEventShapeSummaryTool::m_subcalo_names
std::vector< std::string > m_subcalo_names
Definition: HIEventShapeSummaryTool.h:42
HIEventShapeSummaryTool::m_do_sides
bool m_do_sides
Definition: HIEventShapeSummaryTool.h:43
AsgTool.h
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
DiTauMassTools::TauTypes::ll
@ ll
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49
HIEventShapeSummaryTool
Definition: HIEventShapeSummaryTool.h:17