CMS 3D CMS Logo

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

#include <TripletEngine.h>

Inheritance diagram for trklet::TripletEngine:
trklet::ProcessBase

Public Member Functions

void addInput (MemoryBase *memory, std::string input) override
 
void addOutput (MemoryBase *memory, std::string output) override
 
void execute ()
 
void readTables ()
 
 TripletEngine (std::string name, Settings const &settings, Globals *global, unsigned int iSector)
 
void writeTables ()
 
 ~TripletEngine () override
 
- Public Member Functions inherited from trklet::ProcessBase
unsigned int getISeed (std::string name)
 
std::string const & getName () const
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk, int &layerdisk)
 
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, unsigned int iSector)
 
virtual ~ProcessBase ()=default
 

Private Attributes

int count_
 
int dct1_
 
int dct2_
 
int dct3_
 
int disk1_
 
int disk2_
 
int disk3_
 
int iSeed_
 
int layer1_
 
int layer2_
 
int layer3_
 
int phi1_
 
int phi2_
 
int phi3_
 
int r1_
 
int r2_
 
int r3_
 
int secondphibits_
 
std::map< std::string, std::vector< std::map< std::string, unsigned > > > spTable_
 
std::vector< StubPairsMemory * > stubpairs_
 
StubTripletsMemorystubtriplets_
 
std::vector< bool > table_
 
int thirdphibits_
 
std::vector< VMStubsTEMemory * > thirdvmstubs_
 
std::map< std::string, std::vector< std::vector< std::string > > > tmpSPTable_
 
int z1_
 
int z2_
 
int z3_
 

Additional Inherited Members

- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
unsigned int iSector_
 
std::string name_
 
double phimax_
 
double phimin_
 
Settings const & settings_
 

Detailed Description

Definition at line 18 of file TripletEngine.h.

Constructor & Destructor Documentation

◆ TripletEngine()

TripletEngine::TripletEngine ( std::string  name,
Settings const &  settings,
Globals global,
unsigned int  iSector 
)

Definition at line 13 of file TripletEngine.cc.

14  : ProcessBase(name, settings, global, iSector) {
15  stubpairs_.clear();
16  thirdvmstubs_.clear();
17  layer1_ = 0;
18  layer2_ = 0;
19  layer3_ = 0;
20  disk1_ = 0;
21  disk2_ = 0;
22  disk3_ = 0;
23  dct1_ = 0;
24  dct2_ = 0;
25  dct3_ = 0;
26  phi1_ = 0;
27  phi2_ = 0;
28  phi3_ = 0;
29  z1_ = 0;
30  z2_ = 0;
31  z3_ = 0;
32  r1_ = 0;
33  r2_ = 0;
34  r3_ = 0;
35 
36  if (name_[4] == 'L')
37  layer1_ = name_[5] - '0';
38  if (name_[4] == 'D')
39  disk1_ = name_[5] - '0';
40  if (name_[7] == 'L')
41  layer2_ = name_[8] - '0';
42  if (name_[7] == 'D')
43  disk2_ = name_[8] - '0';
44 
45  if (layer1_ == 3 && layer2_ == 4) {
46  layer3_ = 2;
47  iSeed_ = 8;
48  } else if (layer1_ == 5 && layer2_ == 6) {
49  layer3_ = 4;
50  iSeed_ = 9;
51  } else if (layer1_ == 2 && layer2_ == 3) {
52  disk3_ = 1;
53  iSeed_ = 10;
54  } else if (disk1_ == 1 && disk2_ == 2) {
55  layer3_ = 2;
56  iSeed_ = 11;
57  } else
58  throw cms::Exception("LogicError") << __FILE__ << " " << __LINE__ << " Invalid seeding!";
59 
60  if ((layer2_ == 4 && layer3_ == 2) || (layer2_ == 6 && layer3_ == 4)) {
63  }
64  if ((layer2_ == 3 && disk3_ == 1) || (disk2_ == 2 && layer3_ == 2)) {
67  }
68  readTables();
69 }

