CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
trklet::Sector Class Reference

#include <Sector.h>

Public Member Functions

void addMem (std::string memType, std::string memName)
 
template<typename TV , typename... Args>
void addMemToVec (std::vector< std::unique_ptr< TV > > &memvec, const std::string &memName, Args &...args)
 
void addProc (std::string procType, std::string procName)
 
template<typename TV , typename... Args>
void addProcToVec (std::vector< std::unique_ptr< TV > > &procvec, const std::string &procName, Args &...args)
 
bool addStub (L1TStub stub, std::string dtc)
 
void addWire (std::string mem, std::string procinfull, std::string procoutfull)
 
void clean ()
 
void executeFT ()
 
void executeIR ()
 
void executeMC ()
 
void executeME ()
 
void executeMP ()
 
void executePD (std::vector< Track > &tracks)
 
void executePR ()
 
void executeTC ()
 
void executeTCD ()
 
void executeTE ()
 
void executeTED ()
 
void executeTP ()
 
void executeTRE ()
 
void executeVMR ()
 
std::vector< Tracklet * > getAllTracklets () const
 
MemoryBasegetMem (std::string memName)
 
ProcessBasegetProc (std::string procName)
 
std::vector< const Stub * > getStubs () const
 
double phimax () const
 
double phimin () const
 
 Sector (Settings const &settings, Globals *globals)
 
std::unordered_set< int > seedMatch (int itp) const
 
void setSector (unsigned int isector)
 
void writeAIS (bool first)
 
void writeAP (bool first)
 
void writeAS (bool first)
 
void writeCM (bool first)
 
void writeCT (bool first)
 
void writeDTCStubs (bool first)
 
void writeIRStubs (bool first)
 
void writeMC (bool first)
 
void writeSP (bool first)
 
void writeST (bool first)
 
void writeTF (bool first)
 
void writeTPAR (bool first)
 
void writeTPROJ (bool first)
 
void writeVMPROJ (bool first)
 
void writeVMSME (bool first)
 
void writeVMSTE (bool first)
 
 ~Sector ()
 

Private Attributes

std::vector< std::unique_ptr
< AllInnerStubsMemory > > 
AIS_
 
std::vector< std::unique_ptr
< AllProjectionsMemory > > 
AP_
 
std::vector< std::unique_ptr
< AllStubsMemory > > 
AS_
 
std::vector< std::unique_ptr
< CandidateMatchMemory > > 
CM_
 
std::vector< std::unique_ptr
< CleanTrackMemory > > 
CT_
 
std::vector< std::unique_ptr
< DTCLinkMemory > > 
DL_
 
std::vector< std::unique_ptr
< FullMatchMemory > > 
FM_
 
std::vector< std::unique_ptr
< FitTrack > > 
FT_
 
Globalsglobals_
 
std::vector< std::unique_ptr
< InputLinkMemory > > 
IL_
 
std::vector< std::unique_ptr
< InputRouter > > 
IR_
 
int isector_
 
std::vector< std::unique_ptr
< MatchCalculator > > 
MC_
 
std::vector< std::unique_ptr
< MatchEngine > > 
ME_
 
std::map< std::string,
MemoryBase * > 
Memories_
 
std::vector< MemoryBase * > MemoriesV_
 
std::vector< std::unique_ptr
< MatchProcessor > > 
MP_
 
std::vector< std::unique_ptr
< PurgeDuplicate > > 
PD_
 
double phimax_
 
double phimin_
 
std::vector< std::unique_ptr
< ProjectionRouter > > 
PR_
 
std::map< std::string,
ProcessBase * > 
Processes_
 
Settings const & settings_
 
std::vector< std::unique_ptr
< StubPairsMemory > > 
SP_
 
std::vector< std::unique_ptr
< StubTripletsMemory > > 
ST_
 
std::vector< std::unique_ptr
< TrackletCalculator > > 
TC_
 
std::vector< std::unique_ptr
< TrackletCalculatorDisplaced > > 
TCD_
 
std::vector< std::unique_ptr
< TrackletEngine > > 
TE_
 
std::vector< std::unique_ptr
< TrackletEngineDisplaced > > 
TED_
 
std::vector< std::unique_ptr
< TrackFitMemory > > 
TF_
 
std::vector< std::unique_ptr
< TrackletProcessor > > 
TP_
 
std::vector< std::unique_ptr
< TrackletParametersMemory > > 
TPAR_
 
std::vector< std::unique_ptr
< TrackletProjectionsMemory > > 
TPROJ_
 
std::vector< std::unique_ptr
< TripletEngine > > 
TRE_
 
std::vector< std::unique_ptr
< VMProjectionsMemory > > 
VMPROJ_
 
std::vector< std::unique_ptr
< VMRouter > > 
VMR_
 
std::vector< std::unique_ptr
< VMRouterCM > > 
VMRCM_
 
std::vector< std::unique_ptr
< VMStubsMEMemory > > 
VMSME_
 
std::vector< std::unique_ptr
< VMStubsTEMemory > > 
VMSTE_
 

Detailed Description

Definition at line 61 of file Sector.h.

Constructor & Destructor Documentation

Sector::Sector ( Settings const &  settings,
Globals globals 
)

Definition at line 48 of file Sector.cc.

