ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimWindowExtensionTool Class Reference

#include <FPGATrackSimWindowExtensionTool.h>

Inheritance diagram for FPGATrackSimWindowExtensionTool:
Collaboration diagram for FPGATrackSimWindowExtensionTool:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode extendTracks (const std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits, const FPGATrackSimTrackCollection &tracks, std::vector< FPGATrackSimRoad > &roads) override
virtual StatusCode setupSlices (FPGATrackSimLogicalEventInputHeader *slicedHitHeader) override
bool extendTrackSliced (const FPGATrackSimTrack &track, std::vector< int > &numHits, layer_bitmask_t &hitLayers, std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > &road_hits)
bool extendTrackBinned (const FPGATrackSimTrack &track, std::vector< int > &numHits, layer_bitmask_t &hitLayers, std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > &road_hits)

Private Attributes

ToolHandle< FPGATrackSimBinnedHitsm_hitBinningTool {this, "BinningTool", "FPGATrackSimBinning/FPGATrackSimBinnedHits"}
ServiceHandle< IFPGATrackSimBankSvcm_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
Gaudi::Property< int > m_maxMiss { this, "threshold", 2, "Maximum number of missing hits allowed on a road"}
Gaudi::Property< std::vector< float > > m_phiwindows {this, "phiWindow", {}, "Default window settings for phi, must be size nlayers."}
Gaudi::Property< std::vector< float > > m_zwindows {this, "zWindow", {}, "Default window settings for z, must be size nlayers."}
Gaudi::Property< std::vector< float > > m_phiwindows_barrel {this, "phiWindow_barrel", {}, "Default window settings for phi in the barrel, must be size nlayers."}
Gaudi::Property< std::vector< float > > m_zwindows_barrel {this, "zWindow_barrel", {}, "Default window settings for z in the barrel, must be size nlayers."}
Gaudi::Property< std::vector< float > > m_phiwindows_endcap {this, "phiWindow_endcap", {}, "Default window settings for phi in the endcap, must be size nlayers."}
Gaudi::Property< std::vector< float > > m_zwindows_endcap {this, "zWindow_endcap", {}, "Default window settings for z in the endcap, must be size nlayers."}
Gaudi::Property< bool > m_detectorZoneWindows {this, "detectorZoneWindows", false, "If set to true we separate windows will be used for endcap and barrel hits."}
Gaudi::Property< bool > m_fieldCorrection {this, "fieldCorrection", true, "Use magnetic field correction for Hough transform"}
Gaudi::Property< bool > m_idealGeoRoads {this, "IdealGeoRoads", true, "Do sector assignment of second stage roads"}
Gaudi::Property< bool > m_doBinning {this, "doBinning", false, "Use second stage binning to sort hits, not the plane map"}
Gaudi::Property< bool > m_addAllHits {this, "addAllHits", false, "If set to true ignore the window and just add all the hits"}
Gaudi::Property< std::vector< int > > m_maxHits {this, "maxHits", {}, "If set to positive number, maximum number of hits allowed per layer"}
Gaudi::Property< bool > m_doRegionalMapping { this, "RegionalMapping", false, "Use the sub-region maps to define the sector"}
Gaudi::Property< bool > m_doEtaPatternConsts { this, "doEtaPatternConsts", false, "Whether to use the eta pattern tool for constant generation"}
Gaudi::Property< bool > m_useSpacePoints { this, "useSpacePoints", false, "Whether we are using spacepoints."}
Gaudi::Property< double > m_phiScale {this, "phiScale", 3.15, "Phi scale used when calculating distance from predicted window position" }
Gaudi::Property< double > m_zScale {this, "zScale", 3000, "z scale used when calculating distance from predicted window position" }
std::vector< FPGATrackSimRoadm_roads
std::map< unsigned, std::map< unsigned, std::vector< std::shared_ptr< const FPGATrackSimHit > > > > m_phits_atLayer
unsigned m_nLayers_1stStage = 0
unsigned m_nLayers_2ndStage = 0
unsigned m_threshold = 0
FPGATrackSimLogicalEventInputHeaderm_slicedHitHeader = nullptr

Detailed Description

Definition at line 34 of file FPGATrackSimWindowExtensionTool.h.

Member Function Documentation