References dct1_, dct2_, dct3_, disk1_, disk2_, disk3_, Exception, iSeed_, layer1_, layer2_, layer3_, trklet::ProcessBase::name_, trklet::Settings::nfinephi(), phi1_, phi2_, phi3_, r1_, r2_, r3_, readTables(), secondphibits_, trklet::ProcessBase::settings_, stubpairs_, thirdphibits_, thirdvmstubs_, z1_, z2_, and z3_.

◆ ~TripletEngine()

TripletEngine::~TripletEngine ( )
override

Member Function Documentation

◆ addInput()

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

Implements trklet::ProcessBase.

Definition at line 90 of file TripletEngine.cc.

90  {
91  if (settings_.writetrace()) {
92  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding input from " << memory->getName() << " to input "
93  << input;
94  }
95  if (input == "thirdvmstubin") {
96  auto *tmp = dynamic_cast<VMStubsTEMemory *>(memory);
97  assert(tmp != nullptr);
98  thirdvmstubs_.push_back(tmp);
99  return;
100  }
101  if (input.substr(0, 8) == "stubpair") {
102  auto *tmp = dynamic_cast<StubPairsMemory *>(memory);
103  assert(tmp != nullptr);
104  stubpairs_.push_back(tmp);
105  return;
106  }
107  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find input : " << input;
108 }

References cms::cuda::assert(), Exception, input, trklet::ProcessBase::name_, trklet::ProcessBase::settings_, stubpairs_, thirdvmstubs_, createJobs::tmp, and trklet::Settings::writetrace().

◆ addOutput()

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

Implements trklet::ProcessBase.

Definition at line 76 of file TripletEngine.cc.

76  {
77  if (settings_.writetrace()) {
78  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding output to " << memory->getName() << " to output "
79  << output;
80  }
81  if (output == "stubtripout") {
82  auto *tmp = dynamic_cast<StubTripletsMemory *>(memory);
83  assert(tmp != nullptr);
85  return;
86  }
87  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find output : " << output;
88 }

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

◆ execute()

void TripletEngine::execute ( void  )

Definition at line 110 of file TripletEngine.cc.

