Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Enumerations | Functions
FPGATrackSimHoughFunctions.h File Reference
#include "FPGATrackSimObjects/FPGATrackSimRoad.h"
#include "FPGATrackSimObjects/FPGATrackSimHit.h"
#include "FPGATrackSimObjects/FPGATrackSimTrack.h"
#include "GaudiKernel/ServiceHandle.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "FPGATrackSimMaps/IFPGATrackSimMappingSvc.h"
#include "FPGATrackSimMaps/FPGATrackSimPlaneMap.h"
#include "FPGATrackSimMaps/FPGATrackSimRegionMap.h"
#include "GaudiKernel/ToolHandle.h"
#include "AthenaMonitoringKernel/Monitored.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ORAlgo { ORAlgo::Normal, ORAlgo::InvertGrouping }
 

Functions

long getVolumeID (const FPGATrackSimHit &hit)
 
long getCoarseID (const FPGATrackSimHit &hit)
 
long getFineID (const FPGATrackSimHit &hit)
 
bool isFineIDInStrip (long ID)
 
bool isFineIDInPixel (long ID)
 
void getMissingInfo (const FPGATrackSimRoad &road, int &nMissing, bool &missPixel, bool &missStrip, layer_bitmask_t &missing_mask, layer_bitmask_t &norecovery_mask, const ServiceHandle< IFPGATrackSimMappingSvc > &FPGATrackSimMapping, const TrackCorrType idealCoordFitType)
 
void makeTrackCandidates (const FPGATrackSimRoad &road, const FPGATrackSimTrack &temp, std::vector< FPGATrackSimTrack > &track_cands, const ServiceHandle< IFPGATrackSimMappingSvc > &FPGATrackSimMapping)
 Creates a list of track candidates by taking all possible combination of hits in road. More...
 
StatusCode runOverlapRemoval (std::vector< FPGATrackSimTrack > &tracks, const float minChi2, const int NumOfHitPerGrouping, ORAlgo orAlgo, ToolHandle< GenericMonitoringTool > monTool)
 
void findMinChi2MaxHit (const std::vector< int > &duplicates, std::vector< FPGATrackSimTrack > &RMtracks, std::vector< int > flags_OR, const float minChi2)
 
int findNonOverlapHits (const FPGATrackSimTrack &Track1, const FPGATrackSimTrack &Track2)
 
int findNCommonHits (const FPGATrackSimTrack &Track1, const FPGATrackSimTrack &Track2)
 

Enumeration Type Documentation

◆ ORAlgo

enum ORAlgo
strong
Enumerator
Normal 
InvertGrouping 

Definition at line 20 of file FPGATrackSimHoughFunctions.h.

Function Documentation

◆ findMinChi2MaxHit()

void findMinChi2MaxHit ( const std::vector< int > &  duplicates,
std::vector< FPGATrackSimTrack > &  RMtracks,
std::vector< int >  flags_OR,
const float  minChi2 
)

Definition at line 186 of file FPGATrackSimHoughFunctions.cxx.

