7 MatchEngineUnit::MatchEngineUnit(
bool barrel,
unsigned int layerdisk,
const TrackletLUT& luttable)
8 : luttable_(luttable), candmatches_(3) {
46 use_.emplace_back(0, 0);
49 use_.emplace_back(1, 0);
52 use_.emplace_back(0, 1);
55 use_.emplace_back(1, 1);
91 if (
idle() || almostfull)
115 int deltaphi = stubfinephi - projfinephi;
117 bool dphicut = (
abs(deltaphi) < 3);
119 int nbits = isPSmodule ? 3 : 4;
121 int diskps = (!
barrel_) && isPSmodule;
126 int idrz = stubfinerz - projfinerz;
131 pass = idrz >= -1 && idrz <= 1;
133 pass = idrz >= -5 && idrz <= 5;
137 pass = idrz >= -1 && idrz <= 1;
139 pass = idrz >= -3 && idrz <= 3;
150 <<
" shift_ isPSseed_ :" <<
shift_ <<
" " <<
isPSseed_ <<
" slot=" << slot;
158 std::pair<Tracklet*, const Stub*> tmppair(
proj_, vmstub.
stub());
185 return peek().first->TCID();
Log< level::Info, true > LogVerbatim
const FPGAWord & bend() const
const FPGAWord & finerz() const
const Stub * stub() const
int lookup(unsigned int index) const
void init(VMStubsMEMemory *vmstubsmemory, unsigned int nrzbin, unsigned int rzbin, unsigned int iphi, int shift, int projrinv, int projfinerz, int projfinephi, bool usefirstMinus, bool usefirstPlus, bool usesecondMinus, bool usesecondPlus, bool isPSseed, Tracklet *proj, bool print)
std::pair< Tracklet *, const Stub * > peek() const
U second(std::pair< T, U > const &p)
CircularBuffer< std::pair< Tracklet *, const Stub * > > candmatches_
int trackletIndex() const
const FPGAWord & stubindex() const
const TrackletLUT & luttable_
std::pair< Tracklet *, const Stub * > tmppair_
const VMStubME & getVMStubMEBin(unsigned int bin, unsigned int i) const
VMStubsMEMemory * vmstubsmemory_
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Abs< T >::type abs(const T &t)
constexpr unsigned int NFINERZBITS
std::pair< Tracklet *, const Stub * > tmppair__
std::vector< std::pair< unsigned int, unsigned int > > use_
constexpr unsigned int NFINEPHIBITS
const FPGAWord & finephi() const
static unsigned int const shift
unsigned int nStubsBin(unsigned int bin) const