ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GlobalSim::ERatioAlgTool Class Reference

#include <ERatioAlgTool.h>

Inheritance diagram for GlobalSim::ERatioAlgTool:
Collaboration diagram for GlobalSim::ERatioAlgTool:

Public Member Functions

 ERatioAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~ERatioAlgTool ()=default
 
StatusCode initialize () override
 
virtual StatusCode run (const EventContext &ctx) const override
 
virtual std::string toString () const override
 

Private Attributes

Gaudi::Property< std::string > m_algInstanceName
 
Gaudi::Property< bool > m_enableDump
 
Gaudi::Property< double > m_minDeltaE
 
Gaudi::Property< double > m_maxERCut
 
SG::ReadHandleKey< LArStripNeighborhoodContainerm_nbhdContainerReadKey
 

Detailed Description

Definition at line 21 of file ERatioAlgTool.h.

Constructor & Destructor Documentation

◆ ERatioAlgTool()

GlobalSim::ERatioAlgTool::ERatioAlgTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 14 of file ERatioAlgTool.cxx.

16  :
17  base_class(type, name, parent){
18  }

◆ ~ERatioAlgTool()

virtual GlobalSim::ERatioAlgTool::~ERatioAlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::ERatioAlgTool::initialize ( )
override

Definition at line 20 of file ERatioAlgTool.cxx.

20  {
21 
22  CHECK(m_nbhdContainerReadKey.initialize());
23 
24  return StatusCode::SUCCESS;
25  }

◆ run()

StatusCode GlobalSim::ERatioAlgTool::run ( const EventContext &  ctx) const
overridevirtual

Definition at line 28 of file ERatioAlgTool.cxx.

28  {
29  ATH_MSG_DEBUG("run()");
30 
31  // instantiate Algorithm object
33 
34  // read in LArStrip neighborhoods from the event store
35  // there is one neighborhood per EFex RoI
36  auto in =
38  ctx);
39  CHECK(in.isValid());
40 
41  ATH_MSG_DEBUG("read in " << (*in).size() << " neighborhoods");
42 
43 
44  if (m_enableDump) {
45  dump(name() + "_" + std::to_string(ctx.evt()), alg);
46  }
47 
48  std::vector<bool> found(in->size(), false);
49 
50  // check for the presence of a pi0 candidate in each neighborhood.
51  std::size_t inbhd{0};
52  for (const auto& nbhd : *in) {
53  bool result{false};
54  CHECK(alg.run(*nbhd, result));
55  found.at(inbhd++) = result;
56  }
57 
58 
59  for (const auto res : found) {
60  ATH_MSG_DEBUG("neighborhood result: " <<std::boolalpha << res);
61  }
62 
63 
64  return StatusCode::SUCCESS;
65  }

◆ toString()

std::string GlobalSim::ERatioAlgTool::toString ( ) const
overridevirtual

Definition at line 67 of file ERatioAlgTool.cxx.

67  {
68 
69  std::stringstream ss;
70  ss << "ERatioAlgTool. name: " << name() << '\n'
71  << m_nbhdContainerReadKey << '\n'
72  << ERatio(m_algInstanceName).toString()
73  << '\n';
74  return ss.str();
75  }

Member Data Documentation

◆ m_algInstanceName

Gaudi::Property<std::string> GlobalSim::ERatioAlgTool::m_algInstanceName
private
Initial value:
{
this,
"alg_instance_name",
{},
"instance name of concrete L1Topo Algorithm"}

Definition at line 39 of file ERatioAlgTool.h.

◆ m_enableDump

Gaudi::Property<bool> GlobalSim::ERatioAlgTool::m_enableDump
private
Initial value:
{this,
"enableDump",
{false},
"flag to enable dumps"}

Definition at line 46 of file ERatioAlgTool.h.

◆ m_maxERCut

Gaudi::Property<double> GlobalSim::ERatioAlgTool::m_maxERCut
private
Initial value:
{this,
"maxERCut",
{2.5},
"max acceptable peak ratio for pi0 acceptance"}

Definition at line 61 of file ERatioAlgTool.h.

◆ m_minDeltaE

Gaudi::Property<double> GlobalSim::ERatioAlgTool::m_minDeltaE
private
Initial value:
{this,
"minDeltaE",
{50.0},
"min energy between strips considered significant"}

Definition at line 53 of file ERatioAlgTool.h.

◆ m_nbhdContainerReadKey

SG::ReadHandleKey<LArStripNeighborhoodContainer> GlobalSim::ERatioAlgTool::m_nbhdContainerReadKey
private
Initial value:
{
this,
"LArNeighborhoodContainerReadKey",
"stripNeighborhoodContainer",
"key to read inLArNeighborhoodReadKeys"}

Definition at line 69 of file ERatioAlgTool.h.


The documentation for this class was generated from the following files:
SGout2dot.alg
alg
Definition: SGout2dot.py:243
get_generator_info.result
result
Definition: get_generator_info.py:21
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
GlobalSim::ERatioAlgTool::m_maxERCut
Gaudi::Property< double > m_maxERCut
Definition: ERatioAlgTool.h:61
GlobalSim::ERatioAlgTool::m_nbhdContainerReadKey
SG::ReadHandleKey< LArStripNeighborhoodContainer > m_nbhdContainerReadKey
Definition: ERatioAlgTool.h:69
GlobalSim::ERatioAlgTool::m_minDeltaE
Gaudi::Property< double > m_minDeltaE
Definition: ERatioAlgTool.h:53
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
GlobalSim::ERatioAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: ERatioAlgTool.h:46
GlobalSim::dump
void dump(const std::string &fn, const T &t)
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::ERatioAlgTool::m_algInstanceName
Gaudi::Property< std::string > m_algInstanceName
Definition: ERatioAlgTool.h:39