CMS 3D CMS Logo

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

#include <TrackletEventProcessor.h>

Public Member Functions

void event (SLHCEvent &ev)
 
void init (Settings const &theSettings)
 
void printSummary ()
 
 TrackletEventProcessor ()
 
std::vector< Track * > & tracks ()
 
 ~TrackletEventProcessor ()
 

Private Attributes

Timer addStubTimer_
 
std::unique_ptr< Cablingcabling_
 
Timer cleanTimer_
 
std::map< std::string, std::vector< int > > dtclayerdisk_
 
int eventnum_ = {0}
 
Timer FTTimer_
 
std::unique_ptr< Globalsglobals_
 
HistBasehistbase_ {}
 
Timer MCTimer_
 
Timer METimer_
 
Timer MPTimer_
 
Timer PDTimer_
 
Timer PRTimer_
 
std::vector< std::unique_ptr< Sector > > sectors_
 
const Settingssettings_ {nullptr}
 
Timer TCDTimer_
 
Timer TCTimer_
 
Timer TEDTimer_
 
Timer TETimer_
 
Timer TPTimer_
 
std::vector< Track * > tracks_
 
Timer TRETimer_
 
Timer VMRouterTimer_
 

Detailed Description

Definition at line 22 of file TrackletEventProcessor.h.

Constructor & Destructor Documentation

◆ TrackletEventProcessor()

TrackletEventProcessor::TrackletEventProcessor ( )

Definition at line 18 of file TrackletEventProcessor.cc.

18 : settings_(nullptr) {}

◆ ~TrackletEventProcessor()

TrackletEventProcessor::~TrackletEventProcessor ( )

Definition at line 20 of file TrackletEventProcessor.cc.

20  {
21  if (settings_ && settings_->bookHistos()) {
22  histbase_->close();
23  }
24 }

References trklet::Settings::bookHistos(), trklet::HistBase::close(), histbase_, and settings_.

Member Function Documentation

◆ event()

void TrackletEventProcessor::event ( SLHCEvent ev)

Definition at line 174 of file TrackletEventProcessor.cc.

