30 globals_ = make_unique<Globals>(*settings_);
34 throw cms::Exception(
"Inconsistency") <<
"phi0 conversion parameter inconsistency\n";
38 throw cms::Exception(
"Inconsistency") <<
"ring conversion parameter inconsistency\n";
42 throw cms::Exception(
"Inconsistency") <<
"t conversion parameter inconsistency\n";
52 edm::LogVerbatim(
"Tracklet") <<
"========================================================= \n" 53 <<
"Conversion factors for global coordinates: \n" 57 <<
"========================================================= \n" 58 <<
"Conversion factors for track(let) parameters: \n" 64 <<
"========================================================= \n" 66 <<
"d0bitshift = ??? \n" 67 <<
"=========================================================";
104 config.writeAll(
wires, memorymodules, processingmodules);
107 std::stringstream
wires;
108 std::stringstream memorymodules;
109 std::stringstream processingmodules;
111 config.writeAll(
wires, memorymodules, processingmodules);
122 while (inmem.good()) {
123 string memType, memName,
size;
124 inmem >> memType >> memName >>
size;
128 edm::LogVerbatim(
"Tracklet") <<
"Read memory: " << memType <<
" " << memName;
130 sector_->addMem(memType, memName);
138 while (inproc.good()) {
139 string procType, procName;
140 inproc >> procType >> procName;
144 edm::LogVerbatim(
"Tracklet") <<
"Read process: " << procType <<
" " << procName;
146 sector_->addProc(procType, procName);
154 while (inwire.good()) {
156 getline(inwire,
line);
163 string mem, tmp1, procin, tmp2, procout;
164 ss >>
mem >> tmp1 >> procin;
165 if (procin ==
"output=>") {
169 ss >> tmp2 >> procout;
196 for (
int j = 0;
j <
ev.nstubs();
j++) {
198 unsigned int isector = stub.
region();
203 const string& dtc = stub.
DTClink();
212 for (
unsigned int index = 0;
index < layerstubssector.size();
index++) {
215 globals_->ofstream(
"stubslayersector.txt")
216 << layerdisk <<
" " << sector <<
" " << layerstubssector[
index] << endl;
221 for (
unsigned int layerdisk = 0; layerdisk < layerstubs.size(); layerdisk++) {
222 globals_->ofstream(
"stubslayer.txt") << layerdisk <<
" " << layerstubs[layerdisk] << endl;
282 int nTP =
globals_->event()->nsimtracks();
283 for (
int iTP = 0; iTP < nTP; iTP++) {
285 if (simtrk.
pt() < 2.0)
289 if (hypot(simtrk.
vx(), simtrk.
vy()) > 0.1)
293 bool pion = (
abs(simtrk.
type()) == 211);
294 bool kaon = (
abs(simtrk.
type()) == 321);
295 bool proton = (
abs(simtrk.
type()) == 2212);
300 int simtrackid = simtrk.
trackid();
301 unsigned int hitmask =
ev.layersHit(simtrackid,
nlayers, ndisks);
306 static ofstream outhit(
"hiteff.txt");
307 outhit << simtrk.
eta() <<
" " << (hitmask & 1) <<
" " << (hitmask & 2) <<
" " << (hitmask & 4) <<
" " 308 << (hitmask & 8) <<
" " << (hitmask & 16) <<
" " << (hitmask & 32) <<
" " << (hitmask & 64) <<
" " 309 << (hitmask & 128) <<
" " << (hitmask & 256) <<
" " << (hitmask & 512) <<
" " << (hitmask & 1024)
313 std::unordered_set<int> matchseed;
314 std::unordered_set<int> matchseedtmp =
sector_->seedMatch(iTP);
315 matchseed.insert(matchseedtmp.begin(), matchseedtmp.end());
318 bool eff = matchseed.find(
iseed) != matchseed.end();
389 edm::LogVerbatim(
"Tracklet") <<
"Process Times called Average time (ms) Total time (s)" 405 << setprecision(3) <<
TPTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
408 << setprecision(3) <<
MPTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
412 << setprecision(3) <<
TETimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
416 << setprecision(3) <<
TEDTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
419 << setprecision(3) <<
TRETimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
421 <<
"TrackletCalculatorDisplaced" << setw(10) <<
TCDTimer_.
ntimes() << setw(20)
422 << setprecision(3) <<
TCDTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
426 << setprecision(3) <<
TCTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
428 <<
"ProjectionRouter " << setw(10) <<
PRTimer_.
ntimes() << setw(20)
429 << setprecision(3) <<
PRTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
432 << setprecision(3) <<
METimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
434 <<
"MatchCalculator " << setw(10) <<
MCTimer_.
ntimes() << setw(20)
435 << setprecision(3) <<
MCTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
439 << setprecision(3) <<
FTTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
442 << setprecision(3) <<
PDTimer_.
avgtime() * 1000.0 << setw(20) << setprecision(3)
Log< level::Info, true > LogVerbatim
std::vector< Track > tracks_
unsigned int ntimes() const
~TrackletEventProcessor()
std::unique_ptr< Sector > sector_
std::string const & wiresFile() const
const std::string & DTClink() const
const Settings * settings_
virtual void bookDiskResidual()
void event(SLHCEvent &ev)
virtual void bookLayerResidual()
std::unique_ptr< Globals > globals_
void init(Settings const &theSettings)
std::string tablePath() const
Abs< T >::type abs(const T &t)
virtual void bookSeedEff()
uint16_t mem[nChs][nEvts]
bool writeMonitorData(std::string module) const
std::string const & memoryModulesFile() const
bool debugTracklet() const
constexpr unsigned int N_SECTOR
config
parse the configuration file
std::string const & processingModulesFile() const
void configure(std::istream &inwire, std::istream &inmem, std::istream &inproc)
virtual void bookTrackletParams()
unsigned int writememsect() const
std::ofstream openfile(const std::string &dir, const std::string &fname, const char *file, int line)