ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
FPGATrackSimGenScanTool Class Reference

#include <FPGATrackSimGenScanTool.h>

Inheritance diagram for FPGATrackSimGenScanTool:
Collaboration diagram for FPGATrackSimGenScanTool:

Classes

class  HitPair
 
struct  HitPairSet
 
struct  IntermediateState
 

Public Types

using StoredHit = FPGATrackSimBinUtil::StoredHit
 
using BinEntry = FPGATrackSimBinnedHits::BinEntry
 

Public Member Functions

 FPGATrackSimGenScanTool (const std::string &algname, const std::string &name, const IInterface *ifc)
 
virtual StatusCode initialize () override
 
virtual StatusCode getRoads (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &road) override
 
virtual int getSubRegion () const override
 

Protected Member Functions

StatusCode pairThenGroupFilter (const BinEntry &bindata, std::vector< HitPairSet > &output_pairset)
 
void updateState (const IntermediateState &inputstate, IntermediateState &outputstate, unsigned lyridx, const std::vector< const StoredHit * > &newhits)
 
StatusCode incrementalBuildFilter (const BinEntry &bindata, std::vector< HitPairSet > &output_pairset)
 
StatusCode sortHitsByLayer (const BinEntry &bindata, std::vector< std::vector< const StoredHit * >> &hitsByLayer)
 
StatusCode makePairs (const std::vector< std::vector< const StoredHit * >> &hitsByLayer, HitPairSet &pairs)
 
bool pairPassesFilter (const HitPair &pair)
 
StatusCode filterPairs (HitPairSet &pairs, HitPairSet &filteredpairs)
 
StatusCode groupPairs (HitPairSet &filteredpairs, std::vector< HitPairSet > &clusters, bool verbose)
 
bool pairMatchesPairSet (const HitPairSet &pairset, const HitPair &pair, bool verbose)
 
void addRoad (std::vector< const StoredHit * > const &hits, const FPGATrackSimBinUtil::IdxSet &idx)
 
bool fitRoad (std::vector< const StoredHit * > const &hits, const FPGATrackSimBinUtil::IdxSet &idx, FPGATrackSimTrackPars &trackpars, double &chi2) const
 

Protected Attributes

ServiceHandle< IFPGATrackSimEventSelectionSvcm_EvtSel {this, "FPGATrackSimEventSelectionSvc", ""}
 
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
 
ToolHandle< FPGATrackSimGenScanMonitoringm_monitoring {this, "Monitoring", "FPGATrackSimGenScanMonitoring", "Monitoring Tool"}
 
ToolHandle< FPGATrackSimBinnedHitsm_binnedhits {this, "BinnedHits", "FPGATrackSimBinnedHits", "Binned Hits Class"}
 
Gaudi::Property< double > m_rin {this, "rin", {-1.0}, "Radius of inner layer for extrapolations and keylayer definition"}
 
Gaudi::Property< double > m_rout {this, "rout", {-1.0}, "Radius of outer layer for extrapolations and keylayer definition"}
 
Gaudi::Property< unsigned > m_threshold {this, "threshold", {}, "Minimum value to accept as a road (inclusive)"}
 
Gaudi::Property< std::string > m_binFilter {this, "binFilter", {"PairThenGroup"}, "which bin filter to run, current options: PairThenGroup, IncrementalBuild"}
 
Gaudi::Property< bool > m_binningOnly {this, "binningOnly", {false}, "Turn off road building to test the binning only"}
 
Gaudi::Property< bool > m_applyPairFilter {this, "applyPairFilter", {}, "Apply Pair Filter"}
 
Gaudi::Property< bool > m_reversePairDir {this, "reversePairDir", {}, "Build Pairs starting at last layer and work in"}
 
Gaudi::Property< std::vector< double > > m_pairFilterDeltaPhiCut {this, "pairFilterDeltaPhiCut", {}, "Pair Filter Delta Phi Cut Value (list one per layer)"}
 
Gaudi::Property< std::vector< double > > m_pairFilterDeltaEtaCut {this, "pairFilterDeltaEtaCut", {}, "Pair Filter Delta Eta Cut Value (list one per layer)"}
 
Gaudi::Property< std::vector< double > > m_pairFilterPhiExtrapCut {this, "pairFilterPhiExtrapCut", {}, "Pair Filter Phi Extrap Cut Value (in/out pair)"}
 
Gaudi::Property< std::vector< double > > m_pairFilterEtaExtrapCut {this, "pairFilterEtaExtrapCut", {}, "Pair Filter Eta Extrap Cut Value(in/out pair)"}
 
Gaudi::Property< bool > m_applyPairSetFilter {this, "applyPairSetFilter", {}, "Apply PairSet Filter"}
 
Gaudi::Property< double > m_pairSetMatchPhiCut {this, "pairSetMatchPhiCut", {}, "Pair Set Match Phi Cut Value"}
 
Gaudi::Property< double > m_pairSetMatchEtaCut {this, "pairSetMatchEtaCut", {}, "Pair Set Match Eta Cut Value"}
 
Gaudi::Property< double > m_pairSetDeltaDeltaPhiCut {this, "pairSetDeltaDeltaPhiCut", {}, "Pair Set Delta Delta Phi Cut Value"}
 
Gaudi::Property< double > m_pairSetDeltaDeltaEtaCut {this, "pairSetDeltaDeltaEtaCut", {}, "Pair Set Delta Eta Cut Value"}
 
Gaudi::Property< double > m_pairSetPhiCurvatureCut {this, "pairSetPhiCurvatureCut", {}, "Pair Set Phi Cut Value"}
 
Gaudi::Property< double > m_pairSetEtaCurvatureCut {this, "pairSetEtaCurvatureCut", {}, "Pair Set Eta Cut Value"}
 
Gaudi::Property< double > m_pairSetDeltaPhiCurvatureCut {this, "pairSetDeltaPhiCurvatureCut", {}, "Pair Set Delta Phi Curvature Cut Value"}
 
Gaudi::Property< double > m_pairSetDeltaEtaCurvatureCut {this, "pairSetDeltaEtaCurvatureCut", {}, "Pair Set Delta Eta Curvature Cut Value"}
 
Gaudi::Property< std::vector< double > > m_pairSetPhiExtrapCurvedCut {this, "pairSetPhiExtrapCurvedCut", {}, "Pair Set Phi Extrap Curved Cut Value(in/out pair)"}
 
Gaudi::Property< double > m_phiWeight {this, "phiChi2Weight", 1.0, "Weight for phi component of chi2 in genscan fit"}
 
Gaudi::Property< double > m_etaWeight {this, "etaChi2Weight", 1.0, "Weight for eta component of chi2 in genscan fit"}
 
Gaudi::Property< bool > m_inBinFiltering {this, "inBinFiltering", true, "Filter roads that appear to be outside their bin"}
 
int m_evtsProcessed = 0
 
std::vector< unsigned int > m_pairingLayers
 
std::vector< std::unique_ptr< FPGATrackSimRoad > > m_roads {}
 

Friends

class FPGATrackSimGenScanMonitoring
 

Detailed Description

Definition at line 74 of file FPGATrackSimGenScanTool.h.

Member Typedef Documentation

◆ BinEntry

Definition at line 78 of file FPGATrackSimGenScanTool.h.

◆ StoredHit

Definition at line 77 of file FPGATrackSimGenScanTool.h.

Constructor & Destructor Documentation

◆ FPGATrackSimGenScanTool()

FPGATrackSimGenScanTool::FPGATrackSimGenScanTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 61 of file FPGATrackSimGenScanTool.cxx.