◆ extendTrackBinned()

bool FPGATrackSimWindowExtensionTool::extendTrackBinned ( const FPGATrackSimTrack & track,
std::vector< int > & numHits,
layer_bitmask_t & hitLayers,
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > & road_hits )

Definition at line 245 of file FPGATrackSimWindowExtensionTool.cxx.

246 {
247
248 // Retrieve track parameters.
249 double trackd0 = track.getD0();
250 double trackphi = track.getPhi();
251 double trackz0 = track.getZ0();
252 double tracketa = track.getEta();
253 double trackqoverpt = track.getQOverPt();
254 double cottracktheta = 0.5*(exp(tracketa)-exp(-tracketa));
255
256 // If we're doing binning, match the track to a bin...
257 const FPGATrackSimBinStep* binStep = m_hitBinningTool->getBinTool().lastStep();
258 const IFPGATrackSimBinDesc* binDesc = m_hitBinningTool->getBinTool().binDesc();
259 ATH_MSG_DEBUG("Attempting to look up binIdx for track with phi = " << track.getPhi() << ", chi2/DOF = " << track.getChi2ndof() << ", q/pt = " << track.getQOverPt() << ", eta = " << track.getEta() << ", d0 = " << track.getD0() << ", z0 = " << track.getZ0());
260 FPGATrackSimTrackPars trackPars = track.getPars();
261
262 // MeV/GeV conversion factor, needed when switching between track parametrizations.
263 trackPars[FPGATrackSimTrackPars::IHIP] = trackPars[FPGATrackSimTrackPars::IHIP] * 1000;
264
265 FPGATrackSimBinUtil::ParSet parSet = binDesc->trackParsToParSet(trackPars);
266 if (!m_hitBinningTool->getBinTool().inRange(parSet)) {
267 ATH_MSG_DEBUG("Track doesn't pass binning tool track parameter cuts");
268 }
269 ATH_MSG_DEBUG("Found inside out parameters as " << parSet);
270
271 FPGATrackSimBinUtil::IdxSet binPars = binStep->binIdx(parSet);
272 ATH_MSG_DEBUG("Attempting to look up bin entry using binpars = " << binPars);
273 FPGATrackSimBinnedHits::BinEntry entry = (m_hitBinningTool->lastStepBinnedHits())[binPars];
274
275 ATH_MSG_DEBUG("Matched track to new bin containing " << entry.lyrCnt() << " layers with " << entry.hitCnt << " hits total");
276
277 std::vector<std::vector<std::tuple<float, float, std::shared_ptr<const FPGATrackSimHit>>>> road_hits_sortable;
278 road_hits_sortable.resize(m_nLayers_1stStage + m_nLayers_2ndStage);
279
280 for (FPGATrackSimBinUtil::StoredHit& storedHit : entry.hits) {
281 // These may need more adjustment if we try to bin deduplicated SPs in the future.
282 unsigned layer = storedHit.layer + m_nLayers_1stStage;
283 const std::shared_ptr<const FPGATrackSimHit>& hit = storedHit.hitptr;
284
285 // The rest of this should be the same as the previous loop.
286 double hitphi = hit->getGPhi();
287 double hitr = hit->getR();
288 double hitz = hit->getZ();
289 double pred_hitphi = trackphi - asin(hitr * fpgatracksim::A * 1000 * trackqoverpt - trackd0/hitr);
290 double pred_hitz = trackz0 + hitr*cottracktheta;
291
292 // Field correction, now pulled from FPGATrackSimFunctions.
294 double fieldCor = fieldCorrection(track.getRegion(), trackqoverpt, hitr);
295 pred_hitphi += fieldCor;
296 }
297
298 double diffphi = abs(hitphi-pred_hitphi);
299 double diffz = abs(hitz-pred_hitz);
300
301 // Apply the actual layer check, only accept hits that fall into a track's window.
302 ATH_MSG_DEBUG("Hit in region -- standard window comparison: comparing phi " << diffphi << " to " << m_phiwindows[layer] << " and z " << diffz << " to " << m_zwindows[layer]);
303 if (m_addAllHits) {
304 numHits[layer]++;
305 road_hits_sortable[layer].push_back({diffphi, diffz, hit});
306 hitLayers |= 1 << layer;
307 }
308 else if (m_detectorZoneWindows) {
309 if (hit->isBarrel()) { // Barrel
310 ATH_MSG_DEBUG("Hit in region -- detector zone window comparison comparing phi: " << diffphi << " to " << m_phiwindows_barrel[layer] << " and z " << diffz << " to " << m_zwindows_barrel[layer]);
311 if (m_phiwindows_barrel[layer] == -1 || m_zwindows_barrel[layer] == -1) {
312 ATH_MSG_WARNING("There is a hit in layer: " << layer << " with track eta " << tracketa << " in the barrel!");
313 }
314 if (diffphi < m_phiwindows_barrel[layer] && diffz < m_zwindows_barrel[layer]) {
315 numHits[layer]++;
316 road_hits[layer].push_back(hit);
317 hitLayers |= 1 << layer;
318 }
319 }
320 else { // Endcap
321 ATH_MSG_DEBUG("Hit in region -- detector zone window comparison comparing phi: " << diffphi << " to " << m_phiwindows_endcap[layer] << " and z " << diffz << " to " << m_zwindows_endcap[layer]);
322 if (m_phiwindows_endcap[layer] == -1 || m_zwindows_endcap[layer] == -1) {
323 ATH_MSG_WARNING("There is a hit in layer: " << layer << " with track eta " << tracketa << " in the endcap!");
324 }
325 if (diffphi < m_phiwindows_endcap[layer] && diffz < m_zwindows_endcap[layer]) {
326 numHits[layer]++;
327 road_hits[layer].push_back(hit);
328 hitLayers |= 1 << layer;
329 }
330 }
331 }
332 else if (diffphi < m_phiwindows[layer] && diffz < m_zwindows[layer]) {
333 numHits[layer]++;
334 road_hits_sortable[layer].push_back({diffphi, diffz, hit});
335 hitLayers |= 1 << layer;
336 }
337 }
338
339 // Post-processing. sort the hits by distance. NOTE: should also prioritize SPs here.
340 double zScale = m_zScale.value();
341 double phiScale = m_phiScale.value();
342 for (unsigned layer = 0; layer < m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers(); layer++) {
343 if (road_hits_sortable.at(layer).size() >= 2) {
344 ATH_MSG_DEBUG("Sorting hits in layer " << layer);
345 std::ranges::sort(road_hits_sortable.at(layer), [zScale, phiScale](auto& a, auto& b){
346
347 // Prioritize SP vs non-SP
348 if (std::get<2>(a)->getHitType() == HitType::spacepoint && std::get<2>(b)->getHitType() != HitType::spacepoint) return true;
349 else if (std::get<2>(b)->getHitType() == HitType::spacepoint && std::get<2>(a)->getHitType() != HitType::spacepoint) return false;
350
351 // HitA
352 double dphi = std::get<0>(a);
353 double dz = std::get<1>(a);
354
355 // scaled distance because z and phi are not in same units
356 // these scales are the same as what the pathfinder uses for the time being,
357 // I don't't really know if that makes sense.
358 float distance_a = dphi*dphi/(phiScale*phiScale) + dz*dz/(zScale*zScale);
359
360 // HitB
361 dphi = std::get<0>(b);
362 dz = std::get<1>(b);
363
364 // scaled distance because z and phi are not in same units
365 float distance_b = dphi*dphi/(phiScale*phiScale) + dz*dz/(zScale*zScale);
366
367 return distance_a < distance_b;
368 });
369 }
370
371 // Remove any hits over the cutoff, whatever that is.
372 int cutoff = road_hits_sortable.at(layer).size();
373 if (m_maxHits.value().size() > layer && m_maxHits.value().at(layer) > 0) {
374 cutoff = std::min(cutoff, m_maxHits.value().at(layer));
375 }
376 for (int ihit = 0; ihit < cutoff; ihit++) {
377 auto& road_hit = std::get<2>(road_hits_sortable.at(layer).at(ihit));
378 road_hits.at(layer).push_back(road_hit);
379 }
380
381 }
382
383 return true;
384
385}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double fieldCorrection(unsigned region, double qoverpt, double r)
static Double_t a
unsigned binIdx(unsigned par, double val) const
Gaudi::Property< std::vector< float > > m_zwindows
Gaudi::Property< std::vector< float > > m_phiwindows
ToolHandle< FPGATrackSimBinnedHits > m_hitBinningTool
Gaudi::Property< std::vector< float > > m_phiwindows_endcap
Gaudi::Property< std::vector< int > > m_maxHits
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Gaudi::Property< std::vector< float > > m_zwindows_barrel
Gaudi::Property< std::vector< float > > m_phiwindows_barrel
Gaudi::Property< std::vector< float > > m_zwindows_endcap
virtual const FPGATrackSimBinUtil::ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const =0
@ layer
Definition HitInfo.h:79
static constexpr double A
std::shared_ptr< const FPGATrackSimHit > hitptr