174  {
175  globals_->event() = &ev;
176 
177  tracks_.clear();
178 
179  eventnum_++;
180  bool first = (eventnum_ == 1);
181 
182  cleanTimer_.start();
183  for (unsigned int k = 0; k < N_SECTOR; k++) {
184  sectors_[k]->clean();
185  }
186  cleanTimer_.stop();
187 
189 
190  for (int j = 0; j < ev.nstubs(); j++) {
191  L1TStub stub = ev.stub(j);
192 
193  int layer = stub.layer() + 1;
194  int ladder = stub.ladder();
195  int module = stub.module();
196 
197  string dtc = cabling_->dtc(layer, ladder, module);
198  string dtcbase = dtc.substr(2, dtc.size() - 2);
199  if (dtc[0] == 'n') {
200  dtcbase = dtc.substr(0, 4) + dtc.substr(6, dtc.size() - 6);
201  }
202 
203  cabling_->addphi(dtc, stub.phi(), layer, module);
204 
205  double phi = angle0to2pi::make0To2pi(stub.phi() + 0.5 * settings_->dphisectorHG());
206 
207  unsigned int isector = N_SECTOR * phi / (2 * M_PI);
208 
209  for (unsigned int k = 0; k < N_SECTOR; k++) {
210  int diff = k - isector;
211  if (diff > (int)N_SECTOR / 2)
212  diff -= (int)N_SECTOR;
213  if (diff < (-1) * (int)N_SECTOR / 2)
214  diff += (int)N_SECTOR;
215  if (abs(diff) > 1)
216  continue;
217  double phiminsect =
218  k * 2 * M_PI / N_SECTOR - 0.5 * (settings_->dphisectorHG() - 2 * M_PI / N_SECTOR) - M_PI / N_SECTOR;
219  double dphi = stub.phi() - phiminsect;
220  if (dphi > M_PI)
221  dphi -= 2 * M_PI;
222  while (dphi < 0.0)
223  dphi += 2 * M_PI;
224  if (dphi > settings_->dphisectorHG())
225  continue;
226  bool add = sectors_[k]->addStub(stub, dtcbase);
227 
228  static std::map<string, ofstream*> dtcstubs;
229 
230  if (settings_->writeMem()) {
231  vector<string> dtcs = cabling_->DTCs();
232  for (const auto& dtc : dtcs) {
233  string dtcbase = dtc.substr(2, dtc.size() - 2);
234  if (dtc[0] == 'n') {
235  dtcbase = dtc.substr(0, 4) + dtc.substr(6, dtc.size() - 6);
236  }
237 
238  const string dirIS = settings_->memPath() + "InputStubs/";
239  string fname = dirIS + "Link_";
240  fname += dtcbase;
241  if (dtcstubs.find(dtcbase + "A") != dtcstubs.end())
242  continue;
243  fname += "_A.dat";
244 
245  if (not std::filesystem::exists(dirIS)) {
246  int fail = system((string("mkdir -p ") + dirIS).c_str());
247  if (fail)
248  throw cms::Exception("BadDir") << __FILE__ << " " << __LINE__ << " could not create directory " << dirIS;
249  }
250 
251  ofstream* out = new ofstream;
252  out->open(fname);
253  if (out->fail())
254  throw cms::Exception("BadFile") << __FILE__ << " " << __LINE__ << " could not create file " << fname;
255  dtcstubs[dtcbase + "A"] = out;
256 
257  fname = dirIS + "Link_";
258  fname += dtcbase;
259  if (dtcstubs.find(dtcbase + "B") != dtcstubs.end())
260  continue;
261  fname += "_B.dat";
262  out = new ofstream;
263  out->open(fname);
264  if (out->fail())
265  throw cms::Exception("BadFile") << __FILE__ << " " << __LINE__ << " could not create file " << fname;
266  dtcstubs[dtcbase + "B"] = out;
267  }
268 
269  static int oldevent = -1;
270  if (eventnum_ != oldevent) {
271  oldevent = eventnum_;
272  for (auto& dtcstub : dtcstubs) {
273  FPGAWord tmp;
274  tmp.set(eventnum_ % 8, 3);
275  (*(dtcstub.second)) << "BX " << tmp.str() << " Event : " << eventnum_ + 1 << endl;
276  }
277  }
278  }
279 
280  if (add && settings_->writeMem() && k == settings_->writememsect()) {
281  Stub fpgastub(stub, *settings_, sectors_[k]->phimin(), sectors_[k]->phimax());
282  FPGAWord phi = fpgastub.phi();
283  int topbit = phi.value() >> (phi.nbits() - 1);
284  std::vector<int> tmp = dtclayerdisk_[dtcbase];
285  int layerdisk = stub.layer() + 1;
286  if (layerdisk > 999) {
287  layerdisk = 10 + abs(stub.disk());
288  }
289  int layerdiskcode = -1;
290  for (unsigned int i = 0; i < tmp.size(); i++) {
291  if (tmp[i] == layerdisk)
292  layerdiskcode = i;
293  }
294  if (layerdiskcode == -1) {
295  edm::LogVerbatim("Tracklet") << "dtcbase layerdisk layer disk : " << dtcbase << " " << layerdisk << " "
296  << stub.layer() + 1 << " " << stub.disk();
297  }
298  assert(layerdiskcode >= 0);
299  assert(layerdiskcode < 4);
300  FPGAWord ldcode;
301  ldcode.set(layerdiskcode, 2);
302  string dataword = fpgastub.str() + "|" + ldcode.str() + "|1";
303  if (topbit == 0) {
304  (*dtcstubs[dtcbase + "A"]) << dataword << " " << trklet::hexFormat(dataword) << endl;
305  } else {
306  (*dtcstubs[dtcbase + "B"]) << dataword << " " << trklet::hexFormat(dataword) << endl;
307  }
308  }
309  }
310  }
311 
313 
314  // ----------------------------------------------------------------------------------------
315  // Now start the tracklet processing
316 
317  // VM router
319  for (unsigned int k = 0; k < N_SECTOR; k++) {
320  sectors_[k]->executeVMR();
321  if (settings_->writeMem() && k == settings_->writememsect()) {
322  sectors_[k]->writeInputStubs(first);
323  sectors_[k]->writeVMSTE(first);
324  sectors_[k]->writeVMSME(first);
325  sectors_[k]->writeAS(first);
326  }
327  }
329 
330  // tracklet engine
331  TETimer_.start();
332  for (unsigned int k = 0; k < N_SECTOR; k++) {
333  sectors_[k]->executeTE();
334  }
335  TETimer_.stop();
336 
337  // tracklet engine displaced
338  TEDTimer_.start();
339  for (unsigned int k = 0; k < N_SECTOR; k++) {
340  sectors_[k]->executeTED();
341  }
342  TEDTimer_.stop();
343 
344  // triplet engine
345  TRETimer_.start();
346  for (unsigned int k = 0; k < N_SECTOR; k++) {
347  sectors_[k]->executeTRE();
348  if (settings_->writeMem() && k == settings_->writememsect()) {
349  sectors_[k]->writeST(first);
350  }
351  }
352  TRETimer_.stop();
353 
354  // tracklet processor (alternative implementation to TE+TC)
355  TPTimer_.start();
356  for (unsigned int k = 0; k < N_SECTOR; k++) {
357  sectors_[k]->executeTP();
358  }
359  TPTimer_.stop();
360 
361  for (unsigned int k = 0; k < N_SECTOR; k++) {
362  if (settings_->writeMem() && k == settings_->writememsect()) {
363  sectors_[k]->writeSP(first);
364  }
365  }
366 
367  // tracklet calculator
368  TCTimer_.start();
369  for (unsigned int k = 0; k < N_SECTOR; k++) {
370  sectors_[k]->executeTC();
371  }
372  TCTimer_.stop();
373 
374  int nTP = globals_->event()->nsimtracks();
375  for (int iTP = 0; iTP < nTP; iTP++) {
376  L1SimTrack simtrk = globals_->event()->simtrack(iTP);
377  if (simtrk.pt() < 2.0)
378  continue;
379  if (std::abs(simtrk.vz()) > 15.0)
380  continue;
381  if (hypot(simtrk.vx(), simtrk.vy()) > 0.1)
382  continue;
383  bool electron = (abs(simtrk.type()) == 11);
384  bool muon = (abs(simtrk.type()) == 13);
385  bool pion = (abs(simtrk.type()) == 211);
386  bool kaon = (abs(simtrk.type()) == 321);
387  bool proton = (abs(simtrk.type()) == 2212);
388  if (!(electron || muon || pion || kaon || proton))
389  continue;
390  int nlayers = 0;
391  int ndisks = 0;
392  int simtrackid = simtrk.trackid();
393  unsigned int hitmask = ev.layersHit(simtrackid, nlayers, ndisks);
394  if (nlayers + ndisks < 4)
395  continue;
396 
397  if (settings_->writeMonitorData("HitEff")) {
398  static ofstream outhit("hiteff.txt");
399  outhit << simtrk.eta() << " " << (hitmask & 1) << " " << (hitmask & 2) << " " << (hitmask & 4) << " "
400  << (hitmask & 8) << " " << (hitmask & 16) << " " << (hitmask & 32) << " " << (hitmask & 64) << " "
401  << (hitmask & 128) << " " << (hitmask & 256) << " " << (hitmask & 512) << " " << (hitmask & 1024) << endl;
402  }
403 
404  std::unordered_set<int> matchseed;
405  for (unsigned int k = 0; k < N_SECTOR; k++) {
406  std::unordered_set<int> matchseedtmp = sectors_[k]->seedMatch(iTP);
407  matchseed.insert(matchseedtmp.begin(), matchseedtmp.end());
408  }
409  if (settings_->bookHistos()) {
410  for (int iseed = 0; iseed < 8; iseed++) {
411  bool eff = matchseed.find(iseed) != matchseed.end();
412  globals_->histograms()->fillSeedEff(iseed, simtrk.eta(), eff);
413  }
414  }
415  }
416 
417  // tracklet calculator displaced
418  TCDTimer_.start();
419  for (unsigned int k = 0; k < N_SECTOR; k++) {
420  sectors_[k]->executeTCD();
421  }
422  TCDTimer_.stop();
423 
424  for (unsigned int k = 0; k < N_SECTOR; k++) {
425  if (settings_->writeMem() && k == settings_->writememsect()) {
426  sectors_[k]->writeTPAR(first);
427  sectors_[k]->writeTPROJ(first);
428  }
429  }
430 
431  // projection router
432  PRTimer_.start();
433  for (unsigned int k = 0; k < N_SECTOR; k++) {
434  sectors_[k]->executePR();
435  if (settings_->writeMem() && k == settings_->writememsect()) {
436  sectors_[k]->writeVMPROJ(first);
437  sectors_[k]->writeAP(first);
438  }
439  }
440  PRTimer_.stop();
441 
442  // match engine
443  METimer_.start();
444  for (unsigned int k = 0; k < N_SECTOR; k++) {
445  sectors_[k]->executeME();
446  if (settings_->writeMem() && k == settings_->writememsect()) {
447  sectors_[k]->writeCM(first);
448  }
449  }
450  METimer_.stop();
451 
452  // match calculator
453  MCTimer_.start();
454  for (unsigned int k = 0; k < N_SECTOR; k++) {
455  sectors_[k]->executeMC();
456  }
457  MCTimer_.stop();
458 
459  // match processor (alternative to ME+MC)
460  MPTimer_.start();
461  for (unsigned int k = 0; k < N_SECTOR; k++) {
462  sectors_[k]->executeMP();
463  }
464  MPTimer_.stop();
465 
466  for (unsigned int k = 0; k < N_SECTOR; k++) {
467  if (settings_->writeMem() && k == settings_->writememsect()) {
468  sectors_[k]->writeMC(first);
469  }
470  }
471 
472  // fit track
473  FTTimer_.start();
474  for (unsigned int k = 0; k < N_SECTOR; k++) {
475  sectors_[k]->executeFT();
476 #ifndef USEHYBRID //don't try to print these memories if running hybrid
477  if ((settings_->writeMem() || settings_->writeMonitorData("IFit")) && k == settings_->writememsect()) {
478  sectors_[k]->writeTF(first);
479  }
480 #endif
481  }
482  FTTimer_.stop();
483 
484  // purge duplicate
485  PDTimer_.start();
486  for (unsigned int k = 0; k < N_SECTOR; k++) {
487  sectors_[k]->executePD(tracks_);
488 #ifndef USEHYBRID //don't try to print these memories if running hybrid
489  if (((settings_->writeMem() || settings_->writeMonitorData("IFit")) && k == settings_->writememsect()) ||
490  settings_->writeMonitorData("CT")) {
491  sectors_[k]->writeCT(first);
492  }
493 #endif
494  }
495  PDTimer_.stop();
496 }

