13 using namespace trklet;
17 :
ProcessBase(name, settings, global), innerptlut_(settings), outerptlut_(settings) {
33 if (output ==
"stubpairout") {
39 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find output : " <<
output;
47 if (input ==
"innervmstubin") {
54 if (input ==
"outervmstubin") {
61 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find input : " <<
input;
68 unsigned int countall = 0;
69 unsigned int countpass = 0;
78 unsigned int nbits = 7;
81 int rzdiffmax = lookupbits.
bits(nbits, lookupbits.
nbits() -
nbits);
82 int rzbinfirst = lookupbits.
bits(0, 3);
83 int start = lookupbits.
bits(4, nbits - 4);
91 for (
int ibin = start; ibin <=
last; ibin++) {
106 int ir = ((ibin & 3) << 1) + (rzbin >> 2);
107 index = (index << 3) + ir;
112 if ((rzbin < rzbinfirst) || (rzbin - rzbinfirst > rzdiffmax)) {
119 int ptinnerindex = (index << innerbend.
nbits()) + innerbend.
value();
120 int ptouterindex = (index << outerbend.
nbits()) + outerbend.
value();
124 edm::LogVerbatim(
"Tracklet") <<
"Stub pair rejected because of stub pt cut bends : "
155 double innerphimin, innerphimax;
158 double outerphimin, outerphimax;
Log< level::Info, true > LogVerbatim
const FPGAWord & disk() const
void setbendtable(const TrackletLUT &bendtable)
void setother(VMStubsTEMemory *other)
VMStubsTEMemory * outervmstubs_
void addStubPair(const VMStubTE &stub1, const VMStubTE &stub2, const unsigned index=0, const std::string &tedName="")
const VMStubTE & getVMStubTEBinned(unsigned int bin, unsigned int i) const
void initteptlut(bool fillInner, bool fillTEMem, unsigned int iSeed, unsigned int layerdisk1, unsigned int layerdisk2, unsigned int innerphibits, unsigned int outerphibits, double innerphimin, double innerphimax, double outerphimin, double outerphimax, const std::string &innermem, const std::string &outermem)
void initLayerDisksandISeed(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
Settings const & settings_
unsigned int outerphibits_
bool debugTracklet() const
static std::string const input
unsigned int nVMStubsBinned(unsigned int bin) const
std::string const & getName() const
std::string const & getName() const
unsigned int nbits(unsigned int power)
const FPGAWord & vmbits() const
unsigned int bits(unsigned int lsb, unsigned int nbit) const
const Stub * stub() const
unsigned int maxStep(std::string module) const
int lookup(unsigned int index) const
StubPairsMemory * stubpairs_
const FPGAWord & finephi() const
unsigned int nVMStubs() const
std::ofstream & ofstream(std::string fname)
unsigned int innerphibits_
int nfinephi(unsigned int inner, unsigned int iSeed) const
bool useSeed(unsigned int iSeed) const
const VMStubTE & getVMStubTE(unsigned int i) const
void addInput(MemoryBase *memory, std::string input) override
double benddecode(int ibend, int layerdisk, bool isPSmodule) const
void getPhiRange(double &phimin, double &phimax, unsigned int iSeed, unsigned int inner)
TrackletEngine(std::string name, Settings const &settings, Globals *global)
VMStubsTEMemory * innervmstubs_
const FPGAWord & bend() const
void addOutput(MemoryBase *memory, std::string output) override
bool writeMonitorData(std::string module) const