◆ extendTracks()

StatusCode FPGATrackSimWindowExtensionTool::extendTracks ( const std::vector< std::shared_ptr< const FPGATrackSimHit > > & hits,
const FPGATrackSimTrackCollection & tracks,
std::vector< FPGATrackSimRoad > & roads )
overridevirtual

Definition at line 62 of file FPGATrackSimWindowExtensionTool.cxx.

64 {
65
66 // Reset the internal second stage roads storage.
67 roads.clear();
68 m_roads.clear();
69 for (auto& sliceEntry : m_phits_atLayer){
70 for (auto& entry : sliceEntry.second) {
71 entry.second.clear();
72 }
73 }
74 const FPGATrackSimRegionMap* rmap_2nd = m_FPGATrackSimMapping->SubRegionMap_2nd();
75 const FPGATrackSimPlaneMap *pmap_2nd = nullptr;
76
77 // Create one "tower" per slice for this event.
78 // Note that there now might be only one "slice", at least for the time being.
80 for (int ireg = 0; ireg < rmap_2nd->getNRegions(); ireg++) {
81 FPGATrackSimTowerInputHeader tower = FPGATrackSimTowerInputHeader(ireg);
82 m_slicedHitHeader->addTower(tower);
83 }
84 }
85
86 // Second stage hits may be unmapped, in which case map them.
87 for (size_t i=0; i<m_FPGATrackSimMapping->GetPlaneMap_2ndSliceSize(); i++){
88 pmap_2nd = m_FPGATrackSimMapping->PlaneMap_2nd(i);
89 for (const std::shared_ptr<const FPGATrackSimHit>& hit : hits) {
90 std::shared_ptr<FPGATrackSimHit> hitCopy = std::make_shared<FPGATrackSimHit>(*hit);
91 pmap_2nd->map(*hitCopy);
92 if (!hitCopy->isMapped()){
93 continue;
94 }
95 if (rmap_2nd->isInRegion(i, *hitCopy)) {
96 m_phits_atLayer[i][hitCopy->getLayer()].push_back(hitCopy);
97 // Also store a copy of the hit object in the header class, for ROOT Output + TV creation.
98 if (m_slicedHitHeader) m_slicedHitHeader->getTower(i)->addHit(*hitCopy);
99 }
100 }
101 }
102
103 // Unfortunately this is a bit different from the other code path
104 // If we are using the binning tool here, we need to pass all of the hits to it, and then rely
105 // on the binning tool to match first stage tracks to second stage bins.
106 std::vector<std::shared_ptr<const FPGATrackSimHit>> allMappedHits;
107 if (m_doBinning && m_FPGATrackSimMapping->GetPlaneMap_2ndSliceSize() == 1) {
108 for (unsigned layer = 0; layer < m_nLayers_2ndStage + m_nLayers_1stStage; layer++) {
109 allMappedHits.insert(allMappedHits.end(), m_phits_atLayer[0][layer].begin(), m_phits_atLayer[0][layer].end());
110 }
111 ATH_MSG_VERBOSE("Attempting to bin nhits = " << allMappedHits.size());
112 ATH_CHECK(m_hitBinningTool->fill(allMappedHits));
113 }
114
115 // Now, loop over the tracks.
116 for (const FPGATrackSimTrack& track : tracks) {
117 if (track.passedOR() == 0) {
118 continue;
119 }
120
121 // Retrieve track parameters.
122 double trackphi = track.getPhi();
123 double trackqoverpt = track.getQOverPt();
124
125 std::vector<int> numHits(m_nLayers_2ndStage + m_nLayers_1stStage, 0);
126
127 // Copy over the existing hits. We require that the layer assignment in the first stage
128 // is equal to the layer assignment in the second stage.
129 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> road_hits;
130 road_hits.resize(m_nLayers_1stStage + m_nLayers_2ndStage);
131 layer_bitmask_t hitLayers = 0;
132 unsigned nhit = 0;
133 // We can't just use the the iterator since hit.getLayer() isn't guaranteed to be right.
134 const auto& track_hits = track.getFPGATrackSimHitPtrs();
135 for (unsigned layer = 0; layer < track_hits.size(); layer++) {
136 if (!track_hits[layer]) continue;
137 const FPGATrackSimHit& hit = *track_hits[layer];
138 road_hits[layer].push_back(std::make_shared<FPGATrackSimHit>(hit));
139 if (hit.isReal()) {
140 hitLayers |= 1 << layer;
141 numHits[layer]++;
142 }
143 }
144
145 size_t slice = track.getSubRegion();
146 pmap_2nd = m_FPGATrackSimMapping->PlaneMap_2nd(slice);
147
148 // Extend the track using either slicing (F-200/300 legacy support) or binning (F-600)
149 bool success = (!m_doBinning) ? extendTrackSliced(track, numHits, hitLayers, road_hits) : extendTrackBinned(track, numHits, hitLayers, road_hits);
150 if (!success) continue;
151
152 // now nhit will be equal to the number of layers with hits in the new array.
153 for (auto num: numHits) {
154 if(num > 0) nhit += 1;
155 }
156
157 // If we have enough hits, create a new road.
158 ATH_MSG_DEBUG("Found potential new road with " << nhit << " hits relative to threshold of " << m_threshold);
159 if (nhit >= m_threshold) {
160 m_roads.emplace_back();
161 FPGATrackSimRoad & road = m_roads.back();
162 road.setRoadID(m_roads.size() - 1);
163
164 // Set the "Hough x" and "Hough y" using the track parameters.
165 road.setX(trackphi);
166 road.setY(trackqoverpt);
167 road.setXBin(track.getHoughXBin());
168 road.setYBin(track.getHoughYBin());
169 road.setSubRegion(track.getSubRegion());
170
171 // figure out bit mask for wild card layers
172 unsigned int wclayers = 0;
173 for (unsigned i = 0; i < numHits.size(); i++){
174 if(numHits[i]==0) wclayers |= (0x1 << i);
175 }
176 road.setWCLayers(wclayers);
177
178 // set hit layers and hits
179 road.setHitLayers(hitLayers);
180 road.setHits(std::move(road_hits));
181 }
182 }
183
184 // Move the roads we found into the output argument and return success.
185 roads = std::move(m_roads);
186 ATH_MSG_DEBUG("Found " << roads.size() << " new roads in second stage.");
187
188 // Reset the hit binning tool.
189 m_hitBinningTool->resetBins();
190
191 return StatusCode::SUCCESS;
192}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
uint32_t layer_bitmask_t
bool isReal() const
void map(FPGATrackSimHit &hit) const
bool isInRegion(uint32_t region, const FPGATrackSimHit &hit) const
void setHitLayers(layer_bitmask_t hit_layers)
void setY(float v)
void setHits(std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > &&hits)
void setXBin(unsigned v)
void setYBin(unsigned v)
void setRoadID(int roadID)
void setSubRegion(int v)
void setX(float v)
void setWCLayers(layer_bitmask_t wc_layers)
std::map< unsigned, std::map< unsigned, std::vector< std::shared_ptr< const FPGATrackSimHit > > > > m_phits_atLayer
FPGATrackSimLogicalEventInputHeader * m_slicedHitHeader
bool extendTrackBinned(const FPGATrackSimTrack &track, std::vector< int > &numHits, layer_bitmask_t &hitLayers, std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > &road_hits)
bool extendTrackSliced(const FPGATrackSimTrack &track, std::vector< int > &numHits, layer_bitmask_t &hitLayers, std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > &road_hits)