References funct::abs(), PVValHelper::add(), addStubTimer_, cms::cuda::assert(), trklet::Settings::bookHistos(), cabling_, cleanTimer_, change_name::diff, trklet::L1TStub::disk(), trklet::Settings::dphisectorHG(), dtclayerdisk_, metsig::electron, trklet::L1SimTrack::eta(), ev, eventnum_, Exception, first, alignmentValidation::fname, FTTimer_, globals_, trklet::hexFormat(), mps_fire::i, createfilelist::int, iseed, dqmiolumiharvest::j, dqmdumpme::k, trklet::L1TStub::ladder(), PVValHelper::ladder, trklet::L1TStub::layer(), phase1PixelTopology::layer, M_PI, angle0to2pi::make0To2pi(), MCTimer_, trklet::Settings::memPath(), METimer_, trklet::L1TStub::module(), MPTimer_, trklet::N_SECTOR, nlayers, MillePedeFileConverter_cfg::out, PDTimer_, trklet::Stub::phi(), trklet::L1TStub::phi(), phimax, phimin, PRTimer_, trklet::L1SimTrack::pt(), sectors_, trklet::FPGAWord::set(), settings_, trklet::Timer::start(), trklet::Timer::stop(), trklet::FPGAWord::str(), trklet::Stub::str(), TCDTimer_, TCTimer_, TEDTimer_, TETimer_, createJobs::tmp, TPTimer_, trklet::L1SimTrack::trackid(), tracks_, TRETimer_, trklet::L1SimTrack::type(), VMRouterTimer_, trklet::L1SimTrack::vx(), trklet::L1SimTrack::vy(), trklet::L1SimTrack::vz(), trklet::Settings::writeMem(), trklet::Settings::writememsect(), and trklet::Settings::writeMonitorData().