187 {
188  int ntr_belowMinChi2 = 0;
189  std::vector<int> track_counter;
190  std::vector<int> track_counter_minChi2;
191 
192  for(unsigned int i=0; i<RMtracks.size();i++)
193  {
194  if(RMtracks.at(i).getChi2ndof() > minChi2) {
195  track_counter.push_back(0);
196  flags_OR.push_back(-1);
197  continue;
198  }
199  ntr_belowMinChi2++;
200  track_counter.push_back(ntr_belowMinChi2);
201  track_counter_minChi2.push_back(ntr_belowMinChi2);
202  flags_OR.push_back(1);
203  }
204 
205  int dup_counter = 0;
206  int head_track = 1;
207  float head_chi2 = 0.;
208  int head_nhits = 0;
209 
210  for(auto dup: duplicates)
211  {
212  float t_chi2 = RMtracks.at(dup).getChi2ndof();
213  int t_nhitlayers = RMtracks.at(dup).getFPGATrackSimHits().size();
214  for(auto& hit : RMtracks.at(dup).getFPGATrackSimHits())
215  {
216  ANA_MSG_DEBUG("Real hit info = " << hit);
217  ANA_MSG_DEBUG("Real hit info (global) = Gphi= " << hit.getGPhi() << " Z=" << hit.getZ() << " R=" << hit.getR() << " chi2=" << t_chi2);
218 
219  if(!hit.isReal())
220  {
221  t_nhitlayers--;
222  }
223  }
224  if (dup_counter == 0) {
225  head_track = dup;
226  head_chi2 = RMtracks.at(head_track).getChi2ndof();
227  head_nhits = t_nhitlayers;
228  }
229  if (dup_counter > 0){
230  if(t_nhitlayers>head_nhits)
231  {
232  RMtracks.at(head_track).setPassedOR(0);
233  }
234  else if(t_nhitlayers==head_nhits)
235  {
236  if(t_chi2<head_chi2)
237  {
238  RMtracks.at(head_track).setPassedOR(0);
239  }
240  if(std::abs(t_chi2-head_chi2)<0.000001)
241  {
242  if(track_counter[head_track] < track_counter[dup]) {
243  RMtracks.at(dup).setPassedOR(0);
244  }
245  if(track_counter[head_track] > track_counter[dup]) {
246  RMtracks.at(head_track).setPassedOR(0);
247  }
248  }
249  }
250  }
251 
252  if(!RMtracks.at(head_track).passedOR()) flags_OR[head_track] = 0;
253  if(RMtracks.at(head_track).passedOR()) flags_OR[head_track] = 1;
254  dup_counter++;
255 
256  }
257 }

◆ findNCommonHits()

int findNCommonHits ( const FPGATrackSimTrack Track1,
const FPGATrackSimTrack Track2 
)

Definition at line 260 of file FPGATrackSimHoughFunctions.cxx.

261 {
262  int nCommHits=0;
263 
264  // Loop through all layers
265  for(unsigned int i = 0; i < Track1.getFPGATrackSimHits().size(); ++i)
266  {
267  const FPGATrackSimHit& hit1 = Track1.getFPGATrackSimHits().at(i);
268  const FPGATrackSimHit& hit2 = Track2.getFPGATrackSimHits().at(i);
269 
270  // Check if hit is missing
271  if(!hit1.isReal() || !hit2.isReal())
272  {
273  continue;
274  }
275  // Check if hit on the same plane
276  else if(hit1.getLayer() != hit2.getLayer())
277  {
278  continue;
279  }
280  // Check if two hits have the same hashID
281  else if(hit1.getIdentifierHash() != hit2.getIdentifierHash())
282  {
283  continue;
284  }
285  // Check if two hits have same coordinate. this is difficult due to spacepoints,
286  // since the same hit can be used to make multiple spacepoints.
287  else if (hit1.getHitType() == HitType::spacepoint && hit2.getHitType() == HitType::spacepoint) {
288 
289  if ((std::abs(hit1.getX() - hit2.getX()) < EPSILON) && (std::abs(hit1.getY() - hit2.getY()) < EPSILON) && (std::abs(hit1.getZ() - hit2.getZ()) < EPSILON)) {
290  nCommHits++;
291  } else {
292  continue;
293  }
294  }
295  // If both hits aren't spacepoints, we should be able to do this comparison.
296  else if (std::abs(hit1.getGPhi()-hit2.getGPhi())<0.001 && std::abs(hit1.getZ()-hit2.getZ())<0.001 && std::abs(hit1.getR()-hit2.getR())<0.001) {
297  nCommHits++;
298  }
299  else
300  {
301  continue;
302  }
303  }
304  return nCommHits;
305 }

◆ findNonOverlapHits()

int findNonOverlapHits ( const FPGATrackSimTrack Track1,
const FPGATrackSimTrack Track2 
)

Definition at line 140 of file FPGATrackSimHoughFunctions.cxx.