◆ extendTrackSliced()

bool FPGATrackSimWindowExtensionTool::extendTrackSliced ( const FPGATrackSimTrack & track,
std::vector< int > & numHits,
layer_bitmask_t & hitLayers,
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > & road_hits )

Definition at line 194 of file FPGATrackSimWindowExtensionTool.cxx.

195 {
196
197 const FPGATrackSimRegionMap* rmap_2nd = m_FPGATrackSimMapping->SubRegionMap_2nd();
198
199 // Retrieve track parameters.
200 double trackd0 = track.getD0();
201 double trackphi = track.getPhi();
202 double trackz0 = track.getZ0();
203 double tracketa = track.getEta();
204 double trackqoverpt = track.getQOverPt();
205 double cottracktheta = 0.5*(exp(tracketa)-exp(-tracketa));
206 size_t slice = track.getSubRegion();
207
209 ATH_MSG_DEBUG("Testing layer " << layer << " with " << m_phits_atLayer[slice][layer].size() << " hit");
210 for (const std::shared_ptr<const FPGATrackSimHit>& hit: m_phits_atLayer[slice][layer]) {
211 // Make sure this hit is in the same subregion as the track. TODO: mapping/slice changes.
212 if (!rmap_2nd->isInRegion(track.getSubRegion(), *hit)) {
213 continue;
214 }
215
216 double hitphi = hit->getGPhi();
217 double hitr = hit->getR();
218 double hitz = hit->getZ();
219 double pred_hitphi = trackphi - asin(hitr * fpgatracksim::A * 1000 * trackqoverpt - trackd0/hitr);
220 double pred_hitz = trackz0 + hitr*cottracktheta;
221
222 // Field correction, now pulled from FPGATrackSimFunctions.
224 double fieldCor = fieldCorrection(track.getRegion(), trackqoverpt, hitr);
225 pred_hitphi += fieldCor;
226 }
227
228 double diffphi = abs(hitphi-pred_hitphi);
229 double diffz = abs(hitz-pred_hitz);
230
231 // Apply the actual layer check, only accept hits that fall into a track's window.
232 ATH_MSG_DEBUG("Hit in region, comparing phi: " << diffphi << " to " << m_phiwindows[layer] << " and z " << diffz << " to " << m_zwindows[layer]);
233 if (diffphi < m_phiwindows[layer] && diffz < m_zwindows[layer]) {
234 numHits[layer]++;
235 road_hits[layer].push_back(hit);
236 hitLayers |= 1 << hit->getLayer();
237 }
238 }
239 }
240
241 return true;
242}