110  {
111  unsigned int countall = 0;
112  unsigned int countpass = 0;
113  unsigned int nThirdStubs = 0;
114  count_ = 0;
115 
116  for (unsigned int iThirdMem = 0; iThirdMem < thirdvmstubs_.size();
117  nThirdStubs += thirdvmstubs_.at(iThirdMem)->nVMStubs(), iThirdMem++)
118  ;
119 
120  assert(!thirdvmstubs_.empty());
121  assert(!stubpairs_.empty());
122 
123  bool print = false && (getName().substr(0, 10) == "TRE_L2cL3c");
124 
125  print = print && nThirdStubs > 0;
126 
127  int hacksum = 0;
128  if (print) {
129  edm::LogVerbatim("Tracklet") << "In TripletEngine::execute : " << getName() << " " << nThirdStubs << ":";
130  for (unsigned int i = 0; i < thirdvmstubs_.size(); ++i) {
131  edm::LogVerbatim("Tracklet") << thirdvmstubs_.at(i)->getName() << " " << thirdvmstubs_.at(i)->nVMStubs();
132  }
133  int s = 0;
134  std::string oss = "";
135  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
136  oss += std::to_string(stubpairs_.at(i)->nStubPairs());
137  oss += " ";
138  s += stubpairs_.at(i)->nStubPairs();
139  }
140  hacksum += nThirdStubs * s;
141  edm::LogVerbatim("Tracklet") << oss;
142  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
143  edm::LogVerbatim("Tracklet") << " " << stubpairs_.at(i)->getName();
144  }
145  }
146 
147  tmpSPTable_.clear();
148 
149  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
150  for (unsigned int j = 0; j < stubpairs_.at(i)->nStubPairs(); ++j) {
151  if (print)
152  edm::LogVerbatim("Tracklet") << " ***** " << stubpairs_.at(i)->getName() << " "
153  << stubpairs_.at(i)->nStubPairs();
154 
155  auto firstvmstub = stubpairs_.at(i)->getVMStub1(j);
156  auto secondvmstub = stubpairs_.at(i)->getVMStub2(j);
157 
158  if ((layer2_ == 4 && layer3_ == 2) || (layer2_ == 6 && layer3_ == 4)) {
159  constexpr unsigned int vmbitshift = 10;
160  int lookupbits = (int)((firstvmstub.vmbits().value() >> vmbitshift) & 1023); //1023=2^vmbitshift-1
161  int newbin = (lookupbits & 127);
162  int bin = newbin / 8;
163 
164  int start = (bin >> 1);
165  int last = start + (bin & 1);
166 
167  for (int ibin = start; ibin <= last; ibin++) {
168  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
169  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
170  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
171  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
172  continue;
173  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
174  if (settings_.debugTracklet()) {
175  edm::LogVerbatim("Tracklet") << "In " << getName() << " have third stub";
176  }
177 
178  if (countall >= settings_.maxStep("TRE"))
179  break;
180  countall++;
181 
182  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
183 
184  assert(secondphibits_ != -1);
185  assert(thirdphibits_ != -1);
186 
187  unsigned int nvmsecond = settings_.nallstubs(layer2_ - 1) * settings_.nvmte(1, iSeed_);
188  unsigned int nvmbitssecond = nbits(nvmsecond);
189 
190  FPGAWord iphisecondbin = secondvmstub.stub()->iphivmFineBins(nvmbitssecond, secondphibits_);
191 
192  //currently not using same number of bits as in the TED
193  //assert(iphisecondbin==(int)secondvmstub.finephi());
194  FPGAWord iphithirdbin = thirdvmstub.finephi();
195 
196  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
197 
198  FPGAWord secondbend = secondvmstub.bend();
199  FPGAWord thirdbend = thirdvmstub.bend();
200 
201  index = (index << secondbend.nbits()) + secondbend.value();
202  index = (index << thirdbend.nbits()) + thirdbend.value();
203 
204  if (index >= table_.size())
205  table_.resize(index + 1, false);
206 
207  if (!table_[index]) {
208  if (settings_.debugTracklet()) {
209  edm::LogVerbatim("Tracklet")
210  << "Stub pair rejected because of stub pt cut bends : "
211  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
212  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
213  }
215  continue;
216  }
218  table_[index] = true;
219 
220  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
221  const string &tedName = stubpairs_.at(i)->getTEDName(j);
222  if (!tmpSPTable_.count(tedName))
223  tmpSPTable_[tedName];
224  if (spIndex >= tmpSPTable_.at(tedName).size())
225  tmpSPTable_.at(tedName).resize(spIndex + 1);
226  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
227 
228  if (settings_.debugTracklet())
229  edm::LogVerbatim("Tracklet") << "Adding layer-layer pair in " << getName();
230  if (settings_.writeMonitorData("Seeds")) {
231  ofstream fout("seeds.txt", ofstream::app);
232  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
233  fout.close();
234  }
235  stubtriplets_->addStubs(thirdvmstub.stub(),
236  (stubpairs_.at(i))->getVMStub1(j).stub(),
237  (stubpairs_.at(i))->getVMStub2(j).stub());
238 
239  countpass++;
240  }
241  }
242  }
243 
244  }
245 
246  else if (disk2_ == 2 && layer3_ == 2) {
247  int lookupbits = (int)((firstvmstub.vmbits().value() >> 10) & 1023);
248  int newbin = (lookupbits & 127);
249  int bin = newbin / 8;
250 
251  int start = (bin >> 1);
252  int last = start + (bin & 1);
253 
254  if (firstvmstub.stub()->disk().value() < 0) { //TODO - negative disk should come from memory
255  start = settings_.NLONGVMBINS() - last - 1;
256  last = settings_.NLONGVMBINS() - start - 1;
257  }
258 
259  for (int ibin = start; ibin <= last; ibin++) {
260  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
261  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
262  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
263  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
264  continue;
265 
266  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
267  if (countall >= settings_.maxStep("TRE"))
268  break;
269  countall++;
270 
271  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
272 
273  assert(secondphibits_ != -1);
274  assert(thirdphibits_ != -1);
275 
276  FPGAWord iphisecondbin = secondvmstub.finephi();
277  FPGAWord iphithirdbin = thirdvmstub.finephi();
278 
279  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
280 
281  FPGAWord secondbend = secondvmstub.bend();
282  FPGAWord thirdbend = thirdvmstub.bend();
283 
284  index = (index << secondbend.nbits()) + secondbend.value();
285  index = (index << thirdbend.nbits()) + thirdbend.value();
286 
287  if (index >= table_.size())
288  table_.resize(index + 1, false);
289 
290  if (!table_[index]) {
291  if (settings_.debugTracklet()) {
292  edm::LogVerbatim("Tracklet")
293  << "Stub triplet rejected because of stub pt cut bends : "
294  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
295  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
296  }
297  }
299  table_[index] = true;
300 
301  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
302  const string &tedName = stubpairs_.at(i)->getTEDName(j);
303  if (!tmpSPTable_.count(tedName))
304  tmpSPTable_[tedName];
305  if (spIndex >= tmpSPTable_.at(tedName).size())
306  tmpSPTable_.at(tedName).resize(spIndex + 1);
307  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
308 
309  if (settings_.debugTracklet())
310  edm::LogVerbatim("Tracklet") << "Adding layer-disk pair in " << getName();
311  if (settings_.writeMonitorData("Seeds")) {
312  ofstream fout("seeds.txt", ofstream::app);
313  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
314  fout.close();
315  }
316  stubtriplets_->addStubs(thirdvmstub.stub(),
317  (stubpairs_.at(i))->getVMStub1(j).stub(),
318  (stubpairs_.at(i))->getVMStub2(j).stub());
319  countpass++;
320  }
321  }
322  }
323  }
324 
325  else if (layer2_ == 3 && disk3_ == 1) {
326  int lookupbits = (int)((firstvmstub.vmbits().value() >> 10) & 1023);
327 
328  int newbin = (lookupbits & 127);
329  int bin = newbin / 8;
330 
331  int start = (bin >> 1);
332  int last = start + (bin & 1);
333 
334  for (int ibin = start; ibin <= last; ibin++) {
335  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
336  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
337  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
338  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
339  continue;
340  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
341  if (countall >= settings_.maxStep("TRE"))
342  break;
343  countall++;
344 
345  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
346 
347  assert(secondphibits_ != -1);
348  assert(thirdphibits_ != -1);
349 
350  unsigned int nvmsecond;
351 
352  nvmsecond = settings_.nallstubs(layer2_ - 1) * settings_.nvmte(1, iSeed_);
353  unsigned int nvmbitssecond = nbits(nvmsecond);
354 
355  FPGAWord iphisecondbin = secondvmstub.stub()->iphivmFineBins(nvmbitssecond, secondphibits_);
356 
357  //currentlty not using same number of bits as in the TED
358  //assert(iphisecondbin==(int)secondvmstub.finephi());
359  FPGAWord iphithirdbin = thirdvmstub.finephi();
360 
361  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
362 
363  FPGAWord secondbend = secondvmstub.bend();
364  FPGAWord thirdbend = thirdvmstub.bend();
365 
366  index = (index << secondbend.nbits()) + secondbend.value();
367  index = (index << thirdbend.nbits()) + thirdbend.value();
368 
369  if (index >= table_.size())
370  table_.resize(index + 1, false);
371 
372  if (!table_[index]) {
373  if (settings_.debugTracklet()) {
374  edm::LogVerbatim("Tracklet")
375  << "Stub pair rejected because of stub pt cut bends : "
376  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
377  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
378  }
379  }
381  table_[index] = true;
382 
383  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
384  const string &tedName = stubpairs_.at(i)->getTEDName(j);
385  if (!tmpSPTable_.count(tedName))
386  tmpSPTable_[tedName];
387  if (spIndex >= tmpSPTable_.at(tedName).size())
388  tmpSPTable_.at(tedName).resize(spIndex + 1);
389  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
390 
391  if (settings_.debugTracklet())
392  edm::LogVerbatim("Tracklet") << "Adding layer-disk pair in " << getName();
393  if (settings_.writeMonitorData("Seeds")) {
394  ofstream fout("seeds.txt", ofstream::app);
395  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
396  fout.close();
397  }
398  stubtriplets_->addStubs(thirdvmstub.stub(),
399  (stubpairs_.at(i))->getVMStub1(j).stub(),
400  (stubpairs_.at(i))->getVMStub2(j).stub());
401  countpass++;
402  }
403  }
404  }
405  }
406  }
407  }
408 
409  for (const auto &tedName : tmpSPTable_) {
410  for (unsigned spIndex = 0; spIndex < tedName.second.size(); spIndex++) {
411  if (tedName.second.at(spIndex).empty())
412  continue;
413  vector<string> entry(tedName.second.at(spIndex));
414  sort(entry.begin(), entry.end());
415  entry.erase(unique(entry.begin(), entry.end()), entry.end());
416  const string &spName = entry.at(0);
417 
418  if (!spTable_.count(tedName.first))
419  spTable_[tedName.first];
420  if (spIndex >= spTable_.at(tedName.first).size())
421  spTable_.at(tedName.first).resize(spIndex + 1);
422  if (!spTable_.at(tedName.first).at(spIndex).count(spName))
423  spTable_.at(tedName.first).at(spIndex)[spName] = 0;
424  spTable_.at(tedName.first).at(spIndex)[spName]++;
425  }
426  }
427 
428  if (settings_.writeMonitorData("TRE")) {
429  globals_->ofstream("tripletengine.txt") << getName() << " " << countall << " " << countpass << endl;
430  }
431 }