61  :
62  base_class(algname, name, ifc)
63 {
64  declareInterface<IFPGATrackSimRoadFinderTool>(this);
65 }

Member Function Documentation

◆ addRoad()

void FPGATrackSimGenScanTool::addRoad ( std::vector< const StoredHit * > const hits,
const FPGATrackSimBinUtil::IdxSet idx 
)
protected

Definition at line 591 of file FPGATrackSimGenScanTool.cxx.

592 {
593  layer_bitmask_t hitLayers = 0;
594  std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>
595  sorted_hits(m_binnedhits->getNLayers(),std::vector<std::shared_ptr<const FPGATrackSimHit>>());
596  for (const FPGATrackSimBinUtil::StoredHit* hit : hits)
597  {
598  hitLayers |= 1 << hit->layer;
599  sorted_hits[hit->layer].push_back(hit->hitptr);
600  }
601 
602  // "Fit" the track.
603  FPGATrackSimTrackPars fittedpars;
604  double chi2;
605  bool inBin = fitRoad(hits, idx, fittedpars, chi2);
606  if (!inBin && m_inBinFiltering) return;
607 
608  m_roads.emplace_back(std::make_unique<FPGATrackSimRoad>());
609  FPGATrackSimRoad *r = m_roads.back().get();
610 
611  r->setRoadID(m_roads.size() - 1);
612  // r.setPID(y * m_imageSize_y + x);
613  r->setHits(std::move(sorted_hits));
614 
615  FPGATrackSimBinUtil::ParSet binCenterPars = m_binnedhits->getBinTool().lastStep()->binCenter(idx);
616  FPGATrackSimTrackPars trackpars = m_binnedhits->getBinTool().binDesc()->parSetToTrackPars(binCenterPars);
617  r->setX(trackpars[FPGATrackSimTrackPars::IPHI]);
618  r->setY(trackpars[FPGATrackSimTrackPars::IHIP]);
619  r->setXBin(idx[3]);
620  r->setYBin(idx[4]);
621  r->setHitLayers(hitLayers);
622  r->setSubRegion(0);
623 
624  // Store the fitted information on the track.
625  r->setFitParams(fittedpars);
626  r->setFitChi2(chi2);
627 }

◆ filterPairs()

StatusCode FPGATrackSimGenScanTool::filterPairs ( HitPairSet pairs,
HitPairSet filteredpairs 
)
protected

Definition at line 442 of file FPGATrackSimGenScanTool.cxx.

443 {
444  ATH_MSG_VERBOSE("In filterPairs");
445 
446  for (const FPGATrackSimGenScanTool::HitPair &pair : pairs.pairList) {
447  if (pairPassesFilter(pair)) {
448  filteredpairs.addPair(pair);
449  }
450  }
451  return StatusCode::SUCCESS;
452 }

◆ fitRoad()

bool FPGATrackSimGenScanTool::fitRoad ( std::vector< const StoredHit * > const hits,
const FPGATrackSimBinUtil::IdxSet idx,
FPGATrackSimTrackPars trackpars,
double &  chi2 
) const
protected

Definition at line 730 of file FPGATrackSimGenScanTool.cxx.

731 {
732 
733  double N =hits.size();
734  double sum_Phi = 0;
735  double sum_Phi2 = 0;
736  double sum_PhiR = 0;
737  double sum_PhiR2 = 0;
738  double sum_Eta = 0;
739  double sum_Eta2 = 0;
740  double sum_EtaR = 0;
741  double sum_R = 0;
742  double sum_R2 = 0;
743  double sum_R3 = 0;
744  double sum_R4 = 0;
745 
746  for (const FPGATrackSimBinUtil::StoredHit* hit : hits)
747  {
748  // these are just relevant sums of variables (moments) needed for the chi2 calculation
749  // Calculate r^2, r^3, and r^4, we'll sum these up later below
750  double r = hit->hitptr->getR();
751  double r2 = r*r;
752  double r3 = r2*r;
753  double r4 = r3*r;
754  double dphi = hit->phiShift;
755  double dphi2 = dphi*dphi;
756  double deta = hit->etaShift;
757  double deta2 = deta*deta;
758 
759  sum_Phi += dphi;
760  sum_Phi2 += dphi2;
761  sum_PhiR += dphi*r;
762  sum_PhiR2 += dphi*r2;
763  sum_Eta += deta;
764  sum_Eta2 += deta2;
765  sum_EtaR += deta*r;
766  sum_R += r;
767  sum_R2 += r2;
768  sum_R3 += r3;
769  sum_R4 += r4;
770  }
771 
772  // phi var calculation
773  // phi(r) = phivars[0] + phivars[1]*r + phivars[2]*r^2
774  // math below is calculated by analytically minimizing the chi2
775  // and solving for the phivars.
776  // the terms below which recur in the phivar expression are just organized
777  // by the power of r (i.e. the dimension), but otherwise have no deep meaning
778  double r6_t0 = (-sum_R2 * sum_R4 + sum_R3*sum_R3);
779  double r5_t0 = (sum_R*sum_R4 - sum_R2*sum_R3);
780  double r4_t0 = (-sum_R * sum_R3 + sum_R2*sum_R2);
781  double r4_t1 = (-N*sum_R4 + sum_R2*sum_R2);
782  double r3_t0 = (N*sum_R3 - sum_R*sum_R2);
783  double r2_t0 = (-N*sum_R2 + sum_R*sum_R);
784 
785  // all three phi var expresions use the same demoninator
786  const double denom_phi = N * r6_t0 + sum_R * r5_t0 + sum_R2 * r4_t0;
787  if (nearZero(denom_phi)){
788  ATH_MSG_ERROR("Divide by zero (phi) trapped in FPGATrackSimGenScanTool::fitRoad");
789  return false;
790  }
791 
792  // phivar expresions from analytic chi2 minimization
793  std::vector<double> phivars(3);
794  phivars[0] = (sum_Phi*r6_t0 + sum_PhiR*r5_t0 + sum_PhiR2*r4_t0)/denom_phi;
795  phivars[1] = (sum_Phi*r5_t0 + sum_PhiR*r4_t1 + sum_PhiR2*r3_t0)/denom_phi;
796  phivars[2] = (sum_Phi*r4_t0 + sum_PhiR*r3_t0 + sum_PhiR2*r2_t0)/denom_phi;
797 
798  // eta vars
799  // same as phi but with not curvature (r^2) term
800  const double denom_eta = N*sum_R2 - sum_R*sum_R;
801  if (nearZero(denom_eta)){
802  ATH_MSG_ERROR("Divide by zero (eta) trapped in FPGATrackSimGenScanTool::fitRoad");
803  return false;
804  }
805 
806  std::vector<double> etavars(2);
807  etavars[0] = (-sum_R*sum_EtaR + sum_R2*sum_Eta)/denom_eta;
808  etavars[1] = (N*sum_EtaR - sum_R*sum_Eta)/denom_eta;
809 
810  // bin center
811  FPGATrackSimBinUtil::ParSet parset = m_binnedhits->getBinTool().lastStep()->binCenter(idx);
812  double parshift[FPGATrackSimTrackPars::NPARS];
813  parshift[0] = etavars[0] + etavars[1]*m_rin; // z at r in
814  parshift[1]= etavars[0] + etavars[1]*m_rout; // z at r out
815  parshift[2]= -(phivars[0]/m_rin + phivars[1] + phivars[2]*m_rin) ; // phi at r in
816  parshift[3]= -(phivars[0]/m_rout + phivars[1] + phivars[2]*m_rout) ; // phi at r out
817  double y = (m_rout-m_rin); // midpoint between rin and rout from rin
818  parshift[4]= -phivars[2]/4.0*y*y ; // xm
819 
820  bool inBin = true;
821  const auto& lastStep = m_binnedhits->getBinTool().lastStep();
822  for (int par = 0; par < FPGATrackSimTrackPars::NPARS; par++ ){
823  parset[par]+=parshift[par];
824  inBin = inBin && (std::abs(parshift[par]) < lastStep->binWidth(par)/2.0);
825  }
826 
827  double ec0 = etavars[0];
828  double ec1 = etavars[1];
829  double eta_chi2 = sum_Eta2 - 2*ec0*sum_Eta - 2*ec1*sum_EtaR + N*ec0*ec0 + 2*ec0*ec1*sum_R + ec1*ec1*sum_R2;
830 
831  double pc0 = phivars[0];
832  double pc1 = phivars[1];
833  double pc2 = phivars[2];
834 
835  double phi_chi2 = sum_Phi2 - 2*pc0*sum_Phi - 2*pc1*sum_PhiR - 2*pc2*sum_PhiR2 + N*pc0*pc0 + 2*pc0*pc1*sum_R + 2*pc0*pc2*sum_R2 + 2*pc1*pc2*sum_R3 + pc1*pc1*sum_R2 + pc2*pc2*sum_R4;
836 
837  for (const FPGATrackSimBinUtil::StoredHit* hit : hits)
838  {
839  double r = hit->hitptr->getR();
840  ATH_MSG_VERBOSE("Fitted r= " << r << " phishift " << hit->phiShift << " =?= " << pc0+pc1*r+pc2*r*r << " etashift " << hit->etaShift << " =?= " << ec0+ec1*r);
841  }
842 
843  ATH_MSG_DEBUG("Bin Info parset " << idx << " " << m_binnedhits->getBinTool().lastStep()->binCenter(idx));
844  ATH_MSG_DEBUG("Fitted parset inBin="<< inBin << " nhits=" << hits.size() << " " << parset << " chi2 " << eta_chi2 << "," << phi_chi2);
845 
846  // Return by reference the "fitted" track parameters. shift q/pt dimension (GeV/MeV)
847  trackpars = m_binnedhits->getBinTool().binDesc()->parSetToTrackPars(parset);
848  trackpars[FPGATrackSimTrackPars::IHIP] = trackpars[FPGATrackSimTrackPars::IHIP] / 1000;
849  ATH_MSG_VERBOSE("Fitted track pars" << trackpars);
850 
851  // and the summed chi2, which is assuming (right now) an even weighting between the two components.
852  chi2 = std::sqrt(m_etaWeight * eta_chi2 * eta_chi2 + m_phiWeight * phi_chi2 * phi_chi2);
853 
854  return inBin;
855 }