141 {
142  int nonOverlapHits=0;
143 
144  // Loop through all layers
145  for(unsigned int i = 0; i < Track1.getFPGATrackSimHits().size(); ++i)
146  {
147  const FPGATrackSimHit& hit1 = Track1.getFPGATrackSimHits().at(i);
148  const FPGATrackSimHit& hit2 = Track2.getFPGATrackSimHits().at(i);
149  // First make sure we are looking at real hits
150  if(!hit1.isReal() || !hit2.isReal())
151  {
152  continue;
153  }
154  // Check if two hits are on the same plane
155  else if(hit1.getLayer() != hit2.getLayer())
156  {
157  nonOverlapHits++;
158  }
159  // Check if two hits have the same hashID
160  else if(hit1.getIdentifierHash() != hit2.getIdentifierHash())
161  {
162  nonOverlapHits++;
163  }
164  // Check if two hits have same coordinate. this is difficult due to spacepoints,
165  // since the same hit can be used to make multiple spacepoints.
166  else if (hit1.getHitType() == HitType::spacepoint && hit2.getHitType() == HitType::spacepoint) {
167  if ((abs(hit1.getX() - hit2.getX()) > EPSILON) || (abs(hit1.getY() - hit2.getY()) < EPSILON) || (abs(hit1.getZ() - hit2.getZ()) < EPSILON)) {
168  nonOverlapHits++;
169  } else {
170  continue;
171  }
172  }
173  else if (std::abs(hit1.getGPhi()-hit2.getGPhi())>0.001 && std::abs(hit1.getZ()-hit2.getZ())>0.001 && std::abs(hit1.getR()-hit2.getR())>0.001)
174  {
175  nonOverlapHits++;
176  }
177  else
178  {
179  continue;
180  }
181  }
182  return nonOverlapHits;
183 }

◆ getCoarseID()

long getCoarseID ( const FPGATrackSimHit hit)

Definition at line 495 of file FPGATrackSimHoughFunctions.cxx.

496 {
497  // Custom labelling for the detector layers
498  // to be used in NN training.
499  // This aims at providing a continuous numbering according to this convention:
500  // strip barrel layers in [0,3]
501  // strip C-side end cap layers in [4,9]
502  // strip A-side end cap layers in [10,15]
503  // pixel barrel layers in [16,20]
504  // pixel C-side end cap layers in [21,29]
505  // pixel A-side end cap layers > 30
506  // returns large negative value if no layer
507 
508  long volumeID = getVolumeID(hit);
509  unsigned layerID = hit.getLayerDisk();
510 
511  long offset = -10000;
512 
513  if(volumeID == 10) offset = 0; //strip barrel
514  if(volumeID == 8) offset = 4; //strip -ve EC
515  if(volumeID == 12) offset = 10; //strip +ve EC
516  if(volumeID == 0) offset = 16; // pix barrel
517  if(volumeID == -2) offset = 21; //pix -ve EC
518  if(volumeID == 2) offset = 30; //pix +ve EC
519  return offset + layerID;
520 }

◆ getFineID()

long getFineID ( const FPGATrackSimHit hit)

Definition at line 532 of file FPGATrackSimHoughFunctions.cxx.

