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

#include <DeltaRSqrIncl2AlgTool.h>

Inheritance diagram for GlobalSim::DeltaRSqrIncl2AlgTool:
Collaboration diagram for GlobalSim::DeltaRSqrIncl2AlgTool:

Public Member Functions

 DeltaRSqrIncl2AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~DeltaRSqrIncl2AlgTool ()=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_MaxTOB1
 
Gaudi::Property< unsigned int > m_MaxTOB2
 
Gaudi::Property< std::vector< unsigned int > > m_MinET1
 
Gaudi::Property< std::vector< unsigned int > > m_MinET2
 
Gaudi::Property< std::vector< unsigned int > > m_DeltaRMin
 
Gaudi::Property< std::vector< unsigned int > > m_DeltaRMax
 
Gaudi::Property< unsigned int > m_NumResultBits
 
Gaudi::Property< bool > m_doDump
 
ToolHandle< GenericMonitoringToolm_monTool {this, "monTool", {}, "MonitoringTool"}
 
SG::ReadHandleKey< GlobalSim::GenericTOBArraym_genericTOBArrayReadKey0
 
SG::ReadHandleKey< GlobalSim::GenericTOBArraym_genericTOBArrayReadKey1
 
SG::WriteHandleKey< std::vector< GlobalSim::GenericTOBArray > > m_genericTOBArrayVectorWriteKey
 
SG::WriteHandleKey< GlobalSim::Decisionm_decisionWriteKey
 

Detailed Description

Definition at line 24 of file DeltaRSqrIncl2AlgTool.h.

Constructor & Destructor Documentation

◆ DeltaRSqrIncl2AlgTool()

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

Definition at line 14 of file DeltaRSqrIncl2AlgTool.cxx.

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

◆ ~DeltaRSqrIncl2AlgTool()

virtual GlobalSim::DeltaRSqrIncl2AlgTool::~DeltaRSqrIncl2AlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::DeltaRSqrIncl2AlgTool::initialize ( )
override

Definition at line 20 of file DeltaRSqrIncl2AlgTool.cxx.

20  {
21 
26 
27 
28  return StatusCode::SUCCESS;
29  }

◆ run()

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

Definition at line 32 of file DeltaRSqrIncl2AlgTool.cxx.

32  {
33 
34  auto alg = DeltaRSqrIncl2(m_algInstanceName,
35  m_MaxTOB1,
36  m_MaxTOB2,
37  m_MinET1,
38  m_MinET2,
42 
43  auto in0 =
45  ctx);
46  CHECK(in0.isValid());
47 
48 
49  auto in1 =
51  ctx);
52  CHECK(in1.isValid());
53 
54  auto tobArrayVector_out =
55  std::make_unique<std::vector<GlobalSim::GenericTOBArray>>();
56 
57  auto decision = std::make_unique<GlobalSim::Decision>();
58 
59  CHECK(alg.run(*in0,
60  *in1,
61  *tobArrayVector_out,
62  *decision));
63 
64  if (m_doDump) {
65  dump(name() + "_" + std::to_string(ctx.evt()), *decision);
66  }
67 
69  h_tav_write(m_genericTOBArrayVectorWriteKey, ctx);
70  CHECK(h_tav_write.record(std::move(tobArrayVector_out)));
71 
72 
74  h_decision_write(m_decisionWriteKey, ctx);
75  CHECK(h_decision_write.record(std::move(decision)));
76 
77 
78  // monitor
79 
80  auto nrb = alg.numResultBits();
81 
82  for (unsigned int i = 0; i < nrb; ++i) {
83  const auto& passValues = alg.deltaRSqPassByBit(i);
84  const auto& failValues = alg.deltaRSqFailByBit(i);
85  std::string label_pass =
86  m_algInstanceName + "_pass_by_bit_" + std::to_string(i);
87 
88  std::string label_fail = m_algInstanceName +
89  "_fail_by_bit_" + std::to_string(i);
90  auto pass = Monitored::Collection(std::move(label_pass), passValues);
91  auto fail = Monitored::Collection(std::move(label_fail), failValues);
92  auto group = Monitored::Group(m_monTool, pass, fail);
93  }
94 
95  return StatusCode::SUCCESS;
96  }