48 : isector_(-1), settings_(settings), globals_(globals) {}
int isector_
Definition: Sector.h:142
Settings const & settings_
Definition: Sector.h:143
Globals * globals_
Definition: Sector.h:144
Sector::~Sector ( )
default

Member Function Documentation

void Sector::addMem ( std::string  memType,
std::string  memName 
)

Definition at line 101 of file Sector.cc.

References addMemToVec(), AIS_, AP_, AS_, CM_, CT_, DL_, beamvalidation::exit(), FM_, IL_, phimax_, phimin_, settings_, SP_, ST_, TF_, TPAR_, TPROJ_, VMPROJ_, VMSME_, and VMSTE_.

101  {
102  if (memType == "DTCLink:") {
103  addMemToVec(DL_, memName, settings_, phimin_, phimax_);
104  } else if (memType == "InputLink:") {
105  addMemToVec(IL_, memName, settings_, phimin_, phimax_);
106  } else if (memType == "AllStubs:") {
107  addMemToVec(AS_, memName, settings_);
108  } else if (memType == "AllInnerStubs:") {
109  addMemToVec(AIS_, memName, settings_);
110  } else if (memType == "VMStubsTE:") {
111  addMemToVec(VMSTE_, memName, settings_);
112  } else if (memType == "VMStubsME:") {
113  addMemToVec(VMSME_, memName, settings_);
114  } else if (memType == "StubPairs:" || memType == "StubPairsDisplaced:") {
115  addMemToVec(SP_, memName, settings_);
116  } else if (memType == "StubTriplets:") {
117  addMemToVec(ST_, memName, settings_);
118  } else if (memType == "TrackletParameters:") {
119  addMemToVec(TPAR_, memName, settings_);
120  } else if (memType == "TrackletProjections:") {
121  addMemToVec(TPROJ_, memName, settings_);
122  } else if (memType == "AllProj:") {
123  addMemToVec(AP_, memName, settings_);
124  } else if (memType == "VMProjections:") {
125  addMemToVec(VMPROJ_, memName, settings_);
126  } else if (memType == "CandidateMatch:") {
127  addMemToVec(CM_, memName, settings_);
128  } else if (memType == "FullMatch:") {
129  addMemToVec(FM_, memName, settings_);
130  } else if (memType == "TrackFit:") {
131  addMemToVec(TF_, memName, settings_, phimin_, phimax_);
132  } else if (memType == "CleanTrack:") {
133  addMemToVec(CT_, memName, settings_, phimin_, phimax_);
134  } else {
135  edm::LogPrint("Tracklet") << "Don't know of memory type: " << memType;
136  exit(0);
137  }
138 }
std::vector< std::unique_ptr< VMProjectionsMemory > > VMPROJ_
Definition: Sector.h:161
std::vector< std::unique_ptr< AllStubsMemory > > AS_
Definition: Sector.h:152
std::vector< std::unique_ptr< FullMatchMemory > > FM_
Definition: Sector.h:163
std::vector< std::unique_ptr< TrackletProjectionsMemory > > TPROJ_
Definition: Sector.h:159
std::vector< std::unique_ptr< CandidateMatchMemory > > CM_
Definition: Sector.h:162
std::vector< std::unique_ptr< StubTripletsMemory > > ST_
Definition: Sector.h:157
Settings const & settings_
Definition: Sector.h:143
std::vector< std::unique_ptr< VMStubsTEMemory > > VMSTE_
Definition: Sector.h:154
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:158
void addMemToVec(std::vector< std::unique_ptr< TV > > &memvec, const std::string &memName, Args &...args)
Definition: Sector.h:129
double phimin_
Definition: Sector.h:145
std::vector< std::unique_ptr< StubPairsMemory > > SP_
Definition: Sector.h:156
Log< level::Warning, true > LogPrint
std::vector< std::unique_ptr< CleanTrackMemory > > CT_
Definition: Sector.h:165
std::vector< std::unique_ptr< VMStubsMEMemory > > VMSME_
Definition: Sector.h:155
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:150
std::vector< std::unique_ptr< AllInnerStubsMemory > > AIS_
Definition: Sector.h:153
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:151
std::vector< std::unique_ptr< AllProjectionsMemory > > AP_
Definition: Sector.h:160
std::vector< std::unique_ptr< TrackFitMemory > > TF_
Definition: Sector.h:164
double phimax_
Definition: Sector.h:146
template<typename TV , typename... Args>
void trklet::Sector::addMemToVec ( std::vector< std::unique_ptr< TV > > &  memvec,
const std::string &  memName,
Args &...  args 
)
inline

Definition at line 129 of file Sector.h.

References Memories_, and MemoriesV_.

Referenced by addMem().

129  {
130  memvec.push_back(std::make_unique<TV>(memName, std::forward<Args>(args)...));
131  Memories_[memName] = memvec.back().get();
132  MemoriesV_.push_back(memvec.back().get());
133  }
std::vector< MemoryBase * > MemoriesV_
Definition: Sector.h:149
std::map< std::string, MemoryBase * > Memories_
Definition: Sector.h:148
void Sector::addProc ( std::string  procType,
std::string  procName 
)

Definition at line 140 of file Sector.cc.

References addProcToVec(), beamvalidation::exit(), FT_, globals_, IR_, MC_, ME_, MP_, PD_, PR_, settings_, TC_, TCD_, TE_, TED_, TP_, TRE_, VMR_, and VMRCM_.

