|
ATLAS Offline Software
|
Go to the documentation of this file.
30 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
41 return StatusCode::SUCCESS;
51 ATH_MSG_ERROR(
"Could not get background xAOD::EventInfo " << bkgEvent.
name() <<
" from store " << bkgEvent.
store());
52 return StatusCode::FAILURE;
58 ATH_MSG_ERROR(
"Could not get signal xAOD::EventInfo " << signalEvent.
name() <<
" from store " << signalEvent.
store());
59 return StatusCode::FAILURE;
61 ATH_MSG_DEBUG(
"Found signal xAOD::EventInfo " << signalEvent.
name() <<
" in store " << signalEvent.
store());
63 auto outputEvent = std::make_unique<xAOD::EventInfo>();
64 auto outputEventAux = std::make_unique<xAOD::EventAuxInfo>();
65 outputEvent->setStore (outputEventAux.get());
68 *outputEvent = *bkgEvent;
73 outputEvent->setEventNumber(signalEvent->
eventNumber());
88 <<
") and provided mcChannelNumber (" <<
m_mcChannelNumber.value() <<
") do not match.");
96 outputEvent->setMCEventNumber(signalEvent->
eventNumber());
99 return StatusCode::FAILURE;
106 ATH_MSG_ERROR(
"Signal mcEventWeights are empty. This should not happen.");
107 return StatusCode::FAILURE;
131 outputEvent->setEventFlags (
det, 0);
138 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
141 ATH_MSG_ERROR(
"Beam spot size does not match between signal and background events ("
143 return StatusCode::FAILURE;
147 if (!beamSpotHandle.isValid()) {
149 return StatusCode::FAILURE;
151 outputEvent->setBeamPos( beamSpotHandle->beamPos()[
Amg::x ],
152 beamSpotHandle->beamPos()[
Amg::y ],
153 beamSpotHandle->beamPos()[
Amg::z ] );
154 outputEvent->setBeamPosSigma( beamSpotHandle->beamSigma( 0 ),
155 beamSpotHandle->beamSigma( 1 ),
156 beamSpotHandle->beamSigma( 2 ) );
157 outputEvent->setBeamPosSigmaXY( beamSpotHandle->beamSigmaXY() );
158 outputEvent->setBeamTiltXZ( beamSpotHandle->beamTilt( 0 ) );
159 outputEvent->setBeamTiltYZ( beamSpotHandle->beamTilt( 1 ) );
160 outputEvent->setBeamStatus( beamSpotHandle->beamStatus() );
166 ATH_CHECK(outputEventH.
record(std::move(outputEvent), std::move(outputEventAux)));
167 ATH_MSG_DEBUG(
"Recorded output xAOD::EventInfo " << outputEventH.
name() <<
" in store " << outputEventH.
store());
170 return StatusCode::SUCCESS;
uint64_t eventNumber() const
The current event's event number.
const std::vector< float > & mcEventWeights() const
The weights of all the MC events used in the simulation.
const std::string & name() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< xAOD::EventInfo > m_signalInputKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
void clearSubEvents()
Clear all the currently held sub-events.
@ NotSet
The flag was not set to anything.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
@ IS_SIMULATION
true: simulation, false: data
An algorithm that can be simultaneously executed in multiple threads.
uint32_t mcChannelNumber() const
The MC generator's channel number.
SG::ReadHandleKey< xAOD::EventInfo > m_bkgInputKey
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string store() const
Return the name of the store holding the object we are proxying.
virtual StatusCode execute(const EventContext &ctx) const override
float beamPosSigmaZ() const
The length of the beam spot in the Z direction.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
EventInfoOverlay(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< uint32_t > m_mcChannelNumber
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandleKey< xAOD::EventInfo > m_outputKey
virtual StatusCode initialize() override
EventFlagSubDet
Sub-detector types for which we store event-level flags.
StatusCode initialize(bool used=true)
uint32_t eventFlags(EventFlagSubDet subDet) const
Get the event flags for a particular sub-detector.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
@ nDets
Number of sub-detector type in this enumeration.
#define ATH_MSG_WARNING(x)
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Gaudi::Property< bool > m_dataOverlay
Gaudi::Property< bool > m_validateBeamSpot
@ Core
Core flags describing the event.
uint64_t mcEventNumber() const
The MC generator's event number.