References trklet::StubTripletsMemory::addStubs(), cms::cuda::assert(), trklet::VMStubTE::bend(), trklet::benddecode(), newFWLiteAna::bin, count_, trklet::Settings::debugTracklet(), disk2_, disk3_, mps_splice::entry, trklet::VMStubTE::finephi(), groupFilesInBlocks::fout, trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, mps_fire::i, createfilelist::int, trklet::ProcessBase::iSector_, iSeed_, trklet::VMStubTE::isPSmodule(), dqmiolumiharvest::j, dqmdumpme::k, cmsLHEtoEOSManager::l, dqmdumpme::last, layer2_, layer3_, trklet::Settings::maxStep(), trklet::Settings::nallstubs(), trklet::ProcessBase::name_, trklet::ProcessBase::nbits(), trklet::FPGAWord::nbits(), trklet::Settings::NLONGVMBINS(), trklet::Settings::nvmte(), trklet::Globals::ofstream(), edm::print(), alignCSCRings::s, secondphibits_, trklet::ProcessBase::settings_, spTable_, AlCaHLTBitMon_QueryRunRegistry::string, trklet::VMStubTE::stub(), stubpairs_, stubtriplets_, table_, thirdphibits_, thirdvmstubs_, tmpSPTable_, tier0::unique(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), and trklet::Settings::writeTripletTables().