◆ getRoads()

StatusCode FPGATrackSimGenScanTool::getRoads ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  road 
)
overridevirtual

Definition at line 133 of file FPGATrackSimGenScanTool.cxx.

135 {
136  ATH_MSG_DEBUG("In getRoads, Processing Event# " << ++m_evtsProcessed << " hit size = " << hits.size());
137 
138 
139  roads.clear();
140  m_roads.clear();
141  m_monitoring->resetDataFlowCounters();
142 
143  // Currently assume that if less than 100 hits its a single track MC
144  m_monitoring->parseTruthInfo(getTruthTracks(),(hits.size() < 100));
145 
146  // do the binning...
147  ATH_CHECK(m_binnedhits->fill(hits));
148  m_monitoring->fillBinningSummary(hits);
149 
150  // scan over image building pairs for bins over threshold
151  for (FPGATrackSimBinArray<BinEntry>::ConstIterator &bin : m_binnedhits->lastStepBinnedHits())
152  {
153  // apply threshold
154  if (bin.data().lyrCnt() < m_threshold) continue;
155  ATH_MSG_DEBUG("Bin passes threshold " << bin.data().lyrCnt() << " "
156  << bin.idx());
157 
158  // Monitor contents of bins passing threshold
159  m_monitoring->fillBinLevelOutput(bin.idx(), bin.data());
160  if (m_binningOnly) continue;
161 
162  // pass hits for bin to filterRoad and get back pairs of hits grouped into pairsets
163  std::vector<HitPairSet> pairsets;
164  if (m_binFilter=="PairThenGroup") {
165  ATH_CHECK(pairThenGroupFilter(bin.data(), pairsets));
166  } else if (m_binFilter=="IncrementalBuild") {
167  ATH_CHECK(incrementalBuildFilter(bin.data(), pairsets));
168  } else {
169  ATH_MSG_FATAL("Unknown bin filter" << m_binFilter);
170  }
171  ATH_MSG_DEBUG("grouped PairSets " << pairsets.size());
172 
173  // convert the group pairsets to FPGATrackSimRoads
174  for (const FPGATrackSimGenScanTool::HitPairSet& pairset: pairsets)
175  {
176  addRoad(pairset.hitlist, bin.idx());
177  ATH_MSG_DEBUG("Output road size=" <<pairset.hitlist.size());
178 
179  // debug statement if more than one road found in bin
180  // not necessarily a problem
181  if (pairsets.size() >1) {
182  std::string s = "";
183  for (const FPGATrackSimBinUtil::StoredHit* const hit : pairset.hitlist)
184  {
185  s += "(" + std::to_string(hit->layer) + "," + std::to_string(hit->hitptr->getR()) + "), ";
186  }
187  ATH_MSG_DEBUG("Duplicate Group " << s);
188  }
189  }
190  }
191 
192  // copy roads to output vector
193  roads.reserve(m_roads.size());
194  for (auto & r : m_roads) roads.push_back(std::move(r));
195  ATH_MSG_DEBUG("Roads = " << roads.size());
196 
197  // clear previous event
198  // (reusing saves having to reallocate memory for each event)
199  m_binnedhits->resetBins();
200 
201  m_evtsProcessed++;
202  return StatusCode::SUCCESS;
203 }

◆ getSubRegion()

virtual int FPGATrackSimGenScanTool::getSubRegion ( ) const
inlineoverridevirtual

Definition at line 90 of file FPGATrackSimGenScanTool.h.

90 {return 0;}

◆ groupPairs()

StatusCode FPGATrackSimGenScanTool::groupPairs ( HitPairSet filteredpairs,
std::vector< HitPairSet > &  clusters,
bool  verbose 
)
protected

Definition at line 456 of file FPGATrackSimGenScanTool.cxx.

459 {
460  ATH_MSG_VERBOSE("In groupPairs");
461  for (const FPGATrackSimGenScanTool::HitPair & pair : filteredpairs.pairList)
462  {
463  bool added = false;
464  for (FPGATrackSimGenScanTool::HitPairSet &pairset : pairsets)
465  {
466  // Only add skip pairs if skipped layer is not already hit
467  if ((std::abs(int(pair.second->layer) - int(pair.first->layer)) > 1) // gives if is a skip pair
468  && (pairset.hasLayer(std::min(pair.first->layer,pair.second->layer) + 1))) // gives true if skipped layer already in set
469  {
470  // if it matches mark as added so it doesn't start a new pairset
471  // false here is so it doesn't plot these either
472  if (pairMatchesPairSet(pairset, pair, verbose))
473  added = true;
474  if (!added) {
475  ATH_MSG_VERBOSE("Skip pair does not match non-skip pair");
476  }
477  }
478  else
479  {
480  if (pairMatchesPairSet(pairset, pair, verbose))
481  {
482  int size = pairset.addPair(pair);
483  if (verbose)
484  ATH_MSG_VERBOSE("addPair " << pairsets.size() << " " << pairset.pairList.size() << " " << size);
485  added = true;
486  }
487  }
488 
489  }
490 
491  if (!added)
492  {
493  HitPairSet newpairset;
494  newpairset.addPair(pair);
495  pairsets.push_back(newpairset);
496  }
497  }
498 
499  return StatusCode::SUCCESS;
500 
501 }

