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

#include <cTauMultiplicityAlgTool.h>

Inheritance diagram for GlobalSim::cTauMultiplicityAlgTool:
Collaboration diagram for GlobalSim::cTauMultiplicityAlgTool:

Public Member Functions

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

Private Member Functions

StatusCode monitor (const cTauMultiplicity &) const
 

Private Attributes

Gaudi::Property< std::string > m_algInstanceName
 
Gaudi::Property< unsigned int > m_nbits
 
Gaudi::Property< bool > m_doDump
 
std::unique_ptr< L1MenuResourcesm_l1MenuResources {nullptr}
 
SG::ReadHandleKey< GlobalSim::cTauTOBArraym_cTauTOBArrayReadKey
 
SG::WriteHandleKey< GlobalSim::Countm_CountWriteKey
 
ToolHandle< GenericMonitoringToolm_monTool {this, "monTool", {}, "MonitoringTool"}
 

Detailed Description

Definition at line 28 of file cTauMultiplicityAlgTool.h.

Constructor & Destructor Documentation

◆ cTauMultiplicityAlgTool()

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

Definition at line 20 of file cTauMultiplicityAlgTool.cxx.

22  :
23  base_class(type, name, parent){
24  }

◆ ~cTauMultiplicityAlgTool()

virtual GlobalSim::cTauMultiplicityAlgTool::~cTauMultiplicityAlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::cTauMultiplicityAlgTool::initialize ( )
override

Definition at line 26 of file cTauMultiplicityAlgTool.cxx.

26  {
27 
28  if (m_nbits == 0u) {
29  ATH_MSG_ERROR("m_nbits == 0");
30  return StatusCode::FAILURE;
31  }
32 
33  const TrigConf::L1Menu* l1menu = nullptr;
35  ATH_MSG_INFO("L1Menu name " << l1menu->getAttribute("name"));
37  std::make_unique<L1MenuResources>(*l1menu,
39  "MULTTOPO");
40 
43 
44 
45  return StatusCode::SUCCESS;
46  }

◆ monitor()

StatusCode GlobalSim::cTauMultiplicityAlgTool::monitor ( const cTauMultiplicity alg) const
private

Definition at line 83 of file cTauMultiplicityAlgTool.cxx.

83  {
84 
85  const auto & accept_eta_data = alg.accept_eta();
86 
87  auto accept_eta_moncol = Monitored::Collection("accept_eta",
88  accept_eta_data);
89  const auto & accept_et_data = alg.accept_et();
90  auto accept_et_moncol = Monitored::Collection("accept_et",
91  accept_et_data);
92 
93  const auto & counts_data = alg.counts();
94  auto counts_moncol = Monitored::Collection("counts", counts_data);
95 
96  const auto & TOBet_data = alg.TOB_et();
97  auto TOBet_moncol = Monitored::Collection("Et", TOBet_data);
98 
99 
100  const auto & TOBeta_data = alg.TOB_eta();
101  auto TOBeta_moncol = Monitored::Collection("eta", TOBeta_data);
102 
103 
104  const auto & TOBphi_data = alg.TOB_phi();
105  auto TOBphi_moncol = Monitored::Collection("phi", TOBphi_data);
106 
107  const auto & TOBisolation_partial_loose_data = alg.TOB_isolation_partial_loose();
108  auto TOBisolation_partial_loose_moncol =
109  Monitored::Collection("iso_loose", TOBisolation_partial_loose_data);
110 
111  const auto & TOBisolation_partial_medium_data = alg.TOB_isolation_partial_medium();
112  auto TOBisolation_partial_medium_moncol =
113  Monitored::Collection("iso_medium", TOBisolation_partial_medium_data);
114 
115  const auto & TOBisolation_partial_tight_data = alg.TOB_isolation_partial_tight();
116  auto TOBisolation_partial_tight_moncol =
117  Monitored::Collection("iso_tight", TOBisolation_partial_tight_data);
118 
119 
121  accept_eta_moncol,
122  accept_et_moncol,
123  TOBet_moncol,
124  TOBphi_moncol,
125  TOBeta_moncol,
126  TOBisolation_partial_loose_moncol,
127  TOBisolation_partial_medium_moncol,
128  TOBisolation_partial_tight_moncol
129  );
130 
131  return StatusCode::SUCCESS;
132  }

◆ run()

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

Definition at line 49 of file cTauMultiplicityAlgTool.cxx.