◆ readTables()

void TripletEngine::readTables ( )

Definition at line 433 of file TripletEngine.cc.

433  {
434  ifstream fin;
435  string tableName, word;
436  unsigned num;
437 
438  string tablePath = settings_.tableTREFile();
439  unsigned int finddir = tablePath.find("table_TRE_");
440  tableName = tablePath.substr(0, finddir) + "table_" + name_ + ".txt";
441 
442  fin.open(tableName, ifstream::in);
443  if (!fin) {
444  throw cms::Exception("BadConfig") << "TripletEngine::readTables, file " << tableName << " not known";
445  }
446  while (!fin.eof()) {
447  fin >> word;
448  num = atoi(word.c_str());
449  table_.push_back(num > 0 ? true : false);
450  }
451  fin.close();
452 }

References Exception, groupFilesInBlocks::fin, recoMuon::in, trklet::ProcessBase::name_, EgammaValidation_cff::num, trklet::ProcessBase::settings_, table_, HLT_2018_cff::tableName, and trklet::Settings::tableTREFile().

Referenced by TripletEngine().

◆ writeTables()

void TripletEngine::writeTables ( )

Definition at line 454 of file TripletEngine.cc.

454  {
455  ofstream fout;
456  stringstream tableName;
457 
458  tableName << "table/table_" << name_ << "_" << iSector_ << ".txt";
459 
460  fout.open(tableName.str(), ofstream::out);
461  for (const auto &entry : table_)
462  fout << entry << endl;
463  fout.close();
464 
465  for (const auto &tedName : spTable_) {
466  tableName.str("");
467  tableName << "table/table_" << tedName.first << "_" << name_ << "_" << iSector_ << ".txt";
468 
469  fout.open(tableName.str(), ofstream::out);
470  for (const auto &entry : tedName.second) {
471  for (const auto &spName : entry)
472  fout << spName.first << ":" << spName.second << " ";
473  fout << endl;
474  }
475  fout.close();
476  }
477 }