◆ initialize()

StatusCode FPGATrackSimWindowExtensionTool::initialize ( )
overridevirtual

Definition at line 30 of file FPGATrackSimWindowExtensionTool.cxx.

30 {
31
32 // Retrieve the mapping service.
35 m_nLayers_1stStage = m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers();
36 m_nLayers_2ndStage = m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers() - m_nLayers_1stStage;
37
39
40 // This now needs to be done once for each slice.
41 for (size_t j=0; j<m_FPGATrackSimMapping->GetPlaneMap_2ndSliceSize(); j++){
42 ATH_MSG_DEBUG("Processing second stage slice " << j);
43 m_phits_atLayer[j] = std::map<unsigned, std::vector<std::shared_ptr<const FPGATrackSimHit>>>();
45 ATH_MSG_DEBUG("Processing layer " << i);
46 m_phits_atLayer[j][i] = std::vector<std::shared_ptr<const FPGATrackSimHit>>();
47 }
48 }
49
50 // Retrieve the hit binning tool, for use with inside out.
51 ATH_CHECK(m_hitBinningTool.retrieve());
52 // Setup layer configuration if not already set from layerMap
53 // TODO: this may not be correct because of spacepoints. Do we *really* want to bin using 8 layers?
54 if (m_hitBinningTool->getNLayers()==0) {
56 }
57
58 // Probably need to do something here.
59 return StatusCode::SUCCESS;
60}
ServiceHandle< IFPGATrackSimBankSvc > m_FPGATrackSimBankSvc
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ setupSlices()

virtual StatusCode FPGATrackSimWindowExtensionTool::setupSlices ( FPGATrackSimLogicalEventInputHeader * slicedHitHeader)
inlineoverridevirtual

Definition at line 47 of file FPGATrackSimWindowExtensionTool.h.

47 {
48 m_slicedHitHeader = slicedHitHeader;
49 return StatusCode::SUCCESS;
50 };

Member Data Documentation

◆ m_addAllHits

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_addAllHits {this, "addAllHits", false, "If set to true ignore the window and just add all the hits"}
private

Definition at line 77 of file FPGATrackSimWindowExtensionTool.h.

77{this, "addAllHits", false, "If set to true ignore the window and just add all the hits"};

◆ m_detectorZoneWindows

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_detectorZoneWindows {this, "detectorZoneWindows", false, "If set to true we separate windows will be used for endcap and barrel hits."}
private

Definition at line 73 of file FPGATrackSimWindowExtensionTool.h.

73{this, "detectorZoneWindows", false, "If set to true we separate windows will be used for endcap and barrel hits."};

◆ m_doBinning

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_doBinning {this, "doBinning", false, "Use second stage binning to sort hits, not the plane map"}
private

Definition at line 76 of file FPGATrackSimWindowExtensionTool.h.

76{this, "doBinning", false, "Use second stage binning to sort hits, not the plane map"};