Referenced by L1FPGATrackProducer::produce().

◆ init()

void TrackletEventProcessor::init ( Settings const &  theSettings)

Definition at line 26 of file TrackletEventProcessor.cc.

26  {
27  settings_ = &theSettings;
28 
29  globals_ = make_unique<Globals>(*settings_);
30 
31  //Verify consistency
32  if (settings_->kphi0pars() != globals_->ITC_L1L2()->phi0_final.K()) {
33  throw cms::Exception("Inconsistency") << "phi0 conversion parameter inconsistency\n";
34  }
35 
36  if (settings_->krinvpars() != globals_->ITC_L1L2()->rinv_final.K()) {
37  throw cms::Exception("Inconsistency") << "ring conversion parameter inconsistency\n";
38  }
39 
40  if (settings_->ktpars() != globals_->ITC_L1L2()->t_final.K()) {
41  throw cms::Exception("Inconsistency") << "t conversion parameter inconsistency\n";
42  }
43 
44  if (settings_->debugTracklet()) {
45  edm::LogVerbatim("Tracklet") << "========================================================= \n"
46  << "Conversion factors for global coordinates: \n"
47  << "z kz = " << settings_->kz() << "\n"
48  << "r kr = " << settings_->kr() << "\n"
49  << "phi kphi1 = " << settings_->kphi1() << "\n"
50  << "========================================================= \n"
51  << "Conversion factors for track(let) parameters: \n"
52  << "rinv krinvpars = " << settings_->krinvpars() << "\n"
53  << "phi0 kphi0pars = " << settings_->kphi0pars() << "\n"
54  << "d0 kd0pars = " << settings_->kd0pars() << "\n"
55  << "t ktpars = " << settings_->ktpars() << "\n"
56  << "z0 kz0pars = " << settings_->kz0pars() << "\n"
57  << "========================================================= \n"
58  << "phi0bitshift = " << settings_->phi0bitshift() << "\n"
59  << "d0bitshift = ??? \n"
60  << "=========================================================";
61  }
62 
63  if (settings_->bookHistos()) {
64  histbase_ = new HistBase;
65  histbase_->open();
70 
71  globals_->histograms() = histbase_;
72  }
73 
74  // create the sector processors (1 sector processor = 1 board)
75  sectors_.resize(N_SECTOR);
76 
77  for (unsigned int i = 0; i < N_SECTOR; i++) {
78  sectors_[i] = make_unique<Sector>(i, *settings_, globals_.get());
79  }
80 
81  // get the memory modules
82  if (settings_->debugTracklet()) {
83  edm::LogVerbatim("Tracklet") << "Will read memory modules file";
84  }
85 
86  ifstream inmem(settings_->memoryModulesFile().c_str());
87  assert(inmem.good());
88 
89  while (inmem.good()) {
90  string memType, memName, size;
91  inmem >> memType >> memName >> size;
92  if (!inmem.good())
93  continue;
94  if (settings_->writetrace()) {
95  edm::LogVerbatim("Tracklet") << "Read memory: " << memType << " " << memName;
96  }
97  for (auto& sector : sectors_) {
98  sector->addMem(memType, memName);
99  }
100  }
101 
102  // get the processing modules
103  if (settings_->debugTracklet()) {
104  edm::LogVerbatim("Tracklet") << "Will read processing modules file";
105  }
106 
107  ifstream inproc(settings_->processingModulesFile().c_str());
108  assert(inproc.good());
109 
110  while (inproc.good()) {
111  string procType, procName;
112  inproc >> procType >> procName;
113  if (!inproc.good())
114  continue;
115  if (settings_->writetrace()) {
116  edm::LogVerbatim("Tracklet") << "Read process: " << procType << " " << procName;
117  }
118  for (auto& sector : sectors_) {
119  sector->addProc(procType, procName);
120  }
121  }
122 
123  // get the wiring information
124  if (settings_->debugTracklet()) {
125  edm::LogVerbatim("Tracklet") << "Will read wiring information";
126  }
127 
128  ifstream inwire(settings_->wiresFile().c_str());
129  assert(inwire.good());
130 
131  while (inwire.good()) {
132  string line;
133  getline(inwire, line);
134  if (!inwire.good())
135  continue;
136  if (settings_->writetrace()) {
137  edm::LogVerbatim("Tracklet") << "Line : " << line;
138  }
139  stringstream ss(line);
140  string mem, tmp1, procin, tmp2, procout;
141  ss >> mem >> tmp1 >> procin;
142  if (procin == "output=>") {
143  procin = "";
144  ss >> procout;
145  } else {
146  ss >> tmp2 >> procout;
147  }
148 
149  for (auto& sector : sectors_) {
150  sector->addWire(mem, procin, procout);
151  }
152  }
153 
154  // get the DTC/cabling information
155  ifstream indtc(settings_->DTCLinkLayerDiskFile());
156  assert(indtc.good());
157  string dtc;
158  indtc >> dtc;
159  while (indtc.good()) {
160  vector<int> tmp;
161  dtclayerdisk_[dtc] = tmp;
162  int layerdisk;
163  indtc >> layerdisk;
164  while (layerdisk > 0) {
165  dtclayerdisk_[dtc].push_back(layerdisk);
166  indtc >> layerdisk;
167  }
168  indtc >> dtc;
169  }
170 
171  cabling_ = make_unique<Cabling>(settings_->DTCLinkFile(), settings_->moduleCablingFile(), *settings_);
172 }