140  {
141  if (procType == "InputRouter:") {
142  addProcToVec(IR_, procName, settings_, globals_);
143  } else if (procType == "VMRouter:") {
144  addProcToVec(VMR_, procName, settings_, globals_);
145  } else if (procType == "VMRouterCM:") {
146  addProcToVec(VMRCM_, procName, settings_, globals_);
147  } else if (procType == "TrackletEngine:") {
148  addProcToVec(TE_, procName, settings_, globals_);
149  } else if (procType == "TrackletEngineDisplaced:") {
150  addProcToVec(TED_, procName, settings_, globals_);
151  } else if (procType == "TripletEngine:") {
152  addProcToVec(TRE_, procName, settings_, globals_);
153  } else if (procType == "TrackletCalculator:") {
154  addProcToVec(TC_, procName, settings_, globals_);
155  } else if (procType == "TrackletProcessor:") {
156  addProcToVec(TP_, procName, settings_, globals_);
157  } else if (procType == "TrackletCalculatorDisplaced:") {
158  addProcToVec(TCD_, procName, settings_, globals_);
159  } else if (procType == "ProjectionRouter:") {
160  addProcToVec(PR_, procName, settings_, globals_);
161  } else if (procType == "MatchEngine:") {
162  addProcToVec(ME_, procName, settings_, globals_);
163  } else if (procType == "MatchCalculator:" ||
164  procType == "DiskMatchCalculator:") { //TODO should not be used in configurations
165  addProcToVec(MC_, procName, settings_, globals_);
166  } else if (procType == "MatchProcessor:") {
167  addProcToVec(MP_, procName, settings_, globals_);
168  } else if (procType == "FitTrack:") {
169  addProcToVec(FT_, procName, settings_, globals_);
170  } else if (procType == "PurgeDuplicate:") {
171  addProcToVec(PD_, procName, settings_, globals_);
172  } else {
173  edm::LogPrint("Tracklet") << "Don't know of processing type: " << procType;
174  exit(0);
175  }
176 }
std::vector< std::unique_ptr< InputRouter > > IR_
Definition: Sector.h:168
std::vector< std::unique_ptr< TrackletEngineDisplaced > > TED_
Definition: Sector.h:172
std::vector< std::unique_ptr< TrackletCalculatorDisplaced > > TCD_
Definition: Sector.h:176
std::vector< std::unique_ptr< MatchCalculator > > MC_
Definition: Sector.h:179
Settings const & settings_
Definition: Sector.h:143
Globals * globals_
Definition: Sector.h:144
std::vector< std::unique_ptr< PurgeDuplicate > > PD_
Definition: Sector.h:182
std::vector< std::unique_ptr< TrackletEngine > > TE_
Definition: Sector.h:171
std::vector< std::unique_ptr< ProjectionRouter > > PR_
Definition: Sector.h:177
Log< level::Warning, true > LogPrint
std::vector< std::unique_ptr< TripletEngine > > TRE_
Definition: Sector.h:173
void addProcToVec(std::vector< std::unique_ptr< TV > > &procvec, const std::string &procName, Args &...args)
Definition: Sector.h:136
std::vector< std::unique_ptr< MatchEngine > > ME_
Definition: Sector.h:178
std::vector< std::unique_ptr< VMRouter > > VMR_
Definition: Sector.h:169
std::vector< std::unique_ptr< TrackletCalculator > > TC_
Definition: Sector.h:175
std::vector< std::unique_ptr< TrackletProcessor > > TP_
Definition: Sector.h:174
std::vector< std::unique_ptr< VMRouterCM > > VMRCM_
Definition: Sector.h:170
std::vector< std::unique_ptr< MatchProcessor > > MP_
Definition: Sector.h:180
std::vector< std::unique_ptr< FitTrack > > FT_
Definition: Sector.h:181
template<typename TV , typename... Args>
void trklet::Sector::addProcToVec ( std::vector< std::unique_ptr< TV > > &  procvec,
const std::string &  procName,
Args &...  args 
)
inline

Definition at line 136 of file Sector.h.

References Processes_.

Referenced by addProc().

136  {
137  procvec.push_back(std::make_unique<TV>(procName, std::forward<Args>(args)...));
138  Processes_[procName] = procvec.back().get();
139  }
std::map< std::string, ProcessBase * > Processes_
Definition: Sector.h:167
bool Sector::addStub ( L1TStub  stub,
std::string  dtc 
)

Definition at line 68 of file Sector.cc.

References cms::cuda::assert(), trklet::Stub::bend(), DL_, globals_, mps_fire::i, trklet::TrackletLUT::initPhiCorrTable(), trklet::L1TStub::layerdisk(), trklet::TrackletLUT::lookup(), trklet::N_LAYER, mergeVDriftHistosByStation::name, trklet::FPGAWord::nbits(), trklet::Globals::phiCorr(), trklet::Stub::r(), alignCSCRings::r, trklet::Stub::setPhiCorr(), settings_, and trklet::FPGAWord::value().

