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

#include <SimpleConeAlgTool.h>

Inheritance diagram for GlobalSim::SimpleConeAlgTool:
Collaboration diagram for GlobalSim::SimpleConeAlgTool:

Public Member Functions

 SimpleConeAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SimpleConeAlgTool ()=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< unsigned int > m_InputWidth
 
Gaudi::Property< unsigned int > m_MinET
 
Gaudi::Property< std::vector< unsigned int > > m_MinSumET
 
Gaudi::Property< unsigned int > m_MaxRSqr
 
ToolHandle< GenericMonitoringToolm_monTool {this, "monTool", {}, "MonitoringTool"}
 
SG::ReadHandleKey< GlobalSim::GenericTOBArraym_genericTOBArrayReadKey
 
SG::WriteHandleKey< std::vector< GlobalSim::GenericTOBArray > > m_genericTOBArrayVectorWriteKey
 
SG::WriteHandleKey< GlobalSim::Decisionm_decisionWriteKey
 

Detailed Description

Definition at line 26 of file SimpleConeAlgTool.h.

Constructor & Destructor Documentation

◆ SimpleConeAlgTool()

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

Definition at line 13 of file SimpleConeAlgTool.cxx.

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

◆ ~SimpleConeAlgTool()

virtual GlobalSim::SimpleConeAlgTool::~SimpleConeAlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::SimpleConeAlgTool::initialize ( )
override

Definition at line 19 of file SimpleConeAlgTool.cxx.

19  {
20 
24 
25 
26  return StatusCode::SUCCESS;
27  }

◆ run()

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

Definition at line 30 of file SimpleConeAlgTool.cxx.

30  {
31  auto alg = SimpleCone(m_algInstanceName,
33  m_MaxRSqr,
34  m_MinET,
35  m_MinSumET);
36 
37  auto tobArray_in =
39  ctx);
40  CHECK(tobArray_in.isValid());
41 
42  auto tobArrayVector_out =
43  std::make_unique<std::vector<GlobalSim::GenericTOBArray>>();
44 
45  auto decision = std::make_unique<GlobalSim::Decision>();
46 
47 
48  CHECK(alg.run(*tobArray_in,
49  *tobArrayVector_out,
50  *decision));
51 
53  h_tav_write(m_genericTOBArrayVectorWriteKey, ctx);
54  CHECK(h_tav_write.record(std::move(tobArrayVector_out)));
55 
56 
58  h_decision_write(m_decisionWriteKey, ctx);
59  CHECK(h_decision_write.record(std::move(decision)));
60 
61 
62  //monitoring
63 
64  auto nrb = m_MinSumET.size();
65  for (unsigned int i = 0; i < nrb; ++i) {
66  const auto& passValues = alg.ETPassByBit(i);
67  const auto& failValues = alg.ETFailByBit(i);
68 
69  std::string label_pass = m_algInstanceName +
70  "_pass_by_bit_" + std::to_string(i);
71 
72  std::string label_fail = m_algInstanceName +
73  "_fail_by_bit_" + std::to_string(i);
74 
75  auto pass = Monitored::Collection(std::move(label_pass), passValues);
76  auto fail = Monitored::Collection(std::move(label_fail), failValues);
77  auto group = Monitored::Group(m_monTool, pass, fail);
78  }
79 
80 
81  return StatusCode::SUCCESS;
82  }

◆ toString()

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

Definition at line 84 of file SimpleConeAlgTool.cxx.

84  {
85 
86  std::stringstream ss;
87  ss << "SimpleConeAlgTool. name: " << name() << '\n'
88  << m_genericTOBArrayReadKey << '\n'
90  << m_decisionWriteKey << "\nalg:\n"
91  << SimpleCone(m_algInstanceName,
93  m_MaxRSqr,
94  m_MinET,
95  m_MinSumET).toString();
96 
97  return ss.str();
98  }

Member Data Documentation

◆ m_algInstanceName

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

Definition at line 45 of file SimpleConeAlgTool.h.

◆ m_decisionWriteKey

SG::WriteHandleKey<GlobalSim::Decision> GlobalSim::SimpleConeAlgTool::m_decisionWriteKey
private
Initial value:
{this, "DecisionWriteKey", "",
"key to write out an GlobalSim::Decision object"}

