|
ATLAS Offline Software
|
Go to the documentation of this file.
26 return StatusCode::SUCCESS;
34 if (!inputCollection.
isValid()) {
35 ATH_MSG_ERROR(
"Could not get input truth collection " << inputCollection.
name() <<
" from store " << inputCollection.
store());
36 return StatusCode::FAILURE;
38 ATH_MSG_DEBUG(
"Found input truth collection " << inputCollection.
name() <<
" in store " << inputCollection.
store());
39 const float refPVtxZ =
getPVtxZ(inputCollection);
45 return StatusCode::FAILURE;
48 decHandle( *truthParticle ) = refPVtxZ;
50 return StatusCode::SUCCESS;
55 const HepMC::GenEvent* genEvt = *(inputCollection->
begin());
64 HepMC::FourVector pmvxpos=hScatVx->position();
65 return static_cast<float>(pmvxpos.z());
const std::string & name() const
Return the StoreGate ID for the referenced object.
virtual StatusCode initialize() override
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
virtual float getPVtxZ(SG::ReadHandle< McEventCollection > &inputCollection) const
SG::ReadHandleKey< McEventCollection > m_inputTruthCollectionKey
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_decKey
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode execute(const EventContext &ctx) const override
Handle class for adding a decoration to an object.
std::string store() const
Return the name of the store holding the object we are proxying.
Handle class for adding a decoration to an object.
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?
SG::ReadHandleKey< xAOD::IParticleContainer > m_particleKey
#define ATH_MSG_WARNING(x)
GenVertex * barcode_to_vertex(const GenEvent *e, int id)
const HepMC::GenVertex * ConstGenVertexPtr
PileUpTruthDecoration(const std::string &name, ISvcLocator *pSvcLocator)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.