68  {
69  unsigned int layerdisk = stub.layerdisk();
70 
71  if (layerdisk < N_LAYER && globals_->phiCorr(layerdisk) == nullptr) {
72  globals_->phiCorr(layerdisk) = new TrackletLUT(settings_);
73  globals_->phiCorr(layerdisk)->initPhiCorrTable(layerdisk, 3);
74  }
75 
76  Stub fpgastub(stub, settings_, *globals_);
77 
78  if (layerdisk < N_LAYER) {
79  FPGAWord r = fpgastub.r();
80  int bendbin = fpgastub.bend().value();
81  int rbin = (r.value() + (1 << (r.nbits() - 1))) >> (r.nbits() - 3);
82  const TrackletLUT& phiCorrTable = *globals_->phiCorr(layerdisk);
83  int iphicorr = phiCorrTable.lookup(bendbin * (1 << 3) + rbin);
84  fpgastub.setPhiCorr(iphicorr);
85  }
86 
87  int nadd = 0;
88  for (unsigned int i = 0; i < DL_.size(); i++) {
89  const string& name = DL_[i]->getName();
90  if (name.find("_" + dtc) == string::npos)
91  continue;
92  DL_[i]->addStub(stub, fpgastub);
93  nadd++;
94  }
95 
96  assert(nadd == 1);
97 
98  return true;
99 }
int nbits() const
Definition: FPGAWord.h:25
assert(be >=bs)
void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits)
Definition: TrackletLUT.cc:822
Settings const & settings_
Definition: Sector.h:143
Globals * globals_
Definition: Sector.h:144
int value() const
Definition: FPGAWord.h:24
TrackletLUT *& phiCorr(unsigned int layer)
Definition: Globals.h:42
int layerdisk() const
Definition: L1TStub.h:104
int lookup(unsigned int index) const
Definition: TrackletLUT.cc:900
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:150
constexpr int N_LAYER
Definition: Settings.h:21
void Sector::addWire ( std::string  mem,
std::string  procinfull,
std::string  procoutfull 
)

Definition at line 178 of file Sector.cc.

References trklet::ProcessBase::addInput(), trklet::ProcessBase::addOutput(), getMem(), getProc(), input, and convertSQLitetoXML_cfg::output.

178  {
179  stringstream ss1(procinfull);
180  string procin, output;
181  getline(ss1, procin, '.');
182  getline(ss1, output);
183 
184  stringstream ss2(procoutfull);
185  string procout, input;
186  getline(ss2, procout, '.');
187  getline(ss2, input);
188 
189  MemoryBase* memory = getMem(mem);
190 
191  if (!procin.empty()) {
192  ProcessBase* inProc = getProc(procin);
193  inProc->addOutput(memory, output);
194  }
195 
196  if (!procout.empty()) {
197  ProcessBase* outProc = getProc(procout);
198  outProc->addInput(memory, input);
199  }
200 }
virtual void addOutput(MemoryBase *memory, std::string output)=0
static std::string const input
Definition: EdmProvDump.cc:47
virtual void addInput(MemoryBase *memory, std::string input)=0
uint16_t mem[nChs][nEvts]
MemoryBase * getMem(std::string memName)
Definition: Sector.cc:212
ProcessBase * getProc(std::string procName)
Definition: Sector.cc:202
void Sector::clean ( )

Definition at line 318 of file Sector.cc.

References mem, and MemoriesV_.

318  {
319  for (auto& mem : MemoriesV_) {
320  mem->clean();
321  }
322 }
uint16_t mem[nChs][nEvts]
std::vector< MemoryBase * > MemoriesV_
Definition: Sector.h:149
void Sector::executeFT ( )

Definition at line 412 of file Sector.cc.

References FT_, mps_fire::i, and isector_.

