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

#include <eFEXFillEDM.h>

Inheritance diagram for LVL1::eFEXFillEDM:
Collaboration diagram for LVL1::eFEXFillEDM:

Public Member Functions

 eFEXFillEDM (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors.
eFEXFillEDM && operator= (const eFEXFillEDM &)=delete
 Destructor.
virtual StatusCode initialize ()
 standard Athena-Algorithm method
virtual StatusCode finalize ()
 standard Athena-Algorithm method
virtual StatusCode execute ()
virtual void fillEmEDM (std::unique_ptr< xAOD::eFexEMRoIContainer > &container, uint8_t eFEXNumber, const std::unique_ptr< eFEXegTOB > &tobObject, bool xTOB=false) const
 Create and fill a new fillEmEDM object (corresponding to this window), and return a pointer to it.
virtual void fillTauEDM (std::unique_ptr< xAOD::eFexTauRoIContainer > &container, uint8_t eFEXNumber, const std::unique_ptr< eFEXtauTOB > &tobObject, bool xTOB=false) const
 Create and fill a new fillTauEDM object (corresponding to this window), and return a pointer to it.
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 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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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

Private Attributes

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

Definition at line 30 of file eFEXFillEDM.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

◆ eFEXFillEDM()

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

Constructors.

Definition at line 18 of file eFEXFillEDM.cxx.

18 :
19 AthAlgTool(type, name, parent)
20 {
21 declareInterface<eFEXFillEDM>(this);
22 }
AthAlgTool()
Default constructor:

Member Function Documentation

◆ 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.

◆ execute()

StatusCode LVL1::eFEXFillEDM::execute ( )
virtual

Definition at line 33 of file eFEXFillEDM.cxx.

34 {
35 return StatusCode::SUCCESS;
36 }

◆ 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

◆ fillEmEDM()

void LVL1::eFEXFillEDM::fillEmEDM ( std::unique_ptr< xAOD::eFexEMRoIContainer > & container,
uint8_t eFEXNumber,
const std::unique_ptr< eFEXegTOB > & tobObject,
bool xTOB = false ) const
virtual

Create and fill a new fillEmEDM object (corresponding to this window), and return a pointer to it.

Definition at line 45 of file eFEXFillEDM.cxx.

46 {
47 // Create the object and fill it
48 xAOD::eFexEMRoI* myEmEDM = new xAOD::eFexEMRoI();
49 container->push_back(myEmEDM);
50
51 // Initialise either xTOB or TOB object as requested
52 if (xTOB)
53 myEmEDM->initialize(tobObject->getxTobword0(), tobObject->getxTobword1());
54 else {
55 // For TOB we must translate eFEX index into Shelf+eFEX and add these when initialising
56 uint8_t shelf = int(eFexNum/12);
57 uint8_t eFEX = eFexNum%12;
58 myEmEDM->initialize(eFEX, shelf, tobObject->getTobword());
59 }
60
61 // Supplementary information is the same either way
62 myEmEDM->setRetaCore(tobObject->getRetaCore());
63 myEmEDM->setRetaEnv(tobObject->getRetaEnv());
64 myEmEDM->setRhadEM(tobObject->getRhadEM());
65 myEmEDM->setRhadHad(tobObject->getRhadHad());
66 myEmEDM->setWstotNumerator(tobObject->getWstotNum());
67 myEmEDM->setWstotDenominator(tobObject->getWstotDen());
68
69 ATH_MSG_DEBUG(" setting Type: " << myEmEDM->type() << " eFEX Number: " << +myEmEDM->eFexNumber() << " shelf: " << +myEmEDM->shelfNumber() << " et: " << myEmEDM->et() << " MeV, " << myEmEDM->etTOB() << " TOB, " << myEmEDM->etXTOB() << " xTOB, eta: " << myEmEDM->eta() << " phi: " << myEmEDM->phi() << " input eFexNum: " << +eFexNum << " TOB word: " << tobObject->getTobword() << MSG::dec );
70
71 }
#define ATH_MSG_DEBUG(x)
float et() const
TOB ET (decoded from TOB, stored for convenience)
unsigned int shelfNumber() const
void setWstotNumerator(uint16_t value)
float eta() const
setter for the above
unsigned int eFexNumber() const
Methods to decode data from the TOB/RoI and return to the user.
void setRetaEnv(uint16_t value)
float phi() const
Seed supercell index within central tower (0 -> 3)
void setRhadHad(uint16_t value)
void initialize(unsigned int eFexNumber, unsigned int shelf, uint32_t word0)
Initialise the object with its most important properties TOB initialiser.
void setWstotDenominator(uint16_t value)
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
void setRetaCore(uint16_t value)
ObjectType type() const
Data decoded from the TOB/RoI word and eFEX number.
void setRhadEM(uint16_t value)
unsigned int etXTOB() const
Cluster ET (xTOB ET scale, 25 MeV/count)
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
Definition eFexEMRoI.h:17

◆ fillTauEDM()

void LVL1::eFEXFillEDM::fillTauEDM ( std::unique_ptr< xAOD::eFexTauRoIContainer > & container,
uint8_t eFEXNumber,
const std::unique_ptr< eFEXtauTOB > & tobObject,
bool xTOB = false ) const
virtual

Create and fill a new fillTauEDM object (corresponding to this window), and return a pointer to it.

Definition at line 73 of file eFEXFillEDM.cxx.

74 {
75 // Create the object and fill it:
76 xAOD::eFexTauRoI* myTauEDM = new xAOD::eFexTauRoI();
77 container->push_back(myTauEDM);
78
79 // Initialise either xTOB or TOB object as requested
80 if (xTOB)
81 myTauEDM->initialize(tobObject->getxTobword0(), tobObject->getxTobword1());
82 else {
83 // For TOB we must translate eFEX index into Shelf+eFEX and add these when initialising
84 uint8_t shelf = int(eFexNum/12);
85 uint8_t eFEX = eFexNum%12;
86 myTauEDM->initialize(eFEX, shelf, tobObject->getTobword());
87 }
88
89 // There is some ambiguity in what 'numerator'/'denominator' mean in each of the tau isolation
90 // variables rCore and rHad below, since in the more 'physical' definition, we would consider core/(core+env),
91 // whereas in the firmware we calculate core/env. Here, I store core->numerator, env->denominator.
92 // Provided we remember this when using them, we can then calculate either the 'physical' or the 'firmware' values.
93 myTauEDM->setRCoreNumerator(tobObject->getRcoreCore());
94 myTauEDM->setRCoreDenominator(tobObject->getRcoreEnv());
95 myTauEDM->setRHadNumerator(tobObject->getRhadCore());
96 myTauEDM->setRHadDenominator(tobObject->getRhadEnv());
97
98 ATH_MSG_DEBUG("setting tau version " << myTauEDM->tobVersion() << " eFEX Number: " << +myTauEDM->eFexNumber() << " shelf: " << +myTauEDM->shelfNumber() << " et: " << myTauEDM->et() << " eta: " << myTauEDM->eta() << " phi: " << myTauEDM->phi() << " input eFexNum: " << +eFexNum << " TOB word: " << tobObject->getTobword() <<" xTOB word 1: "<< tobObject->getxTobword0() << " xTOB word 2: " << tobObject->getxTobword1() << " BDT score: " << tobObject->getBDTScore() << " BDT score from EDM " << myTauEDM->bdtScore() << MSG::dec);
99
100 }
unsigned int tobVersion() const
Data decoded from the TOB/RoI word and eFEX number.
unsigned int shelfNumber() const
unsigned int eFexNumber() const
eFEX number
unsigned int bdtScore() const
BDT Score (xTOB only)
float et() const
TOB ET (decoded from TOB, stored for convenience)
float phi() const
Seed supercell index within central tower (0 -> 3)
void setRHadNumerator(uint16_t value)
void setRCoreNumerator(uint16_t value)
void setRHadDenominator(uint16_t value)
float eta() const
setter for the above
void initialize(unsigned int eFexNumber, unsigned int shelf, uint32_t word0)
Initialise the object with its most important properties.
void setRCoreDenominator(uint16_t value)
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition eFexTauRoI.h:16

◆ finalize()

StatusCode LVL1::eFEXFillEDM::finalize ( )
virtual

standard Athena-Algorithm method

Definition at line 40 of file eFEXFillEDM.cxx.

41 {
42 return StatusCode::SUCCESS;
43 }

◆ initialize()

StatusCode LVL1::eFEXFillEDM::initialize ( )
virtual

standard Athena-Algorithm method

Definition at line 26 of file eFEXFillEDM.cxx.

27 {
28 return StatusCode::SUCCESS;
29 }

◆ 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::eFEXFillEDM::interfaceID ( )
inlinestatic

Definition at line 33 of file eFEXFillEDM.h.

33{ return IID_IeFEXFillEDM; };
static const InterfaceID IID_IeFEXFillEDM("LVL1::eFEXFillEDM", 1, 0)
The eFEXFillEDM class defines how to fill eFEX EDM.

◆ 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 }

◆ operator=()

eFEXFillEDM && LVL1::eFEXFillEDM::operator= ( const eFEXFillEDM & )
delete

Destructor.

◆ 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.

◆ 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 }

◆ 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_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_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_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: