ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::eFEXtauBDTAlgo Class Reference

The eFEXtauBDTAlgo class calculates the tau BDT TOB variables. More...

#include <eFEXtauBDTAlgo.h>

Inheritance diagram for LVL1::eFEXtauBDTAlgo:
Collaboration diagram for LVL1::eFEXtauBDTAlgo:

Public Member Functions

 eFEXtauBDTAlgo (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors.
virtual StatusCode initialize () override
 standard Athena-Algorithm method
virtual ~eFEXtauBDTAlgo ()
 Destructor.
virtual void setup (int inputTable[3][3], int efex_id, int fpga_id, int central_eta) override
virtual void compute () override
virtual std::unique_ptr< eFEXtauTOBgetTauTOB () const override
virtual unsigned int rHadCore () const override
virtual unsigned int rHadEnv () const override
virtual unsigned int getEt () const override
virtual unsigned int getBitwiseEt () const override
virtual unsigned int getBDTScore () const override
virtual unsigned int getBDTCondition () const override
virtual unsigned int getBDTHadFracCondition () const override
virtual bool isBDT () const override
virtual void setThresholds (const std::vector< unsigned int > &rHadThreshold, const std::vector< unsigned int > &bdtThreshold, unsigned int etThreshold, unsigned int etThresholdForRHad, unsigned int bdtMinEtThreshold, unsigned int etThresholdForRHadFrac) override
virtual unsigned int getSeed () const override
virtual StatusCode safetyTest ()
virtual bool isCentralTowerSeed () const
virtual void getRCore (std::vector< unsigned int > &rCoreVec) const
virtual unsigned int rCoreCore () const
virtual unsigned int rCoreEnv () const
virtual float getRealRCore () const
virtual void getRHad (std::vector< unsigned int > &rHadVec) const
virtual float getRealRHad () const
virtual void getSums (unsigned int seed, bool UnD, std::vector< unsigned int > &RcoreSums, std::vector< unsigned int > &Remums)
virtual void setAlgoVersion (unsigned int)
void setSCellEncoder (LVL1::eFEXtauTOB *tob) const
virtual bool getUnD () const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void buildLayers (int efex_id, int fpga_id, int central_eta)
void setSuperCells (eFEXtauTOB *tob, bool withSupercells)
virtual void setSupercellSeed ()
virtual void setUnDAndOffPhi ()
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

SG::ReadHandleKey< LVL1::eTowerContainerm_eTowerContainerKey
bool m_cellsSet = false
int m_eFexalgoTowerID [3][3] {}
unsigned int m_em0cells [3][3] {}
unsigned int m_em1cells [12][3] {}
unsigned int m_em2cells [12][3] {}
unsigned int m_em3cells [3][3] {}
unsigned int m_hadcells [3][3] {}
unsigned int m_twrcells [3][3] {}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode initBDTVars ()
void setSCellPointers ()
void setThresholdPointers ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

unsigned int m_hadFracMultipliers [3] {}
unsigned int m_bdtThresholds [3] {}
unsigned int m_etThreshold {}
unsigned int m_maxEtThreshold {}
unsigned int m_maxEtThresholdFrac {}
unsigned int m_bdtMinEtThreshold {}
unsigned int m_bdtScore {}
std::vector< unsigned int > m_bdtVars
std::vector< std::vector< unsigned int * > > m_bdtVarComputeSCellPointers
Gaudi::Property< std::string > m_bdtJsonConfigPath
std::unique_ptr< eFEXtauBDTm_bdtAlgoImpl
bool m_bdtVarsComputed = false
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The eFEXtauBDTAlgo class calculates the tau BDT TOB variables.

Definition at line 28 of file eFEXtauBDTAlgo.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ eFEXtauBDTAlgo()

LVL1::eFEXtauBDTAlgo::eFEXtauBDTAlgo ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructors.

Definition at line 20 of file eFEXtauBDTAlgo.cxx.

23 : eFEXtauAlgoBase(type, name, parent) {}
eFEXtauAlgoBase(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.

◆ ~eFEXtauBDTAlgo()

LVL1::eFEXtauBDTAlgo::~eFEXtauBDTAlgo ( )
virtual

Destructor.

Definition at line 26 of file eFEXtauBDTAlgo.cxx.

26{}

Member Function Documentation

◆ buildLayers()

void LVL1::eFEXtauAlgoBase::buildLayers ( int efex_id,
int fpga_id,
int central_eta )
protectedinherited

Definition at line 37 of file eFEXtauAlgoBase.cxx.

38 {
39
40 SG::ReadHandle<eTowerContainer> eTowerContainer(
41 m_eTowerContainerKey /*,ctx*/);
42
43 for (unsigned int ieta = 0; ieta < 3; ieta++) {
44 for (unsigned int iphi = 0; iphi < 3; iphi++) {
45 if (((efex_id % 3 == 0) && (fpga_id == 0) && (central_eta == 0) &&
46 (ieta == 0)) ||
47 ((efex_id % 3 == 2) && (fpga_id == 3) && (central_eta == 5) &&
48 (ieta == 2))) {
49 m_twrcells[ieta][iphi] = 0;
50 m_em0cells[ieta][iphi] = 0;
51 m_em3cells[ieta][iphi] = 0;
52 m_hadcells[ieta][iphi] = 0;
53 for (unsigned int i = 0; i < 4; i++) {
54 m_em1cells[4 * ieta + i][iphi] = 0;
55 m_em2cells[4 * ieta + i][iphi] = 0;
56 }
57 } else {
58 const LVL1::eTower *tmpTower =
59 eTowerContainer->findTower(m_eFexalgoTowerID[iphi][ieta]);
60 m_twrcells[ieta][iphi] = tmpTower->getTotalET();
61 m_em0cells[ieta][iphi] = tmpTower->getLayerTotalET(0);
62 m_em3cells[ieta][iphi] = tmpTower->getLayerTotalET(3);
63 m_hadcells[ieta][iphi] = tmpTower->getLayerTotalET(4);
64 for (unsigned int i = 0; i < 4; i++) {
65 m_em1cells[4 * ieta + i][iphi] = tmpTower->getET(1, i);
66 m_em2cells[4 * ieta + i][iphi] = tmpTower->getET(2, i);
67 }
68 }
69 }
70 }
71 m_cellsSet = true;
72}
unsigned int m_em1cells[12][3]
SG::ReadHandleKey< LVL1::eTowerContainer > m_eTowerContainerKey
unsigned int m_twrcells[3][3]
unsigned int m_hadcells[3][3]
unsigned int m_em0cells[3][3]
unsigned int m_em2cells[12][3]
unsigned int m_em3cells[3][3]
int getLayerTotalET(unsigned int layer) const
Get total ET sum of all cells in a given layer in MeV.
Definition eTower.cxx:249
int getET(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV.
Definition eTower.cxx:172
int getTotalET() const
Get ET sum of all cells in the eTower in MeV.
Definition eTower.cxx:194

◆ compute()

void LVL1::eFEXtauBDTAlgo::compute ( )
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 63 of file eFEXtauBDTAlgo.cxx.

63{ m_bdtAlgoImpl->next(); }
std::unique_ptr< eFEXtauBDT > m_bdtAlgoImpl

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getBDTCondition()

unsigned int LVL1::eFEXtauBDTAlgo::getBDTCondition ( ) const
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 152 of file eFEXtauBDTAlgo.cxx.

152 {
153 return m_bdtAlgoImpl->getBDTCondition();
154}

◆ getBDTHadFracCondition()

unsigned int LVL1::eFEXtauBDTAlgo::getBDTHadFracCondition ( ) const
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 156 of file eFEXtauBDTAlgo.cxx.

156 {
157 return m_bdtAlgoImpl->getFracCondition();
158}

◆ getBDTScore()

unsigned int LVL1::eFEXtauBDTAlgo::getBDTScore ( ) const
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 148 of file eFEXtauBDTAlgo.cxx.

148 {
149 return m_bdtAlgoImpl->getBDTScore();
150}

◆ getBitwiseEt()

unsigned int LVL1::eFEXtauBDTAlgo::getBitwiseEt ( ) const
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 140 of file eFEXtauBDTAlgo.cxx.

140 {
141 if (m_cellsSet == false) {
142 ATH_MSG_DEBUG("Layers not built, cannot accurately calculate Et.");
143 }
144
145 return m_bdtAlgoImpl->getET();
146}
#define ATH_MSG_DEBUG(x)

◆ getEt()

unsigned int LVL1::eFEXtauBDTAlgo::getEt ( ) const
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 114 of file eFEXtauBDTAlgo.cxx.

114 {
115 if (m_cellsSet == false) {
116 ATH_MSG_DEBUG("Layers not built, cannot accurately calculate Et.");
117 }
118
119 return m_bdtAlgoImpl->getETEstimate();
120}

◆ getRCore()

void LVL1::eFEXtauAlgoBase::getRCore ( std::vector< unsigned int > & rCoreVec) const
virtualinherited

Definition at line 120 of file eFEXtauAlgoBase.cxx.

121 {
122 unsigned int core = rCoreCore();
123 unsigned int env = rCoreEnv();
124
125 rCoreVec.push_back(core);
126 rCoreVec.push_back(env);
127}
virtual unsigned int rCoreEnv() const
virtual unsigned int rCoreCore() const

◆ getRealRCore()

float LVL1::eFEXtauAlgoBase::getRealRCore ( ) const
virtualinherited

Definition at line 96 of file eFEXtauAlgoBase.cxx.

96 {
97 unsigned int core = rCoreCore();
98 unsigned int env = rCoreEnv();
99
100 unsigned int num = core;
101 unsigned int denom = core + env;
102
103 float out = denom ? static_cast<float>(num) / static_cast<float>(denom) : 0;
104
105 return out;
106}

◆ getRealRHad()

float LVL1::eFEXtauAlgoBase::getRealRHad ( ) const
virtualinherited

Definition at line 108 of file eFEXtauAlgoBase.cxx.

108 {
109 unsigned int core = rHadCore();
110 unsigned int env = rHadEnv();
111
112 unsigned int num = core;
113 unsigned int denom = core + env;
114
115 float out = denom ? static_cast<float>(num) / static_cast<float>(denom) : 0;
116
117 return out;
118}
virtual unsigned int rHadEnv() const =0
virtual unsigned int rHadCore() const =0

◆ getRHad()

void LVL1::eFEXtauAlgoBase::getRHad ( std::vector< unsigned int > & rHadVec) const
virtualinherited

Definition at line 87 of file eFEXtauAlgoBase.cxx.

87 {
88 unsigned int core = rHadCore();
89 unsigned int env = rHadEnv();
90
91 rHadVec.push_back(core);
92 rHadVec.push_back(env);
93}

◆ getSeed()

virtual unsigned int LVL1::eFEXtauBDTAlgo::getSeed ( ) const
inlineoverridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 63 of file eFEXtauBDTAlgo.h.

63{ return 1; }

◆ getSums()

void LVL1::eFEXtauAlgoBase::getSums ( unsigned int seed,
bool UnD,
std::vector< unsigned int > & RcoreSums,
std::vector< unsigned int > & Remums )
virtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 76 of file eFEXtauAlgoBase.cxx.

78 {
79 // Set seed parameters to supplied values
80
81 // Now just call the 2 discriminant calculation methods
82 getRCore(RcoreSums);
83 getRHad(RemSums);
84}
virtual void getRHad(std::vector< unsigned int > &rHadVec) const
virtual void getRCore(std::vector< unsigned int > &rCoreVec) const

◆ getTauTOB()

std::unique_ptr< LVL1::eFEXtauTOB > LVL1::eFEXtauBDTAlgo::getTauTOB ( ) const
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 65 of file eFEXtauBDTAlgo.cxx.

65 {
66 std::unique_ptr<eFEXtauTOB> tob = std::make_unique<eFEXtauTOB>();
67 unsigned int et = getEt();
68 tob->setEt(et);
69 tob->setRcoreCore(rCoreCore());
70 tob->setRcoreEnv(rCoreEnv());
71 tob->setRhadCore(rHadCore());
72 tob->setRhadEnv(rHadEnv());
73 tob->setBitwiseEt(getBitwiseEt());
74 tob->setIso(getRealRCore());
75 tob->setSeedUnD(0);
76 tob->setBDTScore(m_bdtAlgoImpl->getBDTScore());
77 tob->setIsBDTAlgo(1);
78 return tob;
79}
float et(const xAOD::jFexSRJetRoI *j)
virtual float getRealRCore() const
virtual unsigned int rHadEnv() const override
virtual unsigned int getBitwiseEt() const override
virtual unsigned int rHadCore() const override
virtual unsigned int getEt() const override

◆ getUnD()

virtual bool LVL1::eFEXtauAlgoBase::getUnD ( ) const
inlinevirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 70 of file eFEXtauAlgoBase.h.

70{ return false; }

◆ initBDTVars()

StatusCode LVL1::eFEXtauBDTAlgo::initBDTVars ( )
private

◆ initialize()

StatusCode LVL1::eFEXtauBDTAlgo::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 28 of file eFEXtauBDTAlgo.cxx.

28 {
29 ATH_CHECK(m_eTowerContainerKey.initialize());
30 if (m_bdtJsonConfigPath.size() == 0) {
31 ATH_MSG_ERROR("eFEX tau BDT json config file path not set in configuration");
32 return StatusCode::FAILURE;
33 }
34 ATH_MSG_INFO("Using BDT config file " << m_bdtJsonConfigPath);
35
36 m_bdtAlgoImpl = std::make_unique<eFEXtauBDT>(this, m_bdtJsonConfigPath);
37
38 try {
41 m_bdtAlgoImpl->initBDTVars();
42 m_bdtAlgoImpl->initETPointers();
43 m_bdtAlgoImpl->initEMETPointers();
44 m_bdtAlgoImpl->initHADETPointers();
45 m_bdtAlgoImpl->initTowersPointers();
46 } catch (const std::domain_error &ex) {
47 ATH_MSG_ERROR(ex.what());
48 return StatusCode::FAILURE;
49 }
50
51 ATH_MSG_INFO("tau Algorithm version: BDT");
52 return StatusCode::SUCCESS;
53}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
Gaudi::Property< std::string > m_bdtJsonConfigPath

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::eFEXtauAlgoBase::interfaceID ( )
inlinestaticinherited

Definition at line 31 of file eFEXtauAlgoBase.h.

31{ return IID_IeFEXtauAlgoBase; };
static const InterfaceID IID_IeFEXtauAlgoBase("LVL1::eFEXtauAlgoBase", 1, 0)
The eFEXtauBDTAlgo class calculates the tau BDT TOB variables.

◆ isBDT()

bool LVL1::eFEXtauBDTAlgo::isBDT ( ) const
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 160 of file eFEXtauBDTAlgo.cxx.

160{ return true; }

◆ isCentralTowerSeed()

bool LVL1::eFEXtauAlgoBase::isCentralTowerSeed ( ) const
virtualinherited

Definition at line 130 of file eFEXtauAlgoBase.cxx.

130 {
131 // Need layer cell ET arrays to be built
132 if (m_cellsSet == false) {
134 "Layers not built, cannot accurately determine if a seed tower.");
135 }
136
137 bool out = true;
138
139 // Get central tower ET
140 unsigned int centralET = m_twrcells[1][1];
141
142 // Loop over all cells and check that the central tower is a local maximum
143 for (unsigned int beta = 0; beta < 3; beta++) {
144 for (unsigned int bphi = 0; bphi < 3; bphi++) {
145 // Don't need to compare central cell with itself
146 if ((beta == 1) && (bphi == 1)) {
147 continue;
148 }
149
150 // Cells to the up and right must have strictly lesser ET
151 if (beta == 2 || (beta == 1 && bphi == 2)) {
152 if (centralET <= m_twrcells[beta][bphi]) {
153 out = false;
154 }
155 }
156 // Cells down and to the left must have lesser or equal ET. If strictly
157 // lesser would create zero TOB if two adjacent cells had equal energy
158 else if (beta == 0 || (beta == 1 && bphi == 0)) {
159 if (centralET < m_twrcells[beta][bphi]) {
160 out = false;
161 }
162 }
163 }
164 }
165
166 return out;
167}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ rCoreCore()

virtual unsigned int LVL1::eFEXtauAlgoBase::rCoreCore ( ) const
inlinevirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 51 of file eFEXtauAlgoBase.h.

51{ return 0; }

◆ rCoreEnv()

virtual unsigned int LVL1::eFEXtauAlgoBase::rCoreEnv ( ) const
inlinevirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 52 of file eFEXtauAlgoBase.h.

52{ return 0; }

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ rHadCore()

unsigned int LVL1::eFEXtauBDTAlgo::rHadCore ( ) const
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 122 of file eFEXtauBDTAlgo.cxx.

122 {
123 if (m_cellsSet == false) {
124 ATH_MSG_DEBUG("Layers not built, cannot calculate rHad core value");
125 }
126
127 return m_bdtAlgoImpl->getHADETEstimate();
128}

◆ rHadEnv()

unsigned int LVL1::eFEXtauBDTAlgo::rHadEnv ( ) const
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 130 of file eFEXtauBDTAlgo.cxx.

130 {
131 if (m_cellsSet == false) {
132 ATH_MSG_DEBUG("Layers not built, cannot calculate rHad environment value");
133 }
134
135 return m_bdtAlgoImpl->getEMETEstimate();
136}

◆ safetyTest()

StatusCode LVL1::eFEXtauAlgoBase::safetyTest ( )
virtualinherited

Definition at line 24 of file eFEXtauAlgoBase.cxx.

24 {
25
26 SG::ReadHandle<eTowerContainer> eTowerContainer(
27 m_eTowerContainerKey /*,ctx*/);
28 if (!eTowerContainer.isValid()) {
29 ATH_MSG_FATAL("Could not retrieve eTowerContainer "
30 << m_eTowerContainerKey.key());
31 return StatusCode::FAILURE;
32 }
33 return StatusCode::SUCCESS;
34}
#define ATH_MSG_FATAL(x)

◆ setAlgoVersion()

virtual void LVL1::eFEXtauAlgoBase::setAlgoVersion ( unsigned int )
inlinevirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 61 of file eFEXtauAlgoBase.h.

61{};

◆ setSCellEncoder()

void LVL1::eFEXtauAlgoBase::setSCellEncoder ( LVL1::eFEXtauTOB * tob) const
inherited

◆ setSCellPointers()

void LVL1::eFEXtauBDTAlgo::setSCellPointers ( )
private

Definition at line 81 of file eFEXtauBDTAlgo.cxx.

81 {
82 for (int phi = 0; phi < 3; phi++) {
83 for (int eta = 0; eta < 3; eta++) {
84 // Coarse layers
85 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 0, &m_em0cells[eta][phi]);
86 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 3, &m_em3cells[eta][phi]);
87 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 4, &m_hadcells[eta][phi]);
88 }
89 for (int eta = 0; eta < 12; eta++) {
90 // Fine layers
91 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 1, &m_em1cells[eta][phi]);
92 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 2, &m_em2cells[eta][phi]);
93 }
94 }
95}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ setSuperCells()