◆ incrementalBuildFilter()

StatusCode FPGATrackSimGenScanTool::incrementalBuildFilter ( const BinEntry bindata,
std::vector< HitPairSet > &  output_pairset 
)
protected

Definition at line 350 of file FPGATrackSimGenScanTool.cxx.

352 {
353  ATH_MSG_VERBOSE("In buildGroupsWithPairs");
354 
355  // Organize Hits by Layer
356  std::vector<std::vector<const StoredHit *>> hitsByLayer(m_binnedhits->getNLayers());
357  ATH_CHECK(sortHitsByLayer(bindata, hitsByLayer));
358 
359  // This is monitoring for each bin over threshold
360  // It's here so it can get the hitsByLayer
361  m_monitoring->fillHitsByLayer(hitsByLayer);
362 
363  std::vector<IntermediateState> states{m_binnedhits->getNLayers()+1};
364  for (unsigned lyridx = 0; lyridx < m_binnedhits->getNLayers(); lyridx++) {
365  unsigned lyr = m_pairingLayers[lyridx];
366  updateState(states[lyridx] , states[lyridx+1], lyridx, hitsByLayer[lyr]);
367  }
368 
369  // this is a little ugly because it requires copying the output pairsets right now
370  output_pairsets=states[m_binnedhits->getNLayers()].pairsets;
371 
372  m_monitoring->fillBuildGroupsWithPairs(states,m_binnedhits->getNLayers()-m_threshold);
373 
374  return StatusCode::SUCCESS;
375 }

◆ initialize()

StatusCode FPGATrackSimGenScanTool::initialize ( )
overridevirtual

Definition at line 68 of file FPGATrackSimGenScanTool.cxx.

69 {
70  // Dump the configuration to make sure it propagated through right
71  const std::vector<Gaudi::Details::PropertyBase*> props = this->getProperties();
72  for( Gaudi::Details::PropertyBase* prop : props ) {
73  if (prop->ownerTypeName()==this->type()) {
74  ATH_MSG_DEBUG("Property:\t" << prop->name() << "\t : \t" << prop->toString());
75  }
76  }
77 
78  // Retrieve info
79  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
80  ATH_MSG_INFO("Map specifies :" << m_binnedhits->getNLayers());
81  ATH_CHECK(m_binnedhits.retrieve());
82  ATH_CHECK(m_monitoring.retrieve());
83  ATH_MSG_INFO("Monitoring Dir :" << m_monitoring->dir());
84 
85  // Setup layer configuration if not already set from layerMap
86  if (m_binnedhits->getNLayers()==0){
87  auto nLogicalLayers = m_FPGATrackSimMapping->PlaneMap_1st(getSubRegion())->getNLogiLayers();
88  if (nLogicalLayers == 0){
89  ATH_MSG_ERROR("Number of logical layers is zero in FPGATrackSimGenScanTool::initialize");
90  return StatusCode::FAILURE;
91  }
92  m_binnedhits->setNLayers(nLogicalLayers);
93  }
94  // This is the layers they get paired with previous layers
95  for (unsigned lyr = 0; lyr < m_binnedhits->getNLayers(); ++lyr) m_pairingLayers.push_back(lyr);
96  if (m_reversePairDir) {
98  }
99  ATH_MSG_INFO("Pairing Layers: " << m_pairingLayers);
100 
101  // Check inputs
102  bool ok = false;
103  if (m_pairFilterDeltaPhiCut.size() != m_binnedhits->getNLayers() - 1)
104  ATH_MSG_FATAL("initialize() pairFilterDeltaPhiCut must have size nLayers-1=" << m_binnedhits->getNLayers() - 1 << " found " << m_pairFilterDeltaPhiCut.size());
105  else if (m_pairFilterDeltaEtaCut.size() != m_binnedhits->getNLayers() - 1)
106  ATH_MSG_FATAL("initialize() pairFilterDeltaEtaCut must have size nLayers-1=" << m_binnedhits->getNLayers() - 1 << " found " << m_pairFilterDeltaEtaCut.size());
107  else if (m_pairFilterPhiExtrapCut.size() != 2)
108  ATH_MSG_FATAL("initialize() pairFilterPhiExtrapCut must have size 2 found " << m_pairFilterPhiExtrapCut.size());
109  else if (m_pairFilterEtaExtrapCut.size() != 2)
110  ATH_MSG_FATAL("initialize() pairFilterEtaExtrapCut must have size 2 found " << m_pairFilterEtaExtrapCut.size());
111  else if (m_pairSetPhiExtrapCurvedCut.size() != 2)
112  ATH_MSG_FATAL("initialize() PairSetPhiExtrapCurvedCut must have size 2found " << m_pairSetPhiExtrapCurvedCut.size());
113  else if ((m_rin < 0.0) || (m_rout < 0.0))
114  ATH_MSG_FATAL("Radii not set");
115  else
116  ok = true;
117  if (!ok)
118  return StatusCode::FAILURE;
119 
120 
121  // register histograms
122  ATH_CHECK(m_monitoring->registerHistograms(m_binnedhits.get()));
123 
124  // write out the firmware LUTs
125  m_binnedhits->getBinTool().writeLUTs();
126 
127  return StatusCode::SUCCESS;
128 }

◆ makePairs()

StatusCode FPGATrackSimGenScanTool::makePairs ( const std::vector< std::vector< const StoredHit * >> &  hitsByLayer,
HitPairSet pairs 
)
protected

Definition at line 396 of file FPGATrackSimGenScanTool.cxx.

398 {
399  ATH_MSG_VERBOSE("In makePairs");
400 
401  std::vector<const StoredHit *> const * lastlyr = 0;
402  std::vector<const StoredHit *> const * lastlastlyr = 0;
403 
404  // order here is designed so lower radius hits come first
405  for (unsigned lyr : m_pairingLayers) {
406  for (const StoredHit *const &ptr1 :
407  hitsByLayer[lyr]) {
408  if (lastlyr) {
409  for (const StoredHit *const &ptr2 : *lastlyr) {
410  pairs.addPair(HitPair(ptr2, ptr1,m_reversePairDir));
411  }
412  // Add Pairs that skip one layer
413  if (lastlastlyr) {
414  for (const StoredHit *const &ptr2 : *lastlastlyr) {
415  pairs.addPair(HitPair(ptr2, ptr1,m_reversePairDir));
416  }
417  }
418  }
419  }
420  lastlastlyr = lastlyr;
421  lastlyr = &hitsByLayer[lyr];
422  m_monitoring->fillPairingHits(lastlyr,lastlastlyr);
423  }
424 
425  return StatusCode::SUCCESS;
426 }

◆ pairMatchesPairSet()

bool FPGATrackSimGenScanTool::pairMatchesPairSet ( const HitPairSet pairset,
const HitPair pair,
bool  verbose 
)
protected

Definition at line 504 of file FPGATrackSimGenScanTool.cxx.