◆ toString()

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

Definition at line 98 of file DeltaRSqrIncl2AlgTool.cxx.

98  {
99 
100  std::stringstream ss;
101  ss << "DeltaRSqrIncl2AlgTool. name: " << name() << '\n'
102  << m_genericTOBArrayReadKey0 << '\n'
103  << m_genericTOBArrayReadKey1 << '\n'
105  << m_decisionWriteKey << "\n alg:\n"
106  << DeltaRSqrIncl2(m_algInstanceName,
107  m_MaxTOB1,
108  m_MaxTOB2,
109  m_MinET1,
110  m_MinET2,
111  m_DeltaRMin,
112  m_DeltaRMax,
113  m_NumResultBits).toString()
114  << '\n';
115  return ss.str();
116  }

Member Data Documentation

◆ m_algInstanceName

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

Definition at line 41 of file DeltaRSqrIncl2AlgTool.h.

◆ m_decisionWriteKey

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

Definition at line 126 of file DeltaRSqrIncl2AlgTool.h.

◆ m_DeltaRMax

Gaudi::Property<std::vector<unsigned int> > GlobalSim::DeltaRSqrIncl2AlgTool::m_DeltaRMax
private
Initial value:
{
this,
"DeltaRMax",
{},
"Delta R max values, one per output bit"
}

Definition at line 84 of file DeltaRSqrIncl2AlgTool.h.

◆ m_DeltaRMin

Gaudi::Property<std::vector<unsigned int> > GlobalSim::DeltaRSqrIncl2AlgTool::m_DeltaRMin
private
Initial value:
{
this,
"DeltaRMin",
{},
"Delta R min values, one per output bit"
}

Definition at line 76 of file DeltaRSqrIncl2AlgTool.h.

◆ m_doDump

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

Definition at line 100 of file DeltaRSqrIncl2AlgTool.h.

◆ m_genericTOBArrayReadKey0

SG::ReadHandleKey<GlobalSim::GenericTOBArray> GlobalSim::DeltaRSqrIncl2AlgTool::m_genericTOBArrayReadKey0
private
Initial value:
{this, "TOBArrayReadKey0", "",
"key to read in a genericTOBArray 1st arg"}

Definition at line 110 of file DeltaRSqrIncl2AlgTool.h.

◆ m_genericTOBArrayReadKey1

SG::ReadHandleKey<GlobalSim::GenericTOBArray> GlobalSim::DeltaRSqrIncl2AlgTool::m_genericTOBArrayReadKey1
private
Initial value:
{this, "TOBArrayReadKey1", "",
"key to read in a genericTOBArray 2nd arg"}

Definition at line 115 of file DeltaRSqrIncl2AlgTool.h.

◆ m_genericTOBArrayVectorWriteKey

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

Definition at line 120 of file DeltaRSqrIncl2AlgTool.h.

◆ m_MaxTOB1

Gaudi::Property<unsigned int> GlobalSim::DeltaRSqrIncl2AlgTool::m_MaxTOB1
private
Initial value:
{
this,
"MaxTOB1",
0u,
"maximum of the obs for argument 1 to consider"}

Definition at line 47 of file DeltaRSqrIncl2AlgTool.h.

◆ m_MaxTOB2

Gaudi::Property<unsigned int> GlobalSim::DeltaRSqrIncl2AlgTool::m_MaxTOB2
private
Initial value:
{
this,
"MaxTOB2",
0u,
"maximum of the obs for argument 2 to consider"}

Definition at line 53 of file DeltaRSqrIncl2AlgTool.h.

◆ m_MinET1

Gaudi::Property<std::vector<unsigned int> > GlobalSim::DeltaRSqrIncl2AlgTool::m_MinET1
private
Initial value:
{
this,
"MinET1",
{},
"Min ET values for argument 1, one per output bit"
}

Definition at line 60 of file DeltaRSqrIncl2AlgTool.h.

◆ m_MinET2