412  {
413  for (auto& i : FT_) {
414  i->execute(isector_);
415  }
416 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< FitTrack > > FT_
Definition: Sector.h:181
void Sector::executeIR ( )

Definition at line 324 of file Sector.cc.

References mps_fire::i, and IR_.

324  {
325  for (auto& i : IR_) {
326  i->execute();
327  }
328 }
std::vector< std::unique_ptr< InputRouter > > IR_
Definition: Sector.h:168
void Sector::executeMC ( )

Definition at line 400 of file Sector.cc.

References mps_fire::i, MC_, and phimin_.

400  {
401  for (auto& i : MC_) {
402  i->execute(phimin_);
403  }
404 }
std::vector< std::unique_ptr< MatchCalculator > > MC_
Definition: Sector.h:179
double phimin_
Definition: Sector.h:145
void Sector::executeME ( )

Definition at line 394 of file Sector.cc.

References mps_fire::i, and ME_.

394  {
395  for (auto& i : ME_) {
396  i->execute();
397  }
398 }
std::vector< std::unique_ptr< MatchEngine > > ME_
Definition: Sector.h:178
void Sector::executeMP ( )

Definition at line 406 of file Sector.cc.

References mps_fire::i, isector_, MP_, and phimin_.

406  {
407  for (auto& i : MP_) {
408  i->execute(isector_, phimin_);
409  }
410 }
int isector_
Definition: Sector.h:142
double phimin_
Definition: Sector.h:145
std::vector< std::unique_ptr< MatchProcessor > > MP_
Definition: Sector.h:180
void Sector::executePD ( std::vector< Track > &  tracks)

Definition at line 418 of file Sector.cc.

References mps_fire::i, isector_, and PD_.

418  {
419  for (auto& i : PD_) {
420  i->execute(tracks, isector_);
421  }
422 }
int isector_
Definition: Sector.h:142
auto const & tracks
cannot be loose
std::vector< std::unique_ptr< PurgeDuplicate > > PD_
Definition: Sector.h:182
void Sector::executePR ( )

Definition at line 388 of file Sector.cc.

References mps_fire::i, and PR_.

388  {
389  for (auto& i : PR_) {
390  i->execute();
391  }
392 }
std::vector< std::unique_ptr< ProjectionRouter > > PR_
Definition: Sector.h:177
void Sector::executeTC ( )

Definition at line 369 of file Sector.cc.

References globals_, mps_fire::i, isector_, trklet::Globals::ofstream(), submitPVResolutionJobs::out, phimax_, phimin_, settings_, TC_, TPROJ_, and trklet::Settings::writeMonitorData().

369  {
370  for (auto& i : TC_) {
371  i->execute(isector_, phimin_, phimax_);
372  }
373 
374  if (settings_.writeMonitorData("TrackProjOcc")) {
375  ofstream& out = globals_->ofstream("trackprojocc.txt");
376  for (auto& i : TPROJ_) {
377  out << i->getName() << " " << i->nTracklets() << endl;
378  }
379  }
380 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< TrackletProjectionsMemory > > TPROJ_
Definition: Sector.h:159
Settings const & settings_
Definition: Sector.h:143
Globals * globals_
Definition: Sector.h:144
double phimin_
Definition: Sector.h:145
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
std::vector< std::unique_ptr< TrackletCalculator > > TC_
Definition: Sector.h:175
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
double phimax_
Definition: Sector.h:146
void Sector::executeTCD ( )

Definition at line 382 of file Sector.cc.

References mps_fire::i, isector_, phimax_, phimin_, and TCD_.

382  {
383  for (auto& i : TCD_) {
384  i->execute(isector_, phimin_, phimax_);
385  }
386 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< TrackletCalculatorDisplaced > > TCD_
Definition: Sector.h:176
double phimin_
Definition: Sector.h:145
double phimax_
Definition: Sector.h:146
void Sector::executeTE ( )

Definition at line 345 of file Sector.cc.

References mps_fire::i, and TE_.

345  {
346  for (auto& i : TE_) {
347  i->execute();
348  }
349 }
std::vector< std::unique_ptr< TrackletEngine > > TE_
Definition: Sector.h:171
void Sector::executeTED ( )

Definition at line 351 of file Sector.cc.

References mps_fire::i, and TED_.

351  {
352  for (auto& i : TED_) {
353  i->execute();
354  }
355 }
std::vector< std::unique_ptr< TrackletEngineDisplaced > > TED_
Definition: Sector.h:172
void Sector::executeTP ( )

Definition at line 363 of file Sector.cc.

References mps_fire::i, isector_, phimax_, phimin_, and TP_.

363  {
364  for (auto& i : TP_) {
365  i->execute(isector_, phimin_, phimax_);
366  }
367 }
int isector_
Definition: Sector.h:142
double phimin_
Definition: Sector.h:145
std::vector< std::unique_ptr< TrackletProcessor > > TP_
Definition: Sector.h:174
double phimax_
Definition: Sector.h:146
void Sector::executeTRE ( )

Definition at line 357 of file Sector.cc.

References mps_fire::i, and TRE_.

357  {
358  for (auto& i : TRE_) {
359  i->execute();
360  }
361 }
std::vector< std::unique_ptr< TripletEngine > > TRE_
Definition: Sector.h:173
void Sector::executeVMR ( )

Definition at line 330 of file Sector.cc.

References globals_, mps_fire::i, IL_, trklet::Globals::ofstream(), submitPVResolutionJobs::out, settings_, VMR_, VMRCM_, and trklet::Settings::writeMonitorData().

330  {
331  if (settings_.writeMonitorData("IL")) {
332  ofstream& out = globals_->ofstream("inputlink.txt");
333  for (auto& i : IL_) {
334  out << i->getName() << " " << i->nStubs() << endl;
335  }
336  }
337  for (auto& i : VMR_) {
338  i->execute();
339  }
340  for (auto& i : VMRCM_) {
341  i->execute();
342  }
343 }
Settings const & settings_
Definition: Sector.h:143
Globals * globals_
Definition: Sector.h:144
std::vector< std::unique_ptr< VMRouter > > VMR_
Definition: Sector.h:169
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
std::vector< std::unique_ptr< VMRouterCM > > VMRCM_
Definition: Sector.h:170
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:151
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
std::vector< Tracklet * > Sector::getAllTracklets ( ) const

Definition at line 424 of file Sector.cc.

References dqmiolumiharvest::j, createJobs::tmp, and TPAR_.

424  {
425  std::vector<Tracklet*> tmp;
426  for (auto& tpar : TPAR_) {
427  for (unsigned int j = 0; j < tpar->nTracklets(); j++) {
428  tmp.push_back(tpar->getTracklet(j));
429  }
430  }
431  return tmp;
432 }
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:158
tmp
align.sh
Definition: createJobs.py:716
MemoryBase * Sector::getMem ( std::string  memName)

Definition at line 212 of file Sector.cc.

References Exception, and Memories_.

Referenced by addWire().

212  {
213  auto it = Memories_.find(memName);
214 
215  if (it != Memories_.end()) {
216  return it->second;
217  }
218  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find memory : " << memName;
219  return nullptr;
220 }
std::map< std::string, MemoryBase * > Memories_
Definition: Sector.h:148
ProcessBase * Sector::getProc ( std::string  procName)

Definition at line 202 of file Sector.cc.

References Exception, and Processes_.

Referenced by addWire().

202  {
203  auto it = Processes_.find(procName);
204 
205  if (it != Processes_.end()) {
206  return it->second;
207  }
208  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find process : " << procName << endl;
209  return nullptr;
210 }
std::map< std::string, ProcessBase * > Processes_
Definition: Sector.h:167
std::vector< const Stub * > Sector::getStubs ( ) const

Definition at line 434 of file Sector.cc.

References IL_, and createJobs::tmp.

434  {
435  std::vector<const Stub*> tmp;
436 
437  for (auto& imem : IL_) {
438  for (unsigned int istub = 0; istub < imem->nStubs(); istub++) {
439  tmp.push_back(imem->getStub(istub));
440  }
441  }
442 
443  return tmp;
444 }
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:151
tmp
align.sh
Definition: createJobs.py:716
double trklet::Sector::phimax ( ) const
inline

Definition at line 126 of file Sector.h.

References phimax_.

126 { return phimax_; }
double phimax_
Definition: Sector.h:146
double trklet::Sector::phimin ( ) const
inline

Definition at line 125 of file Sector.h.

References phimin_.

125 { return phimin_; }
double phimin_
Definition: Sector.h:145
std::unordered_set< int > Sector::seedMatch ( int  itp) const

Definition at line 446 of file Sector.cc.

References mps_fire::i, dqmiolumiharvest::j, and TPAR_.

446  {
447  std::unordered_set<int> tmpSeeds;
448  for (auto& i : TPAR_) {
449  unsigned int nTracklet = i->nTracklets();
450  for (unsigned int j = 0; j < nTracklet; j++) {
451  if (i->getTracklet(j)->tpseed() == itp) {
452  tmpSeeds.insert(i->getTracklet(j)->getISeed());
453  }
454  }
455  }
456  return tmpSeeds;
457 }
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:158
void Sector::setSector ( unsigned int  isector)

Definition at line 52 of file Sector.cc.

References cms::cuda::assert(), trklet::Settings::dphisectorHG(), isector_, M_PI, trklet::N_SECTOR, phimax_, phimin_, reco::reduceRange(), and settings_.

52  {
53  assert(isector < N_SECTOR);
54  isector_ = isector;
55  double dphi = 2 * M_PI / N_SECTOR;
56  double dphiHG = 0.5 * settings_.dphisectorHG() - M_PI / N_SECTOR;
57  phimin_ = isector_ * dphi - dphiHG;
58  phimax_ = phimin_ + dphi + 2 * dphiHG;
59  phimin_ -= M_PI / N_SECTOR;
60  phimax_ -= M_PI / N_SECTOR;
63  if (phimin_ > phimax_) {
64  phimin_ -= 2 * M_PI;
65  }
66 }
double dphisectorHG() const
Definition: Settings.h:281
int isector_
Definition: Sector.h:142
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
assert(be >=bs)
Settings const & settings_
Definition: Sector.h:143
double phimin_
Definition: Sector.h:145
#define M_PI
constexpr unsigned int N_SECTOR
Definition: Settings.h:19
double phimax_
Definition: Sector.h:146
void Sector::writeAIS ( bool  first)

Definition at line 252 of file Sector.cc.

References AIS_, mps_fire::i, and isector_.

252  {
253  for (auto& i : AIS_) {
254  i->writeStubs(first, isector_);
255  }
256 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< AllInnerStubsMemory > > AIS_
Definition: Sector.h:153
void Sector::writeAP ( bool  first)

Definition at line 282 of file Sector.cc.

References AP_, mps_fire::i, and isector_.

282  {
283  for (auto& i : AP_) {
284  i->writeAP(first, isector_);
285  }
286 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< AllProjectionsMemory > > AP_
Definition: Sector.h:160
void Sector::writeAS ( bool  first)

Definition at line 246 of file Sector.cc.

References AS_, mps_fire::i, and isector_.

246  {
247  for (auto& i : AS_) {
248  i->writeStubs(first, isector_);
249  }
250 }
std::vector< std::unique_ptr< AllStubsMemory > > AS_
Definition: Sector.h:152
int isector_
Definition: Sector.h:142
void Sector::writeCM ( bool  first)

Definition at line 294 of file Sector.cc.

References CM_, mps_fire::i, and isector_.

294  {
295  for (auto& i : CM_) {
296  i->writeCM(first, isector_);
297  }
298 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< CandidateMatchMemory > > CM_
Definition: Sector.h:162
void Sector::writeCT ( bool  first)

Definition at line 312 of file Sector.cc.

References CT_, mps_fire::i, and isector_.

312  {
313  for (auto& i : CT_) {
314  i->writeCT(first, isector_);
315  }
316 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< CleanTrackMemory > > CT_
Definition: Sector.h:165
void Sector::writeDTCStubs ( bool  first)

Definition at line 222 of file Sector.cc.

References DL_, mps_fire::i, and isector_.

222  {
223  for (auto& i : DL_) {
224  i->writeStubs(first, isector_);
225  }
226 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:150
void Sector::writeIRStubs ( bool  first)

Definition at line 228 of file Sector.cc.

References mps_fire::i, IL_, and isector_.

228  {
229  for (auto& i : IL_) {
230  i->writeStubs(first, isector_);
231  }
232 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:151
void Sector::writeMC ( bool  first)

Definition at line 300 of file Sector.cc.

References FM_, mps_fire::i, and isector_.

300  {
301  for (auto& i : FM_) {
302  i->writeMC(first, isector_);
303  }
304 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< FullMatchMemory > > FM_
Definition: Sector.h:163
void Sector::writeSP ( bool  first)

Definition at line 258 of file Sector.cc.

References mps_fire::i, isector_, and SP_.

258  {
259  for (auto& i : SP_) {
260  i->writeSP(first, isector_);
261  }
262 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< StubPairsMemory > > SP_
Definition: Sector.h:156
void Sector::writeST ( bool  first)

Definition at line 264 of file Sector.cc.

References mps_fire::i, isector_, and ST_.

264  {
265  for (auto& i : ST_) {
266  i->writeST(first, isector_);
267  }
268 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< StubTripletsMemory > > ST_
Definition: Sector.h:157
void Sector::writeTF ( bool  first)

Definition at line 306 of file Sector.cc.

References mps_fire::i, isector_, and TF_.

306  {
307  for (auto& i : TF_) {
308  i->writeTF(first, isector_);
309  }
310 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< TrackFitMemory > > TF_
Definition: Sector.h:164
void Sector::writeTPAR ( bool  first)

Definition at line 270 of file Sector.cc.

References mps_fire::i, isector_, and TPAR_.

270  {
271  for (auto& i : TPAR_) {
272  i->writeTPAR(first, isector_);
273  }
274 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:158
void Sector::writeTPROJ ( bool  first)

Definition at line 276 of file Sector.cc.

References mps_fire::i, isector_, and TPROJ_.

276  {
277  for (auto& i : TPROJ_) {
278  i->writeTPROJ(first, isector_);
279  }
280 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< TrackletProjectionsMemory > > TPROJ_
Definition: Sector.h:159
void Sector::writeVMPROJ ( bool  first)

Definition at line 288 of file Sector.cc.

References mps_fire::i, isector_, and VMPROJ_.

288  {
289  for (auto& i : VMPROJ_) {
290  i->writeVMPROJ(first, isector_);
291  }
292 }
std::vector< std::unique_ptr< VMProjectionsMemory > > VMPROJ_
Definition: Sector.h:161
int isector_
Definition: Sector.h:142
void Sector::writeVMSME ( bool  first)

Definition at line 240 of file Sector.cc.

References mps_fire::i, isector_, and VMSME_.

240  {
241  for (auto& i : VMSME_) {
242  i->writeStubs(first, isector_);
243  }
244 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< VMStubsMEMemory > > VMSME_
Definition: Sector.h:155
void Sector::writeVMSTE ( bool  first)

Definition at line 234 of file Sector.cc.

References mps_fire::i, isector_, and VMSTE_.

234  {
235  for (auto& i : VMSTE_) {
236  i->writeStubs(first, isector_);
237  }
238 }
int isector_
Definition: Sector.h:142
std::vector< std::unique_ptr< VMStubsTEMemory > > VMSTE_
Definition: Sector.h:154

Member Data Documentation

std::vector<std::unique_ptr<AllInnerStubsMemory> > trklet::Sector::AIS_
private

Definition at line 153 of file Sector.h.

Referenced by addMem(), and writeAIS().

std::vector<std::unique_ptr<AllProjectionsMemory> > trklet::Sector::AP_
private

Definition at line 160 of file Sector.h.

Referenced by addMem(), and writeAP().

std::vector<std::unique_ptr<AllStubsMemory> > trklet::Sector::AS_
private

Definition at line 152 of file Sector.h.

Referenced by addMem(), and writeAS().

std::vector<std::unique_ptr<CandidateMatchMemory> > trklet::Sector::CM_
private

Definition at line 162 of file Sector.h.

Referenced by addMem(), and writeCM().

std::vector<std::unique_ptr<CleanTrackMemory> > trklet::Sector::CT_
private

Definition at line 165 of file Sector.h.

Referenced by addMem(), and writeCT().

std::vector<std::unique_ptr<DTCLinkMemory> > trklet::Sector::DL_
private

Definition at line 150 of file Sector.h.

Referenced by addMem(), addStub(), and writeDTCStubs().

std::vector<std::unique_ptr<FullMatchMemory> > trklet::Sector::FM_
private

Definition at line 163 of file Sector.h.

Referenced by addMem(), and writeMC().

std::vector<std::unique_ptr<FitTrack> > trklet::Sector::FT_
private

Definition at line 181 of file Sector.h.

Referenced by addProc(), and executeFT().

Globals* trklet::Sector::globals_
private

Definition at line 144 of file Sector.h.

Referenced by addProc(), addStub(), executeTC(), and executeVMR().

std::vector<std::unique_ptr<InputLinkMemory> > trklet::Sector::IL_
private

Definition at line 151 of file Sector.h.

Referenced by addMem(), executeVMR(), getStubs(), and writeIRStubs().

std::vector<std::unique_ptr<InputRouter> > trklet::Sector::IR_
private

Definition at line 168 of file Sector.h.

Referenced by addProc(), and executeIR().

int trklet::Sector::isector_
private
std::vector<std::unique_ptr<MatchCalculator> > trklet::Sector::MC_
private

Definition at line 179 of file Sector.h.

Referenced by addProc(), and executeMC().

std::vector<std::unique_ptr<MatchEngine> > trklet::Sector::ME_
private

Definition at line 178 of file Sector.h.

Referenced by addProc(), and executeME().

std::map<std::string, MemoryBase*> trklet::Sector::Memories_
private

Definition at line 148 of file Sector.h.

Referenced by addMemToVec(), and getMem().

std::vector<MemoryBase*> trklet::Sector::MemoriesV_
private

Definition at line 149 of file Sector.h.

Referenced by addMemToVec(), and clean().

std::vector<std::unique_ptr<MatchProcessor> > trklet::Sector::MP_
private

Definition at line 180 of file Sector.h.

Referenced by addProc(), and executeMP().

std::vector<std::unique_ptr<PurgeDuplicate> > trklet::Sector::PD_
private

Definition at line 182 of file Sector.h.

Referenced by addProc(), and executePD().

double trklet::Sector::phimax_
private

Definition at line 146 of file Sector.h.

Referenced by addMem(), executeTC(), executeTCD(), executeTP(), phimax(), and setSector().

double trklet::Sector::phimin_
private

Definition at line 145 of file Sector.h.

Referenced by addMem(), executeMC(), executeMP(), executeTC(), executeTCD(), executeTP(), phimin(), and setSector().

std::vector<std::unique_ptr<ProjectionRouter> > trklet::Sector::PR_
private

Definition at line 177 of file Sector.h.

Referenced by addProc(), and executePR().

std::map<std::string, ProcessBase*> trklet::Sector::Processes_
private

Definition at line 167 of file Sector.h.

Referenced by addProcToVec(), and getProc().

Settings const& trklet::Sector::settings_
private

Definition at line 143 of file Sector.h.

Referenced by addMem(), addProc(), addStub(), executeTC(), executeVMR(), and setSector().

std::vector<std::unique_ptr<StubPairsMemory> > trklet::Sector::SP_
private

Definition at line 156 of file Sector.h.

Referenced by addMem(), and writeSP().

std::vector<std::unique_ptr<StubTripletsMemory> > trklet::Sector::ST_
private

Definition at line 157 of file Sector.h.

Referenced by addMem(), and writeST().

std::vector<std::unique_ptr<TrackletCalculator> > trklet::Sector::TC_
private

Definition at line 175 of file Sector.h.

Referenced by addProc(), and executeTC().

std::vector<std::unique_ptr<TrackletCalculatorDisplaced> > trklet::Sector::TCD_
private

Definition at line 176 of file Sector.h.

Referenced by addProc(), and executeTCD().

std::vector<std::unique_ptr<TrackletEngine> > trklet::Sector::TE_
private

Definition at line 171 of file Sector.h.

Referenced by addProc(), and executeTE().

std::vector<std::unique_ptr<TrackletEngineDisplaced> > trklet::Sector::TED_
private

Definition at line 172 of file Sector.h.

Referenced by addProc(), and executeTED().

std::vector<std::unique_ptr<TrackFitMemory> > trklet::Sector::TF_
private

Definition at line 164 of file Sector.h.

Referenced by addMem(), and writeTF().

std::vector<std::unique_ptr<TrackletProcessor> > trklet::Sector::TP_
private

Definition at line 174 of file Sector.h.

Referenced by addProc(), and executeTP().

std::vector<std::unique_ptr<TrackletParametersMemory> > trklet::Sector::TPAR_
private

Definition at line 158 of file Sector.h.

Referenced by addMem(), getAllTracklets(), seedMatch(), and writeTPAR().

std::vector<std::unique_ptr<TrackletProjectionsMemory> > trklet::Sector::TPROJ_
private

Definition at line 159 of file Sector.h.

Referenced by addMem(), executeTC(), and writeTPROJ().

std::vector<std::unique_ptr<TripletEngine> > trklet::Sector::TRE_
private

Definition at line 173 of file Sector.h.

Referenced by addProc(), and executeTRE().

std::vector<std::unique_ptr<VMProjectionsMemory> > trklet::Sector::VMPROJ_
private

Definition at line 161 of file Sector.h.

Referenced by addMem(), and writeVMPROJ().

std::vector<std::unique_ptr<VMRouter> > trklet::Sector::VMR_
private

Definition at line 169 of file Sector.h.

Referenced by addProc(), and executeVMR().

std::vector<std::unique_ptr<VMRouterCM> > trklet::Sector::VMRCM_
private

Definition at line 170 of file Sector.h.

Referenced by addProc(), and executeVMR().

std::vector<std::unique_ptr<VMStubsMEMemory> > trklet::Sector::VMSME_
private

Definition at line 155 of file Sector.h.

Referenced by addMem(), and writeVMSME().

std::vector<std::unique_ptr<VMStubsTEMemory> > trklet::Sector::VMSTE_
private

Definition at line 154 of file Sector.h.

Referenced by addMem(), and writeVMSTE().