506  {
507  // In order to make it easy to have a long list of possible cuts,
508  // a vector of cutvar structs is used to represent each cut
509  // then apply the AND of all the cuts is done with a std::count_if function
510 
511  // define the struct (effectively mapping because variable, configured cut value,
512  // and histograms for plotting
513  struct cutvar {
514  cutvar(std::string name, double val, double cut, std::vector<TH1D *>& histset) :
515  m_name(std::move(name)), m_val(val), m_cut(cut), m_histset(histset) {}
516  bool passed() { return std::abs(m_val) < m_cut; }
517  void fill(unsigned cat) { m_histset[cat]->Fill(m_val); }
518  std::string m_name;
519  double m_val;
520  double m_cut;
521  std::vector<TH1D *> &m_histset;
522  };
523 
524  // add the cuts to the list of all cuts
525  std::vector<cutvar> allcuts;
526  allcuts.push_back(cutvar("MatchPhi", pairset.MatchPhi(pair),
528  m_monitoring->m_pairSetMatchPhi));
529  allcuts.push_back(cutvar("MatchEta", pairset.MatchEta(pair),
531  m_monitoring->m_pairSetMatchEta));
532  allcuts.push_back(cutvar("DeltaDeltaPhi", pairset.DeltaDeltaPhi(pair),
534  m_monitoring->m_deltaDeltaPhi));
535  allcuts.push_back(cutvar("DeltaDeltaEta", pairset.DeltaDeltaEta(pair),
537  m_monitoring->m_deltaDeltaEta));
538  allcuts.push_back(cutvar("PhiCurvature", pairset.PhiCurvature(pair),
540  m_monitoring->m_phiCurvature));
541  allcuts.push_back(cutvar("EtaCurvature", pairset.EtaCurvature(pair),
543  m_monitoring->m_etaCurvature));
544  if (pairset.pairList.size() > 1) {
545  allcuts.push_back(cutvar(
546  "DeltaPhiCurvature", pairset.DeltaPhiCurvature(pair),
547  m_pairSetDeltaPhiCurvatureCut, m_monitoring->m_deltaPhiCurvature));
548  allcuts.push_back(cutvar(
549  "DeltaEtaCurvature", pairset.DeltaEtaCurvature(pair),
550  m_pairSetDeltaEtaCurvatureCut, m_monitoring->m_deltaEtaCurvature));
551  }
552  allcuts.push_back(cutvar(
553  "PhiInExtrapCurved", pairset.PhiInExtrapCurved(pair, m_rin),
554  m_pairSetPhiExtrapCurvedCut[0], m_monitoring->m_phiInExtrapCurved));
555  allcuts.push_back(cutvar(
556  "PhiOutExtrapCurved", pairset.PhiOutExtrapCurved(pair, m_rout),
557  m_pairSetPhiExtrapCurvedCut[1], m_monitoring->m_phiOutExtrapCurved));
558 
559  // count number of cuts passed
560  unsigned passedCuts = std::count_if(allcuts.begin(), allcuts.end(),
561  [](cutvar& cut) { return cut.passed(); });
562  bool passedAll = (passedCuts == allcuts.size());
563 
564  // monitoring
565  bool passedAllButOne = (passedCuts == allcuts.size() - 1);
566  for (cutvar& cut: allcuts) {
567  // the last value computes if an n-1 histogram should be filled
568  m_monitoring->fillPairSetFilterCut(cut.m_histset, cut.m_val, pair,
569  pairset.lastpair(),
570  (passedAll || (passedAllButOne && !cut.passed())));
571  }
572 
573  if (verbose)
574  {
575  std::string s = "";
576  for (cutvar &cut : allcuts)
577  {
578  s += cut.m_name + " : (" + cut.passed() + ", " + cut.m_val + "), ";
579  }
580  ATH_MSG_DEBUG("PairSet test " << passedAll << " " << s);
581  ATH_MSG_DEBUG("Hits: \n " << *pairset.lastpair().first << "\n "
582  << *pairset.lastpair().second << "\n "
583  << *pair.first << "\n "
584  << *pair.second);
585  }
586 
587  return passedAll;
588 }

◆ pairPassesFilter()

bool FPGATrackSimGenScanTool::pairPassesFilter ( const HitPair pair)
protected

Definition at line 431 of file FPGATrackSimGenScanTool.cxx.

431  {
432  m_monitoring->fillPairFilterCuts(pair,m_rin,m_rout);
433  int lyr = std::min(pair.first->layer,pair.second->layer);
434  return (std::abs(pair.dPhi()) < m_pairFilterDeltaPhiCut[lyr]) &&
435  (std::abs(pair.dEta()) < m_pairFilterDeltaEtaCut[lyr]) &&
436  (std::abs(pair.PhiInExtrap(m_rin)) < m_pairFilterPhiExtrapCut[0]) &&
437  (std::abs(pair.PhiOutExtrap(m_rout)) < m_pairFilterPhiExtrapCut[1]) &&
438  (std::abs(pair.EtaInExtrap(m_rin)) < m_pairFilterEtaExtrapCut[0]) &&
439  (std::abs(pair.EtaOutExtrap(m_rout)) < m_pairFilterEtaExtrapCut[1]);
440 }

◆ pairThenGroupFilter()

StatusCode FPGATrackSimGenScanTool::pairThenGroupFilter ( const BinEntry bindata,
std::vector< HitPairSet > &  output_pairset 
)
protected

Definition at line 206 of file FPGATrackSimGenScanTool.cxx.

208 {
209  ATH_MSG_VERBOSE("In pairThenGroupFilter");
210 
211  // Organize Hits by Layer
212  std::vector<std::vector<const StoredHit *>> hitsByLayer(m_binnedhits->getNLayers());
213  ATH_CHECK(sortHitsByLayer(bindata, hitsByLayer));
214 
215  // This is monitoring for each bin over threshold
216  // It's here so it can get the hitsByLayer
217  m_monitoring->fillHitsByLayer(hitsByLayer);
218 
219  // Make Pairs
220  HitPairSet pairs;
221  ATH_CHECK(makePairs(hitsByLayer, pairs));
222 
223  // Filter Pairs
224  HitPairSet filteredpairs;
225  ATH_CHECK(filterPairs(pairs, filteredpairs));
226 
227  // Require road is still over threshold
228  bool passedPairFilter = (filteredpairs.lyrCnt() >= m_threshold);
229  m_monitoring->pairFilterCheck(pairs, filteredpairs, passedPairFilter);
230 
231  // if passed Pair Filter proceed to group the filtered pairs into pairsets
232  if (passedPairFilter)
233  {
234  // Pair Set Grouping
235  std::vector<HitPairSet> pairsets;
236  ATH_CHECK(groupPairs(filteredpairs, pairsets, false));
237 
238  // loop over pairsets and find those that are over thresold
239  for (const FPGATrackSimGenScanTool::HitPairSet& pairset : pairsets)
240  {
241  // if over threshold add it to the output
242  if (pairset.lyrCnt() >= m_threshold)
243  {
244  if (m_applyPairSetFilter) {
245  output_pairsets.push_back(pairset);
246  }
247  }
248  }
249  }
250 
251  // set outputs if not all filters applied
252  if (!m_applyPairFilter) {
253  // output is just the filtered pairs
254  output_pairsets.push_back(pairs);
255  }
256  else if (passedPairFilter && !m_applyPairSetFilter)
257  {
258  // output is just the filtered pairs
259  output_pairsets.push_back(filteredpairs);
260  }
261 
262  return StatusCode::SUCCESS;
263 }

◆ sortHitsByLayer()

StatusCode FPGATrackSimGenScanTool::sortHitsByLayer ( const BinEntry bindata,
std::vector< std::vector< const StoredHit * >> &  hitsByLayer 
)
protected

Definition at line 379 of file FPGATrackSimGenScanTool.cxx.