References cms::cuda::assert(), trklet::HistBase::bookDiskResidual(), trklet::Settings::bookHistos(), trklet::HistBase::bookLayerResidual(), trklet::HistBase::bookSeedEff(), trklet::HistBase::bookTrackletParams(), cabling_, trklet::Settings::debugTracklet(), dtclayerdisk_, trklet::Settings::DTCLinkFile(), trklet::Settings::DTCLinkLayerDiskFile(), Exception, globals_, histbase_, mps_fire::i, trklet::Settings::kd0pars(), trklet::Settings::kphi0pars(), trklet::Settings::kphi1(), trklet::Settings::kr(), trklet::Settings::krinvpars(), trklet::Settings::ktpars(), trklet::Settings::kz(), trklet::Settings::kz0pars(), mps_splice::line, mem, trklet::Settings::memoryModulesFile(), trklet::Settings::moduleCablingFile(), trklet::N_SECTOR, trklet::HistBase::open(), trklet::Settings::phi0bitshift(), trklet::Settings::processingModulesFile(), sectors_, settings_, findQualityFiles::size, contentValuesCheck::ss, createJobs::tmp, trklet::Settings::wiresFile(), and trklet::Settings::writetrace().

Referenced by L1FPGATrackProducer::beginRun().

◆ printSummary()

void TrackletEventProcessor::printSummary ( )

Definition at line 498 of file TrackletEventProcessor.cc.

