ATLAS Offline Software
FPGATrackSimHitFilteringTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "geometry_constants.h"
12 
13 #include <vector>
14 #include <fstream>
15 #include <cmath>
16 #include <iostream>
17 #include <sstream>
18 #include <boost/algorithm/string.hpp>
19 
20 using namespace asg::msgUserCode;
21 
22 void fill_nearby_hits(const FPGATrackSimHit&, std::vector<std::pair<FPGATrackSimHit,unsigned>> &, std::vector<std::pair<FPGATrackSimHit,unsigned>> &);
25 
26 FPGATrackSimHitFilteringTool::FPGATrackSimHitFilteringTool(const std::string &algname, const std::string &name, const IInterface *ifc)
27  : base_class(algname, name, ifc)
28 {
29 }
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
33 {
34 
35  // random removal
37  m_doRandomRemoval = true;
38  if(m_doRandomRemoval) {
39  m_random.SetSeed(1); // for reproducibility
40  ANA_MSG_INFO("Doing random removal with pixel hit, cluster = " << m_rndPixelHitRmFrac << ", " << m_rndPixelClustRmFrac << " and strip = " << m_rndStripHitRmFrac << ", " << m_rndStripClustRmFrac);
41  }
42 
43  // stubs
44  if(m_doStubs) {
45  ANA_MSG_INFO("Doing stub filtering");
46 
47  if(m_stubCutsFile != "") {
48  // look for it via absolute path
49  ANA_MSG_INFO("looking for stub cuts file " << m_stubCutsFile);
50  std::ifstream inFile;
51  inFile.open(m_stubCutsFile);
52  if(inFile) {
53  ANA_MSG_INFO("reading in from there");
54  }
55  else { // if not there, try PathResolver (might be in TrigHttHitFiltering/config/)
56  std::string stubCutsFile = PathResolver::find_file(m_stubCutsFile, "DATAPATH");
57  inFile.open(stubCutsFile);
58  if(inFile) {
59  ANA_MSG_INFO("read in " << stubCutsFile);
60  }
61  else {
62  ANA_MSG_ERROR("Couldn't find it");
63  return StatusCode::FAILURE;
64  }
65  }
66 
67  std::string line;
68 
69  while(!inFile.eof()) {
70  std::getline(inFile, line);
71  if(line.substr(0,1) == "#" || line == "")
72  continue;
73  std::vector<std::string> strs, cuts_str;
74  boost::split(strs, line, boost::is_any_of("\t"));
75  if(m_useNstrips)
76  boost::split(cuts_str, strs[4], boost::is_any_of(","));
77  else
78  boost::split(cuts_str, strs[3], boost::is_any_of(","));
79  std::pair<float,float> cuts;
80  cuts.first = std::stof(cuts_str[0]);
81  cuts.second = std::stof(cuts_str[1]);
82  m_stubCutMap[strs[0]][std::stoi(strs[1])][std::stoi(strs[2])] = cuts;
83  }
84  }
85 
86  else {
87  // populate it with uniform values
88  ANA_MSG_INFO("using global values for stub cuts");
89 
90  if(m_useNstrips) {
91  ANA_MSG_ERROR("you asked to use Nstrips in stub selection, but that only works when reading in a file (defaults not set)");
92  return StatusCode::FAILURE;
93  }
94  for(int i=0; i<4; i++) {
95  for(int j=-14; j<14; j++) {
96  m_stubCutMap["bar"][i][j] = std::pair<float,float>(-m_barrelStubDphiCut, m_barrelStubDphiCut);
97  }
98  }
99  for(int i=0; i<6; i++) {
100  for(int j=0; j<6; j++) {
101  m_stubCutMap["EC+"][i][j] = std::pair<float,float>(-m_endcapStubDphiCut, m_endcapStubDphiCut);
102  m_stubCutMap["EC-"][i][j] = std::pair<float,float>(-m_endcapStubDphiCut, m_endcapStubDphiCut);
103  }
104  }
105  }
106 
107  // print out the stubCutMap
108  if(m_useNstrips)
109  ANA_MSG_INFO("using stub cut map (nStrips):");
110  else
111  ANA_MSG_INFO("using stub cut map (dPhi):");
112  for(const auto& zone_map : m_stubCutMap) {
113  for(const auto& layer_map : zone_map.second) {
114  for(const auto& ring_map : layer_map.second) {
115  ANA_MSG_INFO(" " << zone_map.first << " " << layer_map.first
116  << " " << ring_map.first << " " << ring_map.second.first
117  << ", " << ring_map.second.second);
118  }
119  }
120  }
121  }
122 
123  return StatusCode::SUCCESS;
124 }
125 
126 
128 {
129  if(!m_doRandomRemoval)
130  return StatusCode::SUCCESS;
131 
132  float pixelFrac = hit_or_cluster ? m_rndPixelHitRmFrac : m_rndPixelClustRmFrac;
133  float stripFrac = hit_or_cluster ? m_rndStripHitRmFrac : m_rndStripClustRmFrac;
134 
135  if(pixelFrac==0 && stripFrac==0)
136  return StatusCode::SUCCESS;
137 
138  for (int i = 0; i < header.nTowers(); ++i) {
139  FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
140  std::vector<FPGATrackSimHit> hits;
141  hits = tower.hits();
143 
144  std::vector<FPGATrackSimHit> filteredHits;
145  for(const auto & hit : hits) {
146  if(hit.isStrip()) {
147  if(m_random.Rndm() >= stripFrac)
148  filteredHits.push_back(hit);
149  }
150  else {
151  if(m_random.Rndm() >= pixelFrac)
152  filteredHits.push_back(hit);
153  }
154  }
155 
156  tower.clearHits();
157  for (const auto & hit : filteredHits) {
158  tower.addHit(hit);
159  }
160 
161  std::string hit_or_cluster_str = hit_or_cluster ? "hit" : "cluster";
162  ANA_MSG_INFO("After random " << hit_or_cluster_str << " removal - (pixel, strip) = (" << pixelFrac << ", " << stripFrac << ") - have " << filteredHits.size() << " left of " << hits.size() << " " << hit_or_cluster_str << "s");
163 
164  }
165  return StatusCode::SUCCESS;
166 }
167 
168 
169 
170 StatusCode FPGATrackSimHitFilteringTool::GetPairedStripPhysLayers(const FPGATrackSimPlaneMap *planeMap, std::vector<int> &paired_strip_layers)
171 {
172  std::vector<int> all_strip_layers;
173 
174  for(int logiLayer = 0; logiLayer < int(planeMap->getNLogiLayers()); logiLayer++) {
175  for(int section = 0; section < int(planeMap->getNSections(logiLayer)); section++) {
176  LayerInfo thisLayerInfo = planeMap->getLayerInfo(logiLayer,section);
177  if(thisLayerInfo.siTech == SiliconTech::pixel) {
178  continue;
179  }
180  else if (thisLayerInfo.siTech == SiliconTech::strip) {
181  all_strip_layers.push_back(thisLayerInfo.physLayer);
182  // check assumptions about physLayer and stereo parity
183  if((thisLayerInfo.physLayer - thisLayerInfo.stereo) % 2 != 0) {
184  ANA_MSG_ERROR("expected parity of strip physLayer and stereo doesn't hold: " <<
185  logiLayer << ", " << section << ": " << thisLayerInfo.siTech <<
186  ", " << thisLayerInfo.zone << ", " << thisLayerInfo.physLayer <<
187  ", " << thisLayerInfo.stereo);
188  return StatusCode::FAILURE;
189  }
190 
191  }
192  else {
193  ANA_MSG_WARNING("siTech not in (pixel,strip)");
194  continue;
195  }
196  }
197  }
198  // need both stereo sides
199  // for each odd one, need x-1, then odd one is good
200  // for each even one, need x+1, then even one is good
201  for(const auto& physLayer : all_strip_layers) {
202  if(physLayer % 2 == 1) {
203  if(std::find(all_strip_layers.begin(), all_strip_layers.end(), physLayer-1) != all_strip_layers.end())
204  paired_strip_layers.push_back(physLayer);
205  }
206  else {
207  if(std::find(all_strip_layers.begin(), all_strip_layers.end(), physLayer+1) != all_strip_layers.end())
208  paired_strip_layers.push_back(physLayer);
209  }
210  }
211  return StatusCode::SUCCESS;
212 }
213 
214 
216  std::vector<int> filter_pixel_physLayers,
217  std::vector<int> filter_strip_physLayers,
218  std::vector<FPGATrackSimCluster> &filteredClusters)
219 {
220 
221  int nHits_preFilt = countHitsFromHeader(header);
222 
223  for (int i = 0; i < header.nTowers(); ++i) {
224  FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
225  std::vector<FPGATrackSimHit> hits;
226  hits = tower.hits();
228 
229  std::vector<FPGATrackSimHit> filteredHits;
230  FilterHits(hits, filter_pixel_physLayers, filter_strip_physLayers, filteredHits);
231 
232  // replace old clusters with new ones (the things called hits here are actually clusters)
233  tower.clearHits();
234  for (auto& hit : filteredHits) {
235  tower.addHit(hit);
236  // make FPGATrackSimCluster for monitoring
237  FPGATrackSimCluster cluster;
238  if(hit.isPixel()){
239  FPGATrackSimCLUSTERING::updatePixelCluster(cluster, hit, true);
240  }
241  if(hit.isStrip()){
242  FPGATrackSimCLUSTERING::updateStripCluster(cluster, hit, true);
243  }
244  filteredClusters.push_back(cluster);
245  }
246  }
247 
248  int nHits_postFilt = countHitsFromHeader(header);
249 
250  if(m_doStubs) { // random removal doesn't impact this so rather boring output
251  if(nHits_postFilt == nHits_preFilt) {
252  ANA_MSG_INFO("Stub filtering had no impact: " << nHits_preFilt << " hits/clusters");
253  }
254  else if(nHits_postFilt < nHits_preFilt) {
255  ANA_MSG_INFO("Stub filtering reduced from " << nHits_preFilt << " to " << nHits_postFilt << " hits/clusters");
256  }
257  else {
258  ANA_MSG_WARNING("Stub filtering has led to duplication - started with " << nHits_preFilt << " and ended up with " << nHits_postFilt << " hits/clusters");
260  }
261  }
262 
263  return StatusCode::SUCCESS;
264 }
265 
266 
267 void FPGATrackSimHitFilteringTool::FilterHits(std::vector<FPGATrackSimHit> &hits,
268  std::vector<int> &filter_pixel_physLayers,
269  std::vector<int> &filter_strip_physLayers,
270  std::vector<FPGATrackSimHit> &filteredHits)
271 {
272 
273  // there are two types of clusters
274  // 1. Those in a part of the detector I am not going to try and filter
275  // 2. Those in a part of the detector I am am going to try and filter
276 
277  // for stub-type filtering, I want to compare all hits on one side to all hits on the other side
278  // don't want to duplicate by doing this twice
279  // use pair<FPGATrackSimHit,ID> to deal with duplicates
280 
281  filteredHits.clear();
282 
283  if(m_doStubs) {
284  // step 1: make a vector of just the hits I am going to try and filter, add the others straight to the passed list. Also give each hit an ID
285 
286  std::vector< std::pair<FPGATrackSimHit,unsigned> > filteredHits_ID, hits_to_filter;
287  unsigned counter = 0;
288  for (const auto &hit : hits) {
289  // assign hit ID
290  std::pair<FPGATrackSimHit,unsigned> hit_ID;
291  hit_ID.first = hit;
292  hit_ID.second = counter;
293  counter ++;
294 
295  // check pixel layer
296  if(!hit.isStrip()) {
297  if( std::any_of(std::begin(filter_pixel_physLayers), std::end(filter_pixel_physLayers),
298  [&](unsigned i) { return i == hit.getPhysLayer(); }) )
299  hits_to_filter.push_back(hit_ID);
300  else
301  filteredHits_ID.push_back(hit_ID);
302  }
303  // check strip layer
304  else {
305  if( std::any_of(std::begin(filter_strip_physLayers), std::end(filter_strip_physLayers),
306  [&](unsigned i) { return i == hit.getPhysLayer(); }) )
307  hits_to_filter.push_back(hit_ID);
308  else
309  filteredHits_ID.push_back(hit_ID);
310  }
311  }
312 
313  // step 2: split into two lists: inner and outer side modules
314  std::vector< std::pair<FPGATrackSimHit,unsigned> > hits_to_filter_inner, hits_to_filter_outer;
315  // ideally use hit.GetSide(), but since this doesn't exist and can't be added
316  // (until I add a friend class, coming soon hopefully)
317  // have to use the hit physLayer
318 
319  for (const auto &hit : hits_to_filter) {
320  if (hit.first.getPhysLayer() % 2 == 0)
321  hits_to_filter_inner.push_back(hit);
322  else
323  hits_to_filter_outer.push_back(hit);
324  }
325 
326  // step 3: do the stub filtering
327  std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_inner_hits, passed_outer_hits;
328  for (const auto &innerHit : hits_to_filter_inner) {
329  std::vector<std::pair<FPGATrackSimHit,unsigned>> nearby_outer_hits;
330  fill_nearby_hits(innerHit.first, hits_to_filter_outer, nearby_outer_hits);
331 
332  // get cut values to apply
333  float cut_m, cut_p;
334  fill_cut_values(innerHit.first, cut_m, cut_p);
335 
336  for (const auto &outerHit : nearby_outer_hits) {
337  bool hitPassed = check_hit_stub(innerHit.first, outerHit.first, cut_m, cut_p);
338  if(hitPassed) {
339  // will have duplicates. Maybe interesting to count them, so remove later
340  passed_inner_hits.push_back(innerHit);
341  passed_outer_hits.push_back(outerHit);
342  }
343  }
344  }
345 
346  // step 4: remove duplicates among the passed hits
347  std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_outer_hits_unique;
348  for (const auto &hit : passed_outer_hits) {
349  auto it = std::find_if(passed_outer_hits_unique.begin(), passed_outer_hits_unique.end(),
350  [&hit](const std::pair<FPGATrackSimHit,unsigned>& h) {return h.second == hit.second;} );
351  if(it == passed_outer_hits_unique.end()) {
352  passed_outer_hits_unique.push_back(hit);
353  }
354  }
355  std::vector< std::pair<FPGATrackSimHit,unsigned> > passed_inner_hits_unique;
356  for (const auto &hit : passed_inner_hits) {
357  auto it = std::find_if(passed_inner_hits_unique.begin(), passed_inner_hits_unique.end(),
358  [&hit](const std::pair<FPGATrackSimHit,unsigned>& h) {return h.second == hit.second;} );
359  if(it == passed_inner_hits_unique.end()) {
360  passed_inner_hits_unique.push_back(hit);
361  }
362  }
363 
364 
365  // step 5: combine them all and sort
366  for (auto &hit : passed_inner_hits_unique) {
367  filteredHits_ID.push_back(hit);
368  }
369  for (const auto &hit : passed_outer_hits_unique) {
370  filteredHits_ID.push_back(hit);
371  }
372  if(true) {
373  // can sort by the hit ID
374  std::sort(filteredHits_ID.begin(), filteredHits_ID.end(),
375  [](const std::pair<FPGATrackSimHit,unsigned> & hit1, const std::pair<FPGATrackSimHit,unsigned> & hit2){
376  return hit1.second < hit2.second;
377  });
378  for (const auto &hit_ID : filteredHits_ID) {
379  filteredHits.push_back(hit_ID.first);
380  }
381  }
382 
383  }
384  else {
385  // fill up filteredHits with the input hits (needed for random removal, which isn't done here)
386  filteredHits = hits;
387  }
388 
389 }
390 
391 
392 void FPGATrackSimHitFilteringTool::fill_cut_values(const FPGATrackSimHit& hit, float &cut_m, float &cut_p)
393 {
394  // if we're doing this globally, then no need to use map
395  // but probably best to for consistency
396 
397  // get cut from map - first, find out which zone, layer and module ring we're in
398  // can maybe do this from module ID, might be faster
399 
400  std::string zone;
401  int layer, ring;
402  if(hit.isBarrel()) {
403  zone = "bar";
404  layer = hit.getLayerDisk();
405  // barrel modules are spaced at 100mm intervals. This might go wrong at the ends, need to verify
406  ring = int(floor(hit.getZ() / 100.));
407  }
408  else {
409  zone = (hit.getZ() < 0) ? "EC-" : "EC+";
410  layer = hit.getLayerDisk();
411 
412  // use hit radius to determine module ring from endcap geometry in geometry_constants namespace
413  int index = -1;
416  ANA_MSG_ERROR("hit radius " << hit.getR() << "is not within bounds of endcap innerRadii vector");
417  ring = hit.getR() < geometry_constants::strip_endcap_innerRadii.front() ? 0 : 5;
418  }
419  else {
423  int temp = index;
424  // subtract numbers from the start until get below zero
425  for(ring=0; ring < int(geometry_constants::strip_endcap_nRows.size()); ring++) {
427  if(temp<0)
428  break;
429  }
430  }
431  }
432 
433  cut_m = m_stubCutMap[zone][layer][ring].first;
434  cut_p = m_stubCutMap[zone][layer][ring].second;
435 
436 }
437 
438 
439 bool FPGATrackSimHitFilteringTool::check_hit_stub(const FPGATrackSimHit& innerHit, const FPGATrackSimHit& outerHit, float cut_m, float cut_p)
440 {
441 
442  float val;
443 
444  if(!m_useNstrips) {
445  // calculate dphi - accounting for 2 pi wrapping
446  float pi = M_PI;
447  float dPhi = (outerHit.getGPhi() - innerHit.getGPhi());
448  if(dPhi > pi)
449  dPhi -= 2*pi;
450  if(dPhi < -pi)
451  dPhi += 2*pi;
452 
453  // we want it in mrad
454  val = dPhi * 1000;
455  }
456 
457  else {
458  val = 0;
459  }
460 
461  // apply cuts
462  return (val > cut_m && val < cut_p);
463 }
464 
465 
466 
467 void fill_nearby_hits(const FPGATrackSimHit& innerHit, std::vector< std::pair<FPGATrackSimHit,unsigned> > & outerHits, std::vector< std::pair<FPGATrackSimHit,unsigned> > & nearby_outer_hits)
468 {
469  for (const auto& outerHit : outerHits) {
470  // layer needs to be inner hit physLayer + 1
471  if(outerHit.first.getPhysLayer() != innerHit.getPhysLayer() + 1)
472  continue;
473 
474  // want to do just +-1 in eta/phi as appropriate
475  // but need to interpret module IDs first
476 
477  // for now, just do by z in barrel and rho in EC
478  // strips are at most 50mm long in barrel, 60mm long in EC
479  // adjacent one is at most a bit over 60mm away
480 
481  if(innerHit.isBarrel()) {
482  if(fabs(innerHit.getZ() - outerHit.first.getZ()) > 80)
483  continue;
484  }
485  else {
486  if(fabs(innerHit.getR() - outerHit.first.getR()) > 80)
487  continue;
488  }
489 
490  // now distance in x-y plane
491  if(fabs(innerHit.getX() - outerHit.first.getX()) > 80)
492  continue;
493  if( fabs(innerHit.getY() - outerHit.first.getY()) > 80)
494  continue;
495 
496  nearby_outer_hits.push_back(outerHit);
497  }
498 }
499 
500 
502 {
503  int nHits = 0;
504  for (int i = 0; i < header.nTowers(); ++i) {
505  FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
506  std::vector<FPGATrackSimHit> hits = tower.hits();
507  nHits += hits.size();
508  }
509  return nHits;
510 }
511 
512 
514 {
515  for (int i = 0; i < header.nTowers(); ++i) {
516  FPGATrackSimTowerInputHeader &tower = *header.getTower(i);
517  std::vector<FPGATrackSimHit> hits = tower.hits();
518  ANA_MSG_DEBUG("tower " << i << " with " << hits.size() << " hits:");
519  for(const auto& hit : hits) {
520  ANA_MSG_DEBUG(" isStrip, side, x, y, z, rho, phi, physLayer, layer, section, phiM, etaM = " << hit.isStrip() << ", " << hit.getPhysLayer()%2 << ", " << hit.getX() << ", " << hit.getY() << ", " << hit.getZ() << ", " << hit.getR() << ", " << hit.getGPhi() << ", " << hit.getPhysLayer() << ", " << hit.getLayer() << ", " << hit.getSection() << ", " << hit.getPhiModule() << ", " << hit.getEtaModule());
521  }
522  }
523 }
FPGATrackSimTowerInputHeader::clearHits
void clearHits()
Definition: FPGATrackSimTowerInputHeader.h:47
temp
Definition: JetEventDict.h:21
FPGATrackSimHitFilteringTool::m_rndPixelClustRmFrac
Gaudi::Property< float > m_rndPixelClustRmFrac
Definition: FPGATrackSimHitFilteringTool.h:54
FPGATrackSimPlaneMap::getNSections
uint32_t getNSections(size_t logiLayer) const
Definition: FPGATrackSimPlaneMap.h:80
getMenu.algname
algname
Definition: getMenu.py:53
checkFileSG.line
line
Definition: checkFileSG.py:75
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
fill_nearby_hits
void fill_nearby_hits(const FPGATrackSimHit &, std::vector< std::pair< FPGATrackSimHit, unsigned >> &, std::vector< std::pair< FPGATrackSimHit, unsigned >> &)
FPGATrackSimPlaneMap::getNLogiLayers
uint32_t getNLogiLayers() const
Definition: FPGATrackSimPlaneMap.h:78
SiliconTech::strip
@ strip
header
Definition: hcg.cxx:526
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer() const
Definition: FPGATrackSimHit.cxx:67
FPGATrackSimCLUSTERING::attachTruth
void attachTruth(std::vector< FPGATrackSimHit > &)
Definition: FPGATrackSimClusteringTool.cxx:256
FPGATrackSimHitFilteringTool::DoHitFiltering
virtual StatusCode DoHitFiltering(FPGATrackSimLogicalEventInputHeader &, std::vector< int >, std::vector< int >, std::vector< FPGATrackSimCluster > &) override
Definition: FPGATrackSimHitFilteringTool.cxx:215
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:25
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
countHitsFromHeader
int countHitsFromHeader(FPGATrackSimLogicalEventInputHeader &)
Definition: FPGATrackSimHitFilteringTool.cxx:501
FPGATrackSimCLUSTERING::updateStripCluster
bool updateStripCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster)
Definition: FPGATrackSimClusteringTool.cxx:356
FPGATrackSimTowerInputHeader::addHit
void addHit(FPGATrackSimHit s)
Definition: FPGATrackSimTowerInputHeader.h:46
FPGATrackSimHitFilteringTool::m_doStubs
Gaudi::Property< bool > m_doStubs
Definition: FPGATrackSimHitFilteringTool.h:56
index
Definition: index.py:1
FPGATrackSimHitFilteringTool::m_rndStripClustRmFrac
Gaudi::Property< float > m_rndStripClustRmFrac
Definition: FPGATrackSimHitFilteringTool.h:55
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:125
makeTOC.inFile
string inFile
Definition: makeTOC.py:5
FPGATrackSimHitFilteringTool::fill_cut_values
void fill_cut_values(const FPGATrackSimHit &, float &, float &)
Definition: FPGATrackSimHitFilteringTool.cxx:392
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
printHitsFromHeader
void printHitsFromHeader(FPGATrackSimLogicalEventInputHeader &)
Definition: FPGATrackSimHitFilteringTool.cxx:513
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LayerInfo::stereo
int stereo
Definition: FPGATrackSimPlaneMap.h:57
M_PI
#define M_PI
Definition: ActiveFraction.h:11
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
FPGATrackSimMultiTruth.h
FPGATrackSimHitFilteringTool::m_stubCutMap
std::unordered_map< std::string, std::unordered_map< int, std::unordered_map< int, std::pair< float, float > > > > m_stubCutMap
Definition: FPGATrackSimHitFilteringTool.h:64
FPGATrackSimHit::getLayerDisk
unsigned getLayerDisk() const
Definition: FPGATrackSimHit.h:77
FPGATrackSimHitFilteringTool::m_random
TRandom3 m_random
Definition: FPGATrackSimHitFilteringTool.h:63
FPGATrackSimHitFilteringTool.h
pi
#define pi
Definition: TileMuonFitter.cxx:65
geometry_constants::strip_endcap_nRows
const std::vector< int > strip_endcap_nRows
Definition: geometry_constants.h:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
geometry_constants::strip_endcap_innerRadii
const std::vector< float > strip_endcap_innerRadii
Definition: geometry_constants.h:17
geometry_constants.h
file to define various geometry constants
FPGATrackSimHit
Definition: FPGATrackSimHit.h:38
FPGATrackSimHit::getGPhi
float getGPhi() const
Definition: FPGATrackSimHit.h:129
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FPGATrackSimHitFilteringTool::FPGATrackSimHitFilteringTool
FPGATrackSimHitFilteringTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimHitFilteringTool.cxx:26
FPGATrackSimHitFilteringTool::m_doRandomRemoval
Gaudi::Property< bool > m_doRandomRemoval
Definition: FPGATrackSimHitFilteringTool.h:51
lumiFormat.i
int i
Definition: lumiFormat.py:92
h
FPGATrackSimHitFilteringTool::m_rndPixelHitRmFrac
Gaudi::Property< float > m_rndPixelHitRmFrac
Definition: FPGATrackSimHitFilteringTool.h:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:530
ANA_MSG_INFO
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:290
MessageCheck.h
macros for messaging and checking status codes
ANA_MSG_WARNING
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:292
plotBeamSpotVert.cuts
string cuts
Definition: plotBeamSpotVert.py:93
FPGATrackSimPlaneMap::getLayerInfo
const LayerInfo & getLayerInfo(uint32_t layer, uint32_t section) const
Definition: FPGATrackSimPlaneMap.h:107
FPGATrackSimHitFilteringTool::m_rndStripHitRmFrac
Gaudi::Property< float > m_rndStripHitRmFrac
Definition: FPGATrackSimHitFilteringTool.h:53
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:126
FPGATrackSimHitFilteringTool::check_hit_stub
bool check_hit_stub(const FPGATrackSimHit &, const FPGATrackSimHit &, float, float)
Definition: FPGATrackSimHitFilteringTool.cxx:439
FPGATrackSimHit::getZ
float getZ() const
Definition: FPGATrackSimHit.h:127
FPGATrackSimPlaneMap
Definition: FPGATrackSimPlaneMap.h:62
FPGATrackSimCLUSTERING::updatePixelCluster
bool updatePixelCluster(FPGATrackSimCluster &currentCluster, FPGATrackSimHit &incomingHit, bool newCluster)
Definition: FPGATrackSimClusteringTool.cxx:275
PathResolver.h
python.draw_obj.zone
def zone(nx, ny)
Definition: draw_obj.py:288
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LayerInfo
Definition: FPGATrackSimPlaneMap.h:52
LayerInfo::zone
DetectorZone zone
Definition: FPGATrackSimPlaneMap.h:54
FPGATrackSimHitFilteringTool::m_stubCutsFile
Gaudi::Property< std::string > m_stubCutsFile
Definition: FPGATrackSimHitFilteringTool.h:57
DeMoScan.index
string index
Definition: DeMoScan.py:362
FPGATrackSimHit::getR
float getR() const
Definition: FPGATrackSimHit.h:128
LayerInfo::siTech
SiliconTech siTech
Definition: FPGATrackSimPlaneMap.h:53
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
FPGATrackSimHitFilteringTool::GetPairedStripPhysLayers
virtual StatusCode GetPairedStripPhysLayers(const FPGATrackSimPlaneMap *, std::vector< int > &) override
Definition: FPGATrackSimHitFilteringTool.cxx:170
FPGATrackSimClusteringTool.h
FPGATrackSimTowerInputHeader::hits
const std::vector< FPGATrackSimHit > & hits() const
Definition: FPGATrackSimTowerInputHeader.h:44
FPGATrackSimHitFilteringTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimHitFilteringTool.cxx:32
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
FPGATrackSimTowerInputHeader
Definition: FPGATrackSimTowerInputHeader.h:18
FPGATrackSimHitFilteringTool::m_useNstrips
Gaudi::Property< bool > m_useNstrips
Definition: FPGATrackSimHitFilteringTool.h:60
LayerInfo::physLayer
int physLayer
Definition: FPGATrackSimPlaneMap.h:55
test_pyathena.counter
counter
Definition: test_pyathena.py:15
FPGATrackSimHit::isBarrel
bool isBarrel() const
Definition: FPGATrackSimHit.h:63
FPGATrackSimHitFilteringTool::m_endcapStubDphiCut
Gaudi::Property< float > m_endcapStubDphiCut
Definition: FPGATrackSimHitFilteringTool.h:59
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
SiliconTech::pixel
@ pixel
FPGATrackSimCluster.h
FPGATrackSimHitFilteringTool::m_barrelStubDphiCut
Gaudi::Property< float > m_barrelStubDphiCut
Definition: FPGATrackSimHitFilteringTool.h:58
FPGATrackSimHitFilteringTool::DoRandomRemoval
virtual StatusCode DoRandomRemoval(FPGATrackSimLogicalEventInputHeader &, bool) override
Definition: FPGATrackSimHitFilteringTool.cxx:127
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288
FPGATrackSimHitFilteringTool::FilterHits
void FilterHits(std::vector< FPGATrackSimHit > &, std::vector< int > &, std::vector< int > &, std::vector< FPGATrackSimHit > &)
Definition: FPGATrackSimHitFilteringTool.cxx:267