|
ATLAS Offline Software
|
Go to the documentation of this file.
46 return StatusCode::SUCCESS;
55 const EventContext& ctx = Gaudi::Hive::currentContext();
59 bool gDataTowerFilled =
false;
62 if(!gDataTowerContainer.
isValid()) {
63 ATH_MSG_FATAL(
"Could not retrieve collection " << gDataTowerContainer.
key() );
64 return StatusCode::FAILURE;
66 gDataTowerFilled = !gDataTowerContainer->
empty();
74 if(!gEmulatedTowerContainer.
isValid()) {
75 ATH_MSG_FATAL(
"Could not retrieve collection " << gEmulatedTowerContainer.
key() );
76 return StatusCode::FAILURE;
84 std::unique_ptr<gTowerContainer> local_gTowerContainerRaw = std::make_unique<gTowerContainer>();
96 data_gTowerContainer = gDataTowerContainer->
empty() ? &gEmulatedTowerContainer : &gDataTowerContainer;
99 ATH_MSG_DEBUG(
"Collection used to build the gTower for simulation: " << (*data_gTowerContainer).key() <<
" with size: "<<(*data_gTowerContainer)->size() <<
". Expected towers 1152");
103 unsigned int TTID = my_gTower->gFEXtowerID();
106 int ID = local_gTowerContainerRaw->getIDfromFWID(TTID);
108 ATH_MSG_WARNING(
"Cannot find simulation ID from firmware ID - This gFexTower will be ignored. (Needs investigation). Please report this!" );
113 if( (targetTower = local_gTowerContainerRaw->findTower(
ID)) ) {
115 targetTower->
setTotalEt(my_gTower->towerEt());
120 ATH_MSG_WARNING(
"Tower ID is officially unknown - it will be ignored. (Needs investigation). Please report this!" );
133 ATH_CHECK(gTowerContainerSG.
record(std::move( local_gTowerContainerRaw ) ) );
138 return StatusCode::SUCCESS;
void setIsSaturated(char isSaturated)
Sets saturation flag.
std::vector< Identifier > ID
ToolHandle< IgSuperCellTowerMapper > m_gSuperCellTowerMapperTool
Gaudi::Property< bool > m_UseEmulated
The gTower class is an interface object for gFEX trigger algorithms The purposes are twofold:
void setTotalEt(int totEt)
const std::string & key() const
Return the StoreGate ID for the referenced object.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
virtual StatusCode execute() override
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing input data of a LVL1 eFEX.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gDataTowerKey
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gEmulTowerKey
gTowerMakerFromGfexTowers(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ToolHandle< IgTowerBuilder > m_gTowerBuilderTool
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
SG::WriteHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
Gaudi::Property< bool > m_isMC
bool empty() const noexcept
Returns true if the collection is empty.