498  {
499  if (settings_->writeMonitorData("Cabling")) {
500  cabling_->writephirange();
501  }
502 
503  if (settings_->bookHistos()) {
504  globals_->histograms()->close();
505  }
506 
507  edm::LogVerbatim("Tracklet") << "Process Times called Average time (ms) Total time (s)"
508  << "\n"
509  << "Cleaning " << setw(10) << cleanTimer_.ntimes() << setw(20)
510  << setprecision(3) << cleanTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
511  << cleanTimer_.tottime() << "\n"
512  << "Add Stubs " << setw(10) << addStubTimer_.ntimes() << setw(20)
513  << setprecision(3) << addStubTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
514  << addStubTimer_.tottime() << "\n"
515  << "VMRouter " << setw(10) << VMRouterTimer_.ntimes() << setw(20)
516  << setprecision(3) << VMRouterTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
517  << VMRouterTimer_.tottime();
518  if (settings_->combined()) {
519  edm::LogVerbatim("Tracklet") << "TrackletProcessor " << setw(10) << TPTimer_.ntimes() << setw(20)
520  << setprecision(3) << TPTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
521  << TPTimer_.tottime() << "\n"
522  << "MatchProcessor " << setw(10) << MPTimer_.ntimes() << setw(20)
523  << setprecision(3) << MPTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
524  << MPTimer_.tottime();
525  } else {
526  edm::LogVerbatim("Tracklet")
527  << "TrackletEngine " << setw(10) << TETimer_.ntimes() << setw(20) << setprecision(3)
528  << TETimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << TETimer_.tottime() << "\n"
529  << "TrackletEngineDisplaced" << setw(10) << TEDTimer_.ntimes() << setw(20) << setprecision(3)
530  << TEDTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << TEDTimer_.tottime() << "\n"
531  << "TripletEngine " << setw(10) << TRETimer_.ntimes() << setw(20) << setprecision(3)
532  << TRETimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << TRETimer_.tottime() << "\n"
533  << "TrackletCalculator " << setw(10) << TCTimer_.ntimes() << setw(20) << setprecision(3)
534  << TCTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << TCTimer_.tottime() << "\n"
535  << "TrackletCalculatorDisplaced" << setw(10) << TCDTimer_.ntimes() << setw(20) << setprecision(3)
536  << TCDTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << TCDTimer_.tottime() << "\n"
537  << "ProjectionRouter " << setw(10) << PRTimer_.ntimes() << setw(20) << setprecision(3)
538  << PRTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << PRTimer_.tottime() << "\n"
539  << "MatchEngine " << setw(10) << METimer_.ntimes() << setw(20) << setprecision(3)
540  << METimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << METimer_.tottime() << "\n"
541  << "MatchCalculator " << setw(10) << MCTimer_.ntimes() << setw(20) << setprecision(3)
542  << MCTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3) << MCTimer_.tottime();
543  }
544  edm::LogVerbatim("Tracklet") << "FitTrack " << setw(10) << FTTimer_.ntimes() << setw(20)
545  << setprecision(3) << FTTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
546  << FTTimer_.tottime() << "\n"
547  << "PurgeDuplicate " << setw(10) << PDTimer_.ntimes() << setw(20)
548  << setprecision(3) << PDTimer_.avgtime() * 1000.0 << setw(20) << setprecision(3)
549  << PDTimer_.tottime();
550 }

References addStubTimer_, trklet::Timer::avgtime(), trklet::Settings::bookHistos(), cabling_, cleanTimer_, trklet::Settings::combined(), FTTimer_, globals_, MCTimer_, METimer_, MPTimer_, trklet::Timer::ntimes(), PDTimer_, PRTimer_, settings_, TCDTimer_, TCTimer_, TEDTimer_, TETimer_, trklet::Timer::tottime(), TPTimer_, TRETimer_, VMRouterTimer_, and trklet::Settings::writeMonitorData().

◆ tracks()

std::vector<Track*>& trklet::TrackletEventProcessor::tracks ( void  )
inline

Definition at line 34 of file TrackletEventProcessor.h.

34 { return tracks_; }

References tracks_.

Referenced by L1FPGATrackProducer::produce().

Member Data Documentation

◆ addStubTimer_

Timer trklet::TrackletEventProcessor::addStubTimer_
private

Definition at line 50 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ cabling_

std::unique_ptr<Cabling> trklet::TrackletEventProcessor::cabling_
private

Definition at line 47 of file TrackletEventProcessor.h.

Referenced by event(), init(), and printSummary().

◆ cleanTimer_

Timer trklet::TrackletEventProcessor::cleanTimer_
private

Definition at line 49 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ dtclayerdisk_

std::map<std::string, std::vector<int> > trklet::TrackletEventProcessor::dtclayerdisk_
private

Definition at line 67 of file TrackletEventProcessor.h.

Referenced by event(), and init().

◆ eventnum_

int trklet::TrackletEventProcessor::eventnum_ = {0}
private

Definition at line 45 of file TrackletEventProcessor.h.

Referenced by event().

◆ FTTimer_

Timer trklet::TrackletEventProcessor::FTTimer_
private

Definition at line 62 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ globals_

std::unique_ptr<Globals> trklet::TrackletEventProcessor::globals_
private

Definition at line 39 of file TrackletEventProcessor.h.

Referenced by event(), init(), and printSummary().

◆ histbase_

HistBase* trklet::TrackletEventProcessor::histbase_ {}
private

Definition at line 43 of file TrackletEventProcessor.h.

Referenced by init(), and ~TrackletEventProcessor().

◆ MCTimer_

Timer trklet::TrackletEventProcessor::MCTimer_
private

Definition at line 60 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ METimer_

Timer trklet::TrackletEventProcessor::METimer_
private

Definition at line 59 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ MPTimer_

Timer trklet::TrackletEventProcessor::MPTimer_
private

Definition at line 61 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ PDTimer_

Timer trklet::TrackletEventProcessor::PDTimer_
private

Definition at line 63 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ PRTimer_

Timer trklet::TrackletEventProcessor::PRTimer_
private

Definition at line 58 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ sectors_

std::vector<std::unique_ptr<Sector> > trklet::TrackletEventProcessor::sectors_
private

Definition at line 41 of file TrackletEventProcessor.h.

Referenced by event(), and init().

◆ settings_

const Settings* trklet::TrackletEventProcessor::settings_ {nullptr}
private

Definition at line 37 of file TrackletEventProcessor.h.

Referenced by event(), init(), printSummary(), and ~TrackletEventProcessor().

