ATLAS Offline Software
TrackFitter.cxx
Go to the documentation of this file.
1 
2 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 
4 #include <algorithm>
5 #include <iostream>
6 #include <fstream>
7 #include <cmath>
8 
10 #include "GaudiKernel/MsgStream.h"
12 
13 
14 #include "TrackFitter.h"
15 
16 
17 std::vector<FPGATrackSimTrack>::const_iterator getBestChi2(std::vector<FPGATrackSimTrack> const & tracks);
18 bool hasGoodFit(std::vector<FPGATrackSimTrack> const & track_cands, float minchi2);
19 
20 
22 // Constructor
24 
26  const std::vector<const FPGATrackSimFitConstantBank*>& droppedLayerbanks, bool guessingHits) :
27  AthMessaging (Athena::getMessageSvc(), "FPGATrackSimTrackFitter")
28 {
29  m_guessinghits = guessingHits;
30  m_nominalBank = nominalbank;
31 
32  if (!m_nominalBank) ATH_MSG_FATAL("Constant bank not set");
33  if (!m_guessinghits)
34  for (auto bank : droppedLayerbanks)
35  m_droppedLayerBanks.push_back(bank);
36 }
37 
38 
40 {
41  m_idbase = 0;
42  m_nfits = 0;
43  m_nfits_maj = 0;
44  m_nfits_maj_pix = 0;
45  m_nfits_maj_SCT = 0;
46  m_nfits_rec = 0;
47  m_nfits_addrec = 0;
48 }
49 
50 
52 // fitTracks
54 
55 
56 int TrackFitter::fitTracks(const std::vector<FPGATrackSimRoad*>& roads, std::vector<FPGATrackSimTrack>& tracks) {
57  resetCounters();
58  for (auto cur_road : roads) {
59  std::vector<FPGATrackSimTrack> t;
60  int isOK = fitTracks(cur_road, t);
61  if (isOK != FITTRACKS_OK) return isOK;
62  else tracks.insert(tracks.end(), t.begin(), t.end());
63  }
64  return FITTRACKS_OK;
65 }
66 
67 
74  int TrackFitter::fitTracks(FPGATrackSimRoad *road, std::vector<FPGATrackSimTrack>& tracks)
75 {
76  if (not road){
77  ATH_MSG_WARNING("road pointer is null in TrackFitter::fitTracks");
78  return FITTRACKS_BAD;
79  }
80 
82 
83  double y = 0.0;
84  double x = 0.0;
86  y = road->getY();
87  x = road->getX();
88  ATH_MSG_DEBUG("Attempting to fit Hough road with y = " << y << ", x = " << x << ", sector = " << road->getSector());
89  }
90 
91  // Error checking
92  int sector = road->getSector();
93  if (sector < 0) {
94  ATH_MSG_DEBUG("Bad sector " << sector);
95  return FITTRACKS_OK;
96  }
97  else if (sector >= m_nominalBank->getNSectors()) {
98  ATH_MSG_WARNING("Constants for sector " << sector << " don't exist");
99  return FITTRACKS_BAD;
100  }
101  else if (!m_nominalBank->getIsGood(sector)) {
102  ATH_MSG_WARNING("Constants for sector " << sector << " are not valid");
103  return FITTRACKS_BAD;
104  }
105 
106  // Get info on layers with missing hits
107  int nMissing;
108  bool missPixel;
109  bool missStrip;
110  layer_bitmask_t missing_mask;
111  layer_bitmask_t norecovery_mask; // mask to prevent majority in planes with multiple hits
112  getMissingInfo(*road, nMissing, missPixel, missStrip, missing_mask, norecovery_mask);
113  // Create a template track with common parameters filled already for initializing below
114  FPGATrackSimTrack temp;
115  if(!m_do2ndStage){
117  temp.setFirstSectorID(road->getSector());
118  }
119  else{
121  temp.setSecondSectorID(road->getSector());
122  }
124  temp.setBankID(-1); // TODO
125  temp.setPatternID(road->getPID());
126  temp.setHitMap(missing_mask);
127  temp.setNMissing(nMissing);
128  temp.setHoughX(x);
129  temp.setHoughY(y);
130  temp.setQOverPt(y);
133 
134  // Create a list of track candidates by taking all possible combinations of hits in road.
135  std::vector<FPGATrackSimTrack> track_cands;
136  makeTrackCandidates(*road, temp, track_cands);
137 
138  // Fit the track candidates
139  size_t nFits = std::min((size_t)m_max_ncomb, track_cands.size());
140  for (size_t icomb = 0; icomb < nFits; icomb++)
141  {
142  // Before we start, make sure this track candidate has not been marked as invalid
143  // due to combinatorics issues with spacepoints.
144  bool ok = track_cands[icomb].isValidCand();
145  if (!ok) {
146  continue;
147  }
148  if (nMissing == 0 || m_guessinghits)
149  {
150  ok = m_nominalBank->linfit(sector, track_cands[icomb], m_do2ndStage);
151  }
152  else
153  {
154  unsigned int ic = 0; // this will be the leading coordinate with a missing hit
155  for (unsigned int ic = 0; ic < m_pmap->getNCoords(); ic++) {
156  if (!( (missing_mask >> ic) & 0x1)) break; // if we found one, stop
157  }
158  // banks are indexed by plane, not by coordinate
159  ok = m_droppedLayerBanks[m_pmap->getCoordLayer(ic)]->linfit(sector, track_cands[icomb], m_do2ndStage);
160  }
161 
162  if (!ok) {
163  continue;
164  }
165  track_cands[icomb].setOrigChi2(track_cands[icomb].getChi2());
166  if (getDoMissingHitsCheck()) {
167  if (track_cands[icomb].getNMissing() == 0) { // missing 0 hits, drop hits one at a time and refit!
168  for (unsigned icoord = 0; icoord < m_pmap->getNCoords(); icoord++) { // 9 coordinates to refit, nominally
169 
170  FPGATrackSimTrack newtrack = track_cands[icomb];
171  newtrack.setNMissing(1);
172  unsigned int bitmask = ( 1 << m_pmap->getNCoords() ) - 1; // all bits set to 1
173  bitmask &= ~(1 << icoord); // remove this coordinate
174  if (m_pmap->getDim(icoord) == 2) { // if we need to do two coordinates at once
175  bitmask &= ~(1 << (icoord+1)); // remove the next coordinate, too
176  newtrack.setNMissing(2);
177  }
178  newtrack.setHitMap(bitmask); // update bitmask
179  m_nominalBank->linfit(sector, newtrack, m_do2ndStage);
180  m_tracks_missinghits_track.push_back(newtrack);
181  if (m_pmap->getDim(icoord) == 2) {
182  icoord++; // skip 2nd of pixel coordinates so we don't do them twice
183  }
184  }
185  }
186  }
187  tracks.push_back(track_cands[icomb]);
188  }
189 
190  // Increment counters
191  m_nfits += nFits;
192  if (nMissing > 0)
193  {
194  m_nfits_maj += nFits;
195  if (missPixel) m_nfits_maj_pix += nFits;
196  if (missStrip) m_nfits_maj_SCT += nFits;
197  }
198 
199  // Do recovery fits
200  if (nMissing == 0) {
201  // In the case of m_do_majority > 1, we only do majority fits if ALL full fits fail the chi2 cut
202  if (m_do_majority == 1 || (m_do_majority > 1 && !hasGoodFit(tracks, m_Chi2Dof_recovery_min)))
203  {
204  for (FPGATrackSimTrack & t : tracks)
205  if (t.getChi2ndof() > m_Chi2Dof_recovery_min && t.getChi2ndof() < m_Chi2Dof_recovery_max){
206  double y(0);
207  if (road != nullptr && m_IdealCoordFitType != TrackCorrType::None)
208  y = road->getY();
209  t = recoverTrack(t, norecovery_mask, sector, y);
210 
211  }
212  }
213  }
214 
215  // Add truth info
216  for (FPGATrackSimTrack & t : tracks) {
217  compute_truth(t); // match the track to a geant particle using the channel-level geant info in the hit data.
218  }
219 
220  return FITTRACKS_OK;
221 }
222 
223 
225 // fitTracks core helper functions
227 
228 
229 // Given road, populates the supplied variables with info on which layers missed hits
230 void TrackFitter::getMissingInfo(const FPGATrackSimRoad & road, int & nMissing, bool & missPixel, bool & missStrip,
231  layer_bitmask_t & missing_mask, layer_bitmask_t & norecovery_mask)
232 {
233  nMissing = m_pmap->getNCoords(); // init with nCoords and decrement as we find misses
234  missPixel = false;
235  missStrip = false;
236  missing_mask = 0;
237  norecovery_mask = 0;
238  unsigned int wclayers = road.getWCLayers();
239  for (unsigned layer = 0; layer < m_pmap->getNLogiLayers(); layer++)
240  {
241  int nHits = road.getHits(layer).size();
242  if (nHits==0)
243  {
244  if (m_IdealCoordFitType == TrackCorrType::None && ((wclayers >> layer) & 1))
245  {
246  int ix = m_pmap->getCoordOffset(layer);
247  int iy = ix + 1;
248  if (m_pmap->isSCT(layer))
249  {
250  missing_mask |= 1 << ix;
251  nMissing -= 1;
252  }
253  else
254  {
255  missing_mask |= (1<<ix) | (1<<iy);
256  nMissing -= 2;
257  }
258  }
259  else
260  {
261  if (m_pmap->isSCT(layer)) missStrip = true;
262  else missPixel = true;
263  }
264  }
265  else if (!((wclayers >> layer) & 1)) { // we have a hit
266  int ix = m_pmap->getCoordOffset(layer);
267  int iy = ix + 1;
268  if (m_pmap->isSCT(layer))
269  {
270  missing_mask |= 1 << ix;
271  nMissing -= 1;
272  }
273  else
274  {
275  missing_mask |= (1<<ix) | (1<<iy);
276  nMissing -= 2;
277  }
278 
279  // set the mask to avoid recovery in crowded planes
280  if (m_norecovery_nhits != -1 && nHits > m_norecovery_nhits)
281  norecovery_mask |= (1<<layer);
282  }
283  }
284 }
285 
286 
287 
296 void TrackFitter::makeTrackCandidates(const FPGATrackSimRoad & road, const FPGATrackSimTrack & temp, std::vector<FPGATrackSimTrack>& track_cands)
297 {
298  std::vector<std::vector<int>> combs = getComboIndices(road.getNHits_layer());
299  track_cands.resize(combs.size(), temp);
300  //
301  //get the WC hits:
302  layer_bitmask_t wcbits= road.getWCLayers();
303  // Add the hits from each combination to the track, and set ID
304  for (size_t icomb = 0; icomb < combs.size(); icomb++)
305  {
306  //Need to set the ID and the hits size of this track
307  track_cands[icomb].setTrackID(m_idbase + icomb);
308  track_cands[icomb].setNLayers(m_pmap->getNLogiLayers());
309 
310  // If this is an idealized coordinate fit; keep references to the idealized radii.
311  track_cands[icomb].setIdealRadii(m_rmap->getAvgRadii(0));
312 
313  std::vector<int> const & hit_indices = combs[icomb]; // size nLayers
314  for (unsigned layer = 0; layer < m_pmap->getNLogiLayers(); layer++)
315  {
316  if (hit_indices[layer] < 0) // Set a dummy hit if road has no hits in this layer
317  {
319  newhit.setLayer(layer);
320  newhit.setSection(0);
321  if (m_pmap->getDim(layer) == 2) newhit.setDetType(SiliconTech::pixel);
322  else newhit.setDetType(SiliconTech::strip);
323 
324  if (wcbits & (1 << layer ) ) {
326  newhit.setLayer(layer);
327  }
328 
329  track_cands[icomb].setFPGATrackSimHit(layer, newhit);
330  }
331  else
332  {
333  const FPGATrackSimHit* hit = road.getHits(layer)[hit_indices[layer]];
334  // If this is an outer spacepoint, and it is not the same as the inner spacepoint, reject it.
335  // Here we "reject" it by marking the candidate as "invalid", to be rejected later.
336  // That require another field on the track object, but it avoids having to change the sizes
337  // of arrays computed above.
338  if (hit->getHitType() == HitType::spacepoint && (hit->getPhysLayer() % 2) == 1) {
339  const FPGATrackSimHit inner_hit = track_cands[icomb].getFPGATrackSimHits().at(layer - 1);
340  if ((hit->getX() != inner_hit.getX()) || (hit->getY() != inner_hit.getY()) || (hit->getZ() != inner_hit.getZ())) {
341  track_cands[icomb].setValidCand(false);
342  }
343  }
344  track_cands[icomb].setFPGATrackSimHit(layer, *hit);
345  }
346  }
347  }
348 
349  m_idbase += combs.size();
350 }
351 
352 
353 
362 {
363  m_nfits_rec += 1;
364 
365  std::vector<FPGATrackSimTrack> recovered_tracks(m_pmap->getNLogiLayers(),t); // start with the complete track in all layers
366 
367  float best_chi2ndof = t.getChi2ndof();
368  int best_i = -1;
369 
370  // Remove a hit from each layer and do a fit
371  for (unsigned layer = (m_require_first ? 1 : 0); layer < recovered_tracks.size(); ++layer)
372  {
373  // Skip planes with multiple hits
374  if (norecovery_mask & (1<<layer)) continue;
375  m_nfits_addrec += 1;
376  // Zero the cluster for the missing layer, make sure to set the number of dimensions for it
377 
379  newhit.setLayer(layer);
380  newhit.setSection(0);
382  recovered_tracks[layer].setFPGATrackSimHit(layer,newhit);
383  // Set the number of missing points and the related bitmask
384  int ix = m_pmap->getCoordOffset(layer);
385 
386  unsigned int missing_mask = t.getHitMap();
387  missing_mask &= ~(1 << ix);
388 
389  if (m_pmap->isPixel(layer)) missing_mask &= ~(1 << (ix + 1));
390 
391  recovered_tracks[layer].setHitMap(missing_mask);
392  recovered_tracks[layer].setNMissing(t.getNMissing() + m_pmap->getDim(layer));
393 
394  // reset the pt
395  recovered_tracks[layer].setQOverPt(qoverpt);
396  recovered_tracks[layer].setTrackCorrType(m_IdealCoordFitType);
397 
398 
399  // If not guessing do the fit using layer+1 since 1st set of constants are the 8/8
400  if (m_guessinghits) m_nominalBank->linfit(sector, recovered_tracks[layer], m_do2ndStage);
401  else m_droppedLayerBanks[layer]->linfit(sector, recovered_tracks[layer], m_do2ndStage);
402 
403 
404  // Check if the chi2ndof is better
405  if (recovered_tracks[layer].getChi2ndof() < best_chi2ndof)
406  {
407  best_chi2ndof = recovered_tracks[layer].getChi2ndof();
408  best_i = layer;
409  }
410  }
411 
412  if (best_i >= 0) {// a better track was found
413  return recovered_tracks[best_i];
414  } else
415  return t;
416 }
417 
418 
419 
420 
421 // compute the best geant match, the barcode with the largest number of hits contributing to the track,
422 // and store in the track.
424 {
425  std::vector<FPGATrackSimMultiTruth> mtv;
426 
427  for (unsigned layer = 0; layer < m_pmap->getNLogiLayers(); layer++)
428  {
429  if (t.getHitMap() & (1 << m_pmap->getCoordOffset(layer))) continue; // no hit in this plane
430  //Sanity check that we have enough hits.
431  if (layer < t.getFPGATrackSimHits().size()) mtv.push_back(t.getFPGATrackSimHits().at(layer).getTruth());
432 
433  // adjust weight for hits without (and also with) a truth match, so that each is counted with the same weight.
434  mtv.back().assign_equal_normalization();
435  }
436 
438  // frac is then the fraction of the total number of hits on the track attributed to the barcode.
439 
442  const bool ok = mt.best(tbarcode, tfrac);
443  if (ok)
444  {
445  t.setEventIndex(tbarcode.first);
446  t.setBarcode(tbarcode.second);
447  t.setBarcodeFrac(tfrac);
448  }
449 }
450 
451 
453 // findTracks utility helper functions
455 
456 // Returns true if there is a fit in track_cands with chi2ndof < minchi2ndof
457 bool hasGoodFit(std::vector<FPGATrackSimTrack> const & track_cands, float minchi2ndof)
458 {
459  for (FPGATrackSimTrack const & t: track_cands)
460  {
461  if (t.getChi2ndof() > 0 && t.getChi2ndof() < minchi2ndof)
462  return true;
463  }
464  return false;
465 }
FPGATrackSimTrack::setHitMap
void setHitMap(unsigned int v)
Definition: FPGATrackSimTrack.h:92
TrackFitter::compute_truth
void compute_truth(FPGATrackSimTrack &newtrk) const
Definition: TrackFitter.cxx:423
TrackFitter::m_idbase
int m_idbase
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:134
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
FPGATrackSimHit::setSection
void setSection(unsigned v)
Definition: FPGATrackSimHit.h:88
TrackFitter::m_max_ncomb
const int m_max_ncomb
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:98
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
FPGATrackSimPlaneMap::getNLogiLayers
uint32_t getNLogiLayers() const
Definition: FPGATrackSimPlaneMap.h:78
SiliconTech::strip
@ strip
FPGATrackSimTrack::setBankID
void setBankID(int v)
Definition: FPGATrackSimTrack.h:75
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer() const
Definition: FPGATrackSimHit.cxx:67
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
getBestChi2
std::vector< FPGATrackSimTrack >::const_iterator getBestChi2(std::vector< FPGATrackSimTrack > const &tracks)
TrackFitter::m_Chi2Dof_recovery_max
float m_Chi2Dof_recovery_max
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:107
TrackFitter::m_nfits_maj_pix
int m_nfits_maj_pix
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:138
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:16
FPGATrackSimTrack::setPatternID
void setPatternID(int v)
Definition: FPGATrackSimTrack.h:76
TrackFitter::makeTrackCandidates
void makeTrackCandidates(const FPGATrackSimRoad &road, const FPGATrackSimTrack &temp, std::vector< FPGATrackSimTrack > &track_cands)
Creates a list of track candidates by taking all possible combination of hits in road.
Definition: TrackFitter.cxx:296
FPGATrackSimMultiTruth::Weight
float Weight
Definition: FPGATrackSimMultiTruth.h:50
TrackFitter::m_require_first
bool m_require_first
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:100
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:125
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
FPGATrackSimTrack::setNMissing
void setNMissing(int v)
Definition: FPGATrackSimTrack.h:90
TrackFitter::m_Chi2Dof_recovery_min
float m_Chi2Dof_recovery_min
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:106
TrackFitter.h
FPGATrackSimPlaneMap::getNCoords
uint32_t getNCoords() const
Definition: FPGATrackSimPlaneMap.h:79
FPGATrackSimTrack::setFirstSectorID
void setFirstSectorID(int v)
Definition: FPGATrackSimTrack.h:77
FPGATrackSimRoad::getHits
std::vector< const FPGATrackSimHit * > const & getHits(size_t layer) const
Definition: FPGATrackSimRoad.h:87
HitType::spacepoint
@ spacepoint
FPGATrackSimMultiTruth.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FITTRACKS_OK
#define FITTRACKS_OK
Definition: FPGATrackSimTypes.h:15
x
#define x
TrackFitter::recoverTrack
FPGATrackSimTrack recoverTrack(FPGATrackSimTrack const &t, sector_t sector, layer_bitmask_t norecovery_mask, double qoverpt)
Given a N/N track that has a bad chi2, try to refit the track by taking away a single hit,...
Definition: TrackFitter.cxx:361
HitType::guessed
@ guessed
FPGATrackSimRoad::getNHits_layer
std::vector< size_t > getNHits_layer() const
Definition: FPGATrackSimRoad.cxx:25
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
TrackFitter::m_tracks_missinghits_track
std::vector< FPGATrackSimTrack > m_tracks_missinghits_track
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:131
FPGATrackSimPlaneMap::getCoordLayer
uint32_t getCoordLayer(uint32_t coord) const
Definition: FPGATrackSimPlaneMap.h:101
FPGATrackSimMultiTruth::best
bool best(FPGATrackSimMultiTruth::Barcode &code, FPGATrackSimMultiTruth::Weight &weight) const
Definition: FPGATrackSimMultiTruth.h:86
FPGATrackSimHit
Definition: FPGATrackSimHit.h:38
FPGATrackSimPlaneMap::getDim
uint32_t getDim(size_t logiLayer) const
Definition: FPGATrackSimPlaneMap.h:81
FPGATrackSimTrack::setSecondSectorID
void setSecondSectorID(int v)
Definition: FPGATrackSimTrack.h:78
TrackFitter::m_nfits_maj
int m_nfits_maj
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:136
HitType::wildcard
@ wildcard
TrackFitter::m_doDeltaGPhis
bool m_doDeltaGPhis
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:95
FPGATrackSimPlaneMap::getCoordOffset
uint32_t getCoordOffset(size_t logiLayer) const
Definition: FPGATrackSimPlaneMap.h:95
TrackFitter::m_do2ndStage
bool m_do2ndStage
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:92
FPGATrackSimPlaneMap::isPixel
bool isPixel(int pl) const
Definition: FPGATrackSimPlaneMap.h:110
FPGATrackSimHit::setDetType
void setDetType(SiliconTech detType)
Definition: FPGATrackSimHit.h:52
FITTRACKS_BAD
#define FITTRACKS_BAD
Definition: FPGATrackSimTypes.h:16
TrackFitter::m_guessinghits
bool m_guessinghits
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:93
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
TrackFitter::m_do_majority
unsigned m_do_majority
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:99
TrackFitter::m_pmap
FPGATrackSimPlaneMap const * m_pmap
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:117
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TrackStage::FIRST
@ FIRST
FPGATrackSimTrack::setDoDeltaGPhis
void setDoDeltaGPhis(bool v)
Definition: FPGATrackSimTrack.h:74
FPGATrackSimMultiTruth::Barcode
std::pair< unsigned long, unsigned long > Barcode
Definition: FPGATrackSimMultiTruth.h:49
TrackFitter::m_nfits_addrec
int m_nfits_addrec
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:140
TrackFitter::m_nfits_maj_SCT
int m_nfits_maj_SCT
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:137
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TrackStage::SECOND
@ SECOND
TrackFitter::m_IdealCoordFitType
TrackCorrType m_IdealCoordFitType
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:94
TrackFitter::m_norecovery_nhits
int m_norecovery_nhits
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:101
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:126
FPGATrackSimTrack::setTrackCorrType
void setTrackCorrType(TrackCorrType v)
Definition: FPGATrackSimTrack.h:72
TrackFitter::fitTracks
int fitTracks(const std::vector< FPGATrackSimRoad * > &roads, std::vector< FPGATrackSimTrack > &tracks)
Definition: TrackFitter.cxx:56
FPGATrackSimHit::getZ
float getZ() const
Definition: FPGATrackSimHit.h:127
getComboIndices
std::vector< std::vector< int > > getComboIndices(std::vector< size_t > const &sizes)
Given a vector of sizes (of arrays), generates a vector of all combinations of indices to index one e...
Definition: FPGATrackSimFunctions.cxx:21
min
#define min(a, b)
Definition: cfImp.cxx:40
grepfile.ic
int ic
Definition: grepfile.py:33
FPGATrackSimTrack::setTrackStage
void setTrackStage(TrackStage v)
Definition: FPGATrackSimTrack.h:73
sector_t
int32_t sector_t
Definition: FPGATrackSimTypes.h:21
TrackFitter::m_rmap
FPGATrackSimRegionMap const * m_rmap
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:118
FPGATrackSimMultiTruth
Definition: FPGATrackSimMultiTruth.h:46
FPGATrackSimMultiTruth::AddAccumulator
Definition: FPGATrackSimMultiTruth.h:57
TrackFitter::getMissingInfo
void getMissingInfo(const FPGATrackSimRoad &road, int &nMissing, bool &missPixel, bool &missStrip, layer_bitmask_t &missing_mask, layer_bitmask_t &norecovery_mask)
Definition: TrackFitter.cxx:230
TrackCorrType::None
@ None
FPGATrackSimFitConstantBank
Definition: FPGATrackSimFitConstantBank.h:24
FPGATrackSimPlaneMap::isSCT
bool isSCT(int pl) const
Definition: FPGATrackSimPlaneMap.h:109
FPGATrackSimRoad::getWCLayers
layer_bitmask_t getWCLayers() const
Definition: FPGATrackSimRoad.h:83
FPGATrackSimTrack::setHoughY
void setHoughY(float v)
Definition: FPGATrackSimTrack.h:82
FPGATrackSimTrack::setQOverPt
void setQOverPt(float v)
Definition: FPGATrackSimTrack.h:83
FPGATrackSimRegionMap::getAvgRadii
const std::vector< double > & getAvgRadii(unsigned region) const
Definition: FPGATrackSimRegionMap.h:103
TrackFitter::m_nfits
int m_nfits
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:135
FPGATrackSimFitConstantBank::getIsGood
bool getIsGood(sector_t sector) const
Definition: FPGATrackSimFitConstantBank.h:41
FPGATrackSimFitConstantBank::linfit
bool linfit(sector_t sector, FPGATrackSimTrack &track, bool isSecondStage) const
Definition: FPGATrackSimFitConstantBank.cxx:303
FPGATrackSimFitConstantBank::getNSectors
int getNSectors() const
Definition: FPGATrackSimFitConstantBank.h:37
FPGATrackSimHit::setLayer
void setLayer(unsigned v)
Definition: FPGATrackSimHit.h:87
y
#define y
TrackFitter::m_nominalBank
const FPGATrackSimFitConstantBank * m_nominalBank
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:124
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
TrackFitter::resetCounters
void resetCounters()
Definition: TrackFitter.cxx:39
FPGATrackSimTrack::setNLayers
void setNLayers(int)
set the number of layers in the track.
Definition: FPGATrackSimTrack.cxx:151
TrackFitter::getDoMissingHitsCheck
bool getDoMissingHitsCheck() const
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:62
muCombUtil::getChi2
double getChi2(int &ndof, double ipt, double eta1, double seta1, double phi1, double sphi1, double ipt1, double sipt1, double eta2, double seta2, double phi2, double sphi2, double ipt2, double sipt2, bool useAbsPt)
Get OLD style (i.e. muFast time) Chi2.
Definition: muCombUtil.cxx:374
SiliconTech::pixel
@ pixel
TrackFitter::TrackFitter
TrackFitter(void)
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:29
FPGATrackSimTrack::setHoughX
void setHoughX(float v)
Definition: FPGATrackSimTrack.h:81
FPGATrackSimHit::getHitType
HitType getHitType() const
Definition: FPGATrackSimHit.h:54
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:51
hasGoodFit
bool hasGoodFit(std::vector< FPGATrackSimTrack > const &track_cands, float minchi2)
Definition: TrackFitter.cxx:457
TrackFitter::m_droppedLayerBanks
std::vector< const FPGATrackSimFitConstantBank * > m_droppedLayerBanks
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:128
TrackFitter::m_nfits_rec
int m_nfits_rec
Definition: EFTracking/FPGATrackSim/FPGATrackSimAlgorithms/src/TrackFitter.h:139