ATLAS Offline Software
Classes | 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

struct  BinEntry
 
class  HitPair
 
struct  HitPairSet
 
struct  IntermediateState
 
struct  StoredHit
 

Public Member Functions

 FPGATrackSimGenScanTool (const std::string &, const std::string &, const IInterface *)
 
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

void computeValidBins ()
 
StatusCode fillImage (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
 
StatusCode pairThenGroupFilter (const BinEntry &bindata, const FPGATrackSimGenScanBinningBase::IdxSet &bin, 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, const FPGATrackSimGenScanBinningBase::IdxSet &bin, 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 FPGATrackSimGenScanBinningBase::IdxSet &idx)
 

Protected Attributes

ServiceHandle< IFPGATrackSimEventSelectionSvcm_EvtSel {this, "FPGATrackSimEventSelectionSvc", "FPGATrackSimEventSelectionSvc"}
 
ServiceHandle< IFPGATrackSimBankSvcm_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
 
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
 
ToolHandle< FPGATrackSimGenScanMonitoringm_monitoring {this, "Monitoring", "FPGATrackSimGenScanMonitoring", "Monitoring Tool"}
 
ToolHandle< FPGATrackSimGenScanBinningBasem_binning {this, "Binning", "FPGATrackSimGenScanBinningBase", "Gen Scan Binning Tool"}
 
Gaudi::Property< std::string > m_parSet {this, "parSet", {}, "String name of parameter set"}
 
Gaudi::Property< std::vector< float > > m_parMin {this, "parMin", {}, "Vector of minimum bounds of parameters (expect 5"}
 
Gaudi::Property< std::vector< float > > m_parMax {this, "parMax", {}, "Vector of maximum bounds of parameters (expect 5"}
 
Gaudi::Property< std::vector< unsigned > > m_parBins {this, "parBins", {}, "Vector of number of bins for each parameter (expect 5)"}
 
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< double > m_d0FractionalPadding {this, "d0FractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
 
Gaudi::Property< double > m_z0FractionalPadding {this, "z0FractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
 
Gaudi::Property< double > m_etaFractionalPadding {this, "etaFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
 
Gaudi::Property< double > m_phiFractionalPadding {this, "phiFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
 
Gaudi::Property< double > m_qOverPtFractionalPadding {this, "qOverPtFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
 
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_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)"}
 
int m_evtsProcessed = 0
 
unsigned m_nLayers = 0
 
std::vector< unsigned int > m_pairingLayers
 
FPGATrackSimGenScanArray< BinEntrym_image
 
FPGATrackSimGenScanArray< int > m_validBin
 
FPGATrackSimGenScanArray< int > m_validSlice
 
FPGATrackSimGenScanArray< int > m_validScan
 
FPGATrackSimGenScanArray< int > m_validSliceAndScan
 
std::vector< FPGATrackSimRoadm_roads {}
 

Friends

class FPGATrackSimGenScanMonitoring
 
std::ostream & operator<< (std::ostream &os, const StoredHit &hit)
 

Detailed Description

Definition at line 73 of file FPGATrackSimGenScanTool.h.

Constructor & Destructor Documentation

◆ FPGATrackSimGenScanTool()

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

Definition at line 55 of file FPGATrackSimGenScanTool.cxx.

55  :
56  base_class(algname, name, ifc)
57 {
58  declareInterface<IFPGATrackSimRoadFinderTool>(this);
59 }

Member Function Documentation

◆ addRoad()

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

Definition at line 702 of file FPGATrackSimGenScanTool.cxx.

703 {
704  layer_bitmask_t hitLayers = 0;
705  std::vector<std::shared_ptr<const FPGATrackSimHit>> outhits;
706  for (const FPGATrackSimGenScanTool::StoredHit* hit : hits)
707  {
708  hitLayers |= 1 << hit->hitptr->getLayer();
709  outhits.push_back(hit->hitptr);
710  }
711 
712  std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> sorted_hits = ::sortByLayer(outhits);
713  sorted_hits.resize(m_nLayers); // If no hits in last layer, return from sortByLayer will be too short
714 
715  m_roads.emplace_back();
716  FPGATrackSimRoad &r = m_roads.back();
717 
718  r.setRoadID(m_roads.size() - 1);
719  // r.setPID(y * m_imageSize_y + x);
720  r.setHits(std::move(sorted_hits));
721  FPGATrackSimTrackPars trackpars = m_binning->parSetToTrackPars(m_binning->binCenter(idx));
722  r.setX(trackpars[FPGATrackSimTrackPars::IPHI]);
723  r.setY(trackpars[FPGATrackSimTrackPars::IHIP]);
724  r.setXBin(idx[3]);
725  r.setYBin(idx[4]);
726  r.setHitLayers(hitLayers);
727  r.setSubRegion(0);
728 }

◆ computeValidBins()

void FPGATrackSimGenScanTool::computeValidBins ( )
protected

Definition at line 833 of file FPGATrackSimGenScanTool.cxx.

833  {
834  // determine which bins are valid
835  m_validBin.setsize(m_binning->m_parBins,false);
836  m_validSlice.setsize(m_binning->sliceBins(),false);
837  m_validScan.setsize(m_binning->scanBins(),false);
838  m_validSliceAndScan.setsize(m_binning->sliceAndScanBins(),false);
839 
840  FPGATrackSimTrackPars min_padded;
841  FPGATrackSimTrackPars max_padded;
848  for (unsigned par = 0; par < FPGATrackSimTrackPars::NPARS; par++)
849  {
850  min_padded[par] = m_EvtSel->getMin()[par] - padding[par] * (m_EvtSel->getMax()[par]-m_EvtSel->getMin()[par]);
851  max_padded[par] = m_EvtSel->getMax()[par] + padding[par] * (m_EvtSel->getMax()[par]-m_EvtSel->getMin()[par]);
853  // working in units of GeV internally
854  min_padded[par] *= 1000;
855  max_padded[par] *= 1000;
856  }
857  ATH_MSG_INFO("Padded Parameter Range: " << FPGATrackSimTrackPars::parName(par)
858  << " min=" << min_padded[par] << " max=" << max_padded[par]);
859  }
860 
861 
863  {
864  // this finds the parameters at all 2^5 corners of the bin and then finds the min and max of those
865  std::vector<FPGATrackSimGenScanBinningBase::ParSet> parsets = m_binning->makeVariationSet(std::vector<unsigned>({0,1,2,3,4}),bin.idx());
866  FPGATrackSimTrackPars minvals = m_binning->parSetToTrackPars(m_binning->binCenter(bin.idx()));
867  FPGATrackSimTrackPars maxvals = m_binning->parSetToTrackPars(m_binning->binCenter(bin.idx()));
868  for (FPGATrackSimGenScanBinningBase::ParSet & parset : parsets) {
869  FPGATrackSimTrackPars trackpars = m_binning->parSetToTrackPars(parset);
870  for (unsigned par =0; par < FPGATrackSimTrackPars::NPARS; par++) {
871  minvals[par] = std::min(minvals[par],trackpars[par]);
872  maxvals[par] = std::max(maxvals[par],trackpars[par]);
873  }
874  }
875 
876  // make sure bin overlaps with active region
877  bool inRange = true;
878  for (unsigned par =0; par < FPGATrackSimTrackPars::NPARS; par++) {
879  inRange = inRange && (minvals[par] < max_padded[par]) && (maxvals[par] > min_padded[par]);
880  }
881  if (inRange)
882  {
883  bin.data() = true;
884  m_validSlice[m_binning->sliceIdx(bin.idx())] = true;
885  m_validScan[m_binning->scanIdx(bin.idx())] = true;
886  m_validSliceAndScan[m_binning->sliceAndScanIdx(bin.idx())] = true;
887  }
888 
889  if (bin.data() == false)
890  {
891  ATH_MSG_VERBOSE("Invalid bin: " << bin.idx() << " :" << m_binning->parSetToTrackPars(m_binning->binCenter(bin.idx()))
892  << " minvals: " << minvals << " maxvals: " << maxvals );
893  }
894  }
895 
896  // count valid bins
897  int validBins = 0;
898  for (FPGATrackSimGenScanArray<int>::Iterator bin : m_validBin) { if(bin.data()) validBins++;}
899 
900  int validSlices = 0;
901  for (FPGATrackSimGenScanArray<int>::Iterator bin : m_validSlice) { if(bin.data()) validSlices++;}
902 
903  int validScans = 0;
904  for (FPGATrackSimGenScanArray<int>::Iterator bin : m_validScan) { if(bin.data()) validScans++;}
905 
906  ATH_MSG_INFO("Valid Bins: " << validBins
907  << " valid slices: " << validSlices
908  << " valid scans: " << validScans);
909 }

◆ fillImage()

StatusCode FPGATrackSimGenScanTool::fillImage ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits)
protected

Definition at line 242 of file FPGATrackSimGenScanTool.cxx.

243 {
244  ATH_MSG_DEBUG("In fillImage");
245 
246  for (const std::shared_ptr<const FPGATrackSimHit>& hit : hits)
247  {
248  m_monitoring->fillHitLevelInput(hit.get());
249 
250  // The following code loops sequentially of the slice, then scan, then row parameters
251  // skipping invalid slices/scans/row/bins and adding hits if the hits are in the bin
252  // according to the m_binning class
253 
254  // this will contain current bin idx as it is built from slices and scans
256 
257  // iterate over slices
259  {
260  // if slice is not valid continue
261  if (!slicebin.data()) continue;
262 
263  // set the slice bins in the current bin idx object
264  ATH_CHECK(m_binning->setIdxSubVec(idx, m_binning->slicePars(), slicebin.idx()));
265 
266  // if hit is not in slice skip slice (continue)
267  if (!m_binning->hitInSlice(idx, hit.get()))
268  {
269  m_monitoring->sliceCheck(slicebin.idx());
270  continue;
271  }
272 
273  m_monitoring->incrementInputPerSlice(slicebin.idx());
274 
275  // iterate over scan bins
277 
278  // if scan bin is not valid continue
279  if (!scanbin.data()) continue; // scan bin not valid
280 
281  // set the scan bins in the current bin idx object
282  ATH_CHECK(m_binning->setIdxSubVec(idx, m_binning->scanPars(), scanbin.idx()));
283 
284  // Find the min/max bins for hit in the row
285  std::pair<unsigned, unsigned> rowRange = m_binning->idxsetToRowParBinRange(idx, hit.get());
286 
287  // put hit in row bins according to row range
288  for (unsigned rowbin = rowRange.first; rowbin < rowRange.second; rowbin++)
289  {
290  idx[m_binning->rowParIdx()] = rowbin;
291 
292  // if full bin is not valid continue
293  if (!m_validBin[idx]) continue;
294 
295  // make a stored hit and fill it with the eta/phishifts as
296  // speficied by the Binning class
297  StoredHit s_hit;
298  s_hit.hitptr = hit;
299  s_hit.layer = hit->getLayer();
300  s_hit.phiShift = m_binning->phiShift(idx, hit.get());
301  s_hit.etaShift = m_binning->etaShift(idx, hit.get());
302 
303  // add hit to the BinEntry for the bin
304  m_image[idx].addHit(s_hit);
305  }
306  }
307  }
308  }
309 
310  m_monitoring->fillInputSummary(hits, m_validSlice, m_validSliceAndScan);
311 
312  return StatusCode::SUCCESS;
313 }

◆ filterPairs()

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

Definition at line 553 of file FPGATrackSimGenScanTool.cxx.

554 {
555  ATH_MSG_VERBOSE("In filterPairs");
556 
557  for (const FPGATrackSimGenScanTool::HitPair &pair : pairs.pairList) {
558  if (pairPassesFilter(pair)) {
559  filteredpairs.addPair(pair);
560  }
561  }
562  return StatusCode::SUCCESS;
563 }

◆ 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 172 of file FPGATrackSimGenScanTool.cxx.

174 {
175  ATH_MSG_DEBUG("In getRoads, Processing Event# " << ++m_evtsProcessed << " hit size = " << hits.size());
176 
177  roads.clear();
178  m_roads.clear();
179  m_monitoring->resetDataFlowCounters();
180 
181  // Currently assume that if less than 100 hits its a single track MC
182  m_monitoring->parseTruthInfo(getTruthTracks(),(hits.size() < 100),m_validBin);
183 
184  // do the binning...
186 
187  // scan over image building pairs for bins over threshold
189  {
190  // apply threshold
191  if (bin.data().lyrCnt() < m_threshold) continue;
192  ATH_MSG_DEBUG("newRoad " << bin.data().lyrCnt() << " " << bin.idx());
193 
194  // pass hits for bin to filterRoad and get back pairs of hits grouped into pairsets
195  std::vector<HitPairSet> pairsets;
196  if (m_binFilter=="PairThenGroup") {
197  ATH_CHECK(pairThenGroupFilter(bin.data(), bin.idx(), pairsets));
198  } else if (m_binFilter=="IncrementalBuild") {
199  ATH_CHECK(incrementalBuildFilter(bin.data(), bin.idx(), pairsets));
200  } else {
201  ATH_MSG_FATAL("Unknown bin filter" << m_binFilter);
202  }
203  ATH_MSG_DEBUG("grouped PairSets " << pairsets.size());
204 
205  // convert the group pairsets to FPGATrackSimRoads
206  for (const FPGATrackSimGenScanTool::HitPairSet& pairset: pairsets)
207  {
208  addRoad(pairset.hitlist, bin.idx());
209 
210  // debug statement if more than one road found in bin
211  // not necessarily a problem
212  if (pairsets.size() >1) {
213  std::string s = "";
214  for (const FPGATrackSimGenScanTool::StoredHit* const hit : pairset.hitlist)
215  {
216  s += "(" + std::to_string(hit->hitptr->getLayer()) + "," + std::to_string(hit->hitptr->getR()) + "), ";
217  }
218  ATH_MSG_DEBUG("Duplicate Group " << s);
219  }
220  }
221  }
222 
223  // copy roads to output vector
224  roads.reserve(m_roads.size());
225  for (FPGATrackSimRoad & r : m_roads) roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(r));
226  ATH_MSG_DEBUG("Roads = " << roads.size());
227  m_monitoring->fillOutputSummary(m_validSlice, m_validSliceAndScan);
228 
229  // clear previous event
230  // (reusing saves having to reallocate memory for each event)
232  {
233  bin.data().reset();
234  }
235 
236  m_evtsProcessed++;
237  return StatusCode::SUCCESS;
238 }

◆ getSubRegion()

virtual int FPGATrackSimGenScanTool::getSubRegion ( ) const
inlineoverridevirtual

Definition at line 87 of file FPGATrackSimGenScanTool.h.

87 {return 0;}

◆ groupPairs()

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

Definition at line 567 of file FPGATrackSimGenScanTool.cxx.

570 {
571  ATH_MSG_VERBOSE("In groupPairs");
572  for (const FPGATrackSimGenScanTool::HitPair & pair : filteredpairs.pairList)
573  {
574  bool added = false;
575  for (FPGATrackSimGenScanTool::HitPairSet &pairset : pairsets)
576  {
577  // Only add skip pairs if skipped layer is not already hit
578  if ((std::abs(pair.second->layer - pair.first->layer) > 1) // gives if is a skip pair
579  && (pairset.hasLayer(std::min(pair.first->layer,pair.second->layer) + 1))) // gives true if skipped layer already in set
580  {
581  // if it matches mark as added so it doesn't start a new pairset
582  // false here is so it doesn't plot these either
583  if (pairMatchesPairSet(pairset, pair, verbose))
584  added = true;
585  if (!added) {
586  ATH_MSG_VERBOSE("Skip pair does not match non-skip pair");
587  }
588  }
589  else
590  {
591  if (pairMatchesPairSet(pairset, pair, verbose))
592  {
593  int size = pairset.addPair(pair);
594  if (verbose)
595  ATH_MSG_VERBOSE("addPair " << pairsets.size() << " " << pairset.pairList.size() << " " << size);
596  added = true;
597  }
598  }
599 
600  }
601 
602  if (!added)
603  {
604  HitPairSet newpairset;
605  newpairset.addPair(pair);
606  pairsets.push_back(newpairset);
607  }
608  }
609 
610  return StatusCode::SUCCESS;
611 
612 }

◆ incrementalBuildFilter()

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

Definition at line 459 of file FPGATrackSimGenScanTool.cxx.

462 {
463  ATH_MSG_VERBOSE("In buildGroupsWithPairs");
464 
465  // Organize Hits by Layer
466  std::vector<std::vector<const StoredHit *>> hitsByLayer(m_nLayers);
467  ATH_CHECK(sortHitsByLayer(bindata, hitsByLayer));
468 
469  // This is monitoring for each bin over threshold
470  // It's here so it can get the hitsByLayer
471  m_monitoring->fillBinLevelOutput(idx, bindata, hitsByLayer);
472 
473  std::vector<IntermediateState> states{m_nLayers+1};
474  for (unsigned lyridx = 0; lyridx < m_nLayers; lyridx++) {
475  unsigned lyr = m_pairingLayers[lyridx];
476  updateState(states[lyridx] , states[lyridx+1], lyridx, hitsByLayer[lyr]);
477  }
478 
479  // this is a little ugly because it requires copying the output pairsets right now
480  output_pairsets=states[m_nLayers].pairsets;
481 
482  m_monitoring->fillBuildGroupsWithPairs(states,m_nLayers-m_threshold);
483 
484  return StatusCode::SUCCESS;
485 }

◆ initialize()

StatusCode FPGATrackSimGenScanTool::initialize ( )
overridevirtual

Definition at line 62 of file FPGATrackSimGenScanTool.cxx.

63 {
64  // Dump the configuration to make sure it propagated through right
65  const std::vector<Gaudi::Details::PropertyBase*> props = this->getProperties();
66  for( Gaudi::Details::PropertyBase* prop : props ) {
67  if (prop->ownerTypeName()==this->type()) {
68  ATH_MSG_DEBUG("Property:\t" << prop->name() << "\t : \t" << prop->toString());
69  }
70  }
71 
72  // Retrieve info
73  ATH_CHECK(m_FPGATrackSimBankSvc.retrieve());
74  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
75  ATH_MSG_INFO("Map specifies :" << m_nLayers);
76  ATH_CHECK(m_monitoring.retrieve());
77  ATH_MSG_INFO("Monitoring Dir :" << m_monitoring->dir());
78  ATH_CHECK(m_binning.retrieve());
79 
80  // Setup layer configuration
81  m_nLayers = m_FPGATrackSimMapping->PlaneMap_1st(getSubRegion())->getNLogiLayers();
82 
83  // This is the layers they get paired with previous layers
84  for (unsigned lyr = 0; lyr < m_nLayers; ++lyr) m_pairingLayers.push_back(lyr);
85  if (m_reversePairDir) {
87  }
88  ATH_MSG_INFO("Pairing Layers: " << m_pairingLayers);
89 
90  // Check inputs
91  bool ok = false;
92  if (m_pairFilterDeltaPhiCut.size() != m_nLayers - 1)
93  ATH_MSG_FATAL("initialize() pairFilterDeltaPhiCut must have size nLayers-1=" << m_nLayers - 1 << " found " << m_pairFilterDeltaPhiCut.size());
94  else if (m_pairFilterDeltaEtaCut.size() != m_nLayers - 1)
95  ATH_MSG_FATAL("initialize() pairFilterDeltaEtaCut must have size nLayers-1=" << m_nLayers - 1 << " found " << m_pairFilterDeltaEtaCut.size());
96  else if (m_pairFilterPhiExtrapCut.size() != 2)
97  ATH_MSG_FATAL("initialize() pairFilterPhiExtrapCut must have size 2 found " << m_pairFilterPhiExtrapCut.size());
98  else if (m_pairFilterEtaExtrapCut.size() != 2)
99  ATH_MSG_FATAL("initialize() pairFilterEtaExtrapCut must have size 2 found " << m_pairFilterEtaExtrapCut.size());
100  else if (m_pairSetPhiExtrapCurvedCut.size() != 2)
101  ATH_MSG_FATAL("initialize() PairSetPhiExtrapCurvedCut must have size 2found " << m_pairSetPhiExtrapCurvedCut.size());
102  else if ((m_rin < 0.0) || (m_rout < 0.0))
103  ATH_MSG_FATAL("Radii not set");
104  else
105  ok = true;
106  if (!ok)
107  return StatusCode::FAILURE;
108 
109 
110  // Dump Binning
111  for (unsigned par : m_binning->slicePars()) { ATH_MSG_INFO("Slice Par: " << m_binning->parNames(par)); }
112  for (unsigned par : m_binning->scanPars()) { ATH_MSG_INFO("Scan Par: " << m_binning->parNames(par)); }
113  ATH_MSG_INFO("Row Par: " << m_binning->parNames(m_binning->rowParIdx()));
114 
115  // Configure Binning
116  for (unsigned par = 0; par < FPGATrackSimGenScanBinningBase::NPars; par++)
117  {
118  m_binning->m_parMin[par] = m_parMin[par];
119  m_binning->m_parMax[par] = m_parMax[par];
120  m_binning->m_parBins[par] = m_parBins[par];
121  if (m_parBins[par] <= 0)
122  {
123  ATH_MSG_FATAL("Every dimension must be at least one bin");
124  return StatusCode::FAILURE;
125  }
126  m_binning->m_parStep[par] = (m_parMax[par] - m_parMin[par]) / m_parBins[par];
127  }
128 
129  // Build Image
130  m_image.setsize(m_binning->m_parBins, BinEntry());
131  ATH_MSG_INFO("Final Image Size: " << m_image.size());
132  // make sure image is starts reset
133  // (reusing saves having to reallocate memory for each event)
135  {
136  bin.data().reset();
137  }
138 
139  // Compute which bins correspond to track parameters that are in the region
140  // i.e. the pT, eta, phi, z0 and d0 bounds
142 
143  // register histograms
144  ATH_CHECK(m_monitoring->registerHistograms(m_nLayers, m_binning.get(), m_rin, m_rout));
145 
146  return StatusCode::SUCCESS;
147 }

◆ makePairs()

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

Definition at line 507 of file FPGATrackSimGenScanTool.cxx.

509 {
510  ATH_MSG_VERBOSE("In makePairs");
511 
512  std::vector<const FPGATrackSimGenScanTool::StoredHit *> const * lastlyr = 0;
513  std::vector<const FPGATrackSimGenScanTool::StoredHit *> const * lastlastlyr = 0;
514 
515  // order here is designed so lower radius hits come first
516  for (unsigned lyr : m_pairingLayers) {
517  for (const FPGATrackSimGenScanTool::StoredHit *const &ptr1 :
518  hitsByLayer[lyr]) {
519  if (lastlyr) {
520  for (const FPGATrackSimGenScanTool::StoredHit *const &ptr2 : *lastlyr) {
521  pairs.addPair(HitPair(ptr2, ptr1,m_reversePairDir));
522  }
523  // Add Pairs that skip one layer
524  if (lastlastlyr) {
525  for (const FPGATrackSimGenScanTool::StoredHit *const &ptr2 : *lastlastlyr) {
526  pairs.addPair(HitPair(ptr2, ptr1,m_reversePairDir));
527  }
528  }
529  }
530  }
531  lastlastlyr = lastlyr;
532  lastlyr = &hitsByLayer[lyr];
533  m_monitoring->fillPairingHits(lastlyr,lastlastlyr);
534  }
535 
536  return StatusCode::SUCCESS;
537 }

◆ pairMatchesPairSet()

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

Definition at line 615 of file FPGATrackSimGenScanTool.cxx.

617  {
618  // In order to make it easy to have a long list of possible cuts,
619  // a vector of cutvar structs is used to represent each cut
620  // then apply the AND of all the cuts is done with a std::count_if function
621 
622  // define the struct (effectively mapping because variable, configured cut value,
623  // and histograms for plotting
624  struct cutvar {
625  cutvar(std::string name, double val, double cut, std::vector<TH1D *>& histset) :
626  m_name(std::move(name)), m_val(val), m_cut(cut), m_histset(histset) {}
627  bool passed() { return std::abs(m_val) < m_cut; }
628  void fill(unsigned cat) { m_histset[cat]->Fill(m_val); }
629  std::string m_name;
630  double m_val;
631  double m_cut;
632  std::vector<TH1D *> &m_histset;
633  };
634 
635  // add the cuts to the list of all cuts
636  std::vector<cutvar> allcuts;
637  allcuts.push_back(cutvar("MatchPhi", pairset.MatchPhi(pair),
639  m_monitoring->m_pairSetMatchPhi));
640  allcuts.push_back(cutvar("MatchEta", pairset.MatchEta(pair),
642  m_monitoring->m_pairSetMatchEta));
643  allcuts.push_back(cutvar("DeltaDeltaPhi", pairset.DeltaDeltaPhi(pair),
645  m_monitoring->m_deltaDeltaPhi));
646  allcuts.push_back(cutvar("DeltaDeltaEta", pairset.DeltaDeltaEta(pair),
648  m_monitoring->m_deltaDeltaEta));
649  allcuts.push_back(cutvar("PhiCurvature", pairset.PhiCurvature(pair),
651  m_monitoring->m_phiCurvature));
652  allcuts.push_back(cutvar("EtaCurvature", pairset.EtaCurvature(pair),
654  m_monitoring->m_etaCurvature));
655  if (pairset.pairList.size() > 1) {
656  allcuts.push_back(cutvar(
657  "DeltaPhiCurvature", pairset.DeltaPhiCurvature(pair),
658  m_pairSetDeltaPhiCurvatureCut, m_monitoring->m_deltaPhiCurvature));
659  allcuts.push_back(cutvar(
660  "DeltaEtaCurvature", pairset.DeltaEtaCurvature(pair),
661  m_pairSetDeltaEtaCurvatureCut, m_monitoring->m_deltaEtaCurvature));
662  }
663  allcuts.push_back(cutvar(
664  "PhiInExtrapCurved", pairset.PhiInExtrapCurved(pair, m_rin),
665  m_pairSetPhiExtrapCurvedCut[0], m_monitoring->m_phiInExtrapCurved));
666  allcuts.push_back(cutvar(
667  "PhiOutExtrapCurved", pairset.PhiOutExtrapCurved(pair, m_rout),
668  m_pairSetPhiExtrapCurvedCut[1], m_monitoring->m_phiOutExtrapCurved));
669 
670  // count number of cuts passed
671  unsigned passedCuts = std::count_if(allcuts.begin(), allcuts.end(),
672  [](cutvar& cut) { return cut.passed(); });
673  bool passedAll = (passedCuts == allcuts.size());
674 
675  // monitoring
676  bool passedAllButOne = (passedCuts == allcuts.size() - 1);
677  for (cutvar& cut: allcuts) {
678  // the last value computes if an n-1 histogram should be filled
679  m_monitoring->fillPairSetFilterCut(cut.m_histset, cut.m_val, pair,
680  pairset.lastpair(),
681  (passedAll || (passedAllButOne && !cut.passed())));
682  }
683 
684  if (verbose)
685  {
686  std::string s = "";
687  for (cutvar &cut : allcuts)
688  {
689  s += cut.m_name + " : (" + cut.passed() + ", " + cut.m_val + "), ";
690  }
691  ATH_MSG_DEBUG("PairSet test " << passedAll << " " << s);
692  ATH_MSG_DEBUG("Hits: \n " << *pairset.lastpair().first << "\n "
693  << *pairset.lastpair().second << "\n "
694  << *pair.first << "\n "
695  << *pair.second);
696  }
697 
698  return passedAll;
699 }

◆ pairPassesFilter()

bool FPGATrackSimGenScanTool::pairPassesFilter ( const HitPair pair)
protected

Definition at line 542 of file FPGATrackSimGenScanTool.cxx.

542  {
543  m_monitoring->fillPairFilterCuts(pair);
544  int lyr = std::min(pair.first->hitptr->getLayer(),pair.second->hitptr->getLayer());
545  return (std::abs(pair.dPhi()) < m_pairFilterDeltaPhiCut[lyr]) &&
546  (std::abs(pair.dEta()) < m_pairFilterDeltaEtaCut[lyr]) &&
547  (std::abs(pair.PhiInExtrap(m_rin)) < m_pairFilterPhiExtrapCut[0]) &&
548  (std::abs(pair.PhiOutExtrap(m_rout)) < m_pairFilterPhiExtrapCut[1]) &&
549  (std::abs(pair.EtaInExtrap(m_rin)) < m_pairFilterEtaExtrapCut[0]) &&
550  (std::abs(pair.EtaOutExtrap(m_rout)) < m_pairFilterEtaExtrapCut[1]);
551 }

◆ pairThenGroupFilter()

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

Definition at line 316 of file FPGATrackSimGenScanTool.cxx.

319 {
320  ATH_MSG_VERBOSE("In pairThenGroupFilter");
321 
322  // Organize Hits by Layer
323  std::vector<std::vector<const StoredHit *>> hitsByLayer(m_nLayers);
324  ATH_CHECK(sortHitsByLayer(bindata, hitsByLayer));
325 
326  // This is monitoring for each bin over threshold
327  // It's here so it can get the hitsByLayer
328  m_monitoring->fillBinLevelOutput(idx, bindata, hitsByLayer);
329 
330  // Make Pairs
331  HitPairSet pairs;
332  ATH_CHECK(makePairs(hitsByLayer, pairs));
333 
334  // Filter Pairs
335  HitPairSet filteredpairs;
336  ATH_CHECK(filterPairs(pairs, filteredpairs));
337 
338  // Require road is still over threshold
339  bool passedPairFilter = (filteredpairs.lyrCnt() >= m_threshold);
340  m_monitoring->pairFilterCheck(pairs, filteredpairs, passedPairFilter);
341 
342  // if passed Pair Filter proceed to group the filtered pairs into pairsets
343  if (passedPairFilter)
344  {
345  // Pair Set Grouping
346  std::vector<HitPairSet> pairsets;
347  ATH_CHECK(groupPairs(filteredpairs, pairsets, false));
348 
349  // loop over pairsets and find those that are over thresold
350  for (const FPGATrackSimGenScanTool::HitPairSet& pairset : pairsets)
351  {
352  // if over threshold add it to the output
353  if (pairset.lyrCnt() >= m_threshold)
354  {
355  if (m_applyPairSetFilter) {
356  output_pairsets.push_back(pairset);
357  }
358  }
359  }
360  }
361 
362  // set outputs if not all filters applied
363  if (!m_applyPairFilter) {
364  // output is just the filtered pairs
365  output_pairsets.push_back(pairs);
366  }
367  else if (passedPairFilter && !m_applyPairSetFilter)
368  {
369  // output is just the filtered pairs
370  output_pairsets.push_back(filteredpairs);
371  }
372 
373  return StatusCode::SUCCESS;
374 }

◆ sortHitsByLayer()

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

Definition at line 489 of file FPGATrackSimGenScanTool.cxx.

491 {
492  ATH_MSG_VERBOSE("In fillHitsByLayer");
493 
494  for (const FPGATrackSimGenScanTool::StoredHit& hit : bindata.hits)
495  {
496  hitsByLayer[hit.hitptr->getLayer()].push_back(&hit);
497  }
498 
499  return StatusCode::SUCCESS;
500 }

◆ updateState()

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

Definition at line 378 of file FPGATrackSimGenScanTool.cxx.

382 {
383  unsigned int allowed_missed_hits = m_nLayers - m_threshold;
384 
385  std::vector<bool> pairset_used(inputstate.pairsets.size(),false);
386 
387  for (auto &newhit : newhits) {
388 
389  // don't make new pairs with hits that the new hit is already paired with in a group
390  std::set<const StoredHit *> vetoList;
391 
392  // try adding hit to existing pair sets
393  for (auto &pairset : inputstate.pairsets) {
394  HitPair nextpair(pairset.lastpair().second, newhit, m_reversePairDir);
395  if (pairMatchesPairSet(pairset, nextpair, false)) {
396  HitPairSet newset(pairset);
397  newset.addPair(nextpair);
398  outputstate.pairsets.push_back(newset);
399  // put inpair hits in list of hits not to pair again with the new hits
400  for (auto vetohit : pairset.hitlist) {
401  vetoList.insert(vetohit);
402  }
403  }
404  }
405 
406  // make new pairsets with unpaired hits
407  for (auto prevhit : inputstate.unpairedHits) {
408  if (vetoList.count(prevhit) == 0) {
409  HitPair newpair(prevhit, newhit, m_reversePairDir);
410  if (pairPassesFilter(newpair)) {
411  HitPairSet newset;
412  newset.addPair(newpair);
413  outputstate.pairsets.push_back(newset);
414  }
415  }
416  }
417 
418  // if this can be the start of a the start of a track and still
419  // have enough hits to make a track, add it to the unpaired hits list
420  if (lyridx <= allowed_missed_hits) {
421  outputstate.unpairedHits.push_back(newhit);
422  }
423  }
424 
425  // Add groups to output without new hit if they have enough hits to skip
426  // this layer. Note expected hits at this point is lyridx+1, since we start
427  // counting lyridx from zero. Logic is then keep the pairset if
428  // expected hits <= hits in set + allows misses
429  for (auto &pairset : inputstate.pairsets) {
430  if (lyridx < (pairset.hitlist.size() + allowed_missed_hits)) {
431  outputstate.pairsets.push_back(pairset);
432  }
433  }
434 
435  // Add hits to unpaired list if hits are still allowed to start a track
436  // ---------------------------------------------------------------------
437  // If you start a new track with a pair whose second element is
438  // layer N (layer numbering starting from zero), then you'll have missed N-1
439  // layers Minus 1 because the first hit was one of the N layers already
440  // passed.
441  //
442  // The next pass will be layer N=lyridx+1 where lyridx is the current value
443  // at this point in the code. You will have then missed lyridx layers, so...
444  // E.g. if you allow one missed layer then this stops putting hits in the
445  // unpairedHits list if lyridx>1, so tracks must start with layer 0 or 1,
446  // which makes sense
447  if (lyridx > allowed_missed_hits) {
448  // make no new track starts
449  outputstate.unpairedHits.clear();
450  } else {
451  // copy in any previous unpairedHits as well
452  for (auto prevhit : inputstate.unpairedHits) {
453  outputstate.unpairedHits.push_back(prevhit);
454  }
455  }
456 }

Friends And Related Function Documentation

◆ FPGATrackSimGenScanMonitoring

friend class FPGATrackSimGenScanMonitoring
friend

Definition at line 89 of file FPGATrackSimGenScanTool.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const StoredHit hit 
)
friend

Definition at line 43 of file FPGATrackSimGenScanTool.cxx.

44 {
45  os << "lyr: " << hit.layer << " ";
46  os << "(" << hit.hitptr->getR() << ", " << hit.hitptr->getGPhi() << ", " << hit.hitptr->getZ() << ") ";
47  os << "[" << hit.phiShift << ", " << hit.etaShift << "]";
48  return os;
49 }

Member Data Documentation

◆ m_applyPairFilter

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

Definition at line 121 of file FPGATrackSimGenScanTool.h.

◆ m_applyPairSetFilter

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

Definition at line 128 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 119 of file FPGATrackSimGenScanTool.h.

◆ m_binning

ToolHandle<FPGATrackSimGenScanBinningBase> FPGATrackSimGenScanTool::m_binning {this, "Binning", "FPGATrackSimGenScanBinningBase", "Gen Scan Binning Tool"}
protected

Definition at line 99 of file FPGATrackSimGenScanTool.h.

◆ m_d0FractionalPadding

Gaudi::Property<double> FPGATrackSimGenScanTool::m_d0FractionalPadding {this, "d0FractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
protected

Definition at line 111 of file FPGATrackSimGenScanTool.h.

◆ m_etaFractionalPadding

Gaudi::Property<double> FPGATrackSimGenScanTool::m_etaFractionalPadding {this, "etaFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
protected

Definition at line 113 of file FPGATrackSimGenScanTool.h.

◆ m_EvtSel

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

Definition at line 95 of file FPGATrackSimGenScanTool.h.

◆ m_evtsProcessed

int FPGATrackSimGenScanTool::m_evtsProcessed = 0
protected

Definition at line 306 of file FPGATrackSimGenScanTool.h.

◆ m_FPGATrackSimBankSvc

ServiceHandle<IFPGATrackSimBankSvc> FPGATrackSimGenScanTool::m_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
protected

Definition at line 96 of file FPGATrackSimGenScanTool.h.

◆ m_FPGATrackSimMapping

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

Definition at line 97 of file FPGATrackSimGenScanTool.h.

◆ m_image

FPGATrackSimGenScanArray<BinEntry> FPGATrackSimGenScanTool::m_image
protected

Definition at line 314 of file FPGATrackSimGenScanTool.h.

◆ m_monitoring

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

Definition at line 98 of file FPGATrackSimGenScanTool.h.

◆ m_nLayers

unsigned FPGATrackSimGenScanTool::m_nLayers = 0
protected

Definition at line 307 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 124 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 123 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 126 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 125 of file FPGATrackSimGenScanTool.h.

◆ m_pairingLayers

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

Definition at line 308 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetDeltaDeltaEtaCut

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

Definition at line 132 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 131 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 136 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 135 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetEtaCurvatureCut

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

Definition at line 134 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetMatchEtaCut

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

Definition at line 130 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetMatchPhiCut

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

Definition at line 129 of file FPGATrackSimGenScanTool.h.

◆ m_pairSetPhiCurvatureCut

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

Definition at line 133 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 137 of file FPGATrackSimGenScanTool.h.

◆ m_parBins

Gaudi::Property<std::vector<unsigned> > FPGATrackSimGenScanTool::m_parBins {this, "parBins", {}, "Vector of number of bins for each parameter (expect 5)"}
protected

Definition at line 106 of file FPGATrackSimGenScanTool.h.

◆ m_parMax

Gaudi::Property<std::vector<float> > FPGATrackSimGenScanTool::m_parMax {this, "parMax", {}, "Vector of maximum bounds of parameters (expect 5"}
protected

Definition at line 105 of file FPGATrackSimGenScanTool.h.

◆ m_parMin

Gaudi::Property<std::vector<float> > FPGATrackSimGenScanTool::m_parMin {this, "parMin", {}, "Vector of minimum bounds of parameters (expect 5"}
protected

Definition at line 104 of file FPGATrackSimGenScanTool.h.

◆ m_parSet

Gaudi::Property<std::string> FPGATrackSimGenScanTool::m_parSet {this, "parSet", {}, "String name of parameter set"}
protected

Definition at line 103 of file FPGATrackSimGenScanTool.h.

◆ m_phiFractionalPadding

Gaudi::Property<double> FPGATrackSimGenScanTool::m_phiFractionalPadding {this, "phiFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
protected

Definition at line 114 of file FPGATrackSimGenScanTool.h.

◆ m_qOverPtFractionalPadding

Gaudi::Property<double> FPGATrackSimGenScanTool::m_qOverPtFractionalPadding {this, "qOverPtFractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
protected

Definition at line 115 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 122 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 108 of file FPGATrackSimGenScanTool.h.

◆ m_roads

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

Definition at line 323 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 109 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 117 of file FPGATrackSimGenScanTool.h.

◆ m_validBin

FPGATrackSimGenScanArray<int> FPGATrackSimGenScanTool::m_validBin
protected

Definition at line 317 of file FPGATrackSimGenScanTool.h.

◆ m_validScan

FPGATrackSimGenScanArray<int> FPGATrackSimGenScanTool::m_validScan
protected

Definition at line 319 of file FPGATrackSimGenScanTool.h.

◆ m_validSlice

FPGATrackSimGenScanArray<int> FPGATrackSimGenScanTool::m_validSlice
protected

Definition at line 318 of file FPGATrackSimGenScanTool.h.

◆ m_validSliceAndScan

FPGATrackSimGenScanArray<int> FPGATrackSimGenScanTool::m_validSliceAndScan
protected

Definition at line 320 of file FPGATrackSimGenScanTool.h.

◆ m_z0FractionalPadding

Gaudi::Property<double> FPGATrackSimGenScanTool::m_z0FractionalPadding {this, "z0FractionalPadding", {}, "Fractional padding used when calculating the valid range of bins"}
protected

Definition at line 112 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:126
FPGATrackSimGenScanTool::m_parMin
Gaudi::Property< std::vector< float > > m_parMin
Definition: FPGATrackSimGenScanTool.h:104
FPGATrackSimTrackPars::IHIP
@ IHIP
Definition: FPGATrackSimTrackPars.h:49
beamspotman.r
def r
Definition: beamspotman.py:676
FPGATrackSimGenScanArray
Definition: FPGATrackSimGenScanArray.h:41
FPGATrackSimGenScanTool::pairMatchesPairSet
bool pairMatchesPairSet(const HitPairSet &pairset, const HitPair &pair, bool verbose)
Definition: FPGATrackSimGenScanTool.cxx:615
FPGATrackSimTrackPars::ID0
@ ID0
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimGenScanBinningBase::IdxSet
Definition: FPGATrackSimGenScanBinning.h:100
FPGATrackSimGenScanTool::m_pairSetPhiCurvatureCut
Gaudi::Property< double > m_pairSetPhiCurvatureCut
Definition: FPGATrackSimGenScanTool.h:133
getMenu.algname
algname
Definition: getMenu.py:54
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimGenScanTool::filterPairs
StatusCode filterPairs(HitPairSet &pairs, HitPairSet &filteredpairs)
Definition: FPGATrackSimGenScanTool.cxx:553
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:119
FPGATrackSimGenScanTool::updateState
void updateState(const IntermediateState &inputstate, IntermediateState &outputstate, unsigned lyridx, const std::vector< const StoredHit * > &newhits)
Definition: FPGATrackSimGenScanTool.cxx:378
FPGATrackSimGenScanTool::m_rin
Gaudi::Property< double > m_rin
Definition: FPGATrackSimGenScanTool.h:108
FPGATrackSimGenScanTool::addRoad
void addRoad(std::vector< const StoredHit * > const &hits, const FPGATrackSimGenScanBinningBase::IdxSet &idx)
Definition: FPGATrackSimGenScanTool.cxx:702
FPGATrackSimGenScanTool::pairThenGroupFilter
StatusCode pairThenGroupFilter(const BinEntry &bindata, const FPGATrackSimGenScanBinningBase::IdxSet &bin, std::vector< HitPairSet > &output_pairset)
Definition: FPGATrackSimGenScanTool.cxx:316
FPGATrackSimTrackPars
Definition: FPGATrackSimTrackPars.h:22
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
FPGATrackSimGenScanTool::m_roads
std::vector< FPGATrackSimRoad > m_roads
Definition: FPGATrackSimGenScanTool.h:323
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
FPGATrackSimTrackPars::IZ0
@ IZ0
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimGenScanTool::fillImage
StatusCode fillImage(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
Definition: FPGATrackSimGenScanTool.cxx:242
FPGATrackSimGenScanBinningBase::ParSet
Definition: FPGATrackSimGenScanBinning.h:90
FPGATrackSimGenScanTool::StoredHit
Definition: FPGATrackSimGenScanTool.h:196
FPGATrackSimGenScanTool::m_z0FractionalPadding
Gaudi::Property< double > m_z0FractionalPadding
Definition: FPGATrackSimGenScanTool.h:112
FPGATrackSimGenScanTool::makePairs
StatusCode makePairs(const std::vector< std::vector< const StoredHit * >> &hitsByLayer, HitPairSet &pairs)
Definition: FPGATrackSimGenScanTool.cxx:507
bin
Definition: BinsDiffFromStripMedian.h:43
FPGATrackSimGenScanTool::sortHitsByLayer
StatusCode sortHitsByLayer(const BinEntry &bindata, std::vector< std::vector< const StoredHit * >> &hitsByLayer)
Definition: FPGATrackSimGenScanTool.cxx:489
FPGATrackSimGenScanTool::m_image
FPGATrackSimGenScanArray< BinEntry > m_image
Definition: FPGATrackSimGenScanTool.h:314
FPGATrackSimGenScanTool::m_qOverPtFractionalPadding
Gaudi::Property< double > m_qOverPtFractionalPadding
Definition: FPGATrackSimGenScanTool.h:115
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
FPGATrackSimGenScanTool::m_evtsProcessed
int m_evtsProcessed
Definition: FPGATrackSimGenScanTool.h:306
dqutils::padding
std::atomic< int > padding
Definition: MonitoringFile_MoveVertexMonitoring.cxx:20
FPGATrackSimGenScanTool::m_EvtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_EvtSel
Definition: FPGATrackSimGenScanTool.h:95
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
python.CreateTierZeroArgdict.pairs
pairs
Definition: CreateTierZeroArgdict.py:201
FPGATrackSimGenScanTool::m_pairFilterPhiExtrapCut
Gaudi::Property< std::vector< double > > m_pairFilterPhiExtrapCut
Definition: FPGATrackSimGenScanTool.h:125
FPGATrackSimGenScanTool::m_binning
ToolHandle< FPGATrackSimGenScanBinningBase > m_binning
Definition: FPGATrackSimGenScanTool.h:99
FPGATrackSimGenScanTool::getSubRegion
virtual int getSubRegion() const override
Definition: FPGATrackSimGenScanTool.h:87
FPGATrackSimGenScanTool::m_validScan
FPGATrackSimGenScanArray< int > m_validScan
Definition: FPGATrackSimGenScanTool.h:319
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FPGATrackSimGenScanBinningBase::NPars
static constexpr unsigned NPars
Definition: FPGATrackSimGenScanBinning.h:232
FPGATrackSimGenScanTool::m_parBins
Gaudi::Property< std::vector< unsigned > > m_parBins
Definition: FPGATrackSimGenScanTool.h:106
FPGATrackSimGenScanTool::m_pairSetDeltaDeltaEtaCut
Gaudi::Property< double > m_pairSetDeltaDeltaEtaCut
Definition: FPGATrackSimGenScanTool.h:132
FPGATrackSimGenScanTool::m_pairSetDeltaEtaCurvatureCut
Gaudi::Property< double > m_pairSetDeltaEtaCurvatureCut
Definition: FPGATrackSimGenScanTool.h:136
FPGATrackSimGenScanTool::m_FPGATrackSimBankSvc
ServiceHandle< IFPGATrackSimBankSvc > m_FPGATrackSimBankSvc
Definition: FPGATrackSimGenScanTool.h:96
FPGATrackSimGenScanTool::m_validSlice
FPGATrackSimGenScanArray< int > m_validSlice
Definition: FPGATrackSimGenScanTool.h:318
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
FPGATrackSimGenScanTool::m_threshold
Gaudi::Property< unsigned > m_threshold
Definition: FPGATrackSimGenScanTool.h:117
FPGATrackSimGenScanTool::incrementalBuildFilter
StatusCode incrementalBuildFilter(const BinEntry &bindata, const FPGATrackSimGenScanBinningBase::IdxSet &bin, std::vector< HitPairSet > &output_pairset)
Definition: FPGATrackSimGenScanTool.cxx:459
FPGATrackSimGenScanTool::HitPairSet
Definition: FPGATrackSimGenScanTool.h:254
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:135
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimGenScanTool::m_pairSetEtaCurvatureCut
Gaudi::Property< double > m_pairSetEtaCurvatureCut
Definition: FPGATrackSimGenScanTool.h:134
FPGATrackSimGenScanTool::m_d0FractionalPadding
Gaudi::Property< double > m_d0FractionalPadding
Definition: FPGATrackSimGenScanTool.h:111
FPGATrackSimGenScanTool::m_monitoring
ToolHandle< FPGATrackSimGenScanMonitoring > m_monitoring
Definition: FPGATrackSimGenScanTool.h:98
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
FPGATrackSimGenScanTool::computeValidBins
void computeValidBins()
Definition: FPGATrackSimGenScanTool.cxx:833
FPGATrackSimGenScanTool::m_pairSetDeltaDeltaPhiCut
Gaudi::Property< double > m_pairSetDeltaDeltaPhiCut
Definition: FPGATrackSimGenScanTool.h:131
FPGATrackSimGenScanTool::pairPassesFilter
bool pairPassesFilter(const HitPair &pair)
Definition: FPGATrackSimGenScanTool.cxx:542
FPGATrackSimGenScanTool::groupPairs
StatusCode groupPairs(HitPairSet &filteredpairs, std::vector< HitPairSet > &clusters, bool verbose)
Definition: FPGATrackSimGenScanTool.cxx:567
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
FPGATrackSimGenScanTool::m_pairSetMatchPhiCut
Gaudi::Property< double > m_pairSetMatchPhiCut
Definition: FPGATrackSimGenScanTool.h:129
FPGATrackSimGenScanTool::m_pairFilterDeltaEtaCut
Gaudi::Property< std::vector< double > > m_pairFilterDeltaEtaCut
Definition: FPGATrackSimGenScanTool.h:124
FPGATrackSimTrackPars::parName
static std::string parName(unsigned i)
Definition: FPGATrackSimTrackPars.cxx:72
FPGATrackSimTrackPars::IPHI
@ IPHI
Definition: FPGATrackSimTrackPars.h:49
FPGATrackSimGenScanTool::m_applyPairSetFilter
Gaudi::Property< bool > m_applyPairSetFilter
Definition: FPGATrackSimGenScanTool.h:128
FPGATrackSimGenScanTool::m_phiFractionalPadding
Gaudi::Property< double > m_phiFractionalPadding
Definition: FPGATrackSimGenScanTool.h:114
FPGATrackSimGenScanTool::HitPair
Definition: FPGATrackSimGenScanTool.h:221
FPGATrackSimGenScanTool::m_nLayers
unsigned m_nLayers
Definition: FPGATrackSimGenScanTool.h:307
FPGATrackSimGenScanTool::StoredHit::hitptr
std::shared_ptr< const FPGATrackSimHit > hitptr
Definition: FPGATrackSimGenScanTool.h:197
FPGATrackSimGenScanTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimGenScanTool.h:97
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
FPGATrackSimGenScanArray::Iterator
Definition: FPGATrackSimGenScanArray.h:127
FPGATrackSimGenScanTool::m_applyPairFilter
Gaudi::Property< bool > m_applyPairFilter
Definition: FPGATrackSimGenScanTool.h:121
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
FPGATrackSimTrackPars::NPARS
@ NPARS
Definition: FPGATrackSimTrackPars.h:49
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
FPGATrackSimGenScanTool::m_rout
Gaudi::Property< double > m_rout
Definition: FPGATrackSimGenScanTool.h:109
FPGATrackSimGenScanTool::m_pairSetPhiExtrapCurvedCut
Gaudi::Property< std::vector< double > > m_pairSetPhiExtrapCurvedCut
Definition: FPGATrackSimGenScanTool.h:137
FPGATrackSimGenScanTool::m_validSliceAndScan
FPGATrackSimGenScanArray< int > m_validSliceAndScan
Definition: FPGATrackSimGenScanTool.h:320
FPGATrackSimGenScanTool::m_reversePairDir
Gaudi::Property< bool > m_reversePairDir
Definition: FPGATrackSimGenScanTool.h:122
FPGATrackSimGenScanTool::m_pairFilterDeltaPhiCut
Gaudi::Property< std::vector< double > > m_pairFilterDeltaPhiCut
Definition: FPGATrackSimGenScanTool.h:123
FPGATrackSimGenScanTool::m_pairSetMatchEtaCut
Gaudi::Property< double > m_pairSetMatchEtaCut
Definition: FPGATrackSimGenScanTool.h:130
FPGATrackSimGenScanArray::setsize
void setsize(const std::vector< unsigned int > &dims, const T &initval)
Definition: FPGATrackSimGenScanArray.h:51
FPGATrackSimGenScanTool::m_pairingLayers
std::vector< unsigned int > m_pairingLayers
Definition: FPGATrackSimGenScanTool.h:308
FPGATrackSimGenScanTool::m_etaFractionalPadding
Gaudi::Property< double > m_etaFractionalPadding
Definition: FPGATrackSimGenScanTool.h:113
FPGATrackSimGenScanTool::m_validBin
FPGATrackSimGenScanArray< int > m_validBin
Definition: FPGATrackSimGenScanTool.h:317
FPGATrackSimGenScanTool::m_parMax
Gaudi::Property< std::vector< float > > m_parMax
Definition: FPGATrackSimGenScanTool.h:105
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:30
sortByLayer
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)
Definition: FPGATrackSimHit.h:270
FPGATrackSimTrackPars::IETA
@ IETA
Definition: FPGATrackSimTrackPars.h:49