◆ m_doEtaPatternConsts

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_doEtaPatternConsts { this, "doEtaPatternConsts", false, "Whether to use the eta pattern tool for constant generation"}
private

Definition at line 85 of file FPGATrackSimWindowExtensionTool.h.

85{ this, "doEtaPatternConsts", false, "Whether to use the eta pattern tool for constant generation"};

◆ m_doRegionalMapping

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_doRegionalMapping { this, "RegionalMapping", false, "Use the sub-region maps to define the sector"}
private

Definition at line 84 of file FPGATrackSimWindowExtensionTool.h.

84{ this, "RegionalMapping", false, "Use the sub-region maps to define the sector"};

◆ m_fieldCorrection

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_fieldCorrection {this, "fieldCorrection", true, "Use magnetic field correction for Hough transform"}
private

Definition at line 74 of file FPGATrackSimWindowExtensionTool.h.

74{this, "fieldCorrection", true, "Use magnetic field correction for Hough transform"};

◆ m_FPGATrackSimBankSvc

ServiceHandle<IFPGATrackSimBankSvc> FPGATrackSimWindowExtensionTool::m_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
private

Definition at line 62 of file FPGATrackSimWindowExtensionTool.h.

62{this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"};

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimWindowExtensionTool::m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
private

Definition at line 63 of file FPGATrackSimWindowExtensionTool.h.

63{this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"};

◆ m_hitBinningTool

ToolHandle<FPGATrackSimBinnedHits> FPGATrackSimWindowExtensionTool::m_hitBinningTool {this, "BinningTool", "FPGATrackSimBinning/FPGATrackSimBinnedHits"}
private

Definition at line 60 of file FPGATrackSimWindowExtensionTool.h.

60{this, "BinningTool", "FPGATrackSimBinning/FPGATrackSimBinnedHits"};

◆ m_idealGeoRoads

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_idealGeoRoads {this, "IdealGeoRoads", true, "Do sector assignment of second stage roads"}
private

Definition at line 75 of file FPGATrackSimWindowExtensionTool.h.

75{this, "IdealGeoRoads", true, "Do sector assignment of second stage roads"};

◆ m_maxHits

Gaudi::Property<std::vector<int> > FPGATrackSimWindowExtensionTool::m_maxHits {this, "maxHits", {}, "If set to positive number, maximum number of hits allowed per layer"}
private

Definition at line 78 of file FPGATrackSimWindowExtensionTool.h.

78{this, "maxHits", {}, "If set to positive number, maximum number of hits allowed per layer"};

◆ m_maxMiss

Gaudi::Property<int> FPGATrackSimWindowExtensionTool::m_maxMiss { this, "threshold", 2, "Maximum number of missing hits allowed on a road"}
private

Definition at line 66 of file FPGATrackSimWindowExtensionTool.h.

66{ this, "threshold", 2, "Maximum number of missing hits allowed on a road"};

◆ m_nLayers_1stStage

unsigned FPGATrackSimWindowExtensionTool::m_nLayers_1stStage = 0
private

Definition at line 95 of file FPGATrackSimWindowExtensionTool.h.

◆ m_nLayers_2ndStage

unsigned FPGATrackSimWindowExtensionTool::m_nLayers_2ndStage = 0
private

Definition at line 96 of file FPGATrackSimWindowExtensionTool.h.

◆ m_phiScale

Gaudi::Property<double> FPGATrackSimWindowExtensionTool::m_phiScale {this, "phiScale", 3.15, "Phi scale used when calculating distance from predicted window position" }
private

Definition at line 89 of file FPGATrackSimWindowExtensionTool.h.

89{this, "phiScale", 3.15, "Phi scale used when calculating distance from predicted window position" };

◆ m_phits_atLayer

std::map<unsigned, std::map<unsigned, std::vector<std::shared_ptr<const FPGATrackSimHit> > > > FPGATrackSimWindowExtensionTool::m_phits_atLayer
private

Definition at line 94 of file FPGATrackSimWindowExtensionTool.h.

◆ m_phiwindows

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_phiwindows {this, "phiWindow", {}, "Default window settings for phi, must be size nlayers."}
private

Definition at line 67 of file FPGATrackSimWindowExtensionTool.h.

67{this, "phiWindow", {}, "Default window settings for phi, must be size nlayers."};

◆ m_phiwindows_barrel

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_phiwindows_barrel {this, "phiWindow_barrel", {}, "Default window settings for phi in the barrel, must be size nlayers."}
private

Definition at line 69 of file FPGATrackSimWindowExtensionTool.h.

69{this, "phiWindow_barrel", {}, "Default window settings for phi in the barrel, must be size nlayers."};

◆ m_phiwindows_endcap

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_phiwindows_endcap {this, "phiWindow_endcap", {}, "Default window settings for phi in the endcap, must be size nlayers."}
private

Definition at line 71 of file FPGATrackSimWindowExtensionTool.h.

71{this, "phiWindow_endcap", {}, "Default window settings for phi in the endcap, must be size nlayers."};

◆ m_roads

std::vector<FPGATrackSimRoad> FPGATrackSimWindowExtensionTool::m_roads
private

Definition at line 92 of file FPGATrackSimWindowExtensionTool.h.

◆ m_slicedHitHeader

FPGATrackSimLogicalEventInputHeader* FPGATrackSimWindowExtensionTool::m_slicedHitHeader = nullptr
private

Definition at line 101 of file FPGATrackSimWindowExtensionTool.h.

◆ m_threshold

unsigned FPGATrackSimWindowExtensionTool::m_threshold = 0
private

Definition at line 97 of file FPGATrackSimWindowExtensionTool.h.

◆ m_useSpacePoints

Gaudi::Property<bool> FPGATrackSimWindowExtensionTool::m_useSpacePoints { this, "useSpacePoints", false, "Whether we are using spacepoints."}
private

Definition at line 86 of file FPGATrackSimWindowExtensionTool.h.

86{ this, "useSpacePoints", false, "Whether we are using spacepoints."};

◆ m_zScale

Gaudi::Property<double> FPGATrackSimWindowExtensionTool::m_zScale {this, "zScale", 3000, "z scale used when calculating distance from predicted window position" }
private

Definition at line 90 of file FPGATrackSimWindowExtensionTool.h.

90{this, "zScale", 3000, "z scale used when calculating distance from predicted window position" };

◆ m_zwindows

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_zwindows {this, "zWindow", {}, "Default window settings for z, must be size nlayers."}
private

Definition at line 68 of file FPGATrackSimWindowExtensionTool.h.

68{this, "zWindow", {}, "Default window settings for z, must be size nlayers."};

◆ m_zwindows_barrel

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_zwindows_barrel {this, "zWindow_barrel", {}, "Default window settings for z in the barrel, must be size nlayers."}
private

Definition at line 70 of file FPGATrackSimWindowExtensionTool.h.

70{this, "zWindow_barrel", {}, "Default window settings for z in the barrel, must be size nlayers."};

◆ m_zwindows_endcap

Gaudi::Property<std::vector<float> > FPGATrackSimWindowExtensionTool::m_zwindows_endcap {this, "zWindow_endcap", {}, "Default window settings for z in the endcap, must be size nlayers."}
private

Definition at line 72 of file FPGATrackSimWindowExtensionTool.h.

72{this, "zWindow_endcap", {}, "Default window settings for z in the endcap, must be size nlayers."};

The documentation for this class was generated from the following files: