34 {
35
36 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA roads...");
37
38 if (roads.size() > 0) {
39 std::unordered_map<xAOD::DetectorIdentType, const xAOD::PixelCluster*> pixelClusterMap;
41 pixelClusterMap.emplace(cluster->identifier(), cluster);
42 }
43
44 std::unordered_map<xAOD::DetectorIdentType, const xAOD::StripCluster*> stripClusterMap;
46 stripClusterMap.emplace(cluster->identifier(), cluster);
47
48 }
49 for (const FPGATrackSimRoad& road : roads) {
50 std::vector<ActsTrk::ATLASUncalibSourceLink> points;
51
52
53 for (
size_t l = 0;
l < road.getNLayers(); ++
l) {
54 for (const auto& layerH : road.getHitPtrs(l)) {
55 if (!layerH || !layerH->isReal()) continue;
56
57 if (layerH->isPixel()) {
59 auto it = pixelClusterMap.find(layerH->getRdoIdentifier());
60 if (it != pixelClusterMap.end()) {
62 }
63 }
64 else if (layerH->isStrip()) {
66 auto it = stripClusterMap.find(layerH->getRdoIdentifier());
67 if (it != stripClusterMap.end()) {
69 }
70 }
71 else {
73 return StatusCode::FAILURE;
74 }
75 }
76 }
77
78 if (points.size()) {
79 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(road);
80 foundProtoTracks.emplace_back(points, std::move(inputPerigee));
81 ATH_MSG_INFO(
"Made a prototrack with " << points.size() <<
" measurements");
82 }
83 }
84 }
85
86 return StatusCode::SUCCESS;
87}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::unique_ptr< Acts::BoundTrackParameters > makeParams(const FPGATrackSimRoad &road) const
StatusCode matchTrackMeasurements(const EventContext &ctx, const XAOD_CLUSTER &cluster, const FPGATrackSimHit &trackHit, std::vector< ActsTrk::ATLASUncalibSourceLink > &measurements, const DataVector< XAOD_CLUSTER > &clusterContainer) const
l
Printing final latex table to .tex output file.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.