References mps_splice::entry, groupFilesInBlocks::fout, trklet::ProcessBase::iSector_, trklet::ProcessBase::name_, MillePedeFileConverter_cfg::out, spTable_, table_, and HLT_2018_cff::tableName.

Referenced by ~TripletEngine().

Member Data Documentation

◆ count_

int trklet::TripletEngine::count_
private

Definition at line 33 of file TripletEngine.h.

Referenced by execute().

◆ dct1_

int trklet::TripletEngine::dct1_
private

Definition at line 41 of file TripletEngine.h.

Referenced by TripletEngine().

◆ dct2_

int trklet::TripletEngine::dct2_
private

Definition at line 42 of file TripletEngine.h.

Referenced by TripletEngine().

◆ dct3_

int trklet::TripletEngine::dct3_
private

Definition at line 43 of file TripletEngine.h.

Referenced by TripletEngine().

◆ disk1_

int trklet::TripletEngine::disk1_
private

Definition at line 38 of file TripletEngine.h.

Referenced by TripletEngine().

◆ disk2_

int trklet::TripletEngine::disk2_
private

Definition at line 39 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ disk3_

int trklet::TripletEngine::disk3_
private

Definition at line 40 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ iSeed_

int trklet::TripletEngine::iSeed_
private

Definition at line 66 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ layer1_

int trklet::TripletEngine::layer1_
private

Definition at line 35 of file TripletEngine.h.

Referenced by TripletEngine().

◆ layer2_

int trklet::TripletEngine::layer2_
private

Definition at line 36 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ layer3_

int trklet::TripletEngine::layer3_
private

Definition at line 37 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ phi1_

int trklet::TripletEngine::phi1_
private

Definition at line 44 of file TripletEngine.h.

Referenced by TripletEngine().

◆ phi2_

int trklet::TripletEngine::phi2_
private

Definition at line 45 of file TripletEngine.h.

Referenced by TripletEngine().

◆ phi3_

int trklet::TripletEngine::phi3_
private

Definition at line 46 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r1_

int trklet::TripletEngine::r1_
private

Definition at line 50 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r2_

int trklet::TripletEngine::r2_
private

Definition at line 51 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r3_

int trklet::TripletEngine::r3_
private

Definition at line 52 of file TripletEngine.h.

Referenced by TripletEngine().

◆ secondphibits_

int trklet::TripletEngine::secondphibits_
private

Definition at line 63 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ spTable_

std::map<std::string, std::vector<std::map<std::string, unsigned> > > trklet::TripletEngine::spTable_
private

Definition at line 60 of file TripletEngine.h.

Referenced by execute(), and writeTables().

◆ stubpairs_

std::vector<StubPairsMemory*> trklet::TripletEngine::stubpairs_
private

Definition at line 55 of file TripletEngine.h.