◆ TCDTimer_

Timer trklet::TrackletEventProcessor::TCDTimer_
private

Definition at line 57 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ TCTimer_

Timer trklet::TrackletEventProcessor::TCTimer_
private

Definition at line 56 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ TEDTimer_

Timer trklet::TrackletEventProcessor::TEDTimer_
private

Definition at line 53 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ TETimer_

Timer trklet::TrackletEventProcessor::TETimer_
private

Definition at line 52 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ TPTimer_

Timer trklet::TrackletEventProcessor::TPTimer_
private

Definition at line 55 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ tracks_

std::vector<Track*> trklet::TrackletEventProcessor::tracks_
private

Definition at line 65 of file TrackletEventProcessor.h.

Referenced by event(), and tracks().

◆ TRETimer_

Timer trklet::TrackletEventProcessor::TRETimer_
private

Definition at line 54 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

◆ VMRouterTimer_

Timer trklet::TrackletEventProcessor::VMRouterTimer_
private

Definition at line 51 of file TrackletEventProcessor.h.

Referenced by event(), and printSummary().

change_name.diff
diff
Definition: change_name.py:13
trklet::Settings::writeMem
bool writeMem() const
Definition: Settings.h:167
trklet::TrackletEventProcessor::TRETimer_
Timer TRETimer_
Definition: TrackletEventProcessor.h:54
trklet::HistBase::bookDiskResidual
virtual void bookDiskResidual()
Definition: HistBase.h:26
mps_fire.i
i
Definition: mps_fire.py:428
trklet::Settings::writetrace
bool writetrace() const
Definition: Settings.h:162
trklet::L1SimTrack::vy
double vy() const
Definition: SLHCEvent.h:32
trklet::HistBase::bookTrackletParams
virtual void bookTrackletParams()
Definition: HistBase.h:27
trklet::L1TStub::ladder
unsigned int ladder() const
Definition: L1TStub.h:51
trklet::FPGAWord::str
std::string str() const
Definition: FPGAWord.cc:54
trklet::Settings::ktpars
double ktpars() const
Definition: Settings.h:355
muon
Definition: MuonCocktails.h:17
trklet::L1TStub::layer
unsigned int layer() const
Definition: L1TStub.h:44
trklet::Settings::krinvpars
double krinvpars() const
Definition: Settings.h:350
trklet::TrackletEventProcessor::TETimer_
Timer TETimer_
Definition: TrackletEventProcessor.h:52
trklet::L1SimTrack::type
int type() const
Definition: SLHCEvent.h:27
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
trklet::TrackletEventProcessor::TCTimer_
Timer TCTimer_
Definition: TrackletEventProcessor.h:56
trklet::TrackletEventProcessor::eventnum_
int eventnum_
Definition: TrackletEventProcessor.h:45
trklet::N_SECTOR
constexpr unsigned int N_SECTOR
Definition: Settings.h:17
trklet::L1TStub
Definition: L1TStub.h:12
trklet::Settings::writememsect
unsigned int writememsect() const
Definition: Settings.h:177
trklet::TrackletEventProcessor::settings_
const Settings * settings_
Definition: TrackletEventProcessor.h:37
trklet::Settings::memPath
std::string const & memPath() const
Definition: Settings.h:169
cms::cuda::assert
assert(be >=bs)
trklet::FPGAWord::set
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
Definition: FPGAWord.cc:14
trklet::L1SimTrack
Definition: SLHCEvent.h:16
trklet::L1SimTrack::vz
double vz() const
Definition: SLHCEvent.h:33
trklet::Timer::avgtime
double avgtime() const
Definition: Timer.h:18
trklet::TrackletEventProcessor::MCTimer_
Timer MCTimer_
Definition: TrackletEventProcessor.h:60
trklet::TrackletEventProcessor::sectors_
std::vector< std::unique_ptr< Sector > > sectors_
Definition: TrackletEventProcessor.h:41
trklet::Settings::kphi1
double kphi1() const
Definition: Settings.h:268
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
mem
uint16_t mem[nChs][nEvts]
Definition: recycleTccEmu.cc:13
trklet::TrackletEventProcessor::addStubTimer_
Timer addStubTimer_
Definition: TrackletEventProcessor.h:50
trklet::Settings::kz0pars
double kz0pars() const
Definition: Settings.h:356
trklet::Settings::bookHistos
bool bookHistos() const
Definition: Settings.h:184
trklet::HistBase
Definition: HistBase.h:16
trklet::TrackletEventProcessor::MPTimer_
Timer MPTimer_
Definition: TrackletEventProcessor.h:61
trklet::Settings::combined
bool combined() const
Definition: Settings.h:227
trklet::TrackletEventProcessor::cabling_
std::unique_ptr< Cabling > cabling_
Definition: TrackletEventProcessor.h:47
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
trklet::L1SimTrack::trackid
int trackid() const
Definition: SLHCEvent.h:26
trklet::TrackletEventProcessor::VMRouterTimer_
Timer VMRouterTimer_
Definition: TrackletEventProcessor.h:51
trklet::HistBase::open
virtual void open()
Definition: HistBase.h:22
trklet::Settings::wiresFile
std::string const & wiresFile() const
Definition: Settings.h:51
trklet::Settings::dphisectorHG
double dphisectorHG() const
Definition: Settings.h:251
trklet::Stub
Definition: Stub.h:16
trklet::TrackletEventProcessor::tracks_
std::vector< Track * > tracks_
Definition: TrackletEventProcessor.h:65
trklet::TrackletEventProcessor::TPTimer_
Timer TPTimer_
Definition: TrackletEventProcessor.h:55
trklet::TrackletEventProcessor::cleanTimer_
Timer cleanTimer_
Definition: TrackletEventProcessor.h:49
trklet::Timer::ntimes
unsigned int ntimes() const
Definition: Timer.h:17
metsig::electron
Definition: SignAlgoResolutions.h:48
trklet::Timer::start
void start()
Definition: Timer.cc:5
trklet::Settings::memoryModulesFile
std::string const & memoryModulesFile() const
Definition: Settings.h:50
trklet::L1TStub::module
unsigned int module() const
Definition: L1TStub.h:52
trklet::TrackletEventProcessor::histbase_
HistBase * histbase_
Definition: TrackletEventProcessor.h:43
trklet::HistBase::bookLayerResidual
virtual void bookLayerResidual()
Definition: HistBase.h:25
trklet::Settings::kd0pars
double kd0pars() const
Definition: Settings.h:357
dqmdumpme.k
k
Definition: dqmdumpme.py:60
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
trklet::FPGAWord
Definition: FPGAWord.h:9
trklet::TrackletEventProcessor::globals_
std::unique_ptr< Globals > globals_
Definition: TrackletEventProcessor.h:39
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
trklet::Settings::kr
double kr() const
Definition: Settings.h:271
trklet::Settings::DTCLinkLayerDiskFile
std::string const & DTCLinkLayerDiskFile() const
Definition: Settings.h:47
iseed
int iseed
Definition: AMPTWrapper.h:134
trklet::Settings::kphi0pars
double kphi0pars() const
Definition: Settings.h:354
PVValHelper::phi
Definition: PVValidationHelpers.h:69
trklet::L1SimTrack::pt
double pt() const
Definition: SLHCEvent.h:28
trklet::Timer::stop
void stop()
Definition: Timer.cc:6
trklet::L1SimTrack::eta
double eta() const
Definition: SLHCEvent.h:29
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
trklet::TrackletEventProcessor::METimer_
Timer METimer_
Definition: TrackletEventProcessor.h:59
createfilelist.int
int
Definition: createfilelist.py:10
trklet::L1TStub::disk
int disk() const
Definition: L1TStub.h:45
trklet::TrackletEventProcessor::PRTimer_
Timer PRTimer_
Definition: TrackletEventProcessor.h:58
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
trklet::TrackletEventProcessor::TCDTimer_
Timer TCDTimer_
Definition: TrackletEventProcessor.h:57
trklet::HistBase::close
virtual void close()
Definition: HistBase.h:23
trklet::HistBase::bookSeedEff
virtual void bookSeedEff()
Definition: HistBase.h:28
trklet::Timer::tottime
double tottime() const
Definition: Timer.h:20
angle0to2pi::make0To2pi
constexpr valType make0To2pi(valType angle)
Definition: deltaPhi.h:67
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
alignmentValidation.fname
string fname
main script
Definition: alignmentValidation.py:959
trklet::Settings::writeMonitorData
bool writeMonitorData(std::string module) const
Definition: Settings.h:96
trklet::TrackletEventProcessor::TEDTimer_
Timer TEDTimer_
Definition: TrackletEventProcessor.h:53
trklet::Settings::DTCLinkFile
std::string DTCLinkFile() const
Definition: Settings.h:45
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
trklet::Settings::moduleCablingFile
std::string const & moduleCablingFile() const
Definition: Settings.h:46
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:245
PVValHelper::ladder
Definition: PVValidationHelpers.h:73
trklet::Settings::kz
double kz() const
Definition: Settings.h:270
trklet::Settings::phi0bitshift
int phi0bitshift() const
Definition: Settings.h:329
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:161
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:15
trklet::TrackletEventProcessor::PDTimer_
Timer PDTimer_
Definition: TrackletEventProcessor.h:63
trklet::L1SimTrack::vx
double vx() const
Definition: SLHCEvent.h:31
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::Settings::processingModulesFile
std::string const & processingModulesFile() const
Definition: Settings.h:49
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
mps_splice.line
line
Definition: mps_splice.py:76
trklet::TrackletEventProcessor::dtclayerdisk_
std::map< std::string, std::vector< int > > dtclayerdisk_
Definition: TrackletEventProcessor.h:67
trklet::TrackletEventProcessor::FTTimer_
Timer FTTimer_
Definition: TrackletEventProcessor.h:62
trklet::L1TStub::phi
double phi() const
Definition: L1TStub.h:62
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
nlayers
Definition: HIMultiTrackSelector.h:48