9#include "EventInfo/EventInfo.h"
21 return StatusCode::SUCCESS;
30 return StatusCode::SUCCESS;
43 for (
size_t iw = 0; iw < nw; ++iw) {
50 mcWeights(0) = std::move(
weights);
53 ATH_MSG_DEBUG(
"Copied HepMC signal event weight(s) to EventInfo");
56 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define CHECK(...)
Evaluate an expression and check for errors.
This class provides general information about an event.
Handle class for adding a decoration to an object.
ServiceHandle< StoreGateSvc > & evtStore()
SG::WriteDecorHandleKey< xAOD::EventInfo > m_mcWeightsKey
virtual StatusCode initialize() override
Copy the weight vector for each event.
CopyEventWeight(const std::string &name, ISvcLocator *svcLoc)
Constructor.
virtual StatusCode execute() override
size_type size() const noexcept
Returns the number of elements in the collection.
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
This class represents the "type of event" where the type is given by one or more "characteristics".
void set_mc_event_weight(float weight, unsigned int iweight=0, unsigned int nWeightsMax=0)
Add in MC weight. For more than 1 weight, add with iweight > 0.
virtual StatusCode initialize() override
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
const HepMC::GenEvent * event_const() const
Access the current signal event (const)
Handle class for adding a decoration to an object.