533 {
534  // Custom labelling for the detector layers
535  // to be used in NN training.
536  // Returns a labelling of non-barrel pixel hits similar to a hit's eta index,
537  // but with a continuous numbering.
538  // Otherwise return convention defined in getCoarseID.
539 
540  long volumeID = getVolumeID(hit);
541  unsigned layerID = hit.getLayerDisk(true);
542  int etaID = hit.getEtaModule(true);
543 
544  long offset = -1000;
545 
546  if(volumeID == 10) return getCoarseID(hit); //strip barrel
547  if(volumeID == 8) return getCoarseID(hit); //strip -ve EC
548  if(volumeID == 12) return getCoarseID(hit); //strip +ve EC
549  if(volumeID == 0) return getCoarseID(hit); //pix barrel
550  if(volumeID == -999) return -999; //hit not in any physical layer
551  if(volumeID == -2)
552  {
553  if(layerID == 0) offset = 21;
554  if(layerID == 1) offset = 21+15;
555  if(layerID == 2) offset = 21+15+6;
556  if(layerID == 3) offset = 21+15+6+23;
557  if(layerID == 4) offset = 21+15+6+23+6;
558  if(layerID == 5) offset = 21+15+6+23+6+11;
559  if(layerID == 6) offset = 21+15+6+23+6+11+8;
560  if(layerID == 7) offset = 21+15+6+23+6+11+8+8;
561  if(layerID == 8) offset = 21+15+6+23+6+11+8+8+9;
562  return offset + etaID;
563  }
564  if(volumeID == 2)
565  {
566  if(layerID == 0) offset = 116;
567  if(layerID == 1) offset = 116+15;
568  if(layerID == 2) offset = 116+15+6;
569  if(layerID == 3) offset = 116+15+6+23;
570  if(layerID == 4) offset = 116+15+6+23+6;
571  if(layerID == 5) offset = 116+15+6+23+6+11;
572  if(layerID == 6) offset = 116+15+6+23+6+11+8;
573  if(layerID == 7) offset = 116+15+6+23+6+11+8+8;
574  if(layerID == 8) offset = 116+15+6+23+6+11+8+8+9;
575  return offset + etaID;
576  }
577 
578  return -1;
579 }

◆ getMissingInfo()

void getMissingInfo ( const FPGATrackSimRoad road,
int &  nMissing,
bool &  missPixel,
bool &  missStrip,
layer_bitmask_t missing_mask,
layer_bitmask_t norecovery_mask,
const ServiceHandle< IFPGATrackSimMappingSvc > &  FPGATrackSimMapping,
const TrackCorrType  idealCoordFitType 
)

Definition at line 309 of file FPGATrackSimHoughFunctions.cxx.

310 {
311  int subregion = road.getSubRegion();
312  nMissing = FPGATrackSimMapping->PlaneMap_1st(subregion)->getNCoords(); // init with nCoords and decrement as we find misses
313  missPixel = false;
314  missStrip = false;
315  missing_mask = 0;
316  norecovery_mask = 0;
317  unsigned int wclayers = road.getWCLayers();
318  for (unsigned layer = 0; layer < FPGATrackSimMapping->PlaneMap_1st(subregion)->getNLogiLayers(); layer++)
319  {
320  int nHits = road.getHits(layer).size();
321  if (nHits==0)
322  {
323  if (idealCoordFitType == TrackCorrType::None && ((wclayers >> layer) & 1))
324  {
325  int ix = FPGATrackSimMapping->PlaneMap_1st(subregion)->getCoordOffset(layer);
326  int iy = ix + 1;
327  if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(layer))
328  {
329  missing_mask |= 1 << ix;
330  nMissing -= 1;
331  }
332  else
333  {
334  missing_mask |= (1<<ix) | (1<<iy);
335  nMissing -= 2;
336  }
337  }
338  else
339  {
340  if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(layer)) missStrip = true;
341  else missPixel = true;
342  }
343  }
344  else if (!((wclayers >> layer) & 1)) { // we have a hit
345  int ix = FPGATrackSimMapping->PlaneMap_1st(subregion)->getCoordOffset(layer);
346  int iy = ix + 1;
347  if (FPGATrackSimMapping->PlaneMap_1st(subregion)->isSCT(layer))
348  {
349  missing_mask |= 1 << ix;
350  nMissing -= 1;
351  }
352  else
353  {
354  missing_mask |= (1<<ix) | (1<<iy);
355  nMissing -= 2;
356  }
357 
358  }
359  }
360 }

◆ getVolumeID()

long getVolumeID ( const FPGATrackSimHit hit)

Definition at line 440 of file FPGATrackSimHoughFunctions.cxx.

