23 return StatusCode::SUCCESS;
29 std::vector<const xAOD::AFPTrack*> trackNearContainer;
30 const int nearId =
m_side + 1;
31 std::copy_if(trackContainer->
begin(), trackContainer->
end(), std::back_inserter(trackNearContainer),
32 [&nearId](
auto track) { return track->stationID() == nearId; });
35 std::vector<const xAOD::AFPTrack*> trackFarContainer;
36 const int farId = 3 *
m_side;
37 std::copy_if(trackContainer->
begin(), trackContainer->
end(), std::back_inserter(trackFarContainer),
38 [&farId](
auto track) { return track->stationID() == farId; });
45 bool foundMatchingTrack =
false;
49 const double dx = trackFar->xLocal() - trackNear->xLocal();
50 const double dy = trackFar->yLocal() - trackNear->yLocal();
53 if (r2 > trackDistanceRadiusSq) {
55 "Tracks too far away from each other (xNear, yNear; xFar, yFar; distance) [mm]: "
56 << trackNear->xLocal() <<
", " << trackNear->yLocal() <<
"; "
57 << trackFar->xLocal() <<
", " << trackFar->yLocal() <<
"; " << r2);
68 foundMatchingTrack =
true;
90 return StatusCode::SUCCESS;
103 auto *
proton = outputContainer->
push_back(std::make_unique<xAOD::AFPProton>());
106 constexpr
double protonMass = 0.938;
111 proton->setMethodID(algID);
125 proton->addAFPTrackLink(trackLink);