|
ATLAS Offline Software
|
Go to the documentation of this file.
17 return StatusCode::SUCCESS;
23 return StatusCode::SUCCESS;
33 declareInterface<IVertexWeightCalculator>(
this);
52 <<
" from StoreGate. Returning 0 distance.");
57 const HepMC::GenEvent* myEvent = (*itr);
59 ATH_MSG_ERROR(
" Cannot find truth event... Returning 0 distance... ");
64 auto Vert = myEvent->vertices().begin();
66 HepMC::GenEvent::vertex_const_iterator Vert = myEvent->vertices_begin();
68 ATH_MSG_DEBUG(
"Resulting MC seed: x: " << (*Vert)->position().x()
69 <<
" y: " << (*Vert)->position().y()
70 <<
" z: " << (*Vert)->position().z());
71 double ztrue = (*Vert)->position().z();
73 double z_vtx_pos = vtxPosition.z();
75 double distance = fabs(z_vtx_pos - ztrue);
TrueVertexDistanceWeightCalculator(const std::string &t, const std::string &n, const IInterface *p)
constructor
Const iterator class for DataVector/DataList.
virtual StatusCode initialize() override
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< McEventCollection > m_mcEventCollectionKey
double mEstimateSignalCompatibility(const Amg::Vector3D &vtxPosition) const
virtual StatusCode finalize() override
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual double estimateSignalCompatibility(const xAOD::Vertex &vertex) const override final
WeightCalculator.
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?
Ensure that the ATLAS eigen extensions are properly loaded.
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.