15 TrackletEngineDisplaced::TrackletEngineDisplaced(
string name,
Settings const& settings,
Globals* global)
24 string name1 =
name.substr(1);
25 if (name1[3] ==
'L') {
28 if (name1[3] ==
'D') {
31 if (name1[11] ==
'L') {
34 if (name1[11] ==
'D') {
37 if (name1[12] ==
'L') {
40 if (name1[12] ==
'D') {
65 if (
output ==
"stubpairout") {
71 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find output : " <<
output;
79 if (
input ==
"firstvmstubin") {
85 if (
input ==
"secondvmstubin") {
91 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find input : " <<
input;
101 unsigned int countall = 0;
102 unsigned int countpass = 0;
103 unsigned int nInnerStubs = 0;
105 for (
unsigned int iInnerMem = 0; iInnerMem <
firstvmstubs_.size();
106 nInnerStubs +=
firstvmstubs_.at(iInnerMem)->nVMStubs(), iInnerMem++)
113 assert(iInnerMem->nVMStubs() == iInnerMem->nVMStubs());
114 for (
unsigned int i = 0;
i < iInnerMem->nVMStubs();
i++) {
115 const VMStubTE& firstvmstub = iInnerMem->getVMStubTE(
i);
121 int lookupbits = firstvmstub.
vmbits().
value() & 1023;
122 int zdiffmax = (lookupbits >> 7);
123 int newbin = (lookupbits & 127);
124 int bin = newbin / 8;
126 int zbinfirst = newbin & 7;
136 for (
int ibin =
start; ibin <=
last; ibin++) {
150 if (zbin < zbinfirst || zbin - zbinfirst > zdiffmax) {
175 <<
"Stub pair rejected because of stub pt cut bends : " 187 for (
unsigned int isp = 0; isp <
stubpairs_.size(); ++isp) {
190 ofstream
fout(
"seeds.txt", ofstream::app);
191 fout << __FILE__ <<
":" << __LINE__ <<
" " <<
name_ <<
" " <<
iSeed_ << endl;
203 int lookupbits = firstvmstub.
vmbits().
value() & 1023;
204 int zdiffmax = (lookupbits >> 7);
205 int newbin = (lookupbits & 127);
206 int bin = newbin / 8;
208 int zbinfirst = newbin & 7;
218 for (
int ibin =
start; ibin <=
last; ibin++) {
233 if (zbin < zbinfirst || zbin - zbinfirst > zdiffmax) {
258 <<
"Stub pair rejected because of stub pt cut bends : " 267 for (
unsigned int isp = 0; isp <
stubpairs_.size(); ++isp) {
271 ofstream
fout(
"seeds.txt", ofstream::app);
272 fout << __FILE__ <<
":" << __LINE__ <<
" " <<
name_ <<
" " <<
iSeed_ << endl;
287 int lookupbits = firstvmstub.
vmbits().
value() & 511;
289 int rdiffmax = (lookupbits >> 6);
290 int newbin = (lookupbits & 63);
291 int bin = newbin / 8;
293 int rbinfirst = newbin & 7;
300 for (
int ibin =
start; ibin <=
last; ibin++) {
316 if (rbin < rbinfirst)
318 if (rbin - rbinfirst > rdiffmax)
321 unsigned int irsecondbin = secondvmstub.
vmbits().
value() >> 2;
339 <<
"Stub pair rejected because of stub pt cut bends : " 349 for (
unsigned int isp = 0; isp <
stubpairs_.size(); ++isp) {
353 ofstream
fout(
"seeds.txt", ofstream::app);
354 fout << __FILE__ <<
":" << __LINE__ <<
" " <<
name_ <<
" " <<
iSeed_ << endl;
366 if (countall > 5000) {
367 edm::LogVerbatim(
"Tracklet") <<
"In TrackletEngineDisplaced::execute : " <<
getName() <<
" " << nInnerStubs <<
" " 370 for (
unsigned int i = 0;
i < iInnerMem->nVMStubs();
i++) {
371 const VMStubTE& firstvmstub = iInnerMem->getVMStubTE(
i);
372 edm::LogVerbatim(
"Tracklet") <<
"In TrackletEngineDisplaced::execute first stub : " 381 edm::LogVerbatim(
"Tracklet") <<
"In TrackletEngineDisplaced::execute second stub : " 399 unsigned int finddir = tablePath.find(
"table_TED_");
400 tableName = tablePath.substr(0, finddir) +
"table_" +
name_ +
".txt";
408 istringstream iss(
line);
418 for (
unsigned int isp = 0; isp <
stubpairs_.size(); ++isp)
Log< level::Info, true > LogVerbatim
const VMStubTE & getVMStubTEBinned(unsigned int bin, unsigned int i) const
short memNameToIndex(const std::string &name)
unsigned int maxStep(std::string module) const
void addOutput(MemoryBase *memory, std::string output) override
bool enableTripletTables() const
const FPGAWord & bend() const
Settings const & settings_
void addInput(MemoryBase *memory, std::string input) override
std::string const & tableTEDFile() const
static std::string const input
const FPGAWord & disk() const
const Stub * stub() const
~TrackletEngineDisplaced() override
const FPGAWord & vmbits() const
std::string const & getName() const
bool writeMonitorData(std::string module) const
VMStubsTEMemory * secondvmstubs_
const FPGAWord & finephi() const
bool debugTracklet() const
const VMStubTE & getVMStubTE(unsigned int i) const
unsigned int nVMStubs() const
std::vector< VMStubsTEMemory * > firstvmstubs_
int nfinephi(unsigned int inner, unsigned int iSeed) const
std::vector< std::set< short > > table_
bool useSeed(unsigned int iSeed) const
unsigned int nVMStubsBinned(unsigned int bin) const
std::ofstream & ofstream(std::string fname)
std::vector< StubPairsMemory * > stubpairs_
std::string const & getName() const
bool writeTripletTables() const
double benddecode(unsigned int ibend, unsigned int layerdisk, bool isPSmodule) const