Referenced by addInput(), execute(), and TripletEngine().

◆ stubtriplets_

StubTripletsMemory* trklet::TripletEngine::stubtriplets_
private

Definition at line 57 of file TripletEngine.h.

Referenced by addOutput(), and execute().

◆ table_

std::vector<bool> trklet::TripletEngine::table_
private

Definition at line 61 of file TripletEngine.h.

Referenced by execute(), readTables(), and writeTables().

◆ thirdphibits_

int trklet::TripletEngine::thirdphibits_
private

Definition at line 64 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ thirdvmstubs_

std::vector<VMStubsTEMemory*> trklet::TripletEngine::thirdvmstubs_
private

Definition at line 54 of file TripletEngine.h.

Referenced by addInput(), execute(), and TripletEngine().

◆ tmpSPTable_

std::map<std::string, std::vector<std::vector<std::string> > > trklet::TripletEngine::tmpSPTable_
private

Definition at line 59 of file TripletEngine.h.

Referenced by execute().

◆ z1_

int trklet::TripletEngine::z1_
private

Definition at line 47 of file TripletEngine.h.

Referenced by TripletEngine().

◆ z2_

int trklet::TripletEngine::z2_
private

Definition at line 48 of file TripletEngine.h.

Referenced by TripletEngine().

◆ z3_

int trklet::TripletEngine::z3_
private

Definition at line 49 of file TripletEngine.h.

Referenced by TripletEngine().

