Returns a VertexShift based on what is given in the background input file.
More...
#include <MatchingBkgVertexPositioner.h>
Returns a VertexShift based on what is given in the background input file.
Definition at line 24 of file MatchingBkgVertexPositioner.h.
◆ MatchingBkgVertexPositioner()
| Simulation::MatchingBkgVertexPositioner::MatchingBkgVertexPositioner |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
◆ ~MatchingBkgVertexPositioner()
| virtual Simulation::MatchingBkgVertexPositioner::~MatchingBkgVertexPositioner |
( |
| ) |
|
|
virtualdefault |
◆ generate()
| CLHEP::HepLorentzVector * Simulation::MatchingBkgVertexPositioner::generate |
( |
const EventContext & | ctx | ) |
const |
|
finaloverride |
Definition at line 25 of file MatchingBkgVertexPositioner.cxx.
26 {
27
28
29 bool enableTime{};
30
32 if (!vertices.isValid()) {
33 ATH_MSG_ERROR(
"Couldn't retrieve xAOD::VertexContainer with key: "
35 return nullptr;
36 }
37
40 ATH_MSG_INFO(
"Using primary vertex with position and time: "
41 << vx->position().x() << " " << vx->position().y() << " "
42 << vx->position().z() << " "
43 << (enableTime && vx->hasValidTime() ? vx->time() : 0));
44 return new CLHEP::HepLorentzVector(
45 vx->position().x(), vx->position().y(), vx->position().z(),
46 enableTime && vx->hasValidTime() ? vx->time() : 0);
47 }
48 }
49
50 ATH_MSG_ERROR(
"No primary vertex found in xAOD::VertexContainer with key: "
52 return nullptr;
53}
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Vertex_v1 Vertex
Define the latest version of the vertex class.
◆ initialize()
| StatusCode Simulation::MatchingBkgVertexPositioner::initialize |
( |
| ) |
|
|
finaloverride |
Definition at line 17 of file MatchingBkgVertexPositioner.cxx.
17 {
19
21
22 return StatusCode::SUCCESS;
23}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ m_vertexContainerKey
Initial value:{
this, "PrimaryVertexContainerName", "PrimaryVertices"}
Definition at line 38 of file MatchingBkgVertexPositioner.h.
38 {
39 this, "PrimaryVertexContainerName", "PrimaryVertices"};
The documentation for this class was generated from the following files: