CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::MatchProcessor Class Reference

#include <MatchProcessor.h>

Inheritance diagram for trklet::MatchProcessor:
trklet::ProcessBase

Public Member Functions

void addInput (MemoryBase *memory, std::string input) override
 
void addOutput (MemoryBase *memory, std::string output) override
 
void execute (unsigned int iSector, double phimin)
 
bool matchCalculator (Tracklet *tracklet, const Stub *fpgastub, bool print, unsigned int istep)
 
 MatchProcessor (std::string name, Settings const &settings, Globals *global)
 
 ~MatchProcessor () override=default
 
- Public Member Functions inherited from trklet::ProcessBase
unsigned int getISeed (const std::string &name)
 
std::string const & getName () const
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk, int &layerdisk)
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisksandISeed (unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
 
unsigned int nbits (unsigned int power)
 
 ProcessBase (std::string name, Settings const &settings, Globals *global)
 
virtual ~ProcessBase ()=default
 

Private Attributes

AllStubsMemoryallstubs_
 
bool barrel_
 
int dzshift_
 
std::vector< FullMatchMemory * > fullmatches_
 
int ialphafactinner_ [N_DSS_MOD *2]
 
int ialphafactouter_ [N_DSS_MOD *2]
 
int icorrshift_
 
int icorzshift_
 
CircularBuffer< ProjectionTempinputProjBuffer_
 
std::vector< TrackletProjectionsMemory * > inputprojs_
 
unsigned int layerdisk_
 
TrackletLUT luttable_
 
std::vector< MatchEngineUnitmatchengines_
 
unsigned int nMatchEngines_
 
int nphiderbits_
 
int nrbits_
 
int nrinv_
 
int nvm_
 
int nvmbins_
 
int nvmbits_
 
TrackletLUT phimatchcuttable_
 
double phimin_
 
unsigned int phiregion_
 
int phishift_
 
TrackletLUT rcut2Stable_
 
TrackletLUT rcutPStable_
 
TrackletLUT rinvbendlut_
 
TrackletLUT rphicut2Stable_
 
TrackletLUT rphicutPStable_
 
std::vector< VMStubsMEMemory * > vmstubs_
 
TrackletLUT zmatchcuttable_
 

Additional Inherited Members

- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
std::string name_
 
Settings const & settings_
 

Detailed Description

Definition at line 25 of file MatchProcessor.h.

Constructor & Destructor Documentation

◆ MatchProcessor()

MatchProcessor::MatchProcessor ( std::string  name,
Settings const &  settings,
Globals global 
)

Definition at line 16 of file MatchProcessor.cc.

References trklet::Settings::alphashift(), cms::cuda::assert(), barrel_, trklet::IMATH_TrackletCalculator::der_phiD_final, dzshift_, trklet::ProcessBase::getName(), trklet::Settings::half2SmoduleWidth(), mps_fire::i, ialphafactinner_, ialphafactouter_, icorrshift_, icorzshift_, trklet::ilog2(), trklet::TrackletLUT::initBendMatch(), trklet::ProcessBase::initLayerDisk(), trklet::TrackletLUT::initmatchcut(), trklet::TrackletLUT::initProjectionBend(), trklet::Globals::ITC_L1L2(), trklet::VarBase::K(), trklet::Settings::kphi(), trklet::Settings::kphider(), trklet::Settings::kphiderdisk(), trklet::Settings::krbarrel(), trklet::Settings::krder(), trklet::Settings::krprojshiftdisk(), trklet::Settings::kz(), trklet::Settings::kzder(), layerdisk_, luttable_, matchengines_, trklet::N_DSS_MOD, trklet::N_LAYER, trklet::Settings::nallstubs(), Skims_PA_cff::name, trklet::Settings::nbitsallstubs(), trklet::Settings::nbitsalpha(), trklet::Settings::nbitsvmme(), nMatchEngines_, trklet::Settings::nphibitsstub(), nphiderbits_, nrbits_, nrinv_, trklet::NRINVBITS, nvm_, nvmbins_, nvmbits_, trklet::Settings::nvmme(), trklet::Settings::nzbitsstub(), phimatchcuttable_, phiregion_, phishift_, rcut2Stable_, rcutPStable_, trklet::Settings::rDSSinner(), trklet::Settings::rDSSouter(), HLT_2022v15_cff::region, rinvbendlut_, rphicut2Stable_, rphicutPStable_, trklet::MatchEngineUnit::setimeu(), trklet::ProcessBase::settings_, and zmatchcuttable_.

17  : ProcessBase(name, settings, global),
18  phimatchcuttable_(settings),
19  zmatchcuttable_(settings),
20  rphicutPStable_(settings),
21  rphicut2Stable_(settings),
22  rcutPStable_(settings),
23  rcut2Stable_(settings),
24  fullmatches_(12),
25  rinvbendlut_(settings),
26  luttable_(settings),
27  inputProjBuffer_(3) {
28  phiregion_ = name[8] - 'A';
29 
31 
33 
36 
37  if (barrel_) {
40  } else {
43  }
44 
46 
47  nrbits_ = 5;
48  nphiderbits_ = 6;
49 
50  if (!barrel_) {
53  }
54 
55  nrinv_ = NRINVBITS;
56 
57  unsigned int region = getName()[8] - 'A';
59 
60  if (barrel_) {
61  phimatchcuttable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::barrelphi, region);
62  zmatchcuttable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::barrelz, region);
63  } else {
64  rphicutPStable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::diskPSphi, region);
65  rphicut2Stable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::disk2Sphi, region);
66  rcutPStable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::diskPSr, region);
67  rcut2Stable_.initmatchcut(layerdisk_, TrackletLUT::MatchType::disk2Sr, region);
68  }
69 
70  for (unsigned int i = 0; i < N_DSS_MOD * 2; i++) {
72  (1 << (settings_.nbitsalpha() - 1)) / (settings_.rDSSinner(i) * settings_.rDSSinner(i)) /
73  settings_.kphi();
75  (1 << (settings_.nbitsalpha() - 1)) / (settings_.rDSSouter(i) * settings_.rDSSouter(i)) /
76  settings_.kphi();
77  }
78 
82 
83  nMatchEngines_ = 4;
84  for (unsigned int iME = 0; iME < nMatchEngines_; iME++) {
86  tmpME.setimeu(iME);
87  matchengines_.push_back(tmpME);
88  }
89 }
void initBendMatch(unsigned int layerdisk)
Definition: TrackletLUT.cc:446
double kz() const
Definition: Settings.h:314
double kphiderdisk() const
Definition: Settings.h:407
void initmatchcut(unsigned int layerdisk, MatchType type, unsigned int region)
Definition: TrackletLUT.cc:14
double rDSSinner(unsigned int iBin) const
Definition: Settings.h:171
std::vector< MatchEngineUnit > matchengines_
double kphider() const
Definition: Settings.h:406
constexpr unsigned int NRINVBITS
Definition: Settings.h:32
void initProjectionBend(double k_phider, unsigned int idisk, unsigned int nrbits, unsigned int nphiderbits)
Definition: TrackletLUT.cc:394
Settings const & settings_
Definition: ProcessBase.h:40
TrackletLUT phimatchcuttable_
double krder() const
Definition: Settings.h:409
constexpr unsigned int N_DSS_MOD
Definition: Settings.h:27
assert(be >=bs)
ProcessBase(std::string name, Settings const &settings, Globals *global)
Definition: ProcessBase.cc:14
double kzder() const
Definition: Settings.h:408
unsigned int nbitsallstubs(unsigned int layerdisk) const
Definition: Settings.h:106
double half2SmoduleWidth() const
Definition: Settings.h:131
unsigned int nzbitsstub(unsigned int layerdisk) const
Definition: Settings.h:82
unsigned int nphibitsstub(unsigned int layerdisk) const
Definition: Settings.h:83
int ilog2(double factor)
Definition: Util.h:104
double rDSSouter(unsigned int iBin) const
Definition: Settings.h:174
std::vector< FullMatchMemory * > fullmatches_
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:48
int alphashift() const
Definition: Settings.h:216
unsigned int nbitsvmme(unsigned int layerdisk) const
Definition: Settings.h:103
CircularBuffer< ProjectionTemp > inputProjBuffer_
void initLayerDisk(unsigned int pos, int &layer, int &disk)
Definition: ProcessBase.cc:33
double K() const
Definition: imath.h:247
TrackletLUT rphicutPStable_
unsigned int nallstubs(unsigned int layerdisk) const
Definition: Settings.h:107
TrackletLUT rphicut2Stable_
int ialphafactinner_[N_DSS_MOD *2]
unsigned int nvmme(unsigned int layerdisk) const
Definition: Settings.h:104
unsigned int nMatchEngines_
int nbitsalpha() const
Definition: Settings.h:217
double krbarrel() const
Definition: Settings.h:317
double krprojshiftdisk() const
Definition: Settings.h:413
double kphi() const
Definition: Settings.h:310
std::string const & getName() const
Definition: ProcessBase.h:22
TrackletLUT zmatchcuttable_
int ialphafactouter_[N_DSS_MOD *2]
constexpr int N_LAYER
Definition: Settings.h:21

◆ ~MatchProcessor()

trklet::MatchProcessor::~MatchProcessor ( )
overridedefault

Member Function Documentation

◆ addInput()

void MatchProcessor::addInput ( MemoryBase memory,
std::string  input 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 108 of file MatchProcessor.cc.

References allstubs_, cms::cuda::assert(), Exception, input, inputprojs_, mps_setup::memory, trklet::ProcessBase::name_, trklet::ProcessBase::settings_, createJobs::tmp, vmstubs_, and trklet::Settings::writetrace().

108  {
109  if (settings_.writetrace()) {
110  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding input from " << memory->getName() << " to input "
111  << input;
112  }
113  if (input == "allstubin") {
114  auto* tmp = dynamic_cast<AllStubsMemory*>(memory);
115  assert(tmp != nullptr);
116  allstubs_ = tmp;
117  return;
118  }
119  if (input == "vmstubin") {
120  auto* tmp = dynamic_cast<VMStubsMEMemory*>(memory);
121  assert(tmp != nullptr);
122  vmstubs_.push_back(tmp); //to allow more than one stub in? vmstubs_=tmp;
123  return;
124  }
125  if (input == "projin") {
126  auto* tmp = dynamic_cast<TrackletProjectionsMemory*>(memory);
127  assert(tmp != nullptr);
128  inputprojs_.push_back(tmp);
129  return;
130  }
131  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " could not find input: " << input;
132 }
Log< level::Info, true > LogVerbatim
std::string name_
Definition: ProcessBase.h:38
Settings const & settings_
Definition: ProcessBase.h:40
bool writetrace() const
Definition: Settings.h:183
std::vector< TrackletProjectionsMemory * > inputprojs_
assert(be >=bs)
static std::string const input
Definition: EdmProvDump.cc:50
std::vector< VMStubsMEMemory * > vmstubs_
tmp
align.sh
Definition: createJobs.py:716
AllStubsMemory * allstubs_

◆ addOutput()

void MatchProcessor::addOutput ( MemoryBase memory,
std::string  output 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 91 of file MatchProcessor.cc.

References cms::cuda::assert(), Exception, fullmatches_, trklet::ProcessBase::getISeed(), mps_setup::memory, trklet::ProcessBase::name_, convertSQLitetoXML_cfg::output, trklet::ProcessBase::settings_, createJobs::tmp, and trklet::Settings::writetrace().

91  {
92  if (settings_.writetrace()) {
93  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding output to " << memory->getName() << " to output "
94  << output;
95  }
96  if (output.find("matchout") != std::string::npos) {
97  auto* tmp = dynamic_cast<FullMatchMemory*>(memory);
98  assert(tmp != nullptr);
99  unsigned int iSeed = getISeed(tmp->getName());
100  assert(iSeed < fullmatches_.size());
101  assert(fullmatches_[iSeed] == nullptr);
102  fullmatches_[iSeed] = tmp;
103  return;
104  }
105  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " could not find output: " << output;
106 }
Log< level::Info, true > LogVerbatim
std::string name_
Definition: ProcessBase.h:38
Settings const & settings_
Definition: ProcessBase.h:40
bool writetrace() const
Definition: Settings.h:183
assert(be >=bs)
std::vector< FullMatchMemory * > fullmatches_
unsigned int getISeed(const std::string &name)
Definition: ProcessBase.cc:119
tmp
align.sh
Definition: createJobs.py:716

◆ execute()

void MatchProcessor::execute ( unsigned int  iSector,
double  phimin 
)

Definition at line 134 of file MatchProcessor.cc.

References cms::cuda::assert(), barrel_, trklet::FPGAWord::bits(), trklet::Settings::debugTracklet(), relativeConstraints::empty, trklet::MemoryBase::getName(), trklet::ProcessBase::getName(), trklet::TrackletProjectionsMemory::getTracklet(), trklet::ProcessBase::globals_, inputProjBuffer_, inputprojs_, trklet::ProjectionTemp::iphi(), LEDCalibrationChannels::iphi, trklet::ProjectionTemp::isPSseed(), layerdisk_, trklet::TrackletLUT::lookup(), matchCalculator(), matchengines_, trklet::Settings::maxStep(), trklet::N_LAYER, trklet::N_RZBITS, LaserClient_cfi::nbins, trklet::FPGAWord::nbits(), trklet::Settings::nbitsvmme(), trklet::NFINEPHIBITS, nMatchEngines_, nphiderbits_, nrbits_, nrinv_, trklet::VMStubsMEMemory::nStubsBin(), trklet::TrackletProjectionsMemory::nTracklets(), nvmbins_, nvmbits_, trklet::Globals::ofstream(), phimin, phimin_, print(), amptDefault_cfi::proj, trklet::ProjectionTemp::proj(), trklet::ProjectionTemp::projfinephi(), trklet::ProjectionTemp::projfinerz(), trklet::ProjectionTemp::projrinv(), rinvbendlut_, edm::second(), trklet::ProcessBase::settings_, edm::shift, trklet::ProjectionTemp::shift(), trklet::ProjectionTemp::slot(), trklet::Tracklet::TCID(), mitigatedMETSequence_cff::U, trklet::ProjectionTemp::use(), trklet::FPGAWord::value(), vmstubs_, and trklet::Settings::writeMonitorData().

134  {
135  assert(vmstubs_.size() == 1);
136 
137  /*
138  The code is organized in three 'steps' corresponding to the PR, ME, and MC functions. The output from
139  the PR step is buffered in a 'circular' buffer, and similarly the ME output is put in a circular buffer.
140  The implementation is done in steps, emulating what can be done in firmware. On each step we do:
141 
142  1) A projection is read and if there is space it is insert into the inputProjBuffer_
143 
144  2) Process next match in the ME - if there is an idle ME the next projection is inserted
145 
146  3) Readout match from ME and send to match calculator
147 
148  However, for the pipelining to work in HLS these blocks are executed in reverse order
149 
150  */
151 
152  bool print = getName() == "MP_L3PHIC" && iSector == 3;
153  print = false;
154 
155  phimin_ = phimin;
156 
157  Tracklet* oldTracklet = nullptr;
158 
159  unsigned int countme = 0;
160  unsigned int countall = 0;
161  unsigned int countsel = 0;
162  unsigned int countinputproj = 0;
163 
164  unsigned int iprojmem = 0;
165  while (iprojmem < inputprojs_.size() && inputprojs_[iprojmem]->nTracklets() == 0) {
166  iprojmem++;
167  }
168 
169  unsigned int iproj = 0;
170 
171  inputProjBuffer_.reset();
172 
173  for (const auto& inputproj : inputprojs_) {
174  countinputproj += inputproj->nTracklets();
175  }
176 
177  for (auto& matchengine : matchengines_) {
178  matchengine.reset();
179  }
180 
181  ProjectionTemp tmpProj_, tmpProj__;
182  bool good_ = false;
183  bool good__ = false;
184 
185  for (unsigned int istep = 0; istep < settings_.maxStep("MP"); istep++) {
186  // This print statement is useful for detailed comparison with the HLS code
187  // It prints out detailed status information for each clock step
188  /*
189  if (print) {
190  cout << "istep = "<<istep<<" projBuff: "<<inputProjBuffer_.rptr()<<" "<<inputProjBuffer_.wptr()<<" "<<projBuffNearFull;
191  unsigned int iMEU = 0;
192  for (auto& matchengine : matchengines_) {
193  cout <<" MEU"<<iMEU<<": "<<matchengine.rptr()<<" "<<matchengine.wptr()
194  <<" "<<matchengine.idle()<<" "<<matchengine.empty()
195  <<" "<<matchengine.TCID();
196  iMEU++;
197  }
198  cout << std::endl;
199  }
200  */
201 
202  //First do some caching of state at the start of the clock
203 
204  bool projdone = false;
205 
206  bool projBuffNearFull = inputProjBuffer_.nearfull();
207 
208  for (unsigned int iME = 0; iME < nMatchEngines_; iME++) {
209  matchengines_[iME].setAlmostFull();
210  }
211 
212  //Step 3
213  //Check if we have candidate match to process
214 
215  unsigned int iMEbest = 0;
216  int bestTCID = matchengines_[0].TCID();
217  bool meactive = matchengines_[0].active();
218  for (unsigned int iME = 1; iME < nMatchEngines_; iME++) {
219  meactive = meactive || matchengines_[iME].active();
220  int tcid = matchengines_[iME].TCID();
221  if (tcid < bestTCID) {
222  bestTCID = tcid;
223  iMEbest = iME;
224  }
225  }
226 
227  // check if the matche engine processing the smallest tcid has match
228 
229  if (!matchengines_[iMEbest].empty()) {
230  std::pair<Tracklet*, const Stub*> candmatch = matchengines_[iMEbest].read();
231 
232  const Stub* fpgastub = candmatch.second;
233  Tracklet* tracklet = candmatch.first;
234 
235  //Consistency check
236  if (oldTracklet != nullptr) {
237  //allow equal here since we can have more than one cadidate match per tracklet projection
238  //cout << "old new : "<<oldTracklet->TCID()<<" "<<tracklet->TCID()<<" "<<iMEbest<<endl;
239  assert(oldTracklet->TCID() <= tracklet->TCID());
240  }
241  oldTracklet = tracklet;
242 
243  bool match = matchCalculator(tracklet, fpgastub, print, istep);
244 
245  if (settings_.debugTracklet() && match) {
246  edm::LogVerbatim("Tracklet") << getName() << " have match";
247  }
248 
249  countall++;
250  if (match)
251  countsel++;
252  }
253 
254  //Step 2
255  //Check if we have ME that can process projection
256 
257  bool addedProjection = false;
258  for (unsigned int iME = 0; iME < nMatchEngines_; iME++) {
259  if (!matchengines_[iME].idle())
260  countme++;
261  //if match engine empty and we have queued projections add to match engine
262  if ((!addedProjection) && matchengines_[iME].idle() && (!inputProjBuffer_.empty())) {
263  ProjectionTemp tmpProj = inputProjBuffer_.read();
264  VMStubsMEMemory* stubmem = vmstubs_[0];
265 
266  if (settings_.debugTracklet()) {
267  edm::LogVerbatim("Tracklet") << getName() << " adding projection to match engine";
268  }
269 
270  int nbins = (1 << N_RZBITS);
271  if (layerdisk_ >= N_LAYER) {
272  nbins *= 2; //twice as many bins in disks (since there are two disks)
273  }
274 
275  matchengines_[iME].init(stubmem,
276  nbins,
277  tmpProj.slot(),
278  tmpProj.iphi(),
279  tmpProj.shift(),
280  tmpProj.projrinv(),
281  tmpProj.projfinerz(),
282  tmpProj.projfinephi(),
283  tmpProj.use(0, 0),
284  tmpProj.use(0, 1),
285  tmpProj.use(1, 0),
286  tmpProj.use(1, 1),
287  tmpProj.isPSseed(),
288  tmpProj.proj());
289  meactive = true;
290  addedProjection = true;
291  } else {
292  matchengines_[iME].step();
293  }
294  matchengines_[iME].processPipeline();
295  }
296 
297  //Step 1
298  //First step here checks if we have more input projections to put into
299  //the input puffer for projections
300 
301  if (good__) {
302  inputProjBuffer_.store(tmpProj__);
303  }
304 
305  good__ = good_;
306  tmpProj__ = tmpProj_;
307 
308  good_ = false;
309 
310  if (iprojmem < inputprojs_.size()) {
311  TrackletProjectionsMemory* projMem = inputprojs_[iprojmem];
312  if (!projBuffNearFull) {
313  if (settings_.debugTracklet()) {
314  edm::LogVerbatim("Tracklet") << getName() << " have projection in memory : " << projMem->getName();
315  }
316 
317  Tracklet* proj = projMem->getTracklet(iproj);
318 
319  FPGAWord fpgaphi = proj->proj(layerdisk_).fpgaphiproj();
320 
321  unsigned int iphi = (fpgaphi.value() >> (fpgaphi.nbits() - nvmbits_)) & (nvmbins_ - 1);
322 
323  int nextrabits = 2;
324  int overlapbits = nvmbits_ + nextrabits;
325 
326  unsigned int extrabits = fpgaphi.bits(fpgaphi.nbits() - overlapbits - nextrabits, nextrabits);
327 
328  unsigned int ivmPlus = iphi;
329 
330  int shift = 0;
331 
332  if (extrabits == ((1U << nextrabits) - 1) && iphi != ((1U << settings_.nbitsvmme(layerdisk_)) - 1)) {
333  shift = 1;
334  ivmPlus++;
335  }
336  unsigned int ivmMinus = iphi;
337  if (extrabits == 0 && iphi != 0) {
338  shift = -1;
339  ivmMinus--;
340  }
341 
342  int projrinv = -1;
343  if (barrel_) {
344  FPGAWord phider = proj->proj(layerdisk_).fpgaphiprojder();
345  projrinv = (1 << (nrinv_ - 1)) - 1 - (phider.value() >> (phider.nbits() - nrinv_));
346  } else {
347  //The next lines looks up the predicted bend based on:
348  // 1 - r projections
349  // 2 - phi derivative
350  // 3 - the sign - i.e. if track is forward or backward
351 
352  int rindex =
353  (proj->proj(layerdisk_).fpgarzproj().value() >> (proj->proj(layerdisk_).fpgarzproj().nbits() - nrbits_)) &
354  ((1 << nrbits_) - 1);
355 
356  int phiprojder = proj->proj(layerdisk_).fpgaphiprojder().value();
357 
358  int phiderindex = (phiprojder >> (proj->proj(layerdisk_).fpgaphiprojder().nbits() - nphiderbits_)) &
359  ((1 << nphiderbits_) - 1);
360 
361  int signindex = proj->proj(layerdisk_).fpgarzprojder().value() < 0;
362 
363  int bendindex = (signindex << (nphiderbits_ + nrbits_)) + (rindex << (nphiderbits_)) + phiderindex;
364 
365  projrinv = rinvbendlut_.lookup(bendindex);
366 
367  proj->proj(layerdisk_).setBendIndex(projrinv);
368  }
369  assert(projrinv >= 0);
370 
371  unsigned int slot = proj->proj(layerdisk_).fpgarzbin1projvm().value();
372  bool second = proj->proj(layerdisk_).fpgarzbin2projvm().value();
373 
374  unsigned int projfinephi =
375  (fpgaphi.value() >> (fpgaphi.nbits() - (nvmbits_ + NFINEPHIBITS))) & ((1 << NFINEPHIBITS) - 1);
376  int projfinerz = proj->proj(layerdisk_).fpgafinerzvm().value();
377 
378  bool isPSseed = proj->PSseed();
379 
380  int nbins = (1 << N_RZBITS);
381  if (layerdisk_ >= N_LAYER) {
382  nbins *= 2; //twice as many bins in disks (since there are two disks)
383  }
384 
385  VMStubsMEMemory* stubmem = vmstubs_[0];
386  bool usefirstMinus = stubmem->nStubsBin(ivmMinus * nbins + slot) != 0;
387  bool usesecondMinus = (second && (stubmem->nStubsBin(ivmMinus * nbins + slot + 1) != 0));
388  bool usefirstPlus = ivmPlus != ivmMinus && stubmem->nStubsBin(ivmPlus * nbins + slot) != 0;
389  bool usesecondPlus = ivmPlus != ivmMinus && (second && (stubmem->nStubsBin(ivmPlus * nbins + slot + 1) != 0));
390 
391  good_ = usefirstPlus || usesecondPlus || usefirstMinus || usesecondMinus;
392 
393  if (good_) {
394  ProjectionTemp tmpProj(proj,
395  slot,
396  projrinv,
397  projfinerz,
398  projfinephi,
399  ivmMinus,
400  shift,
401  usefirstMinus,
402  usefirstPlus,
403  usesecondMinus,
404  usesecondPlus,
405  isPSseed);
406  tmpProj_ = tmpProj;
407  }
408 
409  iproj++;
410  if (iproj == projMem->nTracklets()) {
411  iproj = 0;
412  do {
413  iprojmem++;
414  } while (iprojmem < inputprojs_.size() && inputprojs_[iprojmem]->nTracklets() == 0);
415  }
416 
417  } else {
418  projdone = true && !good_ && !good__;
419  }
420  }
421 
422  //
423  // Check if done
424  //
425  //
426  //
427 
428  if ((projdone && !meactive && inputProjBuffer_.rptr() == inputProjBuffer_.wptr()) ||
429  (istep == settings_.maxStep("MP") - 1)) {
430  if (settings_.writeMonitorData("MP")) {
431  globals_->ofstream("matchprocessor.txt") << getName() << " " << istep << " " << countall << " " << countsel
432  << " " << countme << " " << countinputproj << endl;
433  }
434  break;
435  }
436  }
437 
438  if (settings_.writeMonitorData("MC")) {
439  globals_->ofstream("matchcalculator.txt") << getName() << " " << countall << " " << countsel << endl;
440  }
441 }
Log< level::Info, true > LogVerbatim
constexpr unsigned int N_RZBITS
Definition: Settings.h:35
unsigned int maxStep(std::string module) const
Definition: Settings.h:116
unsigned int projrinv() const
std::vector< MatchEngineUnit > matchengines_
unsigned int projfinephi() const
Settings const & settings_
Definition: ProcessBase.h:40
Globals * globals_
Definition: ProcessBase.h:41
int lookup(unsigned int index) const
Definition: TrackletLUT.cc:904
std::vector< TrackletProjectionsMemory * > inputprojs_
assert(be >=bs)
int TCID() const
Definition: Tracklet.h:214
U second(std::pair< T, U > const &p)
bool use(unsigned int nextrzbin, unsigned int nextiphibin) const
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
int value() const
Definition: FPGAWord.h:24
std::string const & getName() const
Definition: MemoryBase.h:19
unsigned int nbitsvmme(unsigned int layerdisk) const
Definition: Settings.h:103
CircularBuffer< ProjectionTemp > inputProjBuffer_
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
bool debugTracklet() const
Definition: Settings.h:182
bool matchCalculator(Tracklet *tracklet, const Stub *fpgastub, bool print, unsigned int istep)
unsigned int iphi() const
unsigned int slot() const
int nbits() const
Definition: FPGAWord.h:25
constexpr unsigned int NFINEPHIBITS
Definition: Settings.h:34
Tracklet * proj() const
unsigned int nMatchEngines_
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
static unsigned int const shift
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::vector< VMStubsMEMemory * > vmstubs_
unsigned int nStubsBin(unsigned int bin) const
unsigned int bits(unsigned int lsb, unsigned int nbit) const
Definition: FPGAWord.cc:74
std::string const & getName() const
Definition: ProcessBase.h:22
constexpr int N_LAYER
Definition: Settings.h:21

◆ matchCalculator()

bool MatchProcessor::matchCalculator ( Tracklet tracklet,
const Stub fpgastub,
bool  print,
unsigned int  istep 
)

Definition at line 443 of file MatchProcessor.cc.

References funct::abs(), trklet::Tracklet::addMatch(), trklet::Stub::alpha(), trklet::L1TStub::alphanorm(), trklet::Settings::alphashift(), cms::cuda::assert(), trklet::Settings::bfield(), trklet::Settings::bookHistos(), trklet::Settings::c(), trklet::Settings::debugTracklet(), trklet::Tracklet::disk(), trklet::Settings::doKF(), trklet::Settings::doMultipleMatches(), trklet::Settings::dphisectorHG(), trklet::Settings::drmax(), PVValHelper::dz, trklet::Settings::dzmax(), dzshift_, Exception, fullmatches_, trklet::Tracklet::getISeed(), trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, trklet::Settings::half2SmoduleWidth(), trklet::Globals::histograms(), compare::hists, ialphafactinner_, ialphafactouter_, icorrshift_, icorzshift_, LEDCalibrationChannels::iphi, trklet::L1TStub::isPSmodule(), runTheMatrix::keep, trklet::Settings::kphi(), trklet::Settings::kphi1(), trklet::Settings::kr(), trklet::Settings::krprojshiftdisk(), trklet::Settings::kz(), trklet::Stub::l1tstub(), trklet::Tracklet::layer(), layerdisk_, trklet::TrackletLUT::lookup(), M_PI, trklet::Tracklet::match(), trklet::N_BITSMEMADDRESS, trklet::N_DSS_MOD, trklet::N_LAYER, trklet::ProcessBase::name_, trklet::Globals::ofstream(), trklet::Stub::phi(), trklet::L1TStub::phi(), trklet::Stub::phiapprox(), phimatchcuttable_, phimin_, phiregion_, phishift_, amptDefault_cfi::proj, trklet::Tracklet::proj(), DiDispStaMuonMonitor_cfi::pt, trklet::Stub::r(), trklet::L1TStub::r(), trklet::L1TStub::r2(), trklet::Stub::rapprox(), rcut2Stable_, rcutPStable_, trklet::Settings::rDSSinner(), trklet::Settings::rDSSouter(), reco::reduceRange(), trklet::Tracklet::resid(), trklet::Tracklet::rinv(), trklet::Settings::rmean(), rphicut2Stable_, rphicutPStable_, trklet::ProcessBase::settings_, Validation_hcalonly_cfi::sign, trklet::Stub::stubindex(), trklet::Tracklet::stubtruthmatch(), trklet::Tracklet::t(), trklet::third, trklet::Settings::useapprox(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), trklet::L1TStub::z(), trklet::Stub::z(), trklet::Stub::zapprox(), zmatchcuttable_, and trklet::Settings::zmean().

Referenced by execute().

443  {
444  const L1TStub* stub = fpgastub->l1tstub();
445 
446  if (layerdisk_ < N_LAYER) {
447  const Projection& proj = tracklet->proj(layerdisk_);
448  int ir = fpgastub->r().value();
449  int iphi = proj.fpgaphiproj().value();
450  int icorr = (ir * proj.fpgaphiprojder().value()) >> icorrshift_;
451  iphi += icorr;
452 
453  int iz = proj.fpgarzproj().value();
454  int izcor = (ir * proj.fpgarzprojder().value() + (1 << (icorzshift_ - 1))) >> icorzshift_;
455  iz += izcor;
456 
457  int ideltaz = fpgastub->z().value() - iz;
458  int ideltaphi = (fpgastub->phi().value() - iphi) << phishift_;
459 
460  //Floating point calculations
461 
462  double phi = stub->phi();
463  double r = stub->r();
464  double z = stub->z();
465 
466  if (settings_.useapprox()) {
467  double dphi = reco::reduceRange(phi - fpgastub->phiapprox(phimin_, 0.0));
468  assert(std::abs(dphi) < 0.001);
469  phi = fpgastub->phiapprox(phimin_, 0.0);
470  z = fpgastub->zapprox();
471  r = fpgastub->rapprox();
472  }
473 
474  if (phi < 0)
475  phi += 2 * M_PI;
476  phi -= phimin_;
477 
478  double dr = r - settings_.rmean(layerdisk_);
480 
481  double dphi = reco::reduceRange(phi - (proj.phiproj() + dr * proj.phiprojder()));
482 
483  double dz = z - (proj.rzproj() + dr * proj.rzprojder());
484 
485  double dphiapprox = reco::reduceRange(phi - (proj.phiprojapprox() + dr * proj.phiprojderapprox()));
486 
487  double dzapprox = z - (proj.rzprojapprox() + dr * proj.rzprojderapprox());
488 
489  int seedindex = tracklet->getISeed();
490 
491  assert(phimatchcuttable_.lookup(seedindex) > 0);
492  assert(zmatchcuttable_.lookup(seedindex) > 0);
493 
494  if (settings_.bookHistos()) {
495  bool truthmatch = tracklet->stubtruthmatch(stub);
496 
498  hists->FillLayerResidual(layerdisk_ + 1,
499  seedindex,
500  dphiapprox * settings_.rmean(layerdisk_),
501  ideltaphi * settings_.kphi1() * settings_.rmean(layerdisk_),
502  (ideltaz << dzshift_) * settings_.kz(),
503  dz,
504  truthmatch);
505  }
506 
507  if (settings_.writeMonitorData("Residuals")) {
508  double pt = 0.01 * settings_.c() * settings_.bfield() / std::abs(tracklet->rinv());
509 
510  globals_->ofstream("layerresiduals.txt")
511  << layerdisk_ + 1 << " " << seedindex << " " << pt << " "
512  << ideltaphi * settings_.kphi1() * settings_.rmean(layerdisk_) << " "
513  << dphiapprox * settings_.rmean(layerdisk_) << " "
514  << phimatchcuttable_.lookup(seedindex) * settings_.kphi1() * settings_.rmean(layerdisk_) << " "
515  << (ideltaz << dzshift_) * settings_.kz() << " " << dz << " "
516  << zmatchcuttable_.lookup(seedindex) * settings_.kz() << endl;
517  }
518 
519  bool imatch = (std::abs(ideltaphi) <= phimatchcuttable_.lookup(seedindex)) &&
520  (ideltaz << dzshift_ < zmatchcuttable_.lookup(seedindex)) &&
521  (ideltaz << dzshift_ >= -zmatchcuttable_.lookup(seedindex));
522 
523  if (settings_.debugTracklet()) {
524  edm::LogVerbatim("Tracklet") << getName() << " imatch = " << imatch << " ideltaphi cut " << ideltaphi << " "
525  << phimatchcuttable_.lookup(seedindex) << " ideltaz<<dzshift cut "
526  << (ideltaz << dzshift_) << " " << zmatchcuttable_.lookup(seedindex);
527  }
528 
529  //This would catch significant consistency problems in the configuration - helps to debug if there are problems.
530  if (std::abs(dphi) > 0.5 * settings_.dphisectorHG() || std::abs(dphiapprox) > 0.5 * settings_.dphisectorHG()) {
531  throw cms::Exception("LogicError") << "WARNING dphi and/or dphiapprox too large : " << dphi << " " << dphiapprox
532  << endl;
533  }
534 
535  bool keep = true;
536  if (!settings_.doKF() || !settings_.doMultipleMatches()) {
537  // Case of allowing only one stub per track per layer (or no KF which implies the same).
538  if (imatch && tracklet->match(layerdisk_)) {
539  // Veto match if is not the best one for this tracklet (in given layer)
540  auto res = tracklet->resid(layerdisk_);
541  keep = abs(ideltaphi) < abs(res.fpgaphiresid().value());
542  imatch = keep;
543  }
544  }
545 
546  if (imatch) {
547  tracklet->addMatch(layerdisk_,
548  ideltaphi,
549  ideltaz,
550  dphi,
551  dz,
552  dphiapprox,
553  dzapprox,
554  (phiregion_ << N_BITSMEMADDRESS) + fpgastub->stubindex().value(),
555  fpgastub);
556 
557  if (settings_.debugTracklet()) {
558  edm::LogVerbatim("Tracklet") << "Accepted full match in layer " << getName() << " " << tracklet;
559  }
560 
561  int iSeed = tracklet->getISeed();
562  assert(fullmatches_[iSeed] != nullptr);
563  fullmatches_[iSeed]->addMatch(tracklet, fpgastub);
564 
565  return true;
566  } else {
567  return false;
568  }
569  } else { //disk matches
570 
571  //check that stubs and projections in same half of detector
572  assert(stub->z() * tracklet->t() > 0.0);
573 
574  int sign = (tracklet->t() > 0.0) ? 1 : -1;
575  int disk = sign * (layerdisk_ - N_LAYER + 1);
576  assert(disk != 0);
577 
578  //Perform integer calculations here
579 
580  int iz = fpgastub->z().value();
581 
582  const Projection& proj = tracklet->proj(layerdisk_);
583 
584  int iphi = proj.fpgaphiproj().value();
585  int iphicorr = (iz * proj.fpgaphiprojder().value()) >> icorrshift_;
586 
587  iphi += iphicorr;
588 
589  int ir = proj.fpgarzproj().value();
590  int ircorr = (iz * proj.fpgarzprojder().value()) >> icorzshift_;
591  ir += ircorr;
592 
593  int ideltaphi = fpgastub->phi().value() - iphi;
594 
595  int irstub = fpgastub->r().value();
596  int ialphafact = 0;
597  if (!stub->isPSmodule()) {
598  assert(irstub < (int)N_DSS_MOD * 2);
599  if (layerdisk_ - N_LAYER <= 1) {
600  ialphafact = ialphafactinner_[irstub];
601  irstub = settings_.rDSSinner(irstub) / settings_.kr();
602  } else {
603  ialphafact = ialphafactouter_[irstub];
604  irstub = settings_.rDSSouter(irstub) / settings_.kr();
605  }
606  }
607 
608  int ideltar = (irstub * settings_.kr()) / settings_.krprojshiftdisk() - ir;
609 
610  if (!stub->isPSmodule()) {
611  int ialpha = fpgastub->alpha().value();
612  int iphialphacor = ((ideltar * ialpha * ialphafact) >> settings_.alphashift());
613  ideltaphi += iphialphacor;
614  }
615 
616  //Perform floating point calculations here
617 
618  double phi = stub->phi();
619  double z = stub->z();
620  double r = stub->r();
621 
622  if (settings_.useapprox()) {
623  double dphi = reco::reduceRange(phi - fpgastub->phiapprox(phimin_, 0.0));
624  assert(std::abs(dphi) < 0.001);
625  phi = fpgastub->phiapprox(phimin_, 0.0);
626  z = fpgastub->zapprox();
627  r = fpgastub->rapprox();
628  }
629 
630  if (phi < 0)
631  phi += 2 * M_PI;
632  phi -= phimin_;
633 
634  double dz = z - sign * settings_.zmean(layerdisk_ - N_LAYER);
635 
636  if (std::abs(dz) > settings_.dzmax()) {
637  edm::LogProblem("Tracklet") << __FILE__ << ":" << __LINE__ << " " << name_ << " " << tracklet->getISeed();
638  edm::LogProblem("Tracklet") << "stub " << stub->z() << " disk " << disk << " " << dz;
640  }
641 
642  double phiproj = proj.phiproj() + dz * proj.phiprojder();
643  double rproj = proj.rzproj() + dz * proj.rzprojder();
644  double deltar = r - rproj;
645 
646  double dr = stub->r() - rproj;
647  double drapprox = stub->r() - (proj.rzprojapprox() + dz * proj.rzprojderapprox());
648 
649  double dphi = reco::reduceRange(phi - phiproj);
650 
651  double dphiapprox = reco::reduceRange(phi - (proj.phiprojapprox() + dz * proj.phiprojderapprox()));
652 
653  double drphi = dphi * stub->r();
654  double drphiapprox = dphiapprox * stub->r();
655 
656  if (!stub->isPSmodule()) {
657  double alphanorm = stub->alphanorm();
658  dphi += dr * alphanorm * settings_.half2SmoduleWidth() / stub->r2();
659  ;
660  dphiapprox += drapprox * alphanorm * settings_.half2SmoduleWidth() / stub->r2();
661 
662  drphi += dr * alphanorm * settings_.half2SmoduleWidth() / stub->r();
663  drphiapprox += dr * alphanorm * settings_.half2SmoduleWidth() / stub->r();
664  }
665 
666  int seedindex = tracklet->getISeed();
667 
668  int idrphicut = rphicutPStable_.lookup(seedindex);
669  int idrcut = rcutPStable_.lookup(seedindex);
670  if (!stub->isPSmodule()) {
671  idrphicut = rphicut2Stable_.lookup(seedindex);
672  idrcut = rcut2Stable_.lookup(seedindex);
673  }
674 
675  double drphicut = idrphicut * settings_.kphi() * settings_.kr();
676  double drcut = idrcut * settings_.krprojshiftdisk();
677 
678  if (settings_.writeMonitorData("Residuals")) {
679  double pt = 0.01 * settings_.c() * settings_.bfield() / std::abs(tracklet->rinv());
680 
681  globals_->ofstream("diskresiduals.txt")
682  << layerdisk_ - N_LAYER + 1 << " " << stub->isPSmodule() << " " << tracklet->layer() << " "
683  << abs(tracklet->disk()) << " " << pt << " " << ideltaphi * settings_.kphi() * stub->r() << " " << drphiapprox
684  << " " << drphicut << " " << ideltar * settings_.krprojshiftdisk() << " " << deltar << " " << drcut << " "
685  << endl;
686  }
687 
688  bool match = (std::abs(drphi) < drphicut) && (std::abs(deltar) < drcut);
689  bool imatch = (std::abs(ideltaphi * irstub) < idrphicut) && (std::abs(ideltar) < idrcut);
690 
691  if (settings_.debugTracklet()) {
692  edm::LogVerbatim("Tracklet") << "imatch match disk: " << imatch << " " << match << " " << std::abs(ideltaphi)
693  << " " << drphicut / (settings_.kphi() * stub->r()) << " " << std::abs(ideltar)
694  << " " << drcut / settings_.krprojshiftdisk() << " r = " << stub->r();
695  }
696 
697  bool keep = true;
698  if (!settings_.doKF() || !settings_.doMultipleMatches()) {
699  // Case of allowing only one stub per track per layer (or no KF which implies the same).
700  if (imatch && tracklet->match(layerdisk_)) {
701  // Veto match if is not the best one for this tracklet (in given layer)
702  auto res = tracklet->resid(layerdisk_);
703  keep = abs(ideltaphi) < abs(res.fpgaphiresid().value());
704  imatch = keep;
705  }
706  }
707 
708  if (imatch) {
709  if (settings_.debugTracklet()) {
710  edm::LogVerbatim("Tracklet") << "MatchCalculator found match in disk " << getName();
711  }
712 
713  if (std::abs(dphi) >= third * settings_.dphisectorHG()) {
714  edm::LogPrint("Tracklet") << "dphi " << dphi << " ISeed " << tracklet->getISeed();
715  }
717  assert(std::abs(dphiapprox) < third * settings_.dphisectorHG());
718 
719  tracklet->addMatch(layerdisk_,
720  ideltaphi,
721  ideltar,
722  drphi / stub->r(),
723  dr,
724  drphiapprox / stub->r(),
725  drapprox,
726  (phiregion_ << N_BITSMEMADDRESS) + fpgastub->stubindex().value(),
727  fpgastub);
728 
729  if (settings_.debugTracklet()) {
730  edm::LogVerbatim("Tracklet") << "Accepted full match in disk " << getName() << " " << tracklet;
731  }
732 
733  int iSeed = tracklet->getISeed();
734  assert(fullmatches_[iSeed] != nullptr);
735  fullmatches_[iSeed]->addMatch(tracklet, fpgastub);
736 
737  return true;
738  } else {
739  return false;
740  }
741  }
742 }
Log< level::Info, true > LogVerbatim
double kz() const
Definition: Settings.h:314
double phi() const
Definition: L1TStub.h:65
double t() const
Definition: Tracklet.h:123
double zapprox() const
Definition: Stub.cc:158
const FPGAWord & r() const
Definition: Stub.h:60
bool bookHistos() const
Definition: Settings.h:207
std::string name_
Definition: ProcessBase.h:38
const Residual & resid(unsigned int layerdisk)
Definition: Tracklet.h:110
int disk() const
Definition: Tracklet.cc:782
double kphi1() const
Definition: Settings.h:311
double rDSSinner(unsigned int iBin) const
Definition: Settings.h:171
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
double phiapprox(double phimin, double) const
Definition: Stub.cc:177
const FPGAWord & z() const
Definition: Stub.h:61
double dphisectorHG() const
Definition: Settings.h:292
Projection & proj(int layerdisk)
Definition: Tracklet.h:87
Settings const & settings_
Definition: ProcessBase.h:40
TrackletLUT phimatchcuttable_
double z() const
Definition: L1TStub.h:59
Globals * globals_
Definition: ProcessBase.h:41
int lookup(unsigned int index) const
Definition: TrackletLUT.cc:904
double dzmax() const
Definition: Settings.h:129
constexpr unsigned int N_DSS_MOD
Definition: Settings.h:27
assert(be >=bs)
Definition: Electron.h:6
constexpr double third
Definition: Settings.h:42
unsigned int isPSmodule() const
Definition: L1TStub.h:96
void addMatch(unsigned int layerdisk, int ideltaphi, int ideltarz, double dphi, double drz, double dphiapprox, double drzapprox, int stubid, const trklet::Stub *stubptr)
Definition: Tracklet.cc:295
double half2SmoduleWidth() const
Definition: Settings.h:131
double rmean(unsigned int iLayer) const
Definition: Settings.h:164
double rinv() const
Definition: Tracklet.h:120
double rDSSouter(unsigned int iBin) const
Definition: Settings.h:174
std::vector< FullMatchMemory * > fullmatches_
double bfield() const
Definition: Settings.h:263
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int value() const
Definition: FPGAWord.h:24
bool doMultipleMatches() const
Definition: Settings.h:242
int alphashift() const
Definition: Settings.h:216
L1TStub * l1tstub()
Definition: Stub.h:77
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
Log< level::Warning, true > LogPrint
double rapprox() const
Definition: Stub.cc:144
double zmean(unsigned int iDisk) const
Definition: Settings.h:167
const FPGAWord & stubindex() const
Definition: Stub.h:66
#define M_PI
TrackletLUT rphicutPStable_
bool debugTracklet() const
Definition: Settings.h:182
TrackletLUT rphicut2Stable_
double kr() const
Definition: Settings.h:316
double drmax() const
Definition: Settings.h:128
double alphanorm() const
Definition: L1TStub.cc:90
int ialphafactinner_[N_DSS_MOD *2]
bool stubtruthmatch(const L1TStub *stub)
Definition: Tracklet.cc:138
Definition: deltar.py:1
int getISeed() const
Definition: Tracklet.cc:801
double c() const
Definition: Settings.h:212
const FPGAWord & alpha() const
Definition: Stub.h:64
double r() const
Definition: L1TStub.h:60
bool match(unsigned int layerdisk)
Definition: Tracklet.h:105
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
HistBase *& histograms()
Definition: Globals.h:38
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
double krprojshiftdisk() const
Definition: Settings.h:413
const FPGAWord & phi() const
Definition: Stub.h:62
int layer() const
Definition: Tracklet.cc:773
double kphi() const
Definition: Settings.h:310
bool doKF() const
Definition: Settings.h:241
double r2() const
Definition: L1TStub.h:62
std::string const & getName() const
Definition: ProcessBase.h:22
TrackletLUT zmatchcuttable_
int ialphafactouter_[N_DSS_MOD *2]
bool useapprox() const
Definition: Settings.h:235
constexpr unsigned int N_BITSMEMADDRESS
Definition: Settings.h:39
Log< level::Error, true > LogProblem
constexpr int N_LAYER
Definition: Settings.h:21

Member Data Documentation

◆ allstubs_

AllStubsMemory* trklet::MatchProcessor::allstubs_
private

Definition at line 65 of file MatchProcessor.h.

Referenced by addInput().

◆ barrel_

bool trklet::MatchProcessor::barrel_
private

Definition at line 40 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ dzshift_

int trklet::MatchProcessor::dzshift_
private

Definition at line 49 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ fullmatches_

std::vector<FullMatchMemory*> trklet::MatchProcessor::fullmatches_
private

Definition at line 73 of file MatchProcessor.h.

Referenced by addOutput(), and matchCalculator().

◆ ialphafactinner_

int trklet::MatchProcessor::ialphafactinner_[N_DSS_MOD *2]
private

Definition at line 69 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ ialphafactouter_

int trklet::MatchProcessor::ialphafactouter_[N_DSS_MOD *2]
private

Definition at line 70 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ icorrshift_

int trklet::MatchProcessor::icorrshift_
private

Definition at line 50 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ icorzshift_

int trklet::MatchProcessor::icorzshift_
private

Definition at line 51 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ inputProjBuffer_

CircularBuffer<ProjectionTemp> trklet::MatchProcessor::inputProjBuffer_
private

Definition at line 86 of file MatchProcessor.h.

Referenced by execute().

◆ inputprojs_

std::vector<TrackletProjectionsMemory*> trklet::MatchProcessor::inputprojs_
private

Definition at line 67 of file MatchProcessor.h.

Referenced by addInput(), and execute().

◆ layerdisk_

unsigned int trklet::MatchProcessor::layerdisk_
private

Definition at line 39 of file MatchProcessor.h.

Referenced by execute(), matchCalculator(), and MatchProcessor().

◆ luttable_

TrackletLUT trklet::MatchProcessor::luttable_
private

Definition at line 79 of file MatchProcessor.h.

Referenced by MatchProcessor().

◆ matchengines_

std::vector<MatchEngineUnit> trklet::MatchProcessor::matchengines_
private

Definition at line 84 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nMatchEngines_

unsigned int trklet::MatchProcessor::nMatchEngines_
private

Definition at line 83 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nphiderbits_

int trklet::MatchProcessor::nphiderbits_
private

Definition at line 63 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nrbits_

int trklet::MatchProcessor::nrbits_
private

Definition at line 62 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nrinv_

int trklet::MatchProcessor::nrinv_
private

Definition at line 47 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nvm_

int trklet::MatchProcessor::nvm_
private

Definition at line 44 of file MatchProcessor.h.

Referenced by MatchProcessor().

◆ nvmbins_

int trklet::MatchProcessor::nvmbins_
private

Definition at line 46 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ nvmbits_

int trklet::MatchProcessor::nvmbits_
private

Definition at line 45 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ phimatchcuttable_

TrackletLUT trklet::MatchProcessor::phimatchcuttable_
private

Definition at line 54 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ phimin_

double trklet::MatchProcessor::phimin_
private

Definition at line 81 of file MatchProcessor.h.

Referenced by execute(), and matchCalculator().

◆ phiregion_

unsigned int trklet::MatchProcessor::phiregion_
private

Definition at line 42 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ phishift_

int trklet::MatchProcessor::phishift_
private

Definition at line 52 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ rcut2Stable_

TrackletLUT trklet::MatchProcessor::rcut2Stable_
private

Definition at line 60 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ rcutPStable_

TrackletLUT trklet::MatchProcessor::rcutPStable_
private

Definition at line 59 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ rinvbendlut_

TrackletLUT trklet::MatchProcessor::rinvbendlut_
private

Definition at line 76 of file MatchProcessor.h.

Referenced by execute(), and MatchProcessor().

◆ rphicut2Stable_

TrackletLUT trklet::MatchProcessor::rphicut2Stable_
private

Definition at line 58 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ rphicutPStable_

TrackletLUT trklet::MatchProcessor::rphicutPStable_
private

Definition at line 57 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().

◆ vmstubs_

std::vector<VMStubsMEMemory*> trklet::MatchProcessor::vmstubs_
private

Definition at line 66 of file MatchProcessor.h.

Referenced by addInput(), and execute().

◆ zmatchcuttable_

TrackletLUT trklet::MatchProcessor::zmatchcuttable_
private

Definition at line 55 of file MatchProcessor.h.

Referenced by matchCalculator(), and MatchProcessor().