441 {
442  // Custom labelling for the detector volumes
443  // to be used in NN training.
444  // Convention:
445  // barrel | else
446  //-------------------------------------
447  // Pixel | 0 | 2*sign(z)
448  // Strip | 10 | 10 + 2*sign(z)
449  //
450  // Explicitly:
451  // -2: C-side (-z) end cap pixel
452  // 0: barrel pixel
453  // 2: A-side (+z) end cap pixel
454  // 8: C-side end cap strip
455  // 10: barrel strip
456  // 12: A-sde end cap strip
457  // returns -999 if not a real hit
458 
459 
460  long volumeID = -1;
461 
462  if (hit.getR() == 0.0) {
463  return -999; //hit not in any physical layer
464  }
465 
466  if(hit.isBarrel()) {
467  if (hit.isPixel()) {
468  volumeID = 0;
469  }
470  if (hit.isStrip()) {
471  volumeID = 10;
472  }
473  }
474  else {
475  if (hit.isPixel()) {
476  if (hit.getZ() >= 0.) {
477  volumeID = 2;
478  }
479  else {
480  volumeID = -2;
481  }
482  }
483  else if (hit.isStrip()) {
484  if (hit.getZ() >= 0.) {
485  volumeID = 12;
486  }
487  else {
488  volumeID = 8;
489  }
490  }
491  }
492  return volumeID;
493 }

◆ isFineIDInPixel()

bool isFineIDInPixel ( long  ID)

Definition at line 527 of file FPGATrackSimHoughFunctions.cxx.

528 {
529  return !isFineIDInStrip(ID);
530 }

◆ isFineIDInStrip()

bool isFineIDInStrip ( long  ID)

Definition at line 522 of file FPGATrackSimHoughFunctions.cxx.

523 {
524  return (ID < 16);
525 }

◆ makeTrackCandidates()

void makeTrackCandidates ( const FPGATrackSimRoad road,
const FPGATrackSimTrack temp,
std::vector< FPGATrackSimTrack > &  track_cands,
const ServiceHandle< IFPGATrackSimMappingSvc > &  FPGATrackSimMapping 
)

Creates a list of track candidates by taking all possible combination of hits in road.

Sets basic ID info and hits.

NB: If the number of combinations becomes large and memory is a concern, it may be worth turning this function into a sort of iterator over combs, return a single track each call.

Definition at line 371 of file FPGATrackSimHoughFunctions.cxx.

372 {
373  int idbase = 0; // offset for new track ids
374  int subregion = road.getSubRegion();
375  auto pmap = FPGATrackSimMapping->PlaneMap_2nd(subregion);
376 
377  if (temp.getTrackStage() == TrackStage::FIRST) {
378  pmap = FPGATrackSimMapping->PlaneMap_1st(subregion);
379  }
380 
381  std::vector<std::vector<int>> combs = ::getComboIndices(road.getNHits_layer());
382  track_cands.resize(combs.size(), temp);
383 
384  const FPGATrackSimRegionMap* SUBREGIONMAP = FPGATrackSimMapping->SubRegionMap_2nd();
385  //
386  //get the WC hits:
387  layer_bitmask_t wcbits= road.getWCLayers();
388  // Add the hits from each combination to the track, and set ID
389  for (size_t icomb = 0; icomb < combs.size(); icomb++)
390  {
391  //Need to set the ID and the hits size of this track
392  track_cands[icomb].setTrackID(idbase + icomb);
393  track_cands[icomb].setNLayers(pmap->getNLogiLayers());
394 
395  // If this is an idealized coordinate fit; keep references to the idealized radii.
396  track_cands[icomb].setIdealRadii(SUBREGIONMAP->getAvgRadii(subregion));
397  track_cands[icomb].setPassedOR(1);
398 
399  std::vector<int> const & hit_indices = combs[icomb]; // size nLayers
400  for (unsigned layer = 0; layer < pmap->getNLogiLayers(); layer++)
401  {
402  if (hit_indices[layer] < 0) // Set a dummy hit if road has no hits in this layer
403  {
405  newhit.setLayer(layer);
406  newhit.setSection(0);
407  if (pmap->getDim(layer) == 2) newhit.setDetType(SiliconTech::pixel);
408  else newhit.setDetType(SiliconTech::strip);
409 
410  if (wcbits & (1 << layer ) ) {
412  newhit.setLayer(layer);
413  }
414 
415  track_cands[icomb].setFPGATrackSimHit(layer, newhit);
416  }
417  else
418  {
419  const std::shared_ptr<const FPGATrackSimHit> hit = road.getHits(layer)[hit_indices[layer]];
420  // If this is an outer spacepoint, and it is not the same as the inner spacepoint, reject it.
421  // Here we "reject" it by marking the candidate as "invalid", to be rejected later.
422  // That require another field on the track object, but it avoids having to change the sizes
423  // of arrays computed above.
424  if (hit->getHitType() == HitType::spacepoint && (hit->getPhysLayer(true) % 2) == 1) {
425  if (layer == 0) throw (std::out_of_range("makeTrackCandidates: Attempt to access vector at element -1"));
426  const FPGATrackSimHit & inner_hit = track_cands[icomb].getFPGATrackSimHits().at(layer - 1);
427  if ((abs(hit->getX() - inner_hit.getX()) > EPSILON) || (abs(hit->getY() - inner_hit.getY()) > EPSILON) || (abs(hit->getZ() - inner_hit.getZ()) > EPSILON)) {
428  track_cands[icomb].setValidCand(false);
429  }
430  }
431  track_cands[icomb].setFPGATrackSimHit(layer, *hit);
432  }
433  }
434  }
435 
436  idbase += combs.size();
437 }