void LVL1::eFEXtauAlgoBase::setSuperCells ( eFEXtauTOB * tob,
bool withSupercells )
protectedinherited

◆ setSupercellSeed()

virtual void LVL1::eFEXtauAlgoBase::setSupercellSeed ( )
inlineprotectedvirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 82 of file eFEXtauAlgoBase.h.

82{};

◆ setThresholdPointers()

void LVL1::eFEXtauBDTAlgo::setThresholdPointers ( )
private

Definition at line 97 of file eFEXtauBDTAlgo.cxx.

97 {
98 for (int i = 0; i < 3; i++) {
99 m_bdtAlgoImpl->setPointerToFracMultipliersParam(i,
101 }
102
103 for (int i = 0; i < 3; i++) {
104 m_bdtAlgoImpl->setPointerToBDTThresholdsParam(i, &(m_bdtThresholds[i]));
105 }
106
107 m_bdtAlgoImpl->setPointerToMaxETParam(&m_maxEtThreshold);
108 m_bdtAlgoImpl->setPointerToMaxETParamFrac(&m_maxEtThresholdFrac);
109 m_bdtAlgoImpl->setPointerToETThresholdParam(&m_etThreshold);
110 m_bdtAlgoImpl->setPointerToBDTMinETParam(&m_bdtMinEtThreshold);
111}
unsigned int m_etThreshold
unsigned int m_maxEtThresholdFrac
unsigned int m_bdtMinEtThreshold
unsigned int m_maxEtThreshold
unsigned int m_hadFracMultipliers[3]
unsigned int m_bdtThresholds[3]

◆ setThresholds()

void LVL1::eFEXtauBDTAlgo::setThresholds ( const std::vector< unsigned int > & rHadThreshold,
const std::vector< unsigned int > & bdtThreshold,
unsigned int etThreshold,
unsigned int etThresholdForRHad,
unsigned int bdtMinEtThreshold,
unsigned int etThresholdForRHadFrac )
overridevirtual

Reimplemented from LVL1::eFEXtauAlgoBase.

Definition at line 162 of file eFEXtauBDTAlgo.cxx.

165 {
166 for (int i = 0; i < 3; i++) {
167 m_hadFracMultipliers[i] = rHadThreshold[i];
168 m_bdtThresholds[i] = bdtThreshold[i];
169 }
170 m_etThreshold = etThreshold;
171 m_maxEtThreshold = maxEtThreshold;
172 m_maxEtThresholdFrac = maxEtThresholdFrac;
173 m_bdtMinEtThreshold = bdtMinEtThreshold;
174}

◆ setUnDAndOffPhi()

virtual void LVL1::eFEXtauAlgoBase::setUnDAndOffPhi ( )
inlineprotectedvirtualinherited

Reimplemented in LVL1::eFEXtauAlgo.

Definition at line 83 of file eFEXtauAlgoBase.h.

83{};

◆ setup()

void LVL1::eFEXtauBDTAlgo::setup ( int inputTable[3][3],
int efex_id,
int fpga_id,
int central_eta )
overridevirtual

Implements LVL1::eFEXtauAlgoBase.

Definition at line 55 of file eFEXtauBDTAlgo.cxx.

56 {
57
58 std::copy(&inputTable[0][0], &inputTable[0][0] + 9, &m_eFexalgoTowerID[0][0]);
59
60 buildLayers(efex_id, fpga_id, central_eta);
61}
void buildLayers(int efex_id, int fpga_id, int central_eta)

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_bdtAlgoImpl

std::unique_ptr<eFEXtauBDT> LVL1::eFEXtauBDTAlgo::m_bdtAlgoImpl
private

Definition at line 92 of file eFEXtauBDTAlgo.h.

◆ m_bdtJsonConfigPath

Gaudi::Property<std::string> LVL1::eFEXtauBDTAlgo::m_bdtJsonConfigPath
private
Initial value:
{
this, "BDTJsonConfigPath", "",
"Path to BDT json config file"}

Definition at line 89 of file eFEXtauBDTAlgo.h.

89 {
90 this, "BDTJsonConfigPath", "",
91 "Path to BDT json config file"};

◆ m_bdtMinEtThreshold

unsigned int LVL1::eFEXtauBDTAlgo::m_bdtMinEtThreshold {}
private

Definition at line 77 of file eFEXtauBDTAlgo.h.

77{};

◆ m_bdtScore

unsigned int LVL1::eFEXtauBDTAlgo::m_bdtScore {}
private

Definition at line 79 of file eFEXtauBDTAlgo.h.

79{};

◆ m_bdtThresholds

unsigned int LVL1::eFEXtauBDTAlgo::m_bdtThresholds[3] {}
private

Definition at line 73 of file eFEXtauBDTAlgo.h.

73{};

◆ m_bdtVarComputeSCellPointers

std::vector<std::vector<unsigned int *> > LVL1::eFEXtauBDTAlgo::m_bdtVarComputeSCellPointers
private

Definition at line 87 of file eFEXtauBDTAlgo.h.

◆ m_bdtVars

std::vector<unsigned int> LVL1::eFEXtauBDTAlgo::m_bdtVars
private

Definition at line 82 of file eFEXtauBDTAlgo.h.

◆ m_bdtVarsComputed

bool LVL1::eFEXtauBDTAlgo::m_bdtVarsComputed = false
private

Definition at line 94 of file eFEXtauBDTAlgo.h.

◆ m_cellsSet

bool LVL1::eFEXtauAlgoBase::m_cellsSet = false
protectedinherited

Definition at line 75 of file eFEXtauAlgoBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eFexalgoTowerID

int LVL1::eFEXtauAlgoBase::m_eFexalgoTowerID[3][3] {}
protectedinherited

Definition at line 77 of file eFEXtauAlgoBase.h.

77{};

◆ m_em0cells

unsigned int LVL1::eFEXtauAlgoBase::m_em0cells[3][3] {}
protectedinherited

Definition at line 88 of file eFEXtauAlgoBase.h.

88{};

◆ m_em1cells

unsigned int LVL1::eFEXtauAlgoBase::m_em1cells[12][3] {}
protectedinherited

Definition at line 89 of file eFEXtauAlgoBase.h.

89{};

◆ m_em2cells

unsigned int LVL1::eFEXtauAlgoBase::m_em2cells[12][3] {}
protectedinherited

Definition at line 90 of file eFEXtauAlgoBase.h.

90{};

◆ m_em3cells

unsigned int LVL1::eFEXtauAlgoBase::m_em3cells[3][3] {}
protectedinherited

Definition at line 91 of file eFEXtauAlgoBase.h.

91{};

◆ m_eTowerContainerKey

SG::ReadHandleKey<LVL1::eTowerContainer> LVL1::eFEXtauAlgoBase::m_eTowerContainerKey
protectedinherited
Initial value:
{
this, "MyETowers", "eTowerContainer", "Input container for eTowers"}

Definition at line 73 of file eFEXtauAlgoBase.h.

73 {
74 this, "MyETowers", "eTowerContainer", "Input container for eTowers"};

◆ m_etThreshold

unsigned int LVL1::eFEXtauBDTAlgo::m_etThreshold {}
private

Definition at line 74 of file eFEXtauBDTAlgo.h.

74{};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hadcells

unsigned int LVL1::eFEXtauAlgoBase::m_hadcells[3][3] {}
protectedinherited

Definition at line 92 of file eFEXtauAlgoBase.h.

92{};

◆ m_hadFracMultipliers

unsigned int LVL1::eFEXtauBDTAlgo::m_hadFracMultipliers[3] {}
private

Definition at line 72 of file eFEXtauBDTAlgo.h.

72{};

◆ m_maxEtThreshold

unsigned int LVL1::eFEXtauBDTAlgo::m_maxEtThreshold {}
private

Definition at line 75 of file eFEXtauBDTAlgo.h.

75{};

◆ m_maxEtThresholdFrac

unsigned int LVL1::eFEXtauBDTAlgo::m_maxEtThresholdFrac {}
private

Definition at line 76 of file eFEXtauBDTAlgo.h.

76{};

◆ m_twrcells

unsigned int LVL1::eFEXtauAlgoBase::m_twrcells[3][3] {}
protectedinherited

Definition at line 93 of file eFEXtauAlgoBase.h.

93{};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: