|
ATLAS Offline Software
|
Go to the documentation of this file.
23 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
32 return StatusCode::SUCCESS;
42 ATH_MSG_ERROR(
"Could not get signal xAOD::EventInfo " << signalEvent.
name() <<
" from store " << signalEvent.
store());
43 return StatusCode::FAILURE;
45 float sig_beamPosSigmaZ=-1;
52 ATH_MSG_DEBUG(
"Found signal xAOD::EventInfo " << signalEvent.
name() <<
" in store " << signalEvent.
store()<<
" : "<<*signalEvent<<
" beamspot size z="<<sig_beamPosSigmaZ);
56 ATH_CHECK(outputEvent.
record(std::make_unique<xAOD::EventInfo>(), std::make_unique<xAOD::EventAuxInfo>()));
58 ATH_MSG_ERROR(
"Could not record output xAOD::EventInfo " << outputEvent.
name() <<
" to store " << outputEvent.
store());
59 return StatusCode::FAILURE;
61 ATH_MSG_DEBUG(
"Recorded output xAOD::EventInfo " << outputEvent.
name() <<
" in store " << outputEvent.
store());
64 *outputEvent = *signalEvent;
83 <<
") and provided mcChannelNumber (" <<
m_mcChannelNumber.value() <<
") do not match.");
93 return StatusCode::FAILURE;
98 ATH_MSG_ERROR(
"Input mcEventWeights are empty. This should not happen.");
99 return StatusCode::FAILURE;
107 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
109 if (!beamSpotHandle.isValid()) {
111 return StatusCode::FAILURE;
114 beamSpotHandle->beamPos()[
Amg::y ],
115 beamSpotHandle->beamPos()[
Amg::z ] );
117 beamSpotHandle->beamSigma( 1 ),
118 beamSpotHandle->beamSigma( 2 ) );
127 return StatusCode::SUCCESS;
EventInfoUpdateFromContextAlg(const std::string &name, ISvcLocator *pSvcLocator)
void setEventNumber(uint64_t value)
Set the current event's event number.
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.
Gaudi::Property< uint32_t > m_mcChannelNumber
virtual StatusCode execute(const EventContext &ctx) const override
void setBeamPos(float x, float y, float z)
Set the beam spot position.
#define ATH_MSG_VERBOSE(x)
void setBeamPosSigma(float x, float y, float z)
Set the size of the beam spot.
SG::WriteHandleKey< xAOD::EventInfo > m_outputKey
An algorithm that can be simultaneously executed in multiple threads.
uint32_t mcChannelNumber() const
The MC generator's channel number.
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
void setBeamTiltYZ(float value)
Set the beam's tilt in radians in YZ.
void setBeamStatus(uint32_t value)
Set the beam spot's status word.
void setMCEventNumber(uint64_t value)
Set the MC generator's event number.
Exception — Attempt to retrieve nonexistent aux data item.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string store() const
Return the name of the store holding the object we are proxying.
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.
void setTimeStamp(uint32_t value)
Set the POSIX time of the event.
void setBeamPosSigmaXY(float value)
Set the beam spot shape's X-Y correlation.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode initialize(bool used=true)
void setMCChannelNumber(uint32_t value)
Set the MC generator's channel number.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
void setRunNumber(uint32_t value)
Set the current event's run number.
void setBeamTiltXZ(float value)
Set the beam's tilt in radians in XZ.
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::EventInfo > m_signalInputKey
void setLumiBlock(uint32_t value)
Set the current event's luminosity block number.
uint64_t mcEventNumber() const
The MC generator's event number.
void setMCEventWeights(const std::vector< float > &value)
Set the weights of all the MC events used in the simulation.