|
ATLAS Offline Software
|
Go to the documentation of this file.
41 return StatusCode::SUCCESS;
59 for (
const TileCell* mbtsCell : *mbtsContainer) {
64 const uint8_t qbit1 = mbtsCell->qbit1();
71 <<
" Energy=" << mbtsCell->energy()
72 <<
" Time=" << mbtsCell->time()
73 <<
" Qbit1=" << (
int) qbit1
92 eneA += mbtsCell->energy();
93 timeA += mbtsCell->time();
95 }
else if (type_id == -1) {
96 eneC += mbtsCell->energy();
97 timeC += mbtsCell->time();
105 if (countA > 0) timeA /= countA;
106 if (countC > 0) timeC /= countC;
109 ATH_MSG_DEBUG(
"Got MBTS cells above threshold on both sides" );
110 const float timediff = fabs(timeA - timeC);
115 ATH_MSG_DEBUG(
"Event identified as background, set bit 'MBTSTimeDiffHalo' in EventInfo Background word" );
122 ATH_MSG_DEBUG(
"Event identified as collision, set bit 'MBTSTimeDiffCol' in EventInfo Background word" );
129 ATH_MSG_WARNING(
" cannot retrieve EventInfo, will not set Tile information " );
132 ATH_MSG_DEBUG(
"Not enough hits above threshold to distinguish halo from collision event");
137 if (mbtsTime.
record(std::make_unique<MBTSCollisionTime>(countA, countC, eneA, eneC, timeA, timeC)).isFailure()) {
140 ATH_MSG_DEBUG(
"MBTSCollisionTime recorded in event store" );
142 <<
" countC=" << countC
145 <<
" timeA=" << timeA
146 <<
" timeC=" << timeC );
149 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute once per event.
EventInfo_v1 EventInfo
Definition of the latest event info version.
SG::WriteHandleKey< MBTSCollisionTime > m_mbtsCollisionTimeKey
Gaudi::Property< unsigned int > m_minHitsPerSide
SG::ReadHandleKey< TileCellContainer > m_mbtsContainerKey
bool updateEventFlagBit(const EventFlagSubDet subDet, const size_t bit) const
Change detector flags with update semantics.
bool msgLvl(const MSG::Level lvl) const
int type(const Identifier &id) const
extract type field from TileTB identifier
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual StatusCode initialize() override
Algorithm initialize at begin of job.
@ u
Enums for curvilinear frames.
int module(const Identifier &id) const
extract module field from TileTB identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Handle class for recording to StoreGate.
Gaudi::Property< float > m_mbts_threshold
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const TileTBID * m_tileTBID
int channel(const Identifier &id) const
extract channel field from TileTB identifier
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Helpers for checking error return status codes and reporting errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
Gaudi::Property< float > m_timeDiffThreshold
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Handle class for reading from StoreGate.