Gaudi::Property<std::vector<unsigned int> > GlobalSim::DeltaRSqrIncl2AlgTool::m_MinET2
private
Initial value:
{
this,
"MinET2",
{},
"Min ET values for argument 2, one per output bit"
}

Definition at line 68 of file DeltaRSqrIncl2AlgTool.h.

◆ m_monTool

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

Definition at line 106 of file DeltaRSqrIncl2AlgTool.h.

◆ m_NumResultBits

Gaudi::Property<unsigned int> GlobalSim::DeltaRSqrIncl2AlgTool::m_NumResultBits
private
Initial value:
{
this,
"NumResultBits",
{0u},
"number of bits to set in the Decision object"
}

Definition at line 92 of file DeltaRSqrIncl2AlgTool.h.


The documentation for this class was generated from the following files:
GlobalSim::DeltaRSqrIncl2AlgTool::m_algInstanceName
Gaudi::Property< std::string > m_algInstanceName
Definition: DeltaRSqrIncl2AlgTool.h:41
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
GlobalSim::DeltaRSqrIncl2AlgTool::m_decisionWriteKey
SG::WriteHandleKey< GlobalSim::Decision > m_decisionWriteKey
Definition: DeltaRSqrIncl2AlgTool.h:126
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
GlobalSim::DeltaRSqrIncl2AlgTool::m_DeltaRMax
Gaudi::Property< std::vector< unsigned int > > m_DeltaRMax
Definition: DeltaRSqrIncl2AlgTool.h:84
GlobalSim::DeltaRSqrIncl2AlgTool::m_MinET2
Gaudi::Property< std::vector< unsigned int > > m_MinET2
Definition: DeltaRSqrIncl2AlgTool.h:68
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
GlobalSim::DeltaRSqrIncl2AlgTool::m_DeltaRMin
Gaudi::Property< std::vector< unsigned int > > m_DeltaRMin
Definition: DeltaRSqrIncl2AlgTool.h:76
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
GlobalSim::DeltaRSqrIncl2AlgTool::m_doDump
Gaudi::Property< bool > m_doDump
Definition: DeltaRSqrIncl2AlgTool.h:100
GlobalSim::DeltaRSqrIncl2AlgTool::m_genericTOBArrayVectorWriteKey
SG::WriteHandleKey< std::vector< GlobalSim::GenericTOBArray > > m_genericTOBArrayVectorWriteKey
Definition: DeltaRSqrIncl2AlgTool.h:120
GlobalSim::dump
void dump(const std::string &fn, const T &t)
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
GlobalSim::DeltaRSqrIncl2AlgTool::m_MinET1
Gaudi::Property< std::vector< unsigned int > > m_MinET1
Definition: DeltaRSqrIncl2AlgTool.h:60
GlobalSim::DeltaRSqrIncl2AlgTool::m_MaxTOB2
Gaudi::Property< unsigned int > m_MaxTOB2
Definition: DeltaRSqrIncl2AlgTool.h:53
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::DeltaRSqrIncl2AlgTool::m_NumResultBits
Gaudi::Property< unsigned int > m_NumResultBits
Definition: DeltaRSqrIncl2AlgTool.h:92
GlobalSim::DeltaRSqrIncl2AlgTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: DeltaRSqrIncl2AlgTool.h:106
GlobalSim::DeltaRSqrIncl2AlgTool::m_genericTOBArrayReadKey0
SG::ReadHandleKey< GlobalSim::GenericTOBArray > m_genericTOBArrayReadKey0
Definition: DeltaRSqrIncl2AlgTool.h:110
GlobalSim::DeltaRSqrIncl2AlgTool::m_genericTOBArrayReadKey1
SG::ReadHandleKey< GlobalSim::GenericTOBArray > m_genericTOBArrayReadKey1
Definition: DeltaRSqrIncl2AlgTool.h:115
beamspotman.fail
def fail(message)
Definition: beamspotman.py:201
GlobalSim::DeltaRSqrIncl2AlgTool::m_MaxTOB1
Gaudi::Property< unsigned int > m_MaxTOB1
Definition: DeltaRSqrIncl2AlgTool.h:47