33 {
34
35 ATH_MSG_INFO(
"Creating Acts proto-tracks from FPGA roads...");
36
37 if (roads.size() > 0) {
38 std::unordered_map<xAOD::DetectorIdentType, const xAOD::PixelCluster*> pixelClusterMap;
40 pixelClusterMap.emplace(cluster->identifier(), cluster);
41 }
42
43 std::unordered_map<xAOD::DetectorIdentType, const xAOD::StripCluster*> stripClusterMap;
45 stripClusterMap.emplace(cluster->identifier(), cluster);
46
47 }
48 for (const FPGATrackSimRoad& road : roads) {
49 std::vector<const xAOD::UncalibratedMeasurement* > points;
50
51
52 for (
size_t l = 0;
l < road.getNLayers(); ++
l) {
53 for (const auto& layerH : road.getHitPtrs(l)) {
54 if (!layerH || !layerH->isReal()) continue;
55
56 if (layerH->isPixel()) {
58 auto it = pixelClusterMap.find(layerH->getRdoIdentifier());
59 if (it != pixelClusterMap.end()) {
61 }
62 }
63 else if (layerH->isStrip()) {
65 auto it = stripClusterMap.find(layerH->getRdoIdentifier());
66 if (it != stripClusterMap.end()) {
68 }
69 }
70 else {
72 return StatusCode::FAILURE;
73 }
74 }
75 }
76
77 if (points.size()) {
78 std::unique_ptr<Acts::BoundTrackParameters> inputPerigee =
makeParams(road);
79 foundProtoTracks.emplace_back(points, std::move(inputPerigee));
80 ATH_MSG_INFO(
"Made a prototrack with " << points.size() <<
" measurements");
81 }
82 }
83 }
84
85 return StatusCode::SUCCESS;
86}
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode matchTrackMeasurements(const EventContext &ctx, const XAOD_CLUSTER &cluster, const FPGATrackSimHit &trackHit, std::vector< const xAOD::UncalibratedMeasurement * > &measurements, const DataVector< XAOD_CLUSTER > &clusterContainer) const
std::unique_ptr< Acts::BoundTrackParameters > makeParams(const FPGATrackSimRoad &road) 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.