381 {
382  ATH_MSG_DEBUG("In fillHitsByLayer");
383 
384  for (const FPGATrackSimBinUtil::StoredHit &hit : bindata.hits) {
385  hitsByLayer.at(hit.layer).push_back(&hit);
386  }
387 
388  return StatusCode::SUCCESS;
389 }

◆ updateState()

void FPGATrackSimGenScanTool::updateState ( const IntermediateState inputstate,
IntermediateState outputstate,
unsigned  lyridx,
const std::vector< const StoredHit * > &  newhits 
)
protected

Definition at line 266 of file FPGATrackSimGenScanTool.cxx.

270 {
271  unsigned int allowed_missed_hits = m_binnedhits->getNLayers() - m_threshold;
272 
273  std::vector<bool> pairset_used(inputstate.pairsets.size(),false);
274 
275  for (auto &newhit : newhits) {
276 
277  // don't make new pairs with hits that the new hit is already paired with in a group
278  std::set<const StoredHit *> vetoList;
279 
280  // try adding hit to existing pair sets
281  for (unsigned ps_idx = 0; ps_idx < inputstate.pairsets.size(); ++ps_idx) {
282  auto &pairset = inputstate.pairsets[ps_idx];
283  HitPair nextpair(pairset.lastpair().second, newhit, m_reversePairDir);
284  if (pairMatchesPairSet(pairset, nextpair, false) || (m_applyPairSetFilter==false)) {
285  HitPairSet newset(pairset);
286  newset.addPair(nextpair);
287  pairset_used[ps_idx]=true;
288  outputstate.pairsets.push_back(newset);
289  // put inpair hits in list of hits not to pair again with the new hits
290  for (auto vetohit : pairset.hitlist) {
291  vetoList.insert(vetohit);
292  }
293  }
294  }
295 
296  // make new pairsets with unpaired hits
297  for (auto prevhit : inputstate.unpairedHits) {
298  if (vetoList.count(prevhit) == 0) {
299  HitPair newpair(prevhit, newhit, m_reversePairDir);
300  if (pairPassesFilter(newpair) || (m_applyPairFilter == false)) {
301  HitPairSet newset;
302  newset.addPair(newpair);
303  outputstate.pairsets.push_back(newset);
304  }
305  }
306  }
307 
308  // if this can be the start of a the start of a track and still
309  // have enough hits to make a track, add it to the unpaired hits list
310  if (lyridx <= allowed_missed_hits) {
311  outputstate.unpairedHits.push_back(newhit);
312  }
313  }
314 
315  // Add groups to output without new hit if they have enough hits to skip
316  // this layer. Note expected hits at this point is lyridx+1, since we start
317  // counting lyridx from zero. Logic is then keep the pairset if
318  // expected hits <= hits in set + allows misses
319  for (unsigned ps_idx = 0; ps_idx < inputstate.pairsets.size(); ++ps_idx) {
320  auto &pairset = inputstate.pairsets[ps_idx];
321  if ((!pairset_used[ps_idx])&&(lyridx < (pairset.hitlist.size() + allowed_missed_hits))) {
322  outputstate.pairsets.push_back(pairset);
323  }
324  }
325 
326  // Add hits to unpaired list if hits are still allowed to start a track
327  // ---------------------------------------------------------------------
328  // If you start a new track with a pair whose second element is
329  // layer N (layer numbering starting from zero), then you'll have missed N-1
330  // layers Minus 1 because the first hit was one of the N layers already
331  // passed.
332  //
333  // The next pass will be layer N=lyridx+1 where lyridx is the current value
334  // at this point in the code. You will have then missed lyridx layers, so...
335  // E.g. if you allow one missed layer then this stops putting hits in the
336  // unpairedHits list if lyridx>1, so tracks must start with layer 0 or 1,
337  // which makes sense
338  if (lyridx > allowed_missed_hits) {
339  // make no new track starts
340  outputstate.unpairedHits.clear();
341  } else {
342  // copy in any previous unpairedHits as well
343  for (auto prevhit : inputstate.unpairedHits) {
344  outputstate.unpairedHits.push_back(prevhit);
345  }
346  }
347 }

Friends And Related Function Documentation

◆ FPGATrackSimGenScanMonitoring

friend class FPGATrackSimGenScanMonitoring
friend

Definition at line 92 of file FPGATrackSimGenScanTool.h.

Member Data Documentation

◆ m_applyPairFilter

Gaudi::Property<bool> FPGATrackSimGenScanTool::m_applyPairFilter {this, "applyPairFilter", {}, "Apply Pair Filter"}
protected

Definition at line 114 of file FPGATrackSimGenScanTool.h.

◆ m_applyPairSetFilter

Gaudi::Property<bool> FPGATrackSimGenScanTool::m_applyPairSetFilter {this, "applyPairSetFilter", {}, "Apply PairSet Filter"}
protected

Definition at line 121 of file FPGATrackSimGenScanTool.h.

◆ m_binFilter

Gaudi::Property<std::string> FPGATrackSimGenScanTool::m_binFilter {this, "binFilter", {"PairThenGroup"}, "which bin filter to run, current options: PairThenGroup, IncrementalBuild"}
protected

Definition at line 111 of file FPGATrackSimGenScanTool.h.

◆ m_binnedhits

ToolHandle<FPGATrackSimBinnedHits> FPGATrackSimGenScanTool::m_binnedhits {this, "BinnedHits", "FPGATrackSimBinnedHits", "Binned Hits Class"}
protected

Definition at line 101 of file FPGATrackSimGenScanTool.h.

◆ m_binningOnly

Gaudi::Property<bool> FPGATrackSimGenScanTool::m_binningOnly {this, "binningOnly", {false}, "Turn off road building to test the binning only"}
protected

Definition at line 113 of file FPGATrackSimGenScanTool.h.

◆ m_etaWeight

Gaudi::Property<double> FPGATrackSimGenScanTool::m_etaWeight {this, "etaChi2Weight", 1.0, "Weight for eta component of chi2 in genscan fit"}
protected

Definition at line 132 of file FPGATrackSimGenScanTool.h.

◆ m_EvtSel

ServiceHandle<IFPGATrackSimEventSelectionSvc> FPGATrackSimGenScanTool::m_EvtSel {this, "FPGATrackSimEventSelectionSvc", ""}
protected

Definition at line 98 of file FPGATrackSimGenScanTool.h.

◆ m_evtsProcessed

int FPGATrackSimGenScanTool::m_evtsProcessed = 0
protected

Definition at line 265 of file FPGATrackSimGenScanTool.h.

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimGenScanTool::m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
protected

Definition at line 99 of file FPGATrackSimGenScanTool.h.

◆ m_inBinFiltering

Gaudi::Property<bool> FPGATrackSimGenScanTool::m_inBinFiltering {this, "inBinFiltering", true, "Filter roads that appear to be outside their bin"}
protected

Definition at line 133 of file FPGATrackSimGenScanTool.h.

◆ m_monitoring

ToolHandle<FPGATrackSimGenScanMonitoring> FPGATrackSimGenScanTool::m_monitoring {this, "Monitoring", "FPGATrackSimGenScanMonitoring", "Monitoring Tool"}
protected

Definition at line 100 of file FPGATrackSimGenScanTool.h.

◆ m_pairFilterDeltaEtaCut

Gaudi::Property<std::vector<double> > FPGATrackSimGenScanTool::m_pairFilterDeltaEtaCut {this, "pairFilterDeltaEtaCut", {}, "Pair Filter Delta Eta Cut Value (list one per layer)"}
protected

Definition at line 117 of file FPGATrackSimGenScanTool.h.

◆ m_pairFilterDeltaPhiCut

Gaudi::Property<std::vector<double> > FPGATrackSimGenScanTool::m_pairFilterDeltaPhiCut {this, "pairFilterDeltaPhiCut", {}, "Pair Filter Delta Phi Cut Value (list one per layer)"}
protected

Definition at line 116 of file FPGATrackSimGenScanTool.h.

◆ m_pairFilterEtaExtrapCut

Gaudi::Property<std::vector<double> > FPGATrackSimGenScanTool::m_pairFilterEtaExtrapCut {this, "pairFilterEtaExtrapCut", {}, "Pair Filter Eta Extrap Cut Value(in/out pair)"}
protected

Definition at line 119 of file FPGATrackSimGenScanTool.h.

◆ m_pairFilterPhiExtrapCut

Gaudi::Property<std::vector<double> > FPGATrackSimGenScanTool::m_pairFilterPhiExtrapCut {this, "pairFilterPhiExtrapCut", {}, "Pair Filter Phi Extrap Cut Value (in/out pair)"}
protected

Definition at line 118 of file FPGATrackSimGenScanTool.h.

◆ m_pairingLayers

std::vector<unsigned int> FPGATrackSimGenScanTool::m_pairingLayers
protected

Definition at line 266 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetDeltaDeltaEtaCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetDeltaDeltaEtaCut {this, "pairSetDeltaDeltaEtaCut", {}, "Pair Set Delta Eta Cut Value"}
protected

Definition at line 125 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetDeltaDeltaPhiCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetDeltaDeltaPhiCut {this, "pairSetDeltaDeltaPhiCut", {}, "Pair Set Delta Delta Phi Cut Value"}
protected

Definition at line 124 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetDeltaEtaCurvatureCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetDeltaEtaCurvatureCut {this, "pairSetDeltaEtaCurvatureCut", {}, "Pair Set Delta Eta Curvature Cut Value"}
protected

Definition at line 129 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetDeltaPhiCurvatureCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetDeltaPhiCurvatureCut {this, "pairSetDeltaPhiCurvatureCut", {}, "Pair Set Delta Phi Curvature Cut Value"}
protected

Definition at line 128 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetEtaCurvatureCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetEtaCurvatureCut {this, "pairSetEtaCurvatureCut", {}, "Pair Set Eta Cut Value"}
protected

Definition at line 127 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetMatchEtaCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetMatchEtaCut {this, "pairSetMatchEtaCut", {}, "Pair Set Match Eta Cut Value"}
protected

Definition at line 123 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetMatchPhiCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetMatchPhiCut {this, "pairSetMatchPhiCut", {}, "Pair Set Match Phi Cut Value"}
protected

Definition at line 122 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetPhiCurvatureCut

Gaudi::Property<double> FPGATrackSimGenScanTool::m_pairSetPhiCurvatureCut {this, "pairSetPhiCurvatureCut", {}, "Pair Set Phi Cut Value"}
protected

Definition at line 126 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetPhiExtrapCurvedCut

Gaudi::Property<std::vector<double> > FPGATrackSimGenScanTool::m_pairSetPhiExtrapCurvedCut {this, "pairSetPhiExtrapCurvedCut", {}, "Pair Set Phi Extrap Curved Cut Value(in/out pair)"}
protected

Definition at line 130 of file FPGATrackSimGenScanTool.h.

◆ m_phiWeight

Gaudi::Property<double> FPGATrackSimGenScanTool::m_phiWeight {this, "phiChi2Weight", 1.0, "Weight for phi component of chi2 in genscan fit"}
protected

Definition at line 131 of file FPGATrackSimGenScanTool.h.

◆ m_reversePairDir

Gaudi::Property<bool> FPGATrackSimGenScanTool::m_reversePairDir {this, "reversePairDir", {}, "Build Pairs starting at last layer and work in"}
protected

Definition at line 115 of file FPGATrackSimGenScanTool.h.

◆ m_rin

Gaudi::Property<double> FPGATrackSimGenScanTool::m_rin {this, "rin", {-1.0}, "Radius of inner layer for extrapolations and keylayer definition"}
protected

Definition at line 105 of file FPGATrackSimGenScanTool.h.

◆ m_roads

std::vector<std::unique_ptr<FPGATrackSimRoad> > FPGATrackSimGenScanTool::m_roads {}
protected

Definition at line 269 of file FPGATrackSimGenScanTool.h.

◆ m_rout

Gaudi::Property<double> FPGATrackSimGenScanTool::m_rout {this, "rout", {-1.0}, "Radius of outer layer for extrapolations and keylayer definition"}
protected

Definition at line 106 of file FPGATrackSimGenScanTool.h.

◆ m_threshold

Gaudi::Property<unsigned> FPGATrackSimGenScanTool::m_threshold {this, "threshold", {}, "Minimum value to accept as a road (inclusive)"}
protected

Definition at line 109 of file FPGATrackSimGenScanTool.h.


The documentation for this class was generated from the following files:
FPGATrackSimGenScanTool::m_pairFilterEtaExtrapCut
Gaudi::Property< std::vector< double > > m_pairFilterEtaExtrapCut
Definition: FPGATrackSimGenScanTool.h:119
FPGATrackSimTrackPars::IHIP
@ IHIP
Definition: FPGATrackSimTrackPars.h:49
beamspotman.r
def r
Definition: beamspotman.py:674
FPGATrackSimGenScanTool::StoredHit
FPGATrackSimBinUtil::StoredHit StoredHit
Definition: FPGATrackSimGenScanTool.h:77
FPGATrackSimGenScanTool::pairMatchesPairSet
bool pairMatchesPairSet(const HitPairSet &pairset, const HitPair &pair, bool verbose)
Definition: FPGATrackSimGenScanTool.cxx:504
FPGATrackSimBinUtil::StoredHit::hitptr
std::shared_ptr< const FPGATrackSimHit > hitptr
Definition: FPGATrackSimBinUtil.h:103
FPGATrackSimGenScanTool::m_pairSetPhiCurvatureCut
Gaudi::Property< double > m_pairSetPhiCurvatureCut
Definition: FPGATrackSimGenScanTool.h:126
getMenu.algname
algname
Definition: getMenu.py:54
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimGenScanTool::filterPairs
StatusCode filterPairs(HitPairSet &pairs, HitPairSet &filteredpairs)
Definition: FPGATrackSimGenScanTool.cxx:442
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimGenScanTool::m_binFilter
Gaudi::Property< std::string > m_binFilter
Definition: FPGATrackSimGenScanTool.h:111
FPGATrackSimGenScanTool::updateState
void updateState(const IntermediateState &inputstate, IntermediateState &outputstate, unsigned lyridx, const std::vector< const StoredHit * > &newhits)
Definition: FPGATrackSimGenScanTool.cxx:266
FPGATrackSimGenScanTool::m_rin
Gaudi::Property< double > m_rin
Definition: FPGATrackSimGenScanTool.h:105
FPGATrackSimTrackPars
Definition: FPGATrackSimTrackPars.h:22
FPGATrackSimGenScanTool::m_phiWeight
Gaudi::Property< double > m_phiWeight
Definition: FPGATrackSimGenScanTool.h:131
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
FPGATrackSimBinUtil::StoredHit::layer
unsigned layer
Definition: FPGATrackSimBinUtil.h:106
FPGATrackSimGenScanTool::makePairs
StatusCode makePairs(const std::vector< std::vector< const StoredHit * >> &hitsByLayer, HitPairSet &pairs)
Definition: FPGATrackSimGenScanTool.cxx:396
bin
Definition: BinsDiffFromStripMedian.h:43
FPGATrackSimGenScanTool::sortHitsByLayer
StatusCode sortHitsByLayer(const BinEntry &bindata, std::vector< std::vector< const StoredHit * >> &hitsByLayer)
Definition: FPGATrackSimGenScanTool.cxx:379
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
FPGATrackSimGenScanTool::m_binnedhits
ToolHandle< FPGATrackSimBinnedHits > m_binnedhits
Definition: FPGATrackSimGenScanTool.h:101
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
m_name
std::string m_name
Definition: ColumnarPhysliteTest.cxx:62
MCP::ScaleSmearParam::r2
@ r2
FPGATrackSimGenScanTool::m_evtsProcessed
int m_evtsProcessed
Definition: FPGATrackSimGenScanTool.h:265
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
python.CreateTierZeroArgdict.pairs
pairs
Definition: CreateTierZeroArgdict.py:201
FPGATrackSimGenScanTool::m_etaWeight
Gaudi::Property< double > m_etaWeight
Definition: FPGATrackSimGenScanTool.h:132
FPGATrackSimGenScanTool::m_pairFilterPhiExtrapCut
Gaudi::Property< std::vector< double > > m_pairFilterPhiExtrapCut
Definition: FPGATrackSimGenScanTool.h:118
FPGATrackSimGenScanTool::getSubRegion
virtual int getSubRegion() const override
Definition: FPGATrackSimGenScanTool.h:90
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FPGATrackSimGenScanTool::m_pairSetDeltaDeltaEtaCut
Gaudi::Property< double > m_pairSetDeltaDeltaEtaCut
Definition: FPGATrackSimGenScanTool.h:125
FPGATrackSimGenScanTool::m_pairSetDeltaEtaCurvatureCut
Gaudi::Property< double > m_pairSetDeltaEtaCurvatureCut
Definition: FPGATrackSimGenScanTool.h:129
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimGenScanTool::m_binningOnly
Gaudi::Property< bool > m_binningOnly
Definition: FPGATrackSimGenScanTool.h:113
urldecode::states
states
Definition: urldecode.h:39
FPGATrackSimGenScanTool::m_threshold
Gaudi::Property< unsigned > m_threshold
Definition: FPGATrackSimGenScanTool.h:109
FPGATrackSimGenScanTool::HitPairSet
Definition: FPGATrackSimGenScanTool.h:213
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:525
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
FPGATrackSimGenScanTool::m_pairSetDeltaPhiCurvatureCut
Gaudi::Property< double > m_pairSetDeltaPhiCurvatureCut
Definition: FPGATrackSimGenScanTool.h:128
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimGenScanTool::m_pairSetEtaCurvatureCut
Gaudi::Property< double > m_pairSetEtaCurvatureCut
Definition: FPGATrackSimGenScanTool.h:127
FPGATrackSimBinUtil::ParSet
Definition: FPGATrackSimBinUtil.h:45
FPGATrackSimBinArray::ConstIterator
Definition: FPGATrackSimBinArray.h:127
FPGATrackSimGenScanTool::m_monitoring
ToolHandle< FPGATrackSimGenScanMonitoring > m_monitoring
Definition: FPGATrackSimGenScanTool.h:100
FPGATrackSimGenScanTool::m_pairSetDeltaDeltaPhiCut
Gaudi::Property< double > m_pairSetDeltaDeltaPhiCut
Definition: FPGATrackSimGenScanTool.h:124
FPGATrackSimGenScanTool::pairPassesFilter
bool pairPassesFilter(const HitPair &pair)
Definition: FPGATrackSimGenScanTool.cxx:431
FPGATrackSimBinUtil::StoredHit
Definition: FPGATrackSimBinUtil.h:101
FPGATrackSimGenScanTool::groupPairs
StatusCode groupPairs(HitPairSet &filteredpairs, std::vector< HitPairSet > &clusters, bool verbose)
Definition: FPGATrackSimGenScanTool.cxx:456
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
FPGATrackSimGenScanTool::m_roads
std::vector< std::unique_ptr< FPGATrackSimRoad > > m_roads
Definition: FPGATrackSimGenScanTool.h:269
FPGATrackSimGenScanTool::m_pairSetMatchPhiCut
Gaudi::Property< double > m_pairSetMatchPhiCut
Definition: FPGATrackSimGenScanTool.h:122
FPGATrackSimGenScanTool::m_pairFilterDeltaEtaCut
Gaudi::Property< std::vector< double > > m_pairFilterDeltaEtaCut
Definition: FPGATrackSimGenScanTool.h:117
FPGATrackSimTrackPars::IPHI
@ IPHI
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimGenScanTool::m_applyPairSetFilter
Gaudi::Property< bool > m_applyPairSetFilter
Definition: FPGATrackSimGenScanTool.h:121
FPGATrackSimGenScanTool::HitPair
Definition: FPGATrackSimGenScanTool.h:180
y
#define y
lumiFormat.fill
fill
Definition: lumiFormat.py:104
FPGATrackSimGenScanTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimGenScanTool.h:99
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
FPGATrackSimGenScanTool::m_applyPairFilter
Gaudi::Property< bool > m_applyPairFilter
Definition: FPGATrackSimGenScanTool.h:114
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:296
FPGATrackSimTrackPars::NPARS
@ NPARS
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimGenScanTool::fitRoad
bool fitRoad(std::vector< const StoredHit * > const &hits, const FPGATrackSimBinUtil::IdxSet &idx, FPGATrackSimTrackPars &trackpars, double &chi2) const
Definition: FPGATrackSimGenScanTool.cxx:730
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
FPGATrackSimGenScanTool::m_rout
Gaudi::Property< double > m_rout
Definition: FPGATrackSimGenScanTool.h:106
FPGATrackSimGenScanTool::m_pairSetPhiExtrapCurvedCut
Gaudi::Property< std::vector< double > > m_pairSetPhiExtrapCurvedCut
Definition: FPGATrackSimGenScanTool.h:130
FPGATrackSimGenScanTool::m_reversePairDir
Gaudi::Property< bool > m_reversePairDir
Definition: FPGATrackSimGenScanTool.h:115
FPGATrackSimGenScanTool::incrementalBuildFilter
StatusCode incrementalBuildFilter(const BinEntry &bindata, std::vector< HitPairSet > &output_pairset)
Definition: FPGATrackSimGenScanTool.cxx:350
FPGATrackSimGenScanTool::m_pairFilterDeltaPhiCut
Gaudi::Property< std::vector< double > > m_pairFilterDeltaPhiCut
Definition: FPGATrackSimGenScanTool.h:116
FPGATrackSimGenScanTool::m_pairSetMatchEtaCut
Gaudi::Property< double > m_pairSetMatchEtaCut
Definition: FPGATrackSimGenScanTool.h:123
FPGATrackSimGenScanTool::m_pairingLayers
std::vector< unsigned int > m_pairingLayers
Definition: FPGATrackSimGenScanTool.h:266
FPGATrackSimGenScanTool::pairThenGroupFilter
StatusCode pairThenGroupFilter(const BinEntry &bindata, std::vector< HitPairSet > &output_pairset)
Definition: FPGATrackSimGenScanTool.cxx:206
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:31
FPGATrackSimGenScanTool::m_inBinFiltering
Gaudi::Property< bool > m_inBinFiltering
Definition: FPGATrackSimGenScanTool.h:133
FPGATrackSimGenScanTool::addRoad
void addRoad(std::vector< const StoredHit * > const &hits, const FPGATrackSimBinUtil::IdxSet &idx)
Definition: FPGATrackSimGenScanTool.cxx:591