|
ATLAS Offline Software
|
Go to the documentation of this file.
51 return StatusCode::SUCCESS;
62 bool jDataTowerFilled =
false;
65 if(!jDataTowerContainer.
isValid()) {
66 ATH_MSG_ERROR(
"Could not retrieve collection " << jDataTowerContainer.
key() );
67 return StatusCode::FAILURE;
69 jDataTowerFilled = !jDataTowerContainer->
empty();
77 if(!jEmulatedTowerContainer.
isValid()) {
78 ATH_MSG_ERROR(
"Could not retrieve collection " << jEmulatedTowerContainer.
key() );
79 return StatusCode::FAILURE;
85 std::unique_ptr<jTowerContainer> local_jTowerContainerRaw = std::make_unique<jTowerContainer>();
96 data_jTowerContainer = &jEmulatedTowerContainer;
99 data_jTowerContainer = &jDataTowerContainer;
102 ATH_MSG_DEBUG(
"Collection used to build the jTower for simulation: " << (*data_jTowerContainer).key() <<
" with size: "<<(*data_jTowerContainer)->size());
106 unsigned int TTID = my_jTower->jFEXtowerID();
109 if( (targetTower = local_jTowerContainerRaw->findTower(TTID)) ) {
111 targetTower->
setiEta( my_jTower->globalEta() );
112 targetTower->
setiPhi( my_jTower->globalPhi() );
122 targetTower->
set_Et(1,(my_jTower->et_count()).at(0)*500);
125 if( (my_jTower->isjTowerSat()).at(0) ) targetTower->
setHADSat();
136 if( (my_jTower->isjTowerSat()).at(0) ){
147 ATH_MSG_ERROR(
"Tower ID is officially unknown - it will be ignored. (Needs investigation). Please report this!" );
153 ATH_MSG_ERROR(
"Falling into the legacy path. This should never happen!. Use EmulatedTowers or DataTowers - Contact L1Calo offline experts");
154 return StatusCode::FAILURE;
168 ATH_CHECK(jTowerContainerSG.
record(std::move( local_jTowerContainerRaw ) ) );
173 return StatusCode::SUCCESS;
void setCentreEta(float ieta)
Add to eta/phi values of a specified tower.
ToolHandle< IjSuperCellTowerMapper > m_jSuperCellTowerMapperTool
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_DataTowerKey
An algorithm that can be simultaneously executed in multiple threads.
static int Expand(unsigned int code)
Uncompress data.
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
ToolHandle< IjTowerBuilder > m_jTowerBuilderTool
void setCentrePhi(float iphi)
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?
void setOnlineID(int tower_id_online)
virtual StatusCode execute(const EventContext &ctx) const 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.
void setEMSat()
set and get saturation
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
void set_Et(int layer, int et)
Set ET value in MeV.
Handle class for reading from StoreGate.
SG::WriteHandleKey< LVL1::jTowerContainer > m_jTowerContainerSGKey
Class describing input data of a LVL1 jFEX.
jTowerMakerFromJfexTowers(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_EmulTowerKey
bool empty() const noexcept
Returns true if the collection is empty.
Gaudi::Property< bool > m_UseEmulated
Gaudi::Property< bool > m_isMC