◆ runOverlapRemoval()

StatusCode runOverlapRemoval ( std::vector< FPGATrackSimTrack > &  tracks,
const float  minChi2,
const int  NumOfHitPerGrouping,
ORAlgo  orAlgo,
ToolHandle< GenericMonitoringTool monTool 
)

Definition at line 15 of file FPGATrackSimHoughFunctions.cxx.

16 {
17  ANA_MSG_DEBUG("Beginning runOverlapRemoval()");
18  ANA_MSG_DEBUG("Tracks in event: " << tracks.size());
19 
20  std::vector<int> flags_OR;
21  flags_OR.clear();
22 
23  // Debug variables
24  int ntrack_passOR = 0;
25  int ntrack = 0;
26  std::vector<int> track_passOR_counter;
27  std::vector<int> track_passOR_barcodefrac;
28  track_passOR_counter.clear();
29  track_passOR_barcodefrac.clear();
30  int track_barcodefrac_num;
31  int track_barcodefrac_den;
32  float track_barcodefrac;
33  int ntrack_passOR_total = 0;
34  int trackMuon_gt0pt5_passOR = 0;
35  float tmp_TrueTrack_BCF = 0.;
36 
37  // Create tracks to hold and compare
38  FPGATrackSimTrack fit1, fit2;
39  for(unsigned int i=0; i<tracks.size();i++)
40  {
41  fit1=tracks.at(i);
42  // Apply Chi2 cut
43  if(fit1.getChi2ndof() > minChi2)
44  {
45  // Only consider track with chi2 smaller than minChi2
46  tracks.at(i).setPassedOR(0);
47  continue;
48  }
49 
50  // Create vector for holding duplicate track list
51  std::vector<int> duplicates(1,i);
52 
53  // Loop through the rest of the tracks
54  for(unsigned int j=0; j<tracks.size(); j++)
55  {
56  if(i!=j)
57  {
58  fit2=tracks.at(j);
59  // Apply Chi2 cut
60  if(fit2.getChi2ndof()>minChi2)
61  {
62  // Only consider track with chi2 smaller than minChi2
63  tracks.at(j).setPassedOR(0);
64  continue;
65  }
66  // Based on the algorithm choose common hit of non-common hit
67  if(orAlgo == ORAlgo::Normal)
68  {
69  // Find the number of common hits between two tracks
70  int nOverlappingHits = 0;
71  nOverlappingHits=findNCommonHits(fit1,fit2);
72 
73  // Group overlapping tracks into a vector for removal if at least [NumOfHitPerGrouping] hits are the same
74  if(nOverlappingHits >= NumOfHitPerGrouping)
75  {
76  duplicates.push_back(j);
77  }
78  }
79  else if(orAlgo == ORAlgo::InvertGrouping)
80  {
81  // Find the number of non-common hits between two tracks
82  int nNotOverlappingHits=0;
83  nNotOverlappingHits=findNonOverlapHits(fit1, fit2);
84 
85  // If the number of non-overlapping hit is [NumOfHitPerGrouping] or less
86  if(nNotOverlappingHits <= NumOfHitPerGrouping)
87  {
88  duplicates.push_back(j);
89  }
90  }
91  }
92  }
93  findMinChi2MaxHit(duplicates, tracks, flags_OR, minChi2);
94 
95  // Monitoring
96  ntrack++;
97  track_passOR_counter.push_back(ntrack);
98  track_barcodefrac_num = 0;
99  for(auto& hit : tracks.at(i).getFPGATrackSimHits())
100  {
101  if(hit.getBarcode() == 10001) track_barcodefrac_num++;
102  }
103  track_barcodefrac_den = tracks.at(i).getFPGATrackSimHits().size();
104  track_barcodefrac = (float)track_barcodefrac_num/(float)track_barcodefrac_den;
105  fit1.setBarcodeFrac(track_barcodefrac);
106  track_passOR_barcodefrac.push_back(track_barcodefrac);
107  if(fit1.getBarcodeFrac() > 0.5 && tracks.at(i).passedOR()) {
108  trackMuon_gt0pt5_passOR++;
109  if(trackMuon_gt0pt5_passOR == 1) {
110  tmp_TrueTrack_BCF = fit1.getBarcodeFrac();
111  }
112  if(trackMuon_gt0pt5_passOR > 1) {
113  if (fit1.getBarcodeFrac() > tmp_TrueTrack_BCF) {
114  tmp_TrueTrack_BCF = fit1.getBarcodeFrac();
115  }
116  }
117  }
118 
119  }
120 
121  // Monitoring histograms
122  ANA_MSG_DEBUG("List of tracks passing OR:: ");
123  for(unsigned int i=0; i<tracks.size();i++){
124  if(tracks.at(i).passedOR()) {
125  ntrack_passOR++;
126  ANA_MSG_DEBUG("track# = " << track_passOR_counter[i] << ": chi2 = " << tracks.at(i).getChi2ndof() << " barcodefrac = " << track_passOR_barcodefrac[i]);
127  }
128  }
129  ntrack_passOR_total += ntrack_passOR;
130  auto mon_ntrack_passOR = Monitored::Scalar<int>("ntrack_passOR", ntrack_passOR);
131  auto mon_barcodeFrac_passOR = Monitored::Scalar<int>("barcodeFrac_passOR", tmp_TrueTrack_BCF);
132  Monitored::Group(monTool, mon_ntrack_passOR);
133  Monitored::Group(monTool, mon_barcodeFrac_passOR);
134  ANA_MSG_DEBUG("Number of tracks passing OR (total) = " << ntrack_passOR_total);
135 
136 
137  return StatusCode::SUCCESS;
138 }
temp
Definition: JetEventDict.h:21
findNCommonHits
int findNCommonHits(const FPGATrackSimTrack &Track1, const FPGATrackSimTrack &Track2)
Definition: FPGATrackSimHoughFunctions.cxx:260
FPGATrackSimHit::setSection
void setSection(unsigned v)
Definition: FPGATrackSimHit.h:93
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
SiliconTech::strip
@ strip
FPGATrackSimHit::getEtaModule
int getEtaModule(bool old=false) const
Definition: FPGATrackSimHit.h:87
FPGATrackSimHit::isStrip
bool isStrip() const
Definition: FPGATrackSimHit.h:65
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
getCoarseID
long getCoarseID(const FPGATrackSimHit &hit)
Definition: FPGATrackSimHoughFunctions.cxx:495
FPGATrackSimRoad::getSubRegion
int getSubRegion() const
Definition: FPGATrackSimRoad.h:84
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
findNonOverlapHits
int findNonOverlapHits(const FPGATrackSimTrack &Track1, const FPGATrackSimTrack &Track2)
Definition: FPGATrackSimHoughFunctions.cxx:140
FPGATrackSimHit::getLayerDisk
unsigned getLayerDisk(bool old=false) const
Definition: FPGATrackSimHit.h:82
FPGATrackSimRoad::getHits
const std::vector< std::shared_ptr< const FPGATrackSimHit > > & getHits(size_t layer) const
Definition: FPGATrackSimRoad.h:100
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:140
findMinChi2MaxHit
void findMinChi2MaxHit(const std::vector< int > &duplicates, std::vector< FPGATrackSimTrack > &RMtracks, std::vector< int > flags_OR, const float minChi2)
Definition: FPGATrackSimHoughFunctions.cxx:186
FPGATrackSimHit::isReal
bool isReal() const
Definition: FPGATrackSimHit.cxx:40
ORAlgo::Normal
@ Normal
FPGATrackSimHit::getLayer
unsigned getLayer() const
Definition: FPGATrackSimHit.cxx:87
HitType::spacepoint
@ spacepoint
FPGATrackSimRoad::getNHits_layer
std::vector< size_t > getNHits_layer() const
Definition: FPGATrackSimRoad.cxx:27
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimHit::getGPhi
float getGPhi() const
Definition: FPGATrackSimHit.h:144
EPSILON
constexpr float EPSILON
Definition: FPGATrackSimHoughFunctions.cxx:13
HitType::wildcard
@ wildcard
FPGATrackSimTrack::getFPGATrackSimHits
const std::vector< FPGATrackSimHit > & getFPGATrackSimHits() const
Definition: FPGATrackSimTrack.h:63
getVolumeID
long getVolumeID(const FPGATrackSimHit &hit)
Definition: FPGATrackSimHoughFunctions.cxx:440
FPGATrackSimTrack::getBarcodeFrac
float getBarcodeFrac() const
Definition: FPGATrackSimTrack.h:61
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FPGATrackSimHit::setDetType
void setDetType(SiliconTech detType)
Definition: FPGATrackSimHit.h:55
FPGATrackSimTrack::getChi2ndof
float getChi2ndof() const
Definition: FPGATrackSimTrack.h:46
lumiFormat.i
int i
Definition: lumiFormat.py:85
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TrackStage::FIRST
@ FIRST
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:141
FPGATrackSimHit::getIdentifierHash
unsigned getIdentifierHash() const
Definition: FPGATrackSimHit.h:81
FPGATrackSimHit::isPixel
bool isPixel() const
Definition: FPGATrackSimHit.h:64
FPGATrackSimTrack::setBarcodeFrac
void setBarcodeFrac(const float &v)
Definition: FPGATrackSimTrack.h:105
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
isFineIDInStrip
bool isFineIDInStrip(long ID)
Definition: FPGATrackSimHoughFunctions.cxx:522
TrackCorrType::None
@ None
FPGATrackSimRoad::getWCLayers
layer_bitmask_t getWCLayers() const
Definition: FPGATrackSimRoad.h:96
FPGATrackSimRegionMap::getAvgRadii
const std::vector< double > & getAvgRadii(unsigned region) const
Definition: FPGATrackSimRegionMap.h:104
ORAlgo::InvertGrouping
@ InvertGrouping
FPGATrackSimHit::getR
float getR() const
Definition: FPGATrackSimHit.h:143
FPGATrackSimHit::setLayer
void setLayer(unsigned v)
Definition: FPGATrackSimHit.h:92
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
FPGATrackSimRegionMap
Definition: FPGATrackSimRegionMap.h:62
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer(bool old=false) const
Definition: FPGATrackSimHit.cxx:72
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
FPGATrackSimHit::isBarrel
bool isBarrel() const
Definition: FPGATrackSimHit.h:66
generateReferenceFile.duplicates
duplicates
Definition: generateReferenceFile.py:24
SiliconTech::pixel
@ pixel
FPGATrackSimHit::getHitType
HitType getHitType() const
Definition: FPGATrackSimHit.h:57
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:54
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288