49  {
50 
52  CHECK(cTaus.isValid());
53 
54  auto count = std::make_unique<GlobalSim::Count>();
55 
56  const auto & threshold =
57  dynamic_cast<const TrigConf::L1Threshold_cTAU&>(m_l1MenuResources->threshold());
58 
59  auto alg =
60  cTauMultiplicity(m_algInstanceName,
61  m_nbits,
62  threshold,
63  m_l1MenuResources->isolationFW_CTAU(),
64  m_l1MenuResources->isolationFW_CTAU_jTAUCoreScale());
65 
66 
67  CHECK(alg.run(*cTaus, *count));
69  ctx);
70  if (m_doDump) {
71  dump(name() + '_' + std::to_string(ctx.evt()), *count);
72  }
73 
74  CHECK(h_write.record(std::move(count)));
75 
76  CHECK(monitor(alg));
77 
78 
79  return StatusCode::SUCCESS;
80  }

◆ toString()

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

Definition at line 134 of file cTauMultiplicityAlgTool.cxx.

134  {
135 
136  std::stringstream ss;
137  const auto & threshold =
138  dynamic_cast<const TrigConf::L1Threshold_cTAU&>(m_l1MenuResources->threshold());
139  ss << "cTauMultiplicityAlgTool. name: " << name() << '\n'
140  << m_cTauTOBArrayReadKey << '\n'
141  << m_CountWriteKey << '\n'
142  << cTauMultiplicity(m_algInstanceName,
143  m_nbits,
144  threshold,
145  m_l1MenuResources->isolationFW_CTAU(),
146  m_l1MenuResources->isolationFW_CTAU_jTAUCoreScale()).toString()
147  << '\n';
148  return ss.str();
149  }

Member Data Documentation

◆ m_algInstanceName

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

Definition at line 45 of file cTauMultiplicityAlgTool.h.

◆ m_CountWriteKey

SG::WriteHandleKey<GlobalSim::Count> GlobalSim::cTauMultiplicityAlgTool::m_CountWriteKey
private
Initial value:
{this, "CountWriteKey", "",
"key to write out a GlobalSim::Count object"}

Definition at line 71 of file cTauMultiplicityAlgTool.h.

◆ m_cTauTOBArrayReadKey

SG::ReadHandleKey<GlobalSim::cTauTOBArray> GlobalSim::cTauMultiplicityAlgTool::m_cTauTOBArrayReadKey
private
Initial value:
{this, "TOBArrayReadKey", "",
"key to read in an cTauTOBArray"}

Definition at line 67 of file cTauMultiplicityAlgTool.h.

◆ m_doDump

Gaudi::Property<bool> GlobalSim::cTauMultiplicityAlgTool::m_doDump
private
Initial value:
{this,
"do_dump",
{false},
"flag to enable dumps"}

Definition at line 58 of file cTauMultiplicityAlgTool.h.

◆ m_l1MenuResources

std::unique_ptr<L1MenuResources> GlobalSim::cTauMultiplicityAlgTool::m_l1MenuResources {nullptr}
private

Definition at line 64 of file cTauMultiplicityAlgTool.h.

◆ m_monTool

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

Definition at line 76 of file cTauMultiplicityAlgTool.h.

◆ m_nbits

Gaudi::Property<unsigned int> GlobalSim::cTauMultiplicityAlgTool::m_nbits
private
Initial value:
{this,
"nbits",
{0u},
"number of output bits to set in TCS::Count"}

Definition at line 52 of file cTauMultiplicityAlgTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TrigConf::L1Threshold_cTAU
Definition: L1Threshold.h:255
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
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
GlobalSim::cTauMultiplicityAlgTool::m_l1MenuResources
std::unique_ptr< L1MenuResources > m_l1MenuResources
Definition: cTauMultiplicityAlgTool.h:64
GlobalSim::cTauMultiplicityAlgTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: cTauMultiplicityAlgTool.h:76
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
GlobalSim::cTauMultiplicityAlgTool::m_CountWriteKey
SG::WriteHandleKey< GlobalSim::Count > m_CountWriteKey
Definition: cTauMultiplicityAlgTool.h:71
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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::cTauMultiplicityAlgTool::monitor
StatusCode monitor(const cTauMultiplicity &) const
Definition: cTauMultiplicityAlgTool.cxx:83
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
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
threshold
Definition: chainparser.cxx:74
GlobalSim::dump
void dump(const std::string &fn, const T &t)
GlobalSim::cTauMultiplicityAlgTool::m_nbits
Gaudi::Property< unsigned int > m_nbits
Definition: cTauMultiplicityAlgTool.h:52
GlobalSim::cTauMultiplicityAlgTool::m_cTauTOBArrayReadKey
SG::ReadHandleKey< GlobalSim::cTauTOBArray > m_cTauTOBArrayReadKey
Definition: cTauMultiplicityAlgTool.h:67
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
GlobalSim::cTauMultiplicityAlgTool::m_doDump
Gaudi::Property< bool > m_doDump
Definition: cTauMultiplicityAlgTool.h:58
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::cTauMultiplicityAlgTool::m_algInstanceName
Gaudi::Property< std::string > m_algInstanceName
Definition: cTauMultiplicityAlgTool.h:45
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73