mps_fire.i
i
Definition: mps_fire.py:355
trklet::TripletEngine::secondphibits_
int secondphibits_
Definition: TripletEngine.h:63
trklet::Settings::writetrace
bool writetrace() const
Definition: Settings.h:145
start
Definition: start.py:1
input
static const std::string input
Definition: EdmProvDump.cc:48
trklet::TripletEngine::tmpSPTable_
std::map< std::string, std::vector< std::vector< std::string > > > tmpSPTable_
Definition: TripletEngine.h:59
trklet::Settings::writeTripletTables
bool writeTripletTables() const
Definition: Settings.h:160
trklet::VMStubTE
Definition: VMStubTE.h:15
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
mps_splice.entry
entry
Definition: mps_splice.py:68
trklet::TripletEngine::dct3_
int dct3_
Definition: TripletEngine.h:43
trklet::TripletEngine::disk1_
int disk1_
Definition: TripletEngine.h:38
cms::cuda::assert
assert(be >=bs)
trklet::TripletEngine::phi2_
int phi2_
Definition: TripletEngine.h:45
trklet::ProcessBase::nbits
unsigned int nbits(unsigned int power)
Definition: ProcessBase.cc:29
trklet::ProcessBase::settings_
Settings const & settings_
Definition: ProcessBase.h:44
trklet::TripletEngine::layer1_
int layer1_
Definition: TripletEngine.h:35
trklet::TripletEngine::r3_
int r3_
Definition: TripletEngine.h:52
trklet::FPGAWord::nbits
int nbits() const
Definition: FPGAWord.h:25
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
trklet::TripletEngine::z1_
int z1_
Definition: TripletEngine.h:47
trklet::VMStubTE::isPSmodule
bool isPSmodule() const
Definition: VMStubTE.h:31
trklet::TripletEngine::thirdphibits_
int thirdphibits_
Definition: TripletEngine.h:64
trklet::VMStubTE::bend
const FPGAWord & bend() const
Definition: VMStubTE.h:25
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
alignCSCRings.s
s
Definition: alignCSCRings.py:92
dqmdumpme.last
last
Definition: dqmdumpme.py:56
trklet::TripletEngine::disk2_
int disk2_
Definition: TripletEngine.h:39
trklet::Settings::tableTREFile
std::string const & tableTREFile() const
Definition: Settings.h:46
groupFilesInBlocks.fin
fin
Definition: groupFilesInBlocks.py:94
HLT_2018_cff.tableName
tableName
Definition: HLT_2018_cff.py:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
trklet::TripletEngine::layer3_
int layer3_
Definition: TripletEngine.h:37
trklet::FPGAWord
Definition: FPGAWord.h:9
trklet::TripletEngine::r2_
int r2_
Definition: TripletEngine.h:51
trklet::TripletEngine::r1_
int r1_
Definition: TripletEngine.h:50
trklet::TripletEngine::table_
std::vector< bool > table_
Definition: TripletEngine.h:61
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::TripletEngine::thirdvmstubs_
std::vector< VMStubsTEMemory * > thirdvmstubs_
Definition: TripletEngine.h:54
trklet::Settings::NLONGVMBINS
unsigned int NLONGVMBINS() const
Definition: Settings.h:270
trklet::VMStubTE::stub
const Stub * stub() const
Definition: VMStubTE.h:29
recoMuon::in
Definition: RecoMuonEnumerators.h:6
trklet::TripletEngine::spTable_
std::map< std::string, std::vector< std::map< std::string, unsigned > > > spTable_
Definition: TripletEngine.h:60
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
trklet::TripletEngine::count_
int count_
Definition: TripletEngine.h:33
createfilelist.int
int
Definition: createfilelist.py:10
trklet::TripletEngine::stubtriplets_
StubTripletsMemory * stubtriplets_
Definition: TripletEngine.h:57
edm::LogVerbatim
Definition: MessageLogger.h:297
trklet::TripletEngine::readTables
void readTables()
Definition: TripletEngine.cc:433
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
trklet::TripletEngine::phi1_
int phi1_
Definition: TripletEngine.h:44
trklet::TripletEngine::phi3_
int phi3_
Definition: TripletEngine.h:46
trklet::Settings::writeMonitorData
bool writeMonitorData(std::string module) const
Definition: Settings.h:84
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
trklet::Globals::ofstream
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
Exception
Definition: hltDiff.cc:246
trklet::TripletEngine::disk3_
int disk3_
Definition: TripletEngine.h:40
trklet::ProcessBase::getName
std::string const & getName() const
Definition: ProcessBase.h:22
trklet::TripletEngine::z2_
int z2_
Definition: TripletEngine.h:48
trklet::TripletEngine::writeTables
void writeTables()
Definition: TripletEngine.cc:454
trklet::Settings::nvmte
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:76
trklet::ProcessBase::name_
std::string name_
Definition: ProcessBase.h:38
trklet::Settings::nallstubs
unsigned int nallstubs(unsigned int layerdisk) const
Definition: Settings.h:82
trklet::VMStubTE::finephi
const FPGAWord & finephi() const
Definition: VMStubTE.h:23
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::ProcessBase::iSector_
unsigned int iSector_
Definition: ProcessBase.h:39
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:144
trklet::TripletEngine::dct1_
int dct1_
Definition: TripletEngine.h:41
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::Settings::maxStep
unsigned int maxStep(std::string module) const
Definition: Settings.h:91
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::Settings::nfinephi
double nfinephi(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:110
trklet::benddecode
double benddecode(int ibend, bool isPS)
Definition: Util.h:100
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
trklet::TripletEngine::stubpairs_
std::vector< StubPairsMemory * > stubpairs_
Definition: TripletEngine.h:55
trklet::ProcessBase::globals_
Globals * globals_
Definition: ProcessBase.h:45
trklet::ProcessBase::ProcessBase
ProcessBase(std::string name, Settings const &settings, Globals *global, unsigned int iSector)
Definition: ProcessBase.cc:14
trklet::StubTripletsMemory::addStubs
void addStubs(const Stub *stub1, const Stub *stub2, const Stub *stub3)
Definition: StubTripletsMemory.h:20
trklet::TripletEngine::dct2_
int dct2_
Definition: TripletEngine.h:42
trklet::TripletEngine::iSeed_
int iSeed_
Definition: TripletEngine.h:66
trklet::TripletEngine::z3_
int z3_
Definition: TripletEngine.h:49
trklet::TripletEngine::layer2_
int layer2_
Definition: TripletEngine.h:36
memory
Definition: vlib.h:178