5 #include "Acts/Surfaces/PerigeeSurface.hpp"
12 const std::string&
name,
24 return StatusCode::SUCCESS;
31 std::vector<ActsTrk::ProtoTrack> & foundProtoTracks,
32 const std::vector<std::vector<FPGATrackSimHit>>& hitsInRoads,
33 const std::vector<FPGATrackSimRoad>& roads)
const {
35 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA roads...");
37 if (hitsInRoads.size() > 0) {
39 for(
size_t roadIndex=0; roadIndex<=hitsInRoads.size()-1;roadIndex++) {
40 std::vector<ActsTrk::ATLASUncalibSourceLink>
points;
42 if (hitsInRoads.at(roadIndex).size()>0) {
52 const auto& rdoList =
cl->rdoList();
53 const auto it =
std::find(rdoList.begin(), rdoList.end(),
id);
54 if (
it != rdoList.end()) {
62 int strip =
static_cast<int>(
h.getPhiCoord());
66 const auto& rdoList =
cl->rdoList();
67 const auto it =
std::find(rdoList.begin(), rdoList.end(),
id);
68 if (
it != rdoList.end()) {
83 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(roads.at(roadIndex));
84 foundProtoTracks.emplace_back(
points, std::move(inputPerigee));
90 return StatusCode::SUCCESS;
96 std::vector<ActsTrk::ProtoTrack> & foundProtoTracks,
97 const std::vector<FPGATrackSimTrack>& tracks)
const {
99 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA tracks...");
102 if (not
track.passedOR())
continue;
103 std::vector<ActsTrk::ATLASUncalibSourceLink>
points;
104 const std::vector <FPGATrackSimHit>&
hits =
track.getFPGATrackSimHits();
106 if (
hits.size() > 0) {
118 const auto& rdoList =
cl->rdoList();
119 const auto it =
std::find(rdoList.begin(), rdoList.end(),
id);
120 if (
it != rdoList.end()) {
125 else if (
h.isStrip()) {
127 int strip =
static_cast<int>(
h.getPhiCoord());
131 const auto& rdoList =
cl->rdoList();
132 const auto it =
std::find(rdoList.begin(), rdoList.end(),
id);
133 if (
it != rdoList.end()) {
141 return StatusCode::FAILURE;
155 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(
track);
156 foundProtoTracks.emplace_back(
points, std::move(inputPerigee));
161 return StatusCode::FAILURE;
165 return StatusCode::SUCCESS;
169 using namespace Acts::UnitLiterals;
171 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3(0., 0., 0.));
174 constexpr
double GeVToMeV = 1000;
180 double qop=road.
getY()/GeVToMeV;
187 Acts::BoundSquareMatrix
cov = Acts::BoundSquareMatrix::Identity();
188 cov *= (GeVToMeV*GeVToMeV);
193 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
195 absPdg,
mass, Acts::AnyCharge{1.0f}};
197 return std::make_unique<Acts::BoundTrackParameters>(actsSurface,
params,
198 cov, actsHypothesis);
205 using namespace Acts::UnitLiterals;
206 std::shared_ptr<const Acts::Surface> actsSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3(0., 0., 0.));
209 constexpr
double GeVToMeV = 1000;
214 double qop=
track.getQOverPt();
221 Acts::BoundSquareMatrix
cov = Acts::BoundSquareMatrix::Identity();
222 cov *= (GeVToMeV*GeVToMeV);
227 Acts::PdgParticle absPdg = Acts::makeAbsolutePdgParticle(Acts::ePionPlus);
229 absPdg,
mass, Acts::AnyCharge{1.0f}};
231 return std::make_unique<Acts::BoundTrackParameters>(actsSurface,
params,
232 cov, actsHypothesis);