Definition at line 91 of file SimpleConeAlgTool.h.

◆ m_genericTOBArrayReadKey

SG::ReadHandleKey<GlobalSim::GenericTOBArray> GlobalSim::SimpleConeAlgTool::m_genericTOBArrayReadKey
private
Initial value:
{this, "TOBArrayReadKey", "",
"key to read in a genericTauTOBArray"}

Definition at line 81 of file SimpleConeAlgTool.h.

◆ m_genericTOBArrayVectorWriteKey

SG::WriteHandleKey<std::vector<GlobalSim::GenericTOBArray> > GlobalSim::SimpleConeAlgTool::m_genericTOBArrayVectorWriteKey
private
Initial value:
{this,
"TOBArrayVectorWriteKey",
"",
"key to write out a vector<GlobalSim::GenericTOBArray>"}

Definition at line 85 of file SimpleConeAlgTool.h.

◆ m_InputWidth

Gaudi::Property<unsigned int> GlobalSim::SimpleConeAlgTool::m_InputWidth
private
Initial value:
{
this,
"InputWidth",
{0u},
"max number of input objects to consider"}

Definition at line 51 of file SimpleConeAlgTool.h.

◆ m_MaxRSqr

Gaudi::Property<unsigned int> GlobalSim::SimpleConeAlgTool::m_MaxRSqr
private
Initial value:
{
this,
"MaxRSqr",
{0u},
"square radius of cone"}

Definition at line 70 of file SimpleConeAlgTool.h.

◆ m_MinET

Gaudi::Property<unsigned int> GlobalSim::SimpleConeAlgTool::m_MinET
private
Initial value:
{
this,
"MinET",
{0u},
"min RT for contributing TOB"}

Definition at line 57 of file SimpleConeAlgTool.h.

◆ m_MinSumET

Gaudi::Property<std::vector<unsigned int> > GlobalSim::SimpleConeAlgTool::m_MinSumET
private
Initial value:
{
this,
"MinSumET",
{},
"minum sumET for cone jet. one value per oputput bit"}

Definition at line 64 of file SimpleConeAlgTool.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> GlobalSim::SimpleConeAlgTool::m_monTool {this, "monTool", {}, "MonitoringTool"}
private

Definition at line 78 of file SimpleConeAlgTool.h.


The documentation for this class was generated from the following files:
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
SGout2dot.alg
alg
Definition: SGout2dot.py:243
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
GlobalSim::SimpleConeAlgTool::m_genericTOBArrayReadKey
SG::ReadHandleKey< GlobalSim::GenericTOBArray > m_genericTOBArrayReadKey
Definition: SimpleConeAlgTool.h:81
GlobalSim::SimpleConeAlgTool::m_MinET
Gaudi::Property< unsigned int > m_MinET
Definition: SimpleConeAlgTool.h:57
GlobalSim::SimpleConeAlgTool::m_MaxRSqr
Gaudi::Property< unsigned int > m_MaxRSqr
Definition: SimpleConeAlgTool.h:70
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
GlobalSim::SimpleConeAlgTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: SimpleConeAlgTool.h:78
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
GlobalSim::SimpleConeAlgTool::m_MinSumET
Gaudi::Property< std::vector< unsigned int > > m_MinSumET
Definition: SimpleConeAlgTool.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
GlobalSim::SimpleConeAlgTool::m_InputWidth
Gaudi::Property< unsigned int > m_InputWidth
Definition: SimpleConeAlgTool.h:51
GlobalSim::SimpleConeAlgTool::m_decisionWriteKey
SG::WriteHandleKey< GlobalSim::Decision > m_decisionWriteKey
Definition: SimpleConeAlgTool.h:91
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::SimpleConeAlgTool::m_algInstanceName
Gaudi::Property< std::string > m_algInstanceName
Definition: SimpleConeAlgTool.h:45
GlobalSim::SimpleConeAlgTool::m_genericTOBArrayVectorWriteKey
SG::WriteHandleKey< std::vector< GlobalSim::GenericTOBArray > > m_genericTOBArrayVectorWriteKey
Definition: SimpleConeAlgTool.h:85
beamspotman.fail
def fail(message)
Definition: beamspotman.py:201