ATLAS Offline Software
FPGATrackSimClusteringTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3  */
4 
9 #include "CxxUtils/trapping_fp.h"
10 #include <algorithm>
11 #include <cmath>
12 
13 
14 namespace{
15  //For deciding eta || phi columns in modules
16  constexpr unsigned int ETA = 1;
17  constexpr unsigned int PHI = 0;
18 }
19 
20 FPGATrackSimClusteringTool::FPGATrackSimClusteringTool(const std::string& algname, const std::string &name, const IInterface *ifc) :
21  base_class(algname, name, ifc)
22 {
23 }
24 
26  ATH_CHECK(m_lorentzAngleTool.retrieve(EnableTool{m_LorentzAngleShift >=0}));
27  return StatusCode::SUCCESS;
28 }
29 
30 
32 {
33  for (int i = 0; i<header.nTowers(); i++)
34  {
35  // Retreive the hits from the tower
36  FPGATrackSimTowerInputHeader& tower = *header.getTower(i);
38  hits.reserve(tower.hits().size());
39  for (auto& hit : tower.hits()) {
40  hits.push_back(std::make_unique<FPGATrackSimHit>(hit));
41  }
42 
43  HitPtrContainer hitsPerModule;
44  std::vector<FPGATrackSimCluster> towerClusters;
45 
47  for (auto &hit : hits)
49  }
50 
51  splitAndSortHits(std::move(hits), hitsPerModule);
52  SortedClustering(std::move(hitsPerModule), towerClusters);
53  normaliseClusters(towerClusters);
54 
55  //remove the old hits from the tower...
56  tower.clearHits();
57  tower.reserveHits(towerClusters.size());
58  clusters.clear();
59  clusters.reserve(towerClusters.size());
60  if(i > 1)
61  ATH_MSG_WARNING("more than one tower, m_clusters is only going to contain those from the last one");
62 
63  unsigned cluster_count = 0;
64  unsigned int pixelCounter = 0;
65  unsigned int stripCounter = 0;
66  for ( auto &cluster: towerClusters){
67  SetMinMaxIndicies(cluster);
70 
71  FPGATrackSimHit cluster_as_FPGATrackSimhit = cluster.getClusterEquiv();
72  cluster_as_FPGATrackSimhit.setHitType(HitType::clustered);
73  cluster_as_FPGATrackSimhit.setParentageMask(cluster_count); // making use of unused m_parentageMask to keep track of cluster index
74 
75  if(cluster_as_FPGATrackSimhit.getDetType() == SiliconTech::pixel)
76  {
77  cluster_as_FPGATrackSimhit.setCluster1ID(pixelCounter);
78  pixelCounter++;
79  }
80  else if(cluster_as_FPGATrackSimhit.getDetType() == SiliconTech::strip)
81  {
82  cluster_as_FPGATrackSimhit.setCluster1ID(stripCounter);
83  stripCounter++;
84  }
85  tower.addHit(cluster_as_FPGATrackSimhit);
86 
87  if(m_LorentzAngleShift>= 0){
88  ATH_CHECK(m_lorentzAngleTool->updateHitPosition(cluster_as_FPGATrackSimhit, m_LorentzAngleShift));
89  }
90  cluster.setClusterEquiv(cluster_as_FPGATrackSimhit);
91  //send back a copy for monitoring and to check when writing out hits in each road
92  clusters.push_back(cluster);
93  cluster_count++;
94  }
95  }
96  ATH_MSG_DEBUG("Produced "<< clusters.size()<< " clusters");
97  return StatusCode::SUCCESS;
98 }
99 
101  //Set the min and max indices for the cluster equivalent
102  FPGATrackSimHit clusterEquiv = cluster.getClusterEquiv();
103  int maxPhiIdx{-std::numeric_limits<int>::max()}, maxEtaIdx{-std::numeric_limits<int>::max()};
104  int minPhiIdx{std::numeric_limits<int>::max()}, minEtaIdx{std::numeric_limits<int>::max()};
105  for (const FPGATrackSimHit& hit : cluster.getHitList()){
106  maxPhiIdx = std::max(maxPhiIdx, static_cast<int>(hit.getPhiIndex()));
107  minPhiIdx = std::min(minPhiIdx, static_cast<int>(hit.getPhiIndex()));
108  maxEtaIdx = std::max(maxEtaIdx, static_cast<int>(hit.getEtaIndex()));
109  minEtaIdx = std::min(minEtaIdx, static_cast<int>(hit.getEtaIndex()));
110  }
111  clusterEquiv.setMinPhiIndex(minPhiIdx);
112  clusterEquiv.setMaxPhiIndex(maxPhiIdx);
113  clusterEquiv.setMinEtaIndex(minEtaIdx);
114  clusterEquiv.setMaxEtaIndex(maxEtaIdx);
115  cluster.setClusterEquiv(clusterEquiv);
116 }
117 
118 //Attempt to implement clustering using FPGATrackSim objects.
119 void FPGATrackSimClusteringTool::SortedClustering(HitPtrContainer&& sorted_hits, std::vector<FPGATrackSimCluster> &clusters) const {
120  std::vector<FPGATrackSimCluster> moduleClusters;
121  //Loop over the sorted modules that we have
122  for( HitPtrCollection & moduleHits: sorted_hits){
123  //Make the clusters for this module
124  Clustering(std::move(moduleHits), moduleClusters);
125  //Put these clusters into the output list
126  clusters.insert(clusters.end(), moduleClusters.begin(), moduleClusters.end());
127  //Clear the vector or this will get messy
128  moduleClusters.clear();
129  }
130 }
131 
132 
133 void FPGATrackSimClusteringTool::Clustering(HitPtrCollection &&moduleHits, std::vector<FPGATrackSimCluster> &moduleClusters) const {
134  FPGATrackSimHit clusterEquiv;
135  bool newHit;
136 
137  //To hold the current cluster vars for comparison
138  //loop over the hits that we have been passed for this module
139  for( auto& hit: moduleHits){
140  bool is_clustered_hit = false;
142 
143  //Loop over the clusters we have already made, check if this hit should be added to them?
144  for(std::vector<FPGATrackSimCluster>::iterator it = moduleClusters.begin(); it != moduleClusters.end(); ++it) {
145  if(hit->isPixel()) {
147  if (!is_clustered_hit) {
148  is_clustered_hit = true;
149  it_added_clus = it;
150  } else {
151  int cPhi = it->getClusterEquiv().getPhiIndex();
152  int cPhiWidth = it->getClusterEquiv().getPhiWidth();
153  int cEta = it->getClusterEquiv().getEtaIndex();
154  int cEtaWidth = it->getClusterEquiv().getEtaWidth();
155  int fCPhi = it_added_clus->getClusterEquiv().getPhiIndex();
156  int fCPhiWidth = it_added_clus->getClusterEquiv().getPhiWidth();
157  int fCEta = it_added_clus->getClusterEquiv().getEtaIndex();
158  int fCEtaWidth = it_added_clus->getClusterEquiv().getEtaWidth();
159 
160  clusterEquiv = it_added_clus->getClusterEquiv();
161 
162  // set new phi & phi width
163  if (cPhi < fCPhi) {
164  clusterEquiv.setPhiIndex(cPhi);
165  if (cPhi + cPhiWidth < fCPhi + fCPhiWidth)
166  clusterEquiv.setPhiWidth(fCPhiWidth + (fCPhi - cPhi));
167  else
168  clusterEquiv.setPhiWidth(cPhiWidth);
169  } else {
170  clusterEquiv.setPhiIndex(fCPhi);
171  if (!(cPhi + cPhiWidth < fCPhi + fCPhiWidth))
172  clusterEquiv.setPhiWidth(cPhiWidth + (cPhi - fCPhi));
173  else
174  clusterEquiv.setPhiWidth(fCPhiWidth);
175  }
176 
177  // set new eta & eta width
178  if (cEta < fCEta) {
179  clusterEquiv.setEtaIndex(cEta);
180  if (cEta + cEtaWidth < fCEta + fCEtaWidth)
181  clusterEquiv.setEtaWidth(fCEtaWidth + (fCEta - cEta));
182  else
183  clusterEquiv.setEtaWidth(cEtaWidth);
184  } else {
185  clusterEquiv.setEtaIndex(fCEta);
186  if (!(cEta + cEtaWidth < fCEta + fCEtaWidth))
187  clusterEquiv.setEtaWidth(cEtaWidth + (cEta - fCEta));
188  else
189  clusterEquiv.setEtaWidth(fCEtaWidth);
190  }
191 
192  it_added_clus->setClusterEquiv(clusterEquiv);
193 
194  for (auto& hit : it->getHitList()) {
195  newHit = true;
196  for (auto& finalHit : it_added_clus->getHitList()) {
197  if (hit.getEtaIndex() == finalHit.getEtaIndex() &&
198  hit.getPhiIndex() == finalHit.getPhiIndex())
199  newHit = false;
200  }
201  if (newHit) {
203  clusterEquiv = it_added_clus->getClusterEquiv();
204  float xOld = clusterEquiv.getX();
205  float yOld = clusterEquiv.getY();
206  float zOld = clusterEquiv.getZ();
207  float xPhiOld = clusterEquiv.getPhiCoord();
208  float xEtaOld = clusterEquiv.getEtaCoord();
209  float cPhiOld = clusterEquiv.getCentroidPhiIndex();
210  float cEtaOld = clusterEquiv.getCentroidEtaIndex();
211  float xNew = hit.getX();
212  float yNew = hit.getY();
213  float zNew = hit.getZ();
214  float xPhiNew = hit.getPhiCoord();
215  float xEtaNew = hit.getEtaCoord();
216  float cPhiNew = hit.getPhiIndex();
217  float cEtaNew = hit.getEtaIndex();
218  int tot = clusterEquiv.getToT();
219  int totNew = hit.getToT();
220  if (m_digitalClustering) {
221  // n+1 because that is old + new now
222  int n = it_added_clus->getHitList().size();
223  clusterEquiv.setX((xOld*n + xNew) / (n+1));
224  clusterEquiv.setY((yOld*n + yNew) / (n+1));
225  clusterEquiv.setZ((zOld*n + zNew) / (n+1));
226  clusterEquiv.setPhiCoord((xPhiOld*n + xPhiNew) / (n+1));
227  clusterEquiv.setEtaCoord((xEtaOld*n + xEtaNew) / (n+1));
228  clusterEquiv.setCentroidPhiIndex((cPhiOld*n + cPhiNew) / (n+1));
229  clusterEquiv.setCentroidEtaIndex((cEtaOld*n + cEtaNew) / (n+1));
230  } else {
231  clusterEquiv.setX((xOld*tot + xNew*totNew) / (tot+totNew));
232  clusterEquiv.setY((yOld*tot + yNew*totNew) / (tot+totNew));
233  clusterEquiv.setZ((zOld*tot + zNew*totNew) / (tot+totNew));
234  clusterEquiv.setPhiCoord((xPhiOld*tot + xPhiNew*totNew) / (tot+totNew));
235  clusterEquiv.setEtaCoord((xEtaOld*tot + xEtaNew*totNew) / (tot+totNew));
236  clusterEquiv.setCentroidPhiIndex((cPhiOld*tot + cPhiNew*totNew) / (tot+totNew));
237  clusterEquiv.setCentroidEtaIndex((cEtaOld*tot + cEtaNew*totNew) / (tot+totNew));
238  }
239  clusterEquiv.setToT(tot + totNew);
240  it_added_clus->setClusterEquiv(clusterEquiv);
241  it_added_clus->push_backHitList(hit);
242  }
243  }
244 
245  // move the last cluster to the newly freed spot in the cluster array if the merged cluster was not
246  // already the last cluster, decrease loop counter by one, so that this cluster gets also checked
247  // against the current hit
248  if (it != moduleClusters.end() - 1) {
249  *it = moduleClusters.back();
250  moduleClusters.pop_back();
251  it -= 1;
252  } else {
253  moduleClusters.pop_back();
254  break;
255  }
256  }
257  }
258  }
259  if(hit->isStrip()){
261  is_clustered_hit = true;
262  }
263  }
264 
265  //If it is the first hit or a not clustered hit, then start a new cluster and add it to the output vector
266  if((!is_clustered_hit) || (moduleClusters.size() == 0)){
267  FPGATrackSimCluster cluster;
268  if(hit->isPixel()){
269  // No need to check the return code here
271  } else if(hit->isStrip()){
273  }
274  //Put this cluster into the output hits. Will update it in place.
275  moduleClusters.push_back(cluster);
276  }
277  }
278  moduleHits.clear();
279 }
280 
282  splitHitsToModules(std::move(hits), hitsPerModule);
283  sortHitsOnModules(hitsPerModule, eta_phi);
284 }
285 
286 
288  splitHitsToModules(std::move(hits), hitsPerModule);
289  sortHitsOnModules(hitsPerModule);
290 }
291 
292 /*Temporarilly sort the hits into module by module packets
293 */
295  //To hold the current module
296  HitPtrCollection currentModule;
297  uint hashing = 0;
298  //Split the incoming hits into hits by module
299  for ( auto& hit:hits){
300  if(hashing == 0){
301  hashing = hit->getIdentifierHash();
302  currentModule.push_back(std::move(hit));
303  } else if (hit->getIdentifierHash() == hashing) {
304  currentModule.push_back(std::move(hit));
305  } else {
306  hitsPerModule.push_back(std::exchange(currentModule, HitPtrCollection{}));
307  hashing = hit->getIdentifierHash();
308  currentModule.push_back(std::move(hit));
309  }
310  }
311 
312  // Now push that last one
313  if (currentModule.size() > 0) hitsPerModule.push_back(std::move(currentModule));
314 }
315 
316 void FPGATrackSimClusteringTool::sortHitsOnModules(HitPtrContainer &hitsPerModule, int &eta_phi) const{
317  //Loop over the module separated hits
318  for ( auto& module:hitsPerModule){
319  //Work out if columns are ETA (1) || PHI (0)
320  if(etaOrPhi(*module.at(0)) == true){
321  //Sort by ETA first
322  eta_phi = ETA;
323  if (module.size() > 1) {
324  if (module.at(0)->isStrip())
325  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputEta);
326  }
327  if (module.size() > 1) {
328  if (module.at(0)->isStrip())
329  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputPhi);
330  }
331  } else {
332  //Sort by PHI first
333  eta_phi = PHI;
334  if (module.size() > 1) {
335  if (module.at(0)->isStrip())
336  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputPhi);
337  }
338  if (module.size() > 1) {
339  if (module.at(0)->isStrip())
340  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputEta);
341  }
342  }
343  }
344 }
345 
347  //Loop over the module separated hits
348  for ( auto& module:hitsPerModule){
349  if (module.size() > 1) {
350  if (module.at(0)->isStrip())
351  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputEta);
352  }
353  if (module.size() > 1) {
354  if (module.at(0)->isStrip())
355  std::stable_sort(module.begin(), module.end(), FPGATrackSimCLUSTERING::sortITkInputPhi);
356  }
357  }
358 }
359 
360 
361 
362 //Need to remove the fpgatracksim::scaleHitFactor and normalise the widths
363 void FPGATrackSimClusteringTool::normaliseClusters(std::vector<FPGATrackSimCluster> &clusters) const {
364  for( auto &cluster:clusters){
365  //Grab the cluster equiv
366  FPGATrackSimHit clusterEquiv = cluster.getClusterEquiv();
367  //Update the clusterEquiv's position and width
368  if(clusterEquiv.isStrip()){
369  //Clear the groupsize, set this to be one as we are only clustering one row.
370  clusterEquiv.setEtaWidth(1);
372  clusterEquiv.setPhiWidth(clusterEquiv.getPhiWidth()+1);
373  } else {
374  // Nothing to normalise for pixel clusters
375  continue;
376  }
377  cluster.setClusterEquiv(clusterEquiv);
378  }
379 }
380 
381 
382 /*Function to work out if we need to sort by eta or phi first.
383  *Depends on the position and orientation of the module in the detector.
384  * Currently backwards engineered from the MC. Need to ask ITk people to confirm.
385  */
387 
388  /*This currently might get complicated as eta/phi ordering varies depending on the position in the detector.
389  * For ITK-20-00-00 Step 2.2 inclined duals layout, worked out by Naoki.
390  * Detector position | Module Type (# chip) | Column | Row |
391  * =============================================================================
392  * Barrel Layer 0 Eta module 1-6 | 2 (double) | eta | phi |
393  * Barrel Layer 0 Eta module 7-22 | 1 (single) | phi | eta |
394  * Barrel Layer 1 Eta module 1-6 | 3 (quad) | eta | phi |
395  * Barrel Layer 1 Eta module 7-19 | 3 | phi | eta |
396  * Barrel Layer 2 Eta module 1-11 | 3 | eta | phi |
397  * Barrel Layer 2 Eta module 12-22 | 2 | phi | eta |
398  * Barrel Layer 3 Eta module 1-12 | 3 | eta | phi |
399  * Barrel Layer 3 Eta module 13-25 | 2 | phi | eta |
400  * Barrel Layer 4 Eta module 1-13 | 3 | eta | phi |
401  * Barrel Layer 4 Eta module 14-26 | 2 | phi | eta |
402  * All Endcap modules | 3 | eta | phi |
403  * =============================================================================
404  * Module Type 1 = Single, 2, Dual, 3 Quad
405  * 328x400 blocks
406  * Hit type is essentially isPixel
407  * DetectorZone 0 = Barrel, -ive/+ive = endcaps
408  */
409 
410  //Check if the two hits are from the same module
411  //If it is not a barrel module then sort eta as column
413  return ETA;
414  }
415  //Otherwise it is a barrel module and now things get more complicated
416  else {
417  //Start by looking at what layer it is in
418  if (hit.getPhysLayer() == 0 || hit.getPhysLayer() == 1) {
419  if (hit.getEtaModule() <=6) {
420  return ETA;
421  } else {
422  return PHI;
423  }
424  } else if (hit.getPhysLayer() == 2) {
425  if (hit.getEtaModule() <=11) {
426  return ETA;
427  } else {
428  return PHI;
429  }
430  } else if (hit.getPhysLayer() == 3) {
431  if (hit.getEtaModule() <=12) {
432  return ETA;
433  } else {
434  return PHI;
435  }
436  } else if (hit.getPhysLayer() == 4) {
437  if (hit.getEtaModule() <=13) {
438  return ETA;
439  } else {
440  return PHI;
441  }
442  }
443  }
444  //Default to ETA, but shouldn't reach here
445  return ETA;
446 }
447 
448 
449 
450 void FPGATrackSimCLUSTERING::attachTruth(std::vector<FPGATrackSimHit> &hits){
451  for( auto& hit : hits) {
453  // record highest pt contribution to the combination (cluster
454  if(!hit.getTruth().isEmpty()) {
455  mt.add(hit.getTruth());
456  hit.setTruth(mt);
457  } else {
458  FPGATrackSimMultiTruth::Barcode uniquecode(hit.getEventIndex(), hit.getBarcode());
459  mt.maximize(uniquecode, hit.getBarcodePt());
460  hit.setTruth(mt);
461  }
462  }
463 } //record truth for each raw channel in the cluster
464 
465 /*
466  * This function is used in the FPGATrackSimClusteringTools to see if a new hit should be added to the current cluster under construction.
467  * It checks if the hit is in a number of positions w.r.t. the cluster being formed: up/right, down/right, above, right, or inside a cluster that has formed a horseshoe.
468  */
469 bool FPGATrackSimCLUSTERING::updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering){
470 
471  if(newCluster){
472  FPGATrackSimHit newHit = incomingHit;
473  newHit.setEtaIndex(incomingHit.getEtaIndex());
474  newHit.setPhiIndex(incomingHit.getPhiIndex());
475  newHit.setEtaCoord(incomingHit.getEtaCoord());
476  newHit.setPhiCoord(incomingHit.getPhiCoord());
477  newHit.setCentroidPhiIndex(incomingHit.getPhiIndex());
478  newHit.setCentroidEtaIndex(incomingHit.getEtaIndex());
479  newHit.setEtaWidth(1);
480  newHit.setPhiWidth(1);
481  //Set the initial clusterEquiv to be the incoming hit with double precision
482  currentCluster.setClusterEquiv(newHit);
483  //Add the current hit to the list of hits
484  currentCluster.push_backHitList(incomingHit);
485  //It doesn't really matter, as we will be at the end of the hit loop, but we did technically "cluster" this hit
486  return true;
487  } else {
488  int hitCol = incomingHit.getEtaIndex();
489  int hitRow = incomingHit.getPhiIndex();
490 
491  FPGATrackSimHit clusterEquiv = currentCluster.getClusterEquiv();
492  int clusterCol = clusterEquiv.getEtaIndex();
493  int clusterColWidth = clusterEquiv.getEtaWidth();
494  int clusterRow = clusterEquiv.getPhiIndex();
495  int clusterRowWidth = clusterEquiv.getPhiWidth();
496 
497  if ((hitCol == clusterCol + clusterColWidth) && (hitRow == clusterRow + clusterRowWidth)) {
498  clusterColWidth++;
499  clusterRowWidth++;
500 
501  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
502  } else if ((hitCol == clusterCol + clusterColWidth) && (hitRow == clusterRow - 1)) {
503  clusterColWidth++;
504  clusterRow--;
505  clusterRowWidth++;
506 
507  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
508  } else if ((hitCol >= clusterCol) && (hitCol < clusterCol + clusterColWidth) && (hitRow == clusterRow + clusterRowWidth)) {
509  clusterRowWidth++;
510 
511  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
512  } else if ((hitCol == clusterCol + clusterColWidth) && (hitRow >= clusterRow) && (hitRow < clusterRow + clusterRowWidth)) {
513  clusterColWidth++;
514 
515  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
516  } else if ((hitCol >= clusterCol) && (hitCol < clusterCol + clusterColWidth) && (hitRow == clusterRow - 1)) {
517  clusterRow--;
518  clusterRowWidth++;
519 
520  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
521  } else if ((hitCol == clusterCol - 1) && (hitRow == clusterRow - 1)) {
522  clusterCol--;
523  clusterColWidth++;
524  clusterRow--;
525  clusterRowWidth++;
526 
527  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
528  } else if ((hitCol == clusterCol - 1) && (hitRow >= clusterRow) && (hitRow < clusterRow + clusterRowWidth)) {
529  clusterCol--;
530  clusterColWidth++;
531 
532  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
533  } else if ((hitCol == clusterCol - 1) && (hitRow == clusterRow + clusterRowWidth)) {
534  clusterCol--;
535  clusterColWidth++;
536  clusterRowWidth++;
537 
538  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
539  } else if ((hitCol >= clusterCol) && (hitCol < clusterCol + clusterColWidth) && (hitRow >= clusterRow) && (hitRow < clusterRow + clusterRowWidth)) {
540  return FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
541  } else {
542  return false;
543  }
544  }
545 }
546 
547 /*
548  * This function is used in the FPGATrackSimClusteringTools to see if a new hit should be added to the current cluster under construction. It assumes double precision hits.
549  * It checks if the hit is in a number of positions w.r.t. the cluster being formed: up/right, down/right, above, right, or inside a cluster that has formed a horseshoe.
550  */
551 bool FPGATrackSimCLUSTERING::updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering){
552 
554 
555  // Shift initial widths 1->0, 2->2, 3->4, 4->6 etc...
556  //The groupSize is stored in the EtaWidth
558  // Now shift to pixel width equivalents, 0->0, 2->1, 4->2, 6->3 etc...
559  if(tempWidth > 0) tempWidth = tempWidth/fpgatracksim::scaleHitFactor;
560  if(newCluster){
561  FPGATrackSimHit newHit = incomingHit;
562  //Double the precision of the strip positions.
563  int tempCentroid = incomingHit.getPhiIndex()*fpgatracksim::scaleHitFactor;
564  // Now shift the centroid phi+phiWidth, and store the width (put it back in the PhiWidth)
565  newHit.setPhiIndex(incomingHit.getPhiIndex());
566  newHit.setCentroidPhiIndex(tempCentroid+tempWidth);
567  newHit.setPhiWidth(tempWidth);
568  //Set the initial clusterEquiv to be the incoming hit with double precision
569  currentCluster.setClusterEquiv(newHit);
570  //Add the current hit to the list of hits
571  currentCluster.push_backHitList(incomingHit);
572  //It doesn't really matter, as we will be at the end of the hit loop, but we did technically "cluster" this hit
573  return true;
574  } else {
575  //Now get the --START-- of the new strip cluster
576  int hitRow = incomingHit.getEtaIndex();
577  int hitCol = incomingHit.getPhiIndex()*fpgatracksim::scaleHitFactor;
578 
579  FPGATrackSimHit clusterEquiv = currentCluster.getClusterEquiv();
580  int clusterRow = clusterEquiv.getEtaIndex();
581  int clusterRowWidth = clusterEquiv.getEtaWidth();
582  int clusterCol = clusterEquiv.getCentroidPhiIndex();
583  int clusterColWidth = clusterEquiv.getPhiWidth();
584 
585  //Looking for a neighbour to the right. i.e. find the end of the current cluster (Col+width) and look in the next cell (+2). Compare this to the start of the new cluster. This is unlikely/impossible(?) to happen due to preclustering.
586  if(hitCol == clusterCol+clusterColWidth+fpgatracksim::scaleHitFactor && hitRow == clusterRow) {
587  //The new centroid will be the original column position, minus its width, plus the new width
588  //So subtract the original width...
589  clusterCol = clusterCol - clusterColWidth;
590  //The new width will be the combination of the current widths, ++
591  clusterColWidth = clusterColWidth+tempWidth+1;
592  //And add on the new width
593  clusterCol = clusterCol + clusterColWidth;
594  FPGATrackSimCLUSTERING::updateClusterContents(currentCluster, clusterRow, clusterRowWidth, clusterCol, clusterColWidth, incomingHit, digitalClustering);
595  return true;
596  } else return false;
597  }
598 }
599 
600 
601 bool FPGATrackSimCLUSTERING::updateClusterContents(FPGATrackSimCluster &currentCluster, int &clusterRow, int &clusterRowWidth, int &clusterCol, int &clusterColWidth, FPGATrackSimHit &incomingHit, bool digitalClustering) {
602  //Grab the cluster equiv
603  FPGATrackSimHit clusterEquiv = currentCluster.getClusterEquiv();
604  bool isConnected = false;
605 
606  //Check if connected to another hit in the cluster
607  if(incomingHit.isPixel()){
608  for (auto & hit : currentCluster.getHitList()) {
609  auto hitEta = hit.getEtaIndex();
610  auto hitPhi = hit.getPhiIndex();
611  auto inHitEta = incomingHit.getEtaIndex();
612  auto inHitPhi = incomingHit.getPhiIndex();
613 
614  if (((inHitEta == hitEta - 1) && (inHitPhi == hitPhi - 1)) ||
615  ((inHitEta == hitEta + 1) && (inHitPhi == hitPhi - 1)) ||
616  ((inHitEta == hitEta - 1) && (inHitPhi == hitPhi + 1)) ||
617  ((inHitEta == hitEta + 1) && (inHitPhi == hitPhi + 1)) ||
618  ((inHitEta == hitEta) && (inHitPhi == hitPhi - 1)) ||
619  ((inHitEta == hitEta) && (inHitPhi == hitPhi + 1)) ||
620  ((inHitEta == hitEta - 1) && (inHitPhi == hitPhi)) ||
621  ((inHitEta == hitEta + 1) && (inHitPhi == hitPhi))) {
622  isConnected = true;
623  break;
624  }
625  }
626  if (!isConnected)
627  return false;
628  }
629 
630  //Update the clusterEquiv's position and width
631  if (incomingHit.isPixel()) {
632  clusterEquiv.setEtaIndex(clusterCol);
633  clusterEquiv.setEtaWidth(clusterColWidth);
634  clusterEquiv.setPhiIndex(clusterRow);
635  clusterEquiv.setPhiWidth(clusterRowWidth);
636  } else {
637  clusterEquiv.setEtaIndex(clusterRow);
638  clusterEquiv.setEtaWidth(clusterRowWidth);
639  clusterEquiv.setCentroidPhiIndex(clusterCol);
640  clusterEquiv.setPhiWidth(clusterColWidth);
641  }
642 
643 
644  float xOld = clusterEquiv.getX();
645  float yOld = clusterEquiv.getY();
646  float zOld = clusterEquiv.getZ();
647  float xPhiOld = clusterEquiv.getPhiCoord();
648  float xEtaOld = clusterEquiv.getEtaCoord();
649  float cPhiOld = clusterEquiv.getCentroidPhiIndex();
650  float cEtaOld = clusterEquiv.getCentroidEtaIndex();
651  float xNew = incomingHit.getX();
652  float yNew = incomingHit.getY();
653  float zNew = incomingHit.getZ();
654  float xPhiNew = incomingHit.getPhiCoord();
655  float xEtaNew = incomingHit.getEtaCoord();
656  float cPhiNew = incomingHit.getPhiIndex();
657  float cEtaNew = incomingHit.getEtaIndex();
658  int tot = clusterEquiv.getToT();
659  int totNew = incomingHit.getToT();
660  //As strips arrive pre-clustered, this is different for pixels/strips
661  if(incomingHit.isPixel()){
663  if (digitalClustering) {
664  // n+1 because that is old + new now
665  int n = currentCluster.getHitList().size();
666  clusterEquiv.setX((xOld*n + xNew) / (n+1));
667  clusterEquiv.setY((yOld*n + yNew) / (n+1));
668  clusterEquiv.setZ((zOld*n + zNew) / (n+1));
669  clusterEquiv.setPhiCoord((xPhiOld*n + xPhiNew) / (n+1));
670  clusterEquiv.setEtaCoord((xEtaOld*n + xEtaNew) / (n+1));
671  clusterEquiv.setCentroidPhiIndex((cPhiOld*n + cPhiNew) / (n+1));
672  clusterEquiv.setCentroidEtaIndex((cEtaOld*n + cEtaNew) / (n+1));
673  } else {
674  clusterEquiv.setX((xOld*tot + xNew*totNew) / (tot+totNew));
675  clusterEquiv.setY((yOld*tot + yNew*totNew) / (tot+totNew));
676  clusterEquiv.setZ((zOld*tot + zNew*totNew) / (tot+totNew));
677  clusterEquiv.setPhiCoord((xPhiOld*tot + xPhiNew*totNew) / (tot+totNew));
678  clusterEquiv.setEtaCoord((xEtaOld*tot + xEtaNew*totNew) / (tot+totNew));
679  clusterEquiv.setCentroidPhiIndex((cPhiOld*tot + cPhiNew*totNew) / (tot+totNew));
680  clusterEquiv.setCentroidEtaIndex((cEtaOld*tot + cEtaNew*totNew) / (tot+totNew));
681  }
682  } else {
683  //Phi width + 1 for the seed is the width of the current cluster
684  int N = currentCluster.getClusterEquiv().getPhiWidth()+1;
685  //Phi width of an incoming strip is the width of the cluster
686  int newN = incomingHit.getPhiWidth();
687  //Now as above, N+newN
688  clusterEquiv.setPhiCoord((xPhiOld*N + xPhiNew*newN) / (N+newN));
689  clusterEquiv.setX((xOld*N + xNew*newN) / (N+newN));
690  clusterEquiv.setY((yOld*N + yNew*newN) / (N+newN));
691  clusterEquiv.setZ((zOld*N + zNew*newN) / (N+newN));
692  }
693  clusterEquiv.setToT(tot + totNew);
694 
695  //Put it back
696  currentCluster.setClusterEquiv(clusterEquiv);
697 
698  //Pushback the hit into the hitlist
699  currentCluster.push_backHitList(incomingHit);
700 
701  return true;
702 }
703 
704 /* Sort for the ordering of ITk modules: Sort by ETA.
705 */
706 bool FPGATrackSimCLUSTERING::sortITkInputEta(const std::unique_ptr<FPGATrackSimHit>& hitA, const std::unique_ptr<FPGATrackSimHit>& hitB)
707 {
708  if (hitA->getIdentifierHash() != hitB->getIdentifierHash())
709  return hitA->getIdentifierHash() < hitB->getIdentifierHash();
710  return hitA->getEtaIndex() < hitB->getEtaIndex();
711 }
712 
713 /* Sort for the ordering of ITk modules: Sort by PHI.
714 */
715 bool FPGATrackSimCLUSTERING::sortITkInputPhi(const std::unique_ptr<FPGATrackSimHit>& hitA, const std::unique_ptr<FPGATrackSimHit>& hitB)
716 {
717  if (hitA->getIdentifierHash() != hitB->getIdentifierHash())
718  return hitA->getIdentifierHash() < hitB->getIdentifierHash();
719  return hitA->getPhiIndex() < hitB->getPhiIndex();
720 }
721 
722 /* Cap precision of the global coordinates in r, phi, z */
724  FPGATrackSimHit clusterEquiv = cluster.getClusterEquiv();
725  float pos[3] = { clusterEquiv.getR(), clusterEquiv.getGPhi(), clusterEquiv.getZ() };
726 
727  pos[0] = std::trunc(pos[0] / m_coordRPrecision) * m_coordRPrecision;
728  pos[1] = std::trunc(pos[1] / m_coordPhiPrecision) * m_coordPhiPrecision;
729  pos[2] = std::trunc(pos[2] / m_coordZPrecision) * m_coordZPrecision;
730 
731  clusterEquiv.setX(pos[0] * std::cos(pos[1]));
732  clusterEquiv.setY(pos[0] * std::sin(pos[1]));
733  clusterEquiv.setZ(pos[2]);
734 
735  cluster.setClusterEquiv(clusterEquiv);
736 }
737 
739  float pos[3] = { hit.getR(), hit.getGPhi(), hit.getZ() };
740 
741  pos[0] = std::trunc(pos[0] / m_coordRPrecision) * m_coordRPrecision;
742  pos[1] = std::trunc(pos[1] / m_coordPhiPrecision) * m_coordPhiPrecision;
743  pos[2] = std::trunc(pos[2] / m_coordZPrecision) * m_coordZPrecision;
744 
745  hit.setX(pos[0] * std::cos(pos[1]));
746  hit.setY(pos[0] * std::sin(pos[1]));
747  hit.setZ(pos[2]);
748 }
FPGATrackSimClusteringTool::SetMinMaxIndicies
void SetMinMaxIndicies(FPGATrackSimCluster &cluster) const
Definition: FPGATrackSimClusteringTool.cxx:100
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
FPGATrackSimCLUSTERING::updateStripCluster
bool updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
Definition: FPGATrackSimClusteringTool.cxx:551
FPGATrackSimTowerInputHeader::clearHits
void clearHits()
Definition: FPGATrackSimTowerInputHeader.h:49
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
FPGATrackSimClusteringTool::Clustering
void Clustering(HitPtrCollection &&, std::vector< FPGATrackSimCluster > &) const
Definition: FPGATrackSimClusteringTool.cxx:133
getMenu.algname
algname
Definition: getMenu.py:54
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
FPGATrackSimCluster::getHitList
hitVector const & getHitList() const
Definition: FPGATrackSimCluster.h:30
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
SiliconTech::strip
@ strip
FPGATrackSimHit::getEtaModule
int getEtaModule(bool old=false) const
Definition: FPGATrackSimHit.h:87
FPGATrackSimHit::isStrip
bool isStrip() const
Definition: FPGATrackSimHit.h:65
header
Definition: hcg.cxx:526
FPGATrackSimHit::getToT
unsigned getToT() const
Definition: FPGATrackSimHit.h:164
FPGATrackSimClusteringTool::m_lorentzAngleTool
ToolHandle< FPGATrackSim::LorentzAngleTool > m_lorentzAngleTool
Definition: FPGATrackSimClusteringTool.h:52
FPGATrackSimCLUSTERING::attachTruth
void attachTruth(std::vector< FPGATrackSimHit > &)
Definition: FPGATrackSimClusteringTool.cxx:450
AthMsgStreamMacros.h
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimHit::setMinEtaIndex
void setMinEtaIndex(int v)
Definition: FPGATrackSimHit.h:117
FPGATrackSimHit::setEtaIndex
void setEtaIndex(unsigned v)
Definition: FPGATrackSimHit.h:102
FPGATrackSimCLUSTERING::updatePixelCluster
bool updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster, bool digitalClustering)
Definition: FPGATrackSimClusteringTool.cxx:469
FPGATrackSimHit::setPhiCoord
void setPhiCoord(float v)
Definition: FPGATrackSimHit.h:105
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
FPGATrackSimHit::setCentroidPhiIndex
void setCentroidPhiIndex(float v)
Definition: FPGATrackSimHit.h:103
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:149
FPGATrackSimClusteringTool::sortHitsOnModules
void sortHitsOnModules(HitPtrContainer &hitsPerModule, int &eta_phi) const
Definition: FPGATrackSimClusteringTool.cxx:316
FPGATrackSimHit::setMaxEtaIndex
void setMaxEtaIndex(int v)
Definition: FPGATrackSimHit.h:116
FPGATrackSimClusteringTool::HitPtrCollection
std::vector< std::unique_ptr< FPGATrackSimHit > > HitPtrCollection
Definition: FPGATrackSimClusteringTool.h:54
skel.it
it
Definition: skel.GENtoEVGEN.py:407
FPGATrackSimCLUSTERING::updateClusterContents
bool updateClusterContents(FPGATrackSimCluster &currentCluster, int &clusterRow, int &clusterRowWidth, int &clusterCol, int &clusterColWidth, FPGATrackSimHit &incomingHit, bool digitalClustering)
Definition: FPGATrackSimClusteringTool.cxx:601
FPGATrackSimHit::setEtaWidth
void setEtaWidth(unsigned v)
Definition: FPGATrackSimHit.h:78
FPGATrackSimMultiTruth.h
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
FPGATrackSimClusteringTool::m_coordPhiPrecision
Gaudi::Property< float > m_coordPhiPrecision
Definition: FPGATrackSimClusteringTool.h:48
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
RoiUtil::PHI
@ PHI
Definition: RoiSerialise.cxx:31
FPGATrackSimHit::setY
void setY(float v)
Definition: FPGATrackSimHit.h:147
FPGATrackSimCluster::setClusterEquiv
void setClusterEquiv(const FPGATrackSimHit &input)
Definition: FPGATrackSimCluster.h:35
FPGATrackSimCLUSTERING::sortITkInputPhi
bool sortITkInputPhi(const std::unique_ptr< FPGATrackSimHit > &hitA, const std::unique_ptr< FPGATrackSimHit > &HitB)
Definition: FPGATrackSimClusteringTool.cxx:715
FPGATrackSimClusteringTool::splitAndSortHits
void splitAndSortHits(HitPtrCollection &&hits, HitPtrContainer &hitsPerModule, int &eta_phi) const
Definition: FPGATrackSimClusteringTool.cxx:281
FPGATrackSimConstants.h
FPGATrackSimTowerInputHeader::addHit
void addHit(const FPGATrackSimHit &s)
Definition: FPGATrackSimTowerInputHeader.h:48
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimHit::getGPhi
float getGPhi() const
Definition: FPGATrackSimHit.h:153
FPGATrackSimHit::setMaxPhiIndex
void setMaxPhiIndex(int v)
Definition: FPGATrackSimHit.h:114
FPGATrackSimClusteringTool::etaOrPhi
bool etaOrPhi(const FPGATrackSimHit &hit) const
Definition: FPGATrackSimClusteringTool.cxx:386
FPGATrackSimHit::getPhiCoord
float getPhiCoord() const
Definition: FPGATrackSimHit.h:111
python.PyAthena.module
module
Definition: PyAthena.py:131
FPGATrackSimHit::setMinPhiIndex
void setMinPhiIndex(int v)
Definition: FPGATrackSimHit.h:115
FPGATrackSimHit::setX
void setX(float v)
Definition: FPGATrackSimHit.h:146
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
FPGATrackSimHit::setToT
void setToT(unsigned v)
Definition: FPGATrackSimHit.h:157
FPGATrackSimClusteringTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimClusteringTool.cxx:25
FPGATrackSimHit::setPhiIndex
void setPhiIndex(unsigned v)
Definition: FPGATrackSimHit.h:101
FPGATrackSimClusteringTool::HitPtrContainer
std::vector< HitPtrCollection > HitPtrContainer
Definition: FPGATrackSimClusteringTool.h:55
FPGATrackSimHit::getPhiIndex
unsigned getPhiIndex() const
Definition: FPGATrackSimHit.h:107
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:729
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimMultiTruth::add
void add(const FPGATrackSimMultiTruth::Barcode &code, const FPGATrackSimMultiTruth::Weight &weight)
Definition: FPGATrackSimMultiTruth.cxx:22
FPGATrackSimHit::setEtaCoord
void setEtaCoord(float v)
Definition: FPGATrackSimHit.h:106
FPGATrackSimMultiTruth::Barcode
std::pair< unsigned long, unsigned long > Barcode
Definition: FPGATrackSimMultiTruth.h:49
FPGATrackSimClusteringTool::normaliseClusters
void normaliseClusters(std::vector< FPGATrackSimCluster > &clusters) const
Definition: FPGATrackSimClusteringTool.cxx:363
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:150
FPGATrackSimHit::getEtaIndex
unsigned getEtaIndex() const
Definition: FPGATrackSimHit.h:108
FPGATrackSimHit::getIdentifierHash
unsigned getIdentifierHash() const
Definition: FPGATrackSimHit.h:81
FPGATrackSimHit::isPixel
bool isPixel() const
Definition: FPGATrackSimHit.h:64
FPGATrackSimClusteringTool::m_coordZPrecision
Gaudi::Property< float > m_coordZPrecision
Definition: FPGATrackSimClusteringTool.h:49
FPGATrackSimClusteringTool::FPGATrackSimClusteringTool
FPGATrackSimClusteringTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimClusteringTool.cxx:20
FPGATrackSimHit::setCluster1ID
void setCluster1ID(int v)
Definition: FPGATrackSimHit.h:191
FPGATrackSimCLUSTERING::sortITkInputEta
bool sortITkInputEta(const std::unique_ptr< FPGATrackSimHit > &hitA, const std::unique_ptr< FPGATrackSimHit > &hitB)
Definition: FPGATrackSimClusteringTool.cxx:706
FPGATrackSimHit::getZ
float getZ() const
Definition: FPGATrackSimHit.h:151
FPGATrackSimHit::getDetectorZone
DetectorZone getDetectorZone() const
Definition: FPGATrackSimHit.h:59
trapping_fp.h
Tell the compiler to optimize assuming that FP may trap.
FPGATrackSimMultiTruth::maximize
void maximize(const FPGATrackSimMultiTruth::Barcode &code, const FPGATrackSimMultiTruth::Weight &weight)
Definition: FPGATrackSimMultiTruth.cxx:36
FPGATrackSimClusteringTool::SortedClustering
void SortedClustering(HitPtrContainer &&sorted_hits, std::vector< FPGATrackSimCluster > &) const
Definition: FPGATrackSimClusteringTool.cxx:119
FPGATrackSimMultiTruth
Definition: FPGATrackSimMultiTruth.h:46
FPGATrackSimCluster::getClusterEquiv
FPGATrackSimHit const & getClusterEquiv() const
Definition: FPGATrackSimCluster.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
FPGATrackSimHit::getCentroidPhiIndex
float getCentroidPhiIndex() const
Definition: FPGATrackSimHit.h:109
HitType::clustered
@ clustered
FPGATrackSimClusteringTool::m_reduceCoordPrecision
Gaudi::Property< bool > m_reduceCoordPrecision
Definition: FPGATrackSimClusteringTool.h:46
FPGATrackSimHit::setPhiWidth
void setPhiWidth(unsigned v)
Definition: FPGATrackSimHit.h:79
RoiUtil::ETA
@ ETA
Definition: RoiSerialise.cxx:30
FPGATrackSimHit::getEtaCoord
float getEtaCoord() const
Definition: FPGATrackSimHit.h:112
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
FPGATrackSimHit::setZ
void setZ(float v)
Definition: FPGATrackSimHit.h:148
FPGATrackSimClusteringTool::m_digitalClustering
Gaudi::Property< bool > m_digitalClustering
Definition: FPGATrackSimClusteringTool.h:45
FPGATrackSimHit::getCentroidEtaIndex
float getCentroidEtaIndex() const
Definition: FPGATrackSimHit.h:110
fpgatracksim::scaleHitFactor
constexpr float scaleHitFactor
Definition: FPGATrackSimConstants.h:18
FPGATrackSimHit::getR
float getR() const
Definition: FPGATrackSimHit.h:152
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimTowerInputHeader::reserveHits
void reserveHits(size_t size)
Definition: FPGATrackSimTowerInputHeader.h:50
FPGATrackSimClusteringTool.h
FPGATrackSimHit::getDetType
SiliconTech getDetType() const
Definition: FPGATrackSimHit.h:58
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
DetectorZone::barrel
@ barrel
FPGATrackSimHit::getEtaWidth
unsigned getEtaWidth() const
Definition: FPGATrackSimHit.h:85
FPGATrackSimClusteringTool::DoClustering
virtual StatusCode DoClustering(FPGATrackSimLogicalEventInputHeader &, std::vector< FPGATrackSimCluster > &) const override
Definition: FPGATrackSimClusteringTool.cxx:31
FPGATrackSimTowerInputHeader::hits
const std::vector< FPGATrackSimHit > & hits() const
Definition: FPGATrackSimTowerInputHeader.h:46
FPGATrackSimClusteringTool::splitHitsToModules
void splitHitsToModules(HitPtrCollection &&hits, HitPtrContainer &hitsPerModule) const
Definition: FPGATrackSimClusteringTool.cxx:294
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer(bool old=false) const
Definition: FPGATrackSimHit.cxx:72
FPGATrackSimClusteringTool::reduceGlobalCoordPrecision
void reduceGlobalCoordPrecision(FPGATrackSimCluster &cluster) const
Definition: FPGATrackSimClusteringTool.cxx:723
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
FPGATrackSimHit::setCentroidEtaIndex
void setCentroidEtaIndex(float v)
Definition: FPGATrackSimHit.h:104
FPGATrackSimHit::setParentageMask
void setParentageMask(unsigned long v)
Definition: FPGATrackSimHit.h:162
FPGATrackSimTowerInputHeader
Definition: FPGATrackSimTowerInputHeader.h:18
FPGATrackSimHit::getPhiWidth
unsigned getPhiWidth() const
Definition: FPGATrackSimHit.h:86
FPGATrackSimCluster::push_backHitList
void push_backHitList(const FPGATrackSimHit &input)
Definition: FPGATrackSimCluster.h:38
SiliconTech::pixel
@ pixel
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:54
FPGATrackSimClusteringTool::m_LorentzAngleShift
Gaudi::Property< int > m_LorentzAngleShift
Definition: FPGATrackSimClusteringTool.h:50
FPGATrackSimClusteringTool::m_coordRPrecision
Gaudi::Property< float > m_coordRPrecision
Definition: FPGATrackSimClusteringTool.h:47