Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FPGATrackSimMatrixGenAlgo.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/ITHistSvc.h"
19 
20 #include "TH1.h"
21 #include "TH2.h"
22 #include "TStyle.h"
23 
24 #include <cassert>
25 #include <sstream>
26 #include <iostream>
27 #include <fstream>
28 #include <cmath>
29 #include <utility>
30 
31 
33 // Constructors
35 
36 FPGATrackSimMatrixGenAlgo::FPGATrackSimMatrixGenAlgo(const std::string& name, ISvcLocator* pSvcLocator) :
37  AthAlgorithm(name, pSvcLocator)
38 {
39 }
40 
41 
42 
44 // Initialize
46 
48 {
49  ATH_MSG_DEBUG("initialize()");
50 
51  // set the slicing variables from inputs
57 
63 
69 
70  // Retrieve handles
71  ATH_CHECK(m_tHistSvc.retrieve());
72  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
73  ATH_CHECK(m_hitInputTool.retrieve());
74  ATH_CHECK(m_hitMapTool.retrieve());
75  ATH_CHECK(m_EvtSel.retrieve());
76  ATH_CHECK(m_roadFinderTool.retrieve());
77  if (m_doClustering) ATH_CHECK(m_clusteringTool.retrieve());
79  ATH_CHECK(m_trackExtensionTool.retrieve(EnableTool{m_doHoughConstants && m_doSecondStage}));
80  ATH_CHECK(m_trackFitterTool_1st.retrieve(EnableTool{m_doHoughConstants && m_doSecondStage}));
81  ATH_CHECK(m_overlapRemovalTool.retrieve(EnableTool{m_doHoughConstants && m_doSecondStage}));
82 
83 
84 
85  if (m_doHoughConstants) {
86  if (m_ideal_geom == 0) {
87  ATH_MSG_INFO("Hough constants method needs idealized geometry > 0, aborting.");
88  return StatusCode::FAILURE;
89  }
90  m_nRegions = m_FPGATrackSimMapping->RegionMap_1st()->getNRegions();
91  m_pmap_2nd = m_FPGATrackSimMapping->PlaneMap_2nd(0);
92  m_pmap_1st = m_FPGATrackSimMapping->PlaneMap_1st(0);
93  // Get detector configurations
94  m_nLayers_1st = m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers();
95  m_nDim_1st = m_FPGATrackSimMapping->PlaneMap_1st(0)->getNCoords();
96  m_nLayers_2nd = m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers();
97  m_nDim_2nd = m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNCoords();
98  }
99  else {
100  // Get detector configurations
101  m_nLayers_1st = m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers();
102  m_nRegions = m_FPGATrackSimMapping->RegionMap_2nd()->getNRegions();
103  m_nDim_1st = m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNCoords();
104  }
105 
106  m_sector_cum.resize(m_nRegions);
107 
108  // Retrieve slice information
109  m_sliceMin = m_EvtSel->getMin();
110  m_sliceMax = m_EvtSel->getMax();
111 
112  // Check q/pt binning information
113  if (m_qOverPtBins.size() == 0) {
114  ATH_MSG_ERROR("q/pt bin information not set in matrix element job options!");
115  return StatusCode::FAILURE;
116  }
117 
118 
119  // Histograms
121 
123 
124  return StatusCode::SUCCESS;
125 }
126 
127 
129 {
130  // Training tracks
131  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
132  std::string name = "h_trainingTrack_" + FPGATrackSimTrackPars::parName(i);
133  std::string title = FPGATrackSimTrackPars::parName(i) + " of tracks passing pt/barcode check";
134 
135  m_h_trainingTrack[i] = new TH1I(name.c_str(), title.c_str(), 100, m_sliceMin[i], m_sliceMax[i]);
136  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/" + name, m_h_trainingTrack[i]));
137  }
138 
139  // Sector pars
140  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
141 
142  std::string name = "h_sectorPars_" + FPGATrackSimTrackPars::parName(i);
143  std::string title = "Average " + FPGATrackSimTrackPars::parName(i) + " in sector";
144 
145  m_h_sectorPars[i] = new TH1I(name.c_str(), title.c_str(), 100, m_sliceMin[i], m_sliceMax[i]);
146  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/" + name, m_h_sectorPars[i]));
147  }
148 
149  // Select hit failure
150  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
151 
152  std::string name = "h_SHfailure_" + FPGATrackSimTrackPars::parName(i);
153  std::string title = FPGATrackSimTrackPars::parName(i) + " of tracks failing in selectHit()";
154 
155  m_h_SHfailure[i] = new TH1I(name.c_str(), title.c_str(), 100, m_sliceMin[i], m_sliceMax[i]);
156  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/" + name, m_h_SHfailure[i]));
157  }
158 
159  // 3 hits in layer
160  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
161 
162  std::string name = "h_3hitsInLayer_" + FPGATrackSimTrackPars::parName(i);
163  std::string title = FPGATrackSimTrackPars::parName(i) + " of tracks containing 3+ hits in a single layer";
164 
165  m_h_3hitsInLayer[i] = new TH1I(name.c_str(), title.c_str(), 100, m_sliceMin[i], m_sliceMax[i]);
166  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/" + name, m_h_3hitsInLayer[i]));
167  }
168 
169  // Not enough hits
170  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
171  std::string name = "h_notEnoughHits_" + FPGATrackSimTrackPars::parName(i);
172  std::string title = FPGATrackSimTrackPars::parName(i) + " of tracks failing because it didn't have enough hits";
173 
174  m_h_notEnoughHits[i] = new TH1I(name.c_str(), title.c_str(), 100, m_sliceMin[i], m_sliceMax[i]);
175  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/" + name, m_h_notEnoughHits[i]));
176  }
177 
178  m_h_trackQoP_okHits = new TH1I("h_trackQoP_okHits", "half inverse pt of tracks passing hit check",
180  m_h_trackQoP_okRegion = new TH1I("h_trackQoP_okRegion", "half inverse pt of tracks passing region check",
182  m_h_nHit = new TH1I("h_nHit", "number of hits in sector", 100, 0, 100);
183 
184  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/h_trackQoP_okHits", m_h_trackQoP_okHits));
185  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/h_trackQoP_okRegion", m_h_trackQoP_okRegion));
186  ATH_CHECK(m_tHistSvc->regHist("/TRIGFPGATrackSimMATRIXOUT/h_nHit",m_h_nHit));
187 
188  return StatusCode::SUCCESS;
189 }
190 
192 {
193  FPGATrackSimTrackPars pars = track.getPars();
194  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++)
195  hists[i]->Fill(pars[i]);
196 }
197 
199 // Execute
201 
202 
204 {
205  ATH_MSG_DEBUG("execute()");
207  m_eventHeader->reset();
208  // Get hits and training tracks from this event
209  ATH_CHECK(m_hitInputTool->readData(m_eventHeader, Gaudi::Hive::currentContext()));
210 
211  std::vector<FPGATrackSimHit> hits = getLogicalHits();
212 
213  std::vector<FPGATrackSimTruthTrack> truth_tracks = m_eventHeader->optional().getTruthTracks();
214  std::vector<FPGATrackSimTruthTrack> tracks = filterTrainingTracks(truth_tracks);
215  m_nTracks += truth_tracks.size();
216  if (tracks.empty()) {
217  ATH_MSG_DEBUG("Empty training tracks");
218  return StatusCode::SUCCESS;
219  }
220  // Prepare a map of the hits according the barcode
221  std::map<int, std::vector<FPGATrackSimHit>> barcode_hits = makeBarcodeMap(hits, tracks);
222  // For each training track, find the sector it belongs to and accumulate the
223  // hit coordinates and track parameters.
224  for (FPGATrackSimTruthTrack const & track : tracks) {
225 
226  int nSlices = m_FPGATrackSimMapping->SubRegionMap()->getNRegions();
227 
228  // Get list of hits associated to the current truth track
229  std::vector<FPGATrackSimHit> & sector_hits = barcode_hits[track.getBarcode()];
230 
231  const FPGATrackSimPlaneMap *t_pmap = nullptr;
232 
233  // Get the hits that will form the actual sector
234 
235  for (int iSlice = 0; iSlice<nSlices; iSlice++){
236  t_pmap = m_FPGATrackSimMapping->PlaneMap_2nd(iSlice);
237 
238  for (auto & iHit : sector_hits) {
239  t_pmap->map(iHit);
240  }
241 
242  /* For now, don't do this. If we need regionalized/binned fit constants it needs to come from the road.
243  std::vector<FPGATrackSimHit> sector_hits;
244  bool success = filterSectorHits(track_hits, sector_hits, track, true, iSlice);
245  if (!success) continue; // Skip this track if it has bad hits (not complete, etc.)
246  */
247 
248  m_h_trackQoP_okHits->Fill(track.getQOverPt());
249  bool success;
250 
251  // Get the region of this sector
252  // TODO: do we need this the pattern recognition should deal with it.
253  int region = 0; //sgetRegion(sector_hits, false);
254  //if (region < 0 || region >= m_nRegions) continue;
255  m_h_trackQoP_okRegion->Fill(track.getQOverPt());
256 
257  //For the Hough constants, find the Hough roads
258  std::vector<std::shared_ptr<const FPGATrackSimRoad>> houghRoads;
259  if (m_doHoughConstants){
260 
261  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
262 
263  ATH_MSG_DEBUG("Starting from some number of sector hits = " << sector_hits.size());
264  for (const FPGATrackSimHit& hit : sector_hits) if (hit.isMapped() && hit.isReal()) phits.emplace_back(std::make_shared<const FPGATrackSimHit>(hit));
265  ATH_MSG_DEBUG("Passing nhits = " << phits.size() << " to road finder");
266  StatusCode sc = m_roadFinderTool->getRoads(phits, houghRoads, truth_tracks);
267  if (sc.isFailure()) ATH_MSG_WARNING("Hough Transform -> getRoads() failed");
268 
269  ATH_MSG_DEBUG("We found " << houghRoads.size() << " roads");
270 
271  // We now want to just form the accumulator for any valid combination of hits
272  // In first stage mode we'll make the track fitter just generate combinations
273  std::vector<FPGATrackSimTrack> tracks_1st;
274  if (m_doSecondStage) {
275  ATH_CHECK(m_trackFitterTool_1st->getTracks(houghRoads, tracks_1st));
276  ATH_CHECK(m_overlapRemovalTool->runOverlapRemoval(tracks_1st));
277  } else {
278  roadsToTrack(houghRoads, tracks_1st);
279  ATH_MSG_DEBUG("We found " << tracks_1st.size() << " combinations");
280  }
281  for (const auto& track_comb : tracks_1st) {
282  std::vector<FPGATrackSimHit> track_hits = track_comb.getFPGATrackSimHits();
283 
284  if (m_doSecondStage) { // if doing 2nd stage, we want to get tracks from the road and then do tracking and overlap removal
285 
286  // Prepare the accumulator struct
287  std::vector<module_t> modules(m_nLayers_2nd);
289  std::vector<FPGATrackSimHit> hits_2nd;
290  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits_2nd;
291 
292  // This will need updating once we have the second stage working again.
293  success = filterSectorHits(track_hits, hits_2nd, track, false, iSlice); // only look at 2nd stage hits!
294 
295 
296  if (!success) continue; // Skip this track if it has bad hits (not complete, etc.)
297  // awkward fixme
298  for (const auto& hit : hits_2nd) {
299  phits_2nd.push_back(std::make_shared<const FPGATrackSimHit>(hit));
300  }
301 
302  // Use the track extension tool to actually produce a new set of roads.
303  std::vector<std::shared_ptr<const FPGATrackSimRoad>> roads_2nd;
304  std::vector<std::shared_ptr<const FPGATrackSimTrack>> ptracks_1st;
305  ptracks_1st.reserve(tracks_1st.size());
306  for (const auto& track : tracks_1st) {
307  ptracks_1st.push_back(std::make_shared<const FPGATrackSimTrack>(track));
308  }
309  ATH_CHECK(m_trackExtensionTool->extendTracks(phits_2nd, ptracks_1st, roads_2nd));
310  for (auto road_2nd : roads_2nd) {
311  std::vector<module_t> modules(m_nLayers_2nd);
313  acc.pars.qOverPt = road_2nd->getY();
314  acc.pars.phi = road_2nd->getX();
315 
316  std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> modules_acc = {modules, acc};
317  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
318  ATH_CHECK(makeAccumulator(hits_2nd, track, modules_acc));
319 
320  // Add the track to the accumulate map
321  accumulate(m_sector_cum[region], modules_acc.first, modules_acc.second);
322 
323  if (m_dropHitsAndFill)
324  ATH_CHECK(fillAccumulatorByDropping(hits_2nd, false, acc.pars.phi, acc.pars.qOverPt, modules, m_sector_cum[region], track, iSlice));
325 
326  m_nTracksUsed++;
327  }
328  }
329  else {
330  // For each track combination (from a Hough road)
331  double y = track_comb.getHoughY();
332  double x = track_comb.getHoughX();
333  // Prepare the accumulator struct
334  std::vector<module_t> modules(m_nLayers_1st);
336  acc.pars.qOverPt = y;
337  acc.pars.phi = x;
338  std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> modules_acc = {modules, acc};
339  ATH_CHECK(makeAccumulator(track_hits, track, modules_acc));
340 
341  // Add the track to the accumulate map
342  accumulate(m_sector_cum[region], modules_acc.first, modules_acc.second);
343 
344  if (m_dropHitsAndFill)
345  ATH_CHECK(fillAccumulatorByDropping(track_hits, true, acc.pars.phi, acc.pars.qOverPt, modules, m_sector_cum[region], track, iSlice));
346 
347  m_nTracksUsed++;
348  }
349  }
350  }
351  else{
352  // Prepare the accumulator struct
353  std::vector<module_t> modules(m_nLayers_1st);
355  std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> modules_acc = {modules, acc};
356  ATH_CHECK(makeAccumulator(sector_hits, track, modules_acc));
357 
358  // Add the track to the accumulate map
359  accumulate(m_sector_cum[region], modules_acc.first, modules_acc.second);
360 
361  if (m_dropHitsAndFill)
362  ATH_CHECK(fillAccumulatorByDropping(sector_hits, true, acc.pars.phi, acc.pars.qOverPt, modules, m_sector_cum[region], track, iSlice));
363 
364  m_nTracksUsed++;
365  }
366  }
367  }
368 
369  return StatusCode::SUCCESS;
370 }
371 
372 // Adapted from TrackFitter, but TrackFitter *depends* on fit constants and this algorithm
373 void FPGATrackSimMatrixGenAlgo::roadsToTrack(std::vector<std::shared_ptr<const FPGATrackSimRoad>>& houghRoads, std::vector<FPGATrackSimTrack>& track_cands)
374 {
375  for (const std::shared_ptr<const FPGATrackSimRoad>& road : houghRoads) {
376 
377  FPGATrackSimTrack temp;
378  temp.setNLayers(m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers());
379  temp.setBankID(-1);
380  temp.setPatternID(road->getPID());
381  temp.setHoughX(road->getX());
382  temp.setHoughY(road->getY());
383  temp.setQOverPt(road->getY());
384 
385  temp.setSubRegion(road->getSubRegion());
386  temp.setHoughXBin(road->getXBin());
387  temp.setHoughYBin(road->getYBin());
388 
389  // This comes from FPGATrackSimFunctions
390  std::vector<std::vector<int>> combs = getComboIndices(road->getNHits_layer());
391  unsigned existing_size = track_cands.size();
392  track_cands.resize(existing_size + combs.size(), temp);
393 
394  //get the WC hits:
395  layer_bitmask_t wcbits= road->getWCLayers();
396  // Add the hits from each combination to the track, and set ID
397  for (size_t icomb = 0; icomb < combs.size(); icomb++)
398  {
399  track_cands[existing_size + icomb].setNLayers(m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers());
400  std::vector<int> const & hit_indices = combs[icomb]; // size nLayers
401  for (unsigned layer = 0; layer < m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers(); layer++)
402  {
403  if (hit_indices[layer] < 0) // Set a dummy hit if road has no hits in this layer
404  {
406  newhit.setLayer(layer);
407  newhit.setSection(0);
408  if (m_FPGATrackSimMapping->PlaneMap_1st(0)->getDim(layer) == 2) newhit.setDetType(SiliconTech::pixel);
409  else newhit.setDetType(SiliconTech::strip);
410 
411  if (wcbits & (1 << layer ) ) {
413  newhit.setLayer(layer);
414  }
415 
416  track_cands[existing_size + icomb].setFPGATrackSimHit(layer, newhit);
417  }
418  else
419  {
420  const std::shared_ptr<const FPGATrackSimHit> hit = road->getHits(layer)[hit_indices[layer]];
421  // If this is an outer spacepoint, and it is not the same as the inner spacepoint, reject it.
422  // Here we "reject" it by marking the candidate as "invalid", to be rejected later.
423  // That require another field on the track object, but it avoids having to change the sizes
424  // of arrays computed above.
425  if (hit->getHitType() == HitType::spacepoint && (hit->getPhysLayer() % 2) == 1 && (layer>0)) {
426  const FPGATrackSimHit inner_hit = track_cands[existing_size + icomb].getFPGATrackSimHits().at(layer - 1);
427  if ((hit->getX() != inner_hit.getX()) || (hit->getY() != inner_hit.getY()) || (hit->getZ() != inner_hit.getZ())) {
428  track_cands[existing_size + icomb].setValidCand(false);
429  }
430  }
431  track_cands[existing_size + icomb].setFPGATrackSimHit(layer, *hit);
432  }
433  }
434  }
435  }
436 }
437 
438 // Converts raw hits from header into logical hits, and filters those in FPGATrackSim layers
439 // Could replace this with the RawToLogical tool (but probably won't)
440 std::vector<FPGATrackSimHit> FPGATrackSimMatrixGenAlgo::getLogicalHits()
441 {
442  std::vector<FPGATrackSimHit> hits;
443  //Setup the logical header...
445  //Map the hits to the logical header...
446  unsigned stage = 0;
447  if (m_doHoughConstants) stage = 1; // For now Hough constants only works on 1st stage
448  else stage = 2;
449  StatusCode sc = m_hitMapTool->convert(stage, *m_eventHeader, logicalHeader);
450  if (sc.isFailure()) ATH_MSG_ERROR("Hit mapping failed");
451 
452  // Since the clustering tool modifies the logical towers-- refactored this
453  // to only access the output hits from the towers.
454  if (m_doClustering) {
455  std::vector<FPGATrackSimCluster> clustered_hits;
456  sc = m_clusteringTool->DoClustering(logicalHeader, clustered_hits);
457  if (sc.isFailure()) ATH_MSG_ERROR("Clustering failed");
458  }
459  // Optionally do spacepoints (as well).
460  if (m_doSpacePoints) {
461  std::vector<FPGATrackSimCluster> spacepoints;
462  sc = m_spacePointsTool->DoSpacePoints(logicalHeader, spacepoints);
463  if (sc.isFailure()) ATH_MSG_ERROR("Spacepoints failed");
464  }
465 
466  // It should now be safe to pull the towers, regardless.
467  std::vector<FPGATrackSimTowerInputHeader> towers = logicalHeader.towers();
468  for (auto &tower : towers) {
469  std::vector<FPGATrackSimHit> const & towerHits = tower.hits();
470  for (FPGATrackSimHit const & hit : towerHits) {
471  hits.push_back(hit);
472  }
473  }
474  return hits;
475 }
476 
477 
478 // Filters tracks based on m_PT_THRESHOLD and m_TRAING_PDG and D0_THRESHOLD
479 std::vector<FPGATrackSimTruthTrack> FPGATrackSimMatrixGenAlgo::filterTrainingTracks(std::vector<FPGATrackSimTruthTrack> const & truth_tracks) const
480 {
481  std::vector<FPGATrackSimTruthTrack> training_tracks;
482 
483  for (FPGATrackSimTruthTrack const & track : truth_tracks) {
484  if (HepMC::generations(&track) >= 1 || std::abs(track.getPDGCode()) != m_TRAIN_PDG) continue;
485  if (std::abs(track.getD0()) > m_D0_THRESHOLD) continue;
486 
487  // Actually use the event selection service here to kill anything outside the region.
488  if (!(m_EvtSel->passMatching(track))) continue;
489 
490  double pt = TMath::Sqrt(track.getPX()*track.getPX() + track.getPY()*track.getPY());
491  double pt_GeV = pt / 1000;
492 
493  // Add the track to the list of good tracks
494  if (pt_GeV > m_PT_THRESHOLD) training_tracks.push_back(track);
495 
496  // Debug
497  if (msgLvl(MSG::DEBUG)) {
498  double c = track.getQ() /(2 * pt);
499  double eta = TMath::ASinH(track.getPZ() / pt);
500  double phi = TMath::ATan2(track.getPY(), track.getPX());
501  ATH_MSG_DEBUG("pt_GeV = "<< pt_GeV
502  << " c = " << c
503  << " eta = " << eta
504  << " phi = " << phi
505  << " pdgcode = " << track.getPDGCode());
506  }
508  }
509 
510  return training_tracks;
511 }
512 
513 
514 // Sorts 'hits' by barcodes appearing in 'tracks', drops the rest.
515 std::map<int, std::vector<FPGATrackSimHit>> FPGATrackSimMatrixGenAlgo::makeBarcodeMap(std::vector<FPGATrackSimHit> const & hits, std::vector<FPGATrackSimTruthTrack> const & tracks) const
516 {
517  std::map<int, std::vector<FPGATrackSimHit>> map;
518 
519  // Ready the barcodes
520  for (const FPGATrackSimTruthTrack & track : tracks)
521  map[track.getBarcode()] = std::vector<FPGATrackSimHit>();
522 
523  // Add the hits
524  for (const FPGATrackSimHit & hit : hits) {
525  // Get the predominant barcode for the current hit
526  int barcode = hit.getTruth().best_barcode();
527 
528  // Add hit to the list; skip the hits if not associated to a good truth tracks
529  auto it = map.find(barcode);
530  if (it != map.end()) (*it).second.push_back(hit);
531  }
532 
533  return map;
534 }
535 
536 
537 // Given two hits in the same layer, selects the better hit to use for sector
538 // generation based on multiple criteria.
539 //
540 // Returns:
541 // 0 - Failure, this track should be discarded
542 // 1 - Keep old hit
543 // 2 - Use new hit
544 //
545 // NB: sector overlap is a perfectly reasonable situation with forward disks
546 // eta and phi will differ in general in this case
547 // Take the lower-z hit preferentially (right thing to do? d0/pT tradeoff)
548 // But something fishy is going on if we've got two hits on the same disk.
550 {
551  if (old_hit.isReal() && !new_hit.isReal()) return selectHit_returnCode::SH_KEEP_OLD;
552  if (!old_hit.isReal() && new_hit.isReal()) return selectHit_returnCode::SH_KEEP_NEW;
553  if (!old_hit.isReal() && !new_hit.isReal()) return selectHit_returnCode::SH_FAILURE;
554  if ((new_hit.getSection() == old_hit.getSection()) && (new_hit.getLayer() == old_hit.getLayer())
555  && (new_hit.getEtaModule() == old_hit.getEtaModule()) && (new_hit.getPhiModule() == old_hit.getPhiModule())) {
556  ATH_MSG_DEBUG("Two hits on same module");
558  }
559  // Always prefer spacepoints, regardless of all other considerations.
560  // This is necessary in part due to spacepoint duplication.
561  if (old_hit.getHitType() == HitType::spacepoint && new_hit.getHitType() != HitType::spacepoint) {
563  } else if (old_hit.getHitType() != HitType::spacepoint && new_hit.getHitType() == HitType::spacepoint) {
565  }
566  int new_section = new_hit.getSection();
567  int old_section = old_hit.getSection();
568 
569  if (old_section == new_section) {
570  if (old_hit.getEtaModule() == new_hit.getEtaModule()) {
571  int rmax = 0;
572  if (m_doHoughConstants && is1ststage) {
573  int phi_max = m_FPGATrackSimMapping->SubRegionMap()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_max;
574  int phi_min = m_FPGATrackSimMapping->SubRegionMap()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_min;
575  rmax = phi_max - phi_min;
576 
577  }
578  else {
579  int phi_max = m_FPGATrackSimMapping->SubRegionMap_2nd()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_max;
580  int phi_min = m_FPGATrackSimMapping->SubRegionMap_2nd()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_min;
581  rmax = phi_max - phi_min;
582  }
583 
584  int phi_diff = old_hit.getPhiModule() - new_hit.getPhiModule();
585 
586  if (phi_diff == 1 || phi_diff == -rmax) return selectHit_returnCode::SH_KEEP_OLD;
587  else if (phi_diff == -1 || phi_diff == rmax) return selectHit_returnCode::SH_KEEP_NEW;
588  else {
589  ATH_MSG_DEBUG("Hits are too far away in phi");
591  }
592  }
593  else { // Different eta is no good
594  ATH_MSG_DEBUG("Hits are in different eta");
596  }
597  }
598  else { // sections are different
599  int layer = old_hit.getLayer();
600  bool old_isEC = 0;
601  bool new_isEC = 0;
602  int old_disk = 0;
603  int new_disk = 0;
604  if (m_doHoughConstants && is1ststage) {
605  old_isEC = m_FPGATrackSimMapping->PlaneMap_1st(subregion)->isEC(layer, old_section);
606  new_isEC = m_FPGATrackSimMapping->PlaneMap_1st(subregion)->isEC(layer, new_section);
607  old_disk = m_FPGATrackSimMapping->PlaneMap_1st(subregion)->getLayerInfo(layer, old_section).physDisk;
608  new_disk = m_FPGATrackSimMapping->PlaneMap_1st(subregion)->getLayerInfo(layer, new_section).physDisk;
609  }
610  else {
611  old_isEC = m_FPGATrackSimMapping->PlaneMap_2nd(subregion)->isEC(layer, old_section);
612  new_isEC = m_FPGATrackSimMapping->PlaneMap_2nd(subregion)->isEC(layer, new_section);
613  old_disk = m_FPGATrackSimMapping->PlaneMap_2nd(subregion)->getLayerInfo(layer, old_section).physDisk;
614  new_disk = m_FPGATrackSimMapping->PlaneMap_2nd(subregion)->getLayerInfo(layer, new_section).physDisk;
615  }
616  // If one is barrel and one endcap, it's definitely OK, take the barrel hit
617  if (old_isEC != new_isEC) {
618 
619  if (old_isEC) return selectHit_returnCode::SH_KEEP_NEW;
621  }
622  // Two endcap hits : same disk: discard
623  else if (old_disk == new_disk) {
624 
625  ATH_MSG_DEBUG("Two modules hit in same physical disk " << old_disk);
627  }
628  // Two endcap hits on same side: different disks: take the lower-z
629  else {
630  ATH_MSG_DEBUG("Keeping the lower-z of the two disks (" << old_disk << ", " << new_disk << ") hit");
631  if (old_disk > new_disk) return selectHit_returnCode::SH_KEEP_NEW;
633  }
634  }
635 }
636 
637 
638 // A sector is created from hits in all layers. Sometimes there will be extraneous hits
639 // that need to be filtered. This functions returns true on success, and by reference
640 // the filtered hit list with size m_nLayers_1st.
641 //
642 // See selectHit() for details on which hit is chosen when there's more than 1 per layer.
643 bool FPGATrackSimMatrixGenAlgo::filterSectorHits(std::vector<FPGATrackSimHit> const & all_hits, std::vector<FPGATrackSimHit> & sector_hits,
644  FPGATrackSimTruthTrack const & t, bool is1ststage, int subregion) const
645 {
646  FPGATrackSimHit nohit;
648  int nLayers = (is1ststage ? m_nLayers_1st : m_nLayers_2nd);
649  const FPGATrackSimRegionMap *rmap = (is1ststage ? m_FPGATrackSimMapping->SubRegionMap() : m_FPGATrackSimMapping->SubRegionMap_2nd());
650  sector_hits.resize(nLayers, nohit);
651  std::vector<int> layer_count(nLayers); // count number of hits seen in each layer
652 
653  for (FPGATrackSimHit const & hit : all_hits) {
654  if (!hit.isReal() || !hit.isMapped()) continue;
655 
656  // Sanity check. make sure the hit is actually in the first stage?
657  // If the hit falls within the boundaries of ANY subregion in the first stage, it's 1st stage.
658  if (rmap->getRegions(hit).size() == 0) {
659  continue;
660  }
661  int layer = hit.getLayer();
662  if (layer_count[layer] == 0){
663  layer_count[layer]++;
664  sector_hits[layer] = hit;
665  }
666  else if (layer_count[layer] == 1) {
667  layer_count[layer]++;
668  // Already found a hit in this layer, so pick which hit to use
669  selectHit_returnCode selected_hit = selectHit(sector_hits[layer], hit, is1ststage, subregion);
670 
671  if (selected_hit == selectHit_returnCode::SH_FAILURE) {
673  return false;
674  }
675  else if (selected_hit == selectHit_returnCode::SH_KEEP_NEW) sector_hits[layer] = hit;
676  }
677  else {
678  ATH_MSG_DEBUG("Too many hits on a plane, exiting filterHitsSec");
680  return false;
681  }
682  }
683  // Count number of wildcards, spacepoints, and pixel hits.
684  int nwc = 0;
685  int num_sp = 0;
686  int num_pixel = 0;
687 
688  // Check we have the right number of hits.
689  for (int i = 0; i < nLayers; ++i)
690  {
691  if (layer_count[i] == 0)
692  {
693  ATH_MSG_DEBUG("Layer " << i << " has no hits");
694  nwc++;
695  }
696 
697  // Now that we've decided which hit to use-- check their type.
698  if (sector_hits[i].getHitType() == HitType::spacepoint) {
699  num_sp += 1;
700  }
701  if (sector_hits[i].isPixel()) {
702  num_pixel += 1;
703  }
704  }
705  ATH_MSG_DEBUG("Found " << nwc << " wildcards compared to maximum: " << m_MaxWC);
706  // Divide by 2 due to spacepoint duplication.
707  num_sp /= 2;
708  ATH_MSG_DEBUG("Found " << num_sp << " spacepoints after removing duplicates.");
709  // Require we don't have too many wildcards.
710  if (nwc > m_MaxWC)
711  {
713  return false;
714  }
715  // Require that we have a certain number of "2D" hits (i.e. pixels and spacepoints)
716  // The effect of this is that we can ensure we have 4/5 2D hits but 7/9 hits total.
717  // NOTE Again, uncomment logic below for second stage running.
718  num_sp += num_pixel;
719  int minSpacePlusPixel = /*m_isSecondStage ? m_minSpacePlusPixel2 :*/ m_minSpacePlusPixel;
720  if (num_sp < minSpacePlusPixel) {
721  ATH_MSG_DEBUG("Not enough pixel hits + spacepoints (" << num_sp << " < " << minSpacePlusPixel << ")");
723  return false;
724  }
725  return true;
726 }
727 
728 
729 // Returns the lowest index region that contains all hits in 'hits'
730 int FPGATrackSimMatrixGenAlgo::getRegion(std::vector<FPGATrackSimHit> const & hits, bool is1ststage) const
731 {
732  // Start with a bitmask, all true, and set a region to false if any mismatch is found
733  std::vector<bool> region_mask(m_nRegions, true);
734 
735  for (FPGATrackSimHit const & hit : hits) {
736  if (hit.getHitType() != HitType::wildcard){ // don't worry about hits that are WCs
737  for (int region = 0; region < m_nRegions; region++) {
738  if (m_doHoughConstants && is1ststage) {
739  if (!m_FPGATrackSimMapping->RegionMap_1st()->isInRegion(region, hit))
740  region_mask[region] = false;
741  }
742  else {
743  if (!m_FPGATrackSimMapping->RegionMap_2nd()->isInRegion(region, hit))
744  region_mask[region] = false;
745  }
746  }
747  }
748  }
749 
750  // For now just give preference to lowest region index for simplicity
751  for (int region = 0; region < m_nRegions; region++) {
752  if (region_mask[region])
753  return region;
754  }
755 
756  return -1;
757 }
758 
759 // Fill accumulators by dropping one hit
760 StatusCode FPGATrackSimMatrixGenAlgo::fillAccumulatorByDropping(std::vector<FPGATrackSimHit> &sector_hits, bool is1ststage, double x, double y, std::vector<module_t> &modules, AccumulateMap &map, FPGATrackSimTruthTrack const & track, int subregion) const
761 {
762 
763  int nLayers = (is1ststage ? m_nLayers_1st : m_nLayers_2nd);
764  int nDim = (is1ststage ? m_nDim_1st : m_nDim_2nd);
765 
766  int nwc = 0;
767  for (auto module : modules) {
768  if (module == -1) nwc++;
769  }
770  // Don't do this unless we miss at most one hit!
771  if (nwc < m_MaxWC) {
772  for (int layer = 0; layer < nLayers; layer++) {
773  // Back up the current hit in this layer.
774  FPGATrackSimHit backup_hit = sector_hits[layer];
775 
776  // Create a new wildcard hit, and put it here.
777  FPGATrackSimHit *wcHit = new FPGATrackSimHit();
779  wcHit->setLayer(layer);
780  if (is1ststage) wcHit->setDetType(m_FPGATrackSimMapping->PlaneMap_1st(subregion)->getDetType(layer));
781  else wcHit->setDetType(m_FPGATrackSimMapping->PlaneMap_2nd(subregion)->getDetType(layer));
782 
783  sector_hits[layer] = *wcHit;
784 
785  // If this is a spacepoint, we must also convert the other hit.
786  FPGATrackSimHit other_backup = backup_hit;
787  unsigned other_layer = 0;
788  if (backup_hit.getHitType() == HitType::spacepoint) {
789  other_layer = (backup_hit.getPhysLayer() % 2 == 0) ? layer + 1 : layer - 1;
790  other_backup = sector_hits[other_layer];
791  sector_hits[other_layer] = other_backup.getOriginalHit();
792  }
793 
794  FPGATrackSimMatrixAccumulator new_acc(nLayers, nDim);
795  new_acc.pars.qOverPt = y;
796  new_acc.pars.phi = x;
797  std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> new_modules_acc = {modules, new_acc};
798 
799  auto sc = makeAccumulator(sector_hits, track, new_modules_acc);
800  if (sc != StatusCode::SUCCESS){
801  delete wcHit;
802  ATH_MSG_ERROR("FPGATrackSimMatrixGenAlgo::fillAccumulatorByDropping; makeAccumulator failed");
803  return StatusCode::FAILURE;
804  }
805  accumulate(map, new_modules_acc.first, new_modules_acc.second);
806 
807  // Restore the hit. May not be necessary to clean up wcHit here.
808  sector_hits[layer] = backup_hit;
809  delete wcHit;
810 
811  // Restore the other layer, if this is a spacepoint.
812  if (backup_hit.getHitType() == HitType::spacepoint) {
813  sector_hits[other_layer] = other_backup;
814  }
815  }
816  }
817  return StatusCode::SUCCESS;
818 }
819 
820 // Given a track and corresponding hits, returns the sector (list of modules) and the accumulation
821 // struct.
822 StatusCode FPGATrackSimMatrixGenAlgo::makeAccumulator(std::vector<FPGATrackSimHit> const & sector_hits, FPGATrackSimTruthTrack const & track, std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator> & accumulator) const
823 {
824 
825 
827  int nLayers = (m_doSecondStage ? m_nLayers_2nd : m_nLayers_1st);
828  int nDim = (m_doSecondStage ? m_nDim_2nd : m_nDim_1st);
829  std::vector<module_t> modules(nLayers);
830  FPGATrackSimMatrixAccumulator acc(nLayers, nDim);
831 
832  //find the bin!
833  // NOTE: this only implements q/pt binning, not the subregion / eta pattern-based constants for now.
834  int sectorbin = 0;
835  double qoverpt = track.getQ() / track.getPt();
836 
837  // for 2nd stage we only use one q/pt bin
838  if (m_absQOverPtBinning || m_doSecondStage) qoverpt = abs(qoverpt);
839  if (!m_doSecondStage) {
840  for (unsigned bin = 0; bin < m_qOverPtBins.size()-1; bin++) {
841  sectorbin = fpgatracksim::QPT_SECTOR_OFFSET * bin;
842  if (qoverpt < m_qOverPtBins[bin+1]) break;
843  }
844  }
845 
846  // Create sector definitions (list of modules)
847  std::string module_printout = "";
848  for (int i = 0; i < nLayers; i++)
849  {
850  if (sector_hits[i].isReal()) {
851  if (m_single) modules[i] = sector_hits[i].getIdentifierHash();
852  else {
853  modules[i] = sectorbin;
854  // Modify sectorbin by a "type" field, which for now means: 0 = not spacepoint, 1 = spacepoint.
855  // This will fail if we have more than 99 q/pt bins!
856  if (sector_hits[i].getHitType() == HitType::spacepoint) {
858  }
859  module_printout += std::to_string(modules[i]) + ", ";
860  }
861  }
862  else {
863  modules[i] = -1; // WC
864  }
865  }
866 
867  ATH_MSG_DEBUG("Generating track in sectorbin = " << sectorbin << " with modules: " << module_printout);
868 
869 
870  if (m_single) {
871  const int ToKeep[13] = {2200,2564,2861,3831,5368,14169,14173,20442,20446,29625,29629,42176,42180};
872  bool keepThis = true;
873  for (int i = 0; i < 13; i++) {
874  if (modules[i] != ToKeep[i] && modules[i] != -1) {
875  keepThis = false;
876  }
877  }
878 
879  if (!keepThis) {
880  for (int i = 0; i < 13; i++) modules[i] = -1;
881  }
882  else {
883  for (int i = 0; i < 13; i++) {
884  }
885  }
886  }
887 
888 
889  // Hough Constants parameters
890  double y = accumulator.second.pars.qOverPt;
891  double x = accumulator.second.pars.phi;
892 
893  // Vectorize (flatten) coordinates
894  std::vector<float> coords;
895 
896  for (int i = 0; i < nLayers; ++i) {
897  if (sector_hits[i].getHitType() != HitType::wildcard) {
898 
899  double target_r = (m_doSecondStage ? m_FPGATrackSimMapping->RegionMap_2nd()->getAvgRadius(0, i) : m_FPGATrackSimMapping->RegionMap_1st()->getAvgRadius(0, i));
900  // If this is a spacepoint the target R should be the average of the two layers.
901  // TODO, get this to be loaded in from a mean radii file into the mapping infrastructure.
902  if (sector_hits[i].getHitType() == HitType::spacepoint) {
903  int other_layer = (sector_hits[i].getSide() == 0) ? i + 1 : i - 1;
904  target_r = (m_doSecondStage ?
905  (target_r + m_FPGATrackSimMapping->RegionMap_2nd()->getAvgRadius(0, other_layer))/2. :
906  (target_r + m_FPGATrackSimMapping->RegionMap_1st()->getAvgRadius(0, other_layer))/2.);
907  }
908 
909  std::vector<float> coords_tmp;
910  if ( m_ideal_geom > 1 ) {
911  coords_tmp = computeIdealCoords(sector_hits[i], x, y, target_r, m_doDeltaPhiConsts, TrackCorrType::Second);
912  }
913  else {
914  coords_tmp = computeIdealCoords(sector_hits[i], x, y, target_r, m_doDeltaPhiConsts, TrackCorrType::None);
915  }
916 
917  // Create phi for any hits that are not spacepoints, as well as "inner" spacepoints.
918  // but not outer spacepoints. this avoids duplicate coordinates.
919  if (sector_hits[i].getHitType() != HitType::spacepoint || sector_hits[i].getSide() == 0) {
920  // get idealized gPhi
921  coords.push_back(coords_tmp[1]);
922  }
923 
924  // Create a z coordinate for the "outer" layer of the spacepoint and for 2D pixel hits.
925  // This means that a spacepoint will write out (phi, eta) pairs, but (0, phi) or (phi, 0) if it's missing.
926  if (sector_hits[i].getDim() == 2 || (sector_hits[i].getHitType() == HitType::spacepoint && (sector_hits[i].getPhysLayer() % 2) == 1)) {
927  // get idealized z
928  coords.push_back(coords_tmp[0]);
929  }
930  }
931  else {
932  if (pmap->getDim(i) == 2) {
933  coords.push_back(0);
934  }
935  coords.push_back(0);
936  }
937  }
938 
939  assert(coords.size() == (size_t)nDim);
940  acc.hit_coords = coords;
941  acc.hit_coordsG = coords;
942 
943  // Get the track parameters
944  acc.pars = track.getPars();
946  acc.pars.qOverPt = (y / 1000.0) - track.getQOverPt(); // fit for delta q/pT
947  acc.pars.phi = x - track.getPhi(); // fit for delta phi_0
948  }
949 
951  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++)
952  bins[i] = (acc.pars[i] - m_sliceMin[i]) * m_nBins[i] / (m_sliceMax[i] - m_sliceMin[i]);
953  acc.track_bins.push_back(bins);
954 
955  // Force phi to be in [0, 2pi] (post binning)
956  if (!m_doDeltaPhiConsts) {
957  while (acc.pars.phi < 0) acc.pars.phi += 2*M_PI;
958  while (acc.pars.phi > 2*M_PI) acc.pars.phi -= 2*M_PI;
959  }
960 
961  // Calculate the pre-multiplied elements
962  for (int i = 0; i < nDim; i++)
963  {
964  acc.hit_x_QoP[i] = coords[i] * acc.pars.qOverPt;
965  acc.hit_xG_HIP[i] = coords[i] * acc.pars.qOverPt;
966  acc.hit_x_d0[i] = coords[i] * acc.pars.d0;
967  acc.hit_x_z0[i] = coords[i] * acc.pars.z0;
968  acc.hit_x_eta[i] = coords[i] * acc.pars.eta;
969  acc.hit_xG_eta[i] = coords[i] * acc.pars.eta;
970  acc.hit_x_phi[i] = coords[i] * acc.pars.phi;
971 
972  for (int j = i; j < nDim; j++)
973  acc.covariance[i * nDim + j] = coords[i] * coords[j];
974 
975  for (int j = i; j < nDim; j++)
976  acc.covarianceG[i * nDim + j] = coords[i] * coords[j];
977  }
978 
979  accumulator = {modules, acc};
980  return StatusCode::SUCCESS;
981 }
982 
983 
984 
986 // Finalize
988 
989 
991 {
992  ATH_MSG_DEBUG("finalize()");
993  ATH_MSG_INFO("Tracks used: " << m_nTracksUsed << "/" << m_nTracks);
994  int nLayers = (m_doSecondStage ? m_nLayers_2nd : m_nLayers_1st);
995  int nDim = (m_doSecondStage ? m_nDim_2nd : m_nDim_1st);
996 
997  for (int region = 0; region < m_nRegions; region++) {
998  // Create the tree
999  std::stringstream name;
1000  std::stringstream title;
1001  name << "am" << region;
1002  title << "Ambank " << region << " parameters";
1003  TTree* tree = new TTree(name.str().c_str(), title.str().c_str());
1004  ATH_CHECK(m_tHistSvc->regTree(Form("/TRIGFPGATrackSimMATRIXOUT/%s",tree->GetName()), tree));
1005 
1006  // Fill the tree
1007  ::fillTree(m_sector_cum[region], tree, nLayers, nDim);
1008  // Monitoring
1009  ATH_MSG_INFO("Sectors found in region " << region << ": " << m_sector_cum[region].size());
1010  for (auto & sector_info : m_sector_cum[region]) {
1011  double coverage = sector_info.second.track_bins.size();
1012  m_h_nHit->Fill(coverage);
1013  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++)
1014  m_h_sectorPars[i]->Fill(sector_info.second.pars[i] / coverage);
1015  }
1016  }
1017 
1018  writeSliceTree();
1019  ATH_CHECK(m_tHistSvc->finalize());
1020  return StatusCode::SUCCESS;
1021 }
1022 
1023 
1025 {
1026  TTree* sliceTree = new TTree("slice", "Region slice boundaries"); // slice
1027 
1028  sliceTree->Branch("c_max", &m_sliceMax.qOverPt);
1029  sliceTree->Branch("d0_max", &m_sliceMax.d0);
1030  sliceTree->Branch("phi_max", &m_sliceMax.phi);
1031  sliceTree->Branch("z0_max", &m_sliceMax.z0);
1032  sliceTree->Branch("eta_max", &m_sliceMax.eta);
1033 
1034  sliceTree->Branch("c_min", &m_sliceMin.qOverPt);
1035  sliceTree->Branch("d0_min", &m_sliceMin.d0);
1036  sliceTree->Branch("phi_min", &m_sliceMin.phi);
1037  sliceTree->Branch("z0_min", &m_sliceMin.z0);
1038  sliceTree->Branch("eta_min", &m_sliceMin.eta);
1039 
1040  sliceTree->Branch("c_slices", &m_nBins.qOverPt);
1041  sliceTree->Branch("d0_slices", &m_nBins.d0);
1042  sliceTree->Branch("phi_slices", &m_nBins.phi);
1043  sliceTree->Branch("z0_slices", &m_nBins.z0);
1044  sliceTree->Branch("eta_slices", &m_nBins.eta);
1045 
1046  StatusCode sc = m_tHistSvc->regTree("/TRIGFPGATrackSimMATRIXOUT/slice",sliceTree);
1047  if (sc.isFailure()) ATH_MSG_ERROR("tHist failed");
1048 
1049  sliceTree->Fill();
1050 }
FPGATrackSimHit::getSection
unsigned getSection() const
Definition: FPGATrackSimHit.cxx:83
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
FPGATrackSimHit::getPhiModule
unsigned getPhiModule() const
Definition: FPGATrackSimHit.h:88
FPGATrackSimMatrixGenAlgo::m_hitMapTool
ToolHandle< FPGATrackSimRawToLogicalHitsTool > m_hitMapTool
Definition: FPGATrackSimMatrixGenAlgo.h:80
FPGATrackSimMatrixGenAlgo::getLogicalHits
std::vector< FPGATrackSimHit > getLogicalHits()
Definition: FPGATrackSimMatrixGenAlgo.cxx:440
FPGATrackSimHit::setSection
void setSection(unsigned v)
Definition: FPGATrackSimHit.h:93
FPGATrackSimMatrixGenAlgo::roadsToTrack
void roadsToTrack(std::vector< std::shared_ptr< const FPGATrackSimRoad >> &houghRoads, std::vector< FPGATrackSimTrack > &track_cands)
Definition: FPGATrackSimMatrixGenAlgo.cxx:373
FPGATrackSimMatrixGenAlgo::m_qOverPtBins
Gaudi::Property< std::vector< double > > m_qOverPtBins
Definition: FPGATrackSimMatrixGenAlgo.h:126
FPGATrackSimMatrixGenAlgo::m_temp_z0_max
Gaudi::Property< float > m_temp_z0_max
Definition: FPGATrackSimMatrixGenAlgo.h:117
FPGATrackSimMatrixGenAlgo::m_temp_d0_max
Gaudi::Property< float > m_temp_d0_max
Definition: FPGATrackSimMatrixGenAlgo.h:115
FPGATrackSimMatrixGenAlgo::makeAccumulator
StatusCode makeAccumulator(std::vector< FPGATrackSimHit > const &sector_hits, FPGATrackSimTruthTrack const &track, std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > &accumulator) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:822
FPGATrackSimMatrixGenAlgo::m_temp_phi_max
Gaudi::Property< float > m_temp_phi_max
Definition: FPGATrackSimMatrixGenAlgo.h:113
FPGATrackSimTrackPars::phi
double phi
Definition: FPGATrackSimTrackPars.h:24
FPGATrackSimMatrixGenAlgo::m_temp_d0_min
Gaudi::Property< float > m_temp_d0_min
Definition: FPGATrackSimMatrixGenAlgo.h:114
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
FPGATrackSimRegionSlices.h
Stores slice definitions for FPGATrackSim regions.
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
SiliconTech::strip
@ strip
FPGATrackSimTrack::setBankID
void setBankID(int v)
Definition: FPGATrackSimTrack.h:84
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer() const
Definition: FPGATrackSimHit.cxx:69
python.FPGATrackSimAnalysisConfig.stage
stage
Definition: FPGATrackSimAnalysisConfig.py:659
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimTrackParsI::eta
int eta
Definition: FPGATrackSimTrackPars.h:62
FPGATrackSimMatrixGenAlgo::m_minSpacePlusPixel
Gaudi::Property< int > m_minSpacePlusPixel
Definition: FPGATrackSimMatrixGenAlgo.h:106
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
FPGATrackSimMatrixGenAlgo::m_nTracksUsed
size_t m_nTracksUsed
Definition: FPGATrackSimMatrixGenAlgo.h:146
FPGATrackSimMatrixGenAlgo::m_pmap_2nd
const FPGATrackSimPlaneMap * m_pmap_2nd
Definition: FPGATrackSimMatrixGenAlgo.h:92
FPGATrackSimMatrixGenAlgo::makeBarcodeMap
std::map< int, std::vector< FPGATrackSimHit > > makeBarcodeMap(std::vector< FPGATrackSimHit > const &hits, std::vector< FPGATrackSimTruthTrack > const &tracks) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:515
FPGATrackSimTrackPars
Definition: FPGATrackSimTrackPars.h:22
FPGATrackSimTrackPars::qOverPt
double qOverPt
Definition: FPGATrackSimTrackPars.h:25
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
FPGATrackSimTrack::setPatternID
void setPatternID(int v)
Definition: FPGATrackSimTrack.h:85
FPGATrackSimMatrixGenAlgo::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimMatrixGenAlgo.h:75
FPGATrackSimMatrixGenAlgo::m_nDim_1st
int m_nDim_1st
Definition: FPGATrackSimMatrixGenAlgo.h:130
FPGATrackSimMatrixGenAlgo::m_temp_z0_slices
Gaudi::Property< int > m_temp_z0_slices
Definition: FPGATrackSimMatrixGenAlgo.h:123
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:140
fpgatracksim::SPACEPOINT_SECTOR_OFFSET
constexpr int SPACEPOINT_SECTOR_OFFSET
Definition: FPGATrackSimConstants.h:22
FPGATrackSimMatrixGenAlgo::m_nLayers_1st
int m_nLayers_1st
Definition: FPGATrackSimMatrixGenAlgo.h:129
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
tree
TChain * tree
Definition: tile_monitor.h:30
FPGATrackSimHit::isReal
bool isReal() const
Definition: FPGATrackSimHit.cxx:40
FPGATrackSimTrackPars::d0
double d0
Definition: FPGATrackSimTrackPars.h:26
skel.it
it
Definition: skel.GENtoEVGEN.py:407
FPGATrackSimHit::getLayer
unsigned getLayer() const
Definition: FPGATrackSimHit.cxx:77
TrackCorrType::Second
@ Second
test_pyathena.pt
pt
Definition: test_pyathena.py:11
FPGATrackSimMatrixGenAlgo::filterTrainingTracks
std::vector< FPGATrackSimTruthTrack > filterTrainingTracks(std::vector< FPGATrackSimTruthTrack > const &truth_tracks) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:479
M_PI
#define M_PI
Definition: ActiveFraction.h:11
bin
Definition: BinsDiffFromStripMedian.h:43
FPGATrackSimMatrixGenAlgo::filterSectorHits
bool filterSectorHits(std::vector< FPGATrackSimHit > const &all_hits, std::vector< FPGATrackSimHit > &sector_hits, FPGATrackSimTruthTrack const &t, bool is1ststage, int subregion) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:643
FPGATrackSimTrack::setHoughXBin
void setHoughXBin(unsigned v)
Definition: FPGATrackSimTrack.h:108
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
FPGATrackSimMatrixGenAlgo::m_trackExtensionTool
ToolHandle< IFPGATrackSimTrackExtensionTool > m_trackExtensionTool
Definition: FPGATrackSimMatrixGenAlgo.h:87
FPGATrackSimTrackParsI::d0
int d0
Definition: FPGATrackSimTrackPars.h:60
FPGATrackSimMatrixGenAlgo::writeSliceTree
void writeSliceTree()
Definition: FPGATrackSimMatrixGenAlgo.cxx:1024
HitType::spacepoint
@ spacepoint
FPGATrackSimMatrixGenAlgo::m_dropHitsAndFill
Gaudi::Property< bool > m_dropHitsAndFill
Definition: FPGATrackSimMatrixGenAlgo.h:127
FPGATrackSimMatrixGenAlgo::getRegion
int getRegion(std::vector< FPGATrackSimHit > const &hits, bool is1ststage) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:730
FPGATrackSimHit::getEtaModule
int getEtaModule() const
Definition: FPGATrackSimHit.h:87
FPGATrackSimMatrixGenAlgo::m_ideal_geom
Gaudi::Property< int > m_ideal_geom
Definition: FPGATrackSimMatrixGenAlgo.h:101
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPGATrackSimMatrixGenAlgo::m_temp_phi_min
Gaudi::Property< float > m_temp_phi_min
Definition: FPGATrackSimMatrixGenAlgo.h:112
FPGATrackSimTrackPars::eta
double eta
Definition: FPGATrackSimTrackPars.h:28
FPGATrackSimMatrixGenAlgo::m_D0_THRESHOLD
Gaudi::Property< float > m_D0_THRESHOLD
Definition: FPGATrackSimMatrixGenAlgo.h:108
FPGATrackSimMatrixGenAlgo::m_temp_z0_min
Gaudi::Property< float > m_temp_z0_min
Definition: FPGATrackSimMatrixGenAlgo.h:116
x
#define x
FPGATrackSimMatrixGenAlgo::m_temp_eta_slices
Gaudi::Property< int > m_temp_eta_slices
Definition: FPGATrackSimMatrixGenAlgo.h:124
FPGATrackSimMatrixGenAlgo::m_trackFitterTool_1st
ToolHandle< FPGATrackSimTrackFitterTool > m_trackFitterTool_1st
Definition: FPGATrackSimMatrixGenAlgo.h:85
FPGATrackSimMatrixGenAlgo::m_temp_eta_min
Gaudi::Property< float > m_temp_eta_min
Definition: FPGATrackSimMatrixGenAlgo.h:118
FPGATrackSimMatrixGenAlgo::selectHit_returnCode::SH_FAILURE
@ SH_FAILURE
FPGATrackSimMatrixGenAlgo::m_EvtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_EvtSel
Definition: FPGATrackSimMatrixGenAlgo.h:76
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
FPGATrackSimConstants.h
FPGATrackSimOptionalEventInfo::getTruthTracks
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:37
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimPlaneMap::getDim
uint32_t getDim(size_t logiLayer) const
Definition: FPGATrackSimPlaneMap.h:78
HitType::wildcard
@ wildcard
FPGATrackSimMatrixGenAlgo::m_doHoughConstants
Gaudi::Property< bool > m_doHoughConstants
Definition: FPGATrackSimMatrixGenAlgo.h:103
fillTree
void fillTree(AccumulateMap &map, TTree *tree, int nLayers, int nCoords)
Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).
Definition: FPGATrackSimMatrixIO.cxx:226
computeIdealCoords
std::vector< float > computeIdealCoords(const FPGATrackSimHit &hit, const double hough_x, const double hough_y, const double target_r, const bool doDeltaGPhis, const TrackCorrType trackCorrType)
Definition: FPGATrackSimFunctions.cxx:116
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.PyAthena.module
module
Definition: PyAthena.py:131
FPGATrackSimHit::setDetType
void setDetType(SiliconTech detType)
Definition: FPGATrackSimHit.h:55
FPGATrackSimMatrixGenAlgo::initialize
StatusCode initialize() override
Definition: FPGATrackSimMatrixGenAlgo.cxx:47
FPGATrackSimTrack::setHoughYBin
void setHoughYBin(unsigned v)
Definition: FPGATrackSimTrack.h:109
FPGATrackSimMatrixGenAlgo::FPGATrackSimMatrixGenAlgo
FPGATrackSimMatrixGenAlgo(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimMatrixGenAlgo.cxx:36
FPGATrackSimMatrixGenAlgo::m_sliceMax
FPGATrackSimTrackPars m_sliceMax
Definition: FPGATrackSimMatrixGenAlgo.h:137
FPGATrackSimMatrixGenAlgo::m_doSecondStage
Gaudi::Property< bool > m_doSecondStage
Definition: FPGATrackSimMatrixGenAlgo.h:99
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimMatrixGenAlgo::m_temp_c_min
Gaudi::Property< float > m_temp_c_min
Definition: FPGATrackSimMatrixGenAlgo.h:110
FPGATrackSimMatrixGenAlgo::m_nRegions
Gaudi::Property< int > m_nRegions
Definition: FPGATrackSimMatrixGenAlgo.h:97
FPGATrackSimPlaneMap::map
void map(FPGATrackSimHit &hit) const
Definition: FPGATrackSimPlaneMap.cxx:234
FPGATrackSimMatrixGenAlgo::selectHit_returnCode::SH_KEEP_OLD
@ SH_KEEP_OLD
FPGATrackSimMatrixGenAlgo::m_single
Gaudi::Property< bool > m_single
Definition: FPGATrackSimMatrixGenAlgo.h:102
lumiFormat.i
int i
Definition: lumiFormat.py:85
FPGATrackSimHit::getOriginalHit
const FPGATrackSimHit getOriginalHit() const
Definition: FPGATrackSimHit.cxx:122
FPGATrackSimEventInputHeader::clearHits
void clearHits()
Definition: FPGATrackSimEventInputHeader.h:40
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
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
FPGATrackSimMatrixAccumulator
Definition: FPGATrackSimMatrixAccumulator.h:36
FPGATrackSimMatrixGenAlgo::m_spacePointsTool
ToolHandle< FPGATrackSimSpacePointsToolI > m_spacePointsTool
Definition: FPGATrackSimMatrixGenAlgo.h:82
FPGATrackSimMatrixGenAlgo::m_h_sectorPars
TH1I * m_h_sectorPars[FPGATrackSimTrackPars::NPARS]
Definition: FPGATrackSimMatrixGenAlgo.h:173
FPGATrackSimMatrixGenAlgo.h
Algorithm to generate matrix files, to be used for sector and constant generation.
covarianceTool.title
title
Definition: covarianceTool.py:542
FPGATrackSimMatrixGenAlgo::m_hitInputTool
ToolHandle< IFPGATrackSimInputTool > m_hitInputTool
Definition: FPGATrackSimMatrixGenAlgo.h:79
FPGATrackSimMatrixGenAlgo::m_temp_d0_slices
Gaudi::Property< int > m_temp_d0_slices
Definition: FPGATrackSimMatrixGenAlgo.h:122
FPGATrackSimMatrixGenAlgo::m_h_trackQoP_okHits
TH1I * m_h_trackQoP_okHits
Definition: FPGATrackSimMatrixGenAlgo.h:178
FPGATrackSimMatrixGenAlgo::selectHit
selectHit_returnCode selectHit(FPGATrackSimHit const &old_hit, FPGATrackSimHit const &new_hit, bool is1ststage, int subregion) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:549
FPGATrackSimMatrixGenAlgo::m_doDeltaPhiConsts
Gaudi::Property< bool > m_doDeltaPhiConsts
Definition: FPGATrackSimMatrixGenAlgo.h:104
FPGATrackSimMatrixGenAlgo::m_PT_THRESHOLD
Gaudi::Property< float > m_PT_THRESHOLD
Definition: FPGATrackSimMatrixGenAlgo.h:107
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
FPGATrackSimEventInputHeader
Definition: FPGATrackSimEventInputHeader.h:22
FPGATrackSimMatrixGenAlgo::m_pmap_1st
const FPGATrackSimPlaneMap * m_pmap_1st
Definition: FPGATrackSimMatrixGenAlgo.h:91
plotting.yearwise_luminosity_vs_mu.bins
bins
Definition: yearwise_luminosity_vs_mu.py:30
FPGATrackSimMatrixGenAlgo::m_temp_phi_slices
Gaudi::Property< int > m_temp_phi_slices
Definition: FPGATrackSimMatrixGenAlgo.h:121
FPGATrackSimMatrixGenAlgo::m_doSpacePoints
Gaudi::Property< bool > m_doSpacePoints
Definition: FPGATrackSimMatrixGenAlgo.h:100
FPGATrackSimMatrixGenAlgo::execute
StatusCode execute() override
Definition: FPGATrackSimMatrixGenAlgo.cxx:203
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:141
FPGATrackSimMatrixGenAlgo::m_absQOverPtBinning
Gaudi::Property< bool > m_absQOverPtBinning
Definition: FPGATrackSimMatrixGenAlgo.h:125
FPGATrackSimMatrixGenAlgo::m_doClustering
Gaudi::Property< bool > m_doClustering
Definition: FPGATrackSimMatrixGenAlgo.h:98
FPGATrackSimMatrixGenAlgo::m_clusteringTool
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
Definition: FPGATrackSimMatrixGenAlgo.h:81
FPGATrackSimMatrixGenAlgo::m_eventHeader
FPGATrackSimEventInputHeader * m_eventHeader
Definition: FPGATrackSimMatrixGenAlgo.h:140
FPGATrackSimMatrixGenAlgo::bookHistograms
StatusCode bookHistograms()
Definition: FPGATrackSimMatrixGenAlgo.cxx:128
FPGATrackSimMatrixGenAlgo::m_overlapRemovalTool
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool
Definition: FPGATrackSimMatrixGenAlgo.h:88
AthAlgorithm
Definition: AthAlgorithm.h:47
FPGATrackSimHit::getZ
float getZ() const
Definition: FPGATrackSimHit.h:142
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
FPGATrackSimMatrixGenAlgo::m_h_notEnoughHits
TH1I * m_h_notEnoughHits[FPGATrackSimTrackPars::NPARS]
Definition: FPGATrackSimMatrixGenAlgo.h:176
FPGATrackSimPlaneMap
Definition: FPGATrackSimPlaneMap.h:62
FPGATrackSimMatrixGenAlgo::m_nTracks
size_t m_nTracks
Definition: FPGATrackSimMatrixGenAlgo.h:145
keylayer_zslicemap.rmap
rmap
Definition: keylayer_zslicemap.py:33
FPGATrackSimMatrixGenAlgo::fillAccumulatorByDropping
StatusCode fillAccumulatorByDropping(std::vector< FPGATrackSimHit > &sector_hits, bool is1ststage, double x, double y, std::vector< module_t > &modules, AccumulateMap &map, FPGATrackSimTruthTrack const &track, int subregion) const
Definition: FPGATrackSimMatrixGenAlgo.cxx:760
fpgatracksim::QPT_SECTOR_OFFSET
constexpr int QPT_SECTOR_OFFSET
Definition: FPGATrackSimConstants.h:23
FPGATrackSimMatrixAccumulator.h
Helper struct for accumulating sector information for matrix generation.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MagicNumbers.h
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TrackCorrType::None
@ None
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
FPGATrackSimFunctions.h
FPGATrackSimMatrixGenAlgo::selectHit_returnCode::SH_KEEP_NEW
@ SH_KEEP_NEW
FPGATrackSimMatrixGenAlgo::m_h_3hitsInLayer
TH1I * m_h_3hitsInLayer[FPGATrackSimTrackPars::NPARS]
Definition: FPGATrackSimMatrixGenAlgo.h:175
FPGATrackSimTrack::setHoughY
void setHoughY(float v)
Definition: FPGATrackSimTrack.h:91
FPGATrackSimMatrixGenAlgo::m_sector_cum
std::vector< AccumulateMap > m_sector_cum
Definition: FPGATrackSimMatrixGenAlgo.h:70
FPGATrackSimMatrixGenAlgo::m_h_SHfailure
TH1I * m_h_SHfailure[FPGATrackSimTrackPars::NPARS]
Definition: FPGATrackSimMatrixGenAlgo.h:174
FPGATrackSimTrackPars::parName
static std::string parName(unsigned i)
Definition: FPGATrackSimTrackPars.cxx:72
FPGATrackSimTrack::setQOverPt
void setQOverPt(float v)
Definition: FPGATrackSimTrack.h:92
FPGATrackSimMatrixAccumulator::pars
FPGATrackSimTrackPars pars
Definition: FPGATrackSimMatrixAccumulator.h:70
FPGATrackSimEventInputHeader::optional
FPGATrackSimOptionalEventInfo const & optional() const
Definition: FPGATrackSimEventInputHeader.h:34
FPGATrackSimTrackParsI::phi
int phi
Definition: FPGATrackSimTrackPars.h:58
FPGATrackSimMatrixGenAlgo::m_temp_c_max
Gaudi::Property< float > m_temp_c_max
Definition: FPGATrackSimMatrixGenAlgo.h:111
fillTrackPars
void fillTrackPars(TH1I *const hists[FPGATrackSimTrackPars::NPARS], FPGATrackSimTruthTrack const &track)
Definition: FPGATrackSimMatrixGenAlgo.cxx:191
FPGATrackSimHit::setLayer
void setLayer(unsigned v)
Definition: FPGATrackSimHit.h:92
y
#define y
RunTileMonitoring.towers
towers
Definition: RunTileMonitoring.py:133
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimMatrixGenAlgo::m_h_trackQoP_okRegion
TH1I * m_h_trackQoP_okRegion
Definition: FPGATrackSimMatrixGenAlgo.h:179
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
FPGATrackSimTrackPars::z0
double z0
Definition: FPGATrackSimTrackPars.h:27
FPGATrackSimMatrixGenAlgo::m_sliceMin
FPGATrackSimTrackPars m_sliceMin
Definition: FPGATrackSimMatrixGenAlgo.h:136
FPGATrackSimMatrixGenAlgo::m_h_trainingTrack
TH1I * m_h_trainingTrack[FPGATrackSimTrackPars::NPARS]
Definition: FPGATrackSimMatrixGenAlgo.h:172
DEBUG
#define DEBUG
Definition: page_access.h:11
FPGATrackSimTrackPars::NPARS
@ NPARS
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimTrack::setSubRegion
void setSubRegion(unsigned v)
Definition: FPGATrackSimTrack.h:107
FPGATrackSimMatrixGenAlgo::m_MaxWC
Gaudi::Property< int > m_MaxWC
Definition: FPGATrackSimMatrixGenAlgo.h:105
FPGATrackSimMatrixGenAlgo::m_TRAIN_PDG
Gaudi::Property< int > m_TRAIN_PDG
Definition: FPGATrackSimMatrixGenAlgo.h:109
FPGATrackSimMatrixGenAlgo::m_roadFinderTool
ToolHandle< FPGATrackSimRoadUnionTool > m_roadFinderTool
Definition: FPGATrackSimMatrixGenAlgo.h:84
FPGATrackSimTrackParsI::z0
int z0
Definition: FPGATrackSimTrackPars.h:61
FPGATrackSimMatrixGenAlgo::m_nBins
FPGATrackSimTrackParsI m_nBins
Definition: FPGATrackSimMatrixGenAlgo.h:138
FPGATrackSimMatrixGenAlgo::m_h_nHit
TH1I * m_h_nHit
Definition: FPGATrackSimMatrixGenAlgo.h:180
FPGATrackSimMatrixGenAlgo::finalize
StatusCode finalize() override
Definition: FPGATrackSimMatrixGenAlgo.cxx:990
FPGATrackSimRegionMap
Definition: FPGATrackSimRegionMap.h:62
FPGATrackSimLogicalEventInputHeader::towers
const std::vector< FPGATrackSimTowerInputHeader > & towers() const
Definition: FPGATrackSimLogicalEventInputHeader.h:36
AccumulateMap
std::unordered_map< std::vector< module_t >, FPGATrackSimMatrixAccumulator, container_hash< std::vector< module_t > > > AccumulateMap
Definition: FPGATrackSimMatrixAccumulator.h:108
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
FPGATrackSimTrack::setNLayers
void setNLayers(int)
set the number of layers in the track.
Definition: FPGATrackSimTrack.cxx:107
FPGATrackSimTrackParsI::qOverPt
int qOverPt
Definition: FPGATrackSimTrackPars.h:59
FPGATrackSimTrackParsI
Definition: FPGATrackSimTrackPars.h:56
HepMC::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Definition: MagicNumbers.h:358
FPGATrackSimMatrixGenAlgo::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
Definition: FPGATrackSimMatrixGenAlgo.h:77
FPGATrackSimMatrixGenAlgo::m_temp_eta_max
Gaudi::Property< float > m_temp_eta_max
Definition: FPGATrackSimMatrixGenAlgo.h:119
FPGATrackSimEventInputHeader::reset
void reset()
Definition: FPGATrackSimEventInputHeader.cxx:14
python.compressB64.c
def c
Definition: compressB64.py:93
FPGATrackSimMatrixGenAlgo::selectHit_returnCode
selectHit_returnCode
Definition: FPGATrackSimMatrixGenAlgo.h:151
SiliconTech::pixel
@ pixel
FPGATrackSimTrack::setHoughX
void setHoughX(float v)
Definition: FPGATrackSimTrack.h:90
FPGATrackSimHit::getHitType
HitType getHitType() const
Definition: FPGATrackSimHit.h:57
FPGATrackSimMatrixGenAlgo::m_temp_c_slices
Gaudi::Property< int > m_temp_c_slices
Definition: FPGATrackSimMatrixGenAlgo.h:120
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:54
FPGATrackSimMatrixGenAlgo::m_nDim_2nd
int m_nDim_2nd
Definition: FPGATrackSimMatrixGenAlgo.h:133
FPGATrackSimMatrixGenAlgo::m_nLayers_2nd
int m_nLayers_2nd
Definition: FPGATrackSimMatrixGenAlgo.h:132
LArGeo::ATan2
GeoGenfun::FunctionNoop ATan2(GeoGenfun::GENFUNCTION y, GeoGenfun::GENFUNCTION x)
Definition: BarrelAuxFunctions.cxx:50