7#include "CLHEP/Random/RandFlat.h"
18 declareInterface<IVertexSelectionTool> (
this );
28 msg(MSG::INFO) <<
"Initialization successful" <<
endmsg;
30 return StatusCode::SUCCESS;
35 return StatusCode::SUCCESS;
53 const HepMC::GenEvent *evt = (*itr);
59 auto vitr = evt->vertices().begin();
61 HepMC::GenEvent::vertex_const_iterator vitr = evt->vertices_begin();
67 HepMC::FourVector vxGenPos = (*vitr)->position();
70 unsigned int res_pos = 0;
74 unsigned int cont_size = vertexContainer->
size();
77 float z_sim = vxGenPos.z();
79 float significance = fabs(z_sim - (*vertexContainer)[0]->position().
z());
80 for(
unsigned int i = 1; i < cont_size; ++i)
84 if(loc_significance < significance)
86 significance = loc_significance;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
DataModel_detail::const_iterator< DataVector > const_iterator
size_type size() const noexcept
Returns the number of elements in the collection.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const Amg::Vector3D & position() const
Returns the 3-pos.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Ensure that the ATLAS eigen extensions are properly loaded.
@ z
global position (cartesian)
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.