54 ATH_MSG_ERROR(
"Expected GenEvent::signal_process_vertex() to already have been set at this point!");
55 return StatusCode::FAILURE;
62 CLHEP::HepLorentzVector *curShift = vertexShifter->generate(ctx);
64 ATH_MSG_ERROR(
"Vertex Shifter AthenaTool returned zero-pointer! Ignore.");
68 ATH_MSG_VERBOSE(
"Retrieved Vertex shift of: " << *curShift <<
" from " << vertexShifter->name());
75 bool modifySigVtx(
true);
79 for(
auto& curVtx: ge.vertices()) {
83 const HepMC::FourVector &curPos = (curVtx->has_set_position()) ? curVtx->position() : HepMC::FourVector::ZERO_VECTOR();
86 CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
88 newPos += (*curShift);
90 ATH_MSG_VERBOSE(
"Original vtx position = " << curPos.x() <<
", " << curPos.y() <<
", " << curPos.z() );
94 curVtx->set_position(
HepMC::FourVector(newPos.x(),newPos.y(),newPos.z(),newPos.t()));
95 if(modifySigVtx && signalProcVtx==curVtx) {
103 CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
104 newPos += (*curShift);
112 return StatusCode::SUCCESS;