5 #define TRUTHTOTRACK_IMP
25 , m_extrapolator(
"Trk::Extrapolator/AtlasExtrapolator")
27 declareInterface<ITruthToTrack>(
this);
34 return StatusCode::SUCCESS;
43 if(
part &&
part->production_vertex()) {
44 HepMC::FourVector tv =
part->production_vertex()->position();
48 const HepMC::FourVector& fv =
part->momentum();
52 const int id =
part->pdg_id();
80 const int id =
part->pdg_id();
102 if(
part &&
part->production_vertex() && m_extrapolator) {
104 std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(
part) );
105 if(productionVertexTrackParams) {
109 generatedTrackPerigee = m_extrapolator->extrapolateDirectly(
110 Gaudi::Hive::currentContext(),
111 *productionVertexTrackParams,
119 return generatedTrackPerigee;
128 if(
part &&
part->hasProdVtx() && m_extrapolator) {
130 std::unique_ptr<const Trk::TrackParameters> productionVertexTrackParams( makeProdVertexParameters(
part) );
131 if(productionVertexTrackParams) {
135 generatedTrackPerigee = m_extrapolator->extrapolateDirectly(
136 Gaudi::Hive::currentContext(),
137 *productionVertexTrackParams,
145 return generatedTrackPerigee;