CMS 3D CMS Logo

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 (std::vector< std::vector< std::string >> &streamsTrackRaw, std::vector< std::vector< StubStreamData >> &streamsStubRaw)
 
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 executeTPD ()
 
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< TrackletProcessorDisplaced > > TPD_
 
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 63 of file Sector.h.

Constructor & Destructor Documentation

◆ Sector()

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

Definition at line 52 of file Sector.cc.

52 : isector_(-1), settings_(settings), globals_(globals) {}
int isector_
Definition: Sector.h:146
Settings const & settings_
Definition: Sector.h:147
Globals * globals_
Definition: Sector.h:148

◆ ~Sector()

Sector::~Sector ( )
default

Member Function Documentation

◆ addMem()

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

Definition at line 106 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_.

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

◆ addMemToVec()

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 133 of file Sector.h.

References writedatasetfile::args, Memories_, and MemoriesV_.

Referenced by addMem().

133  {
134  memvec.push_back(std::make_unique<TV>(memName, std::forward<Args>(args)...));
135  Memories_[memName] = memvec.back().get();
136  MemoriesV_.push_back(memvec.back().get());
137  }
std::vector< MemoryBase * > MemoriesV_
Definition: Sector.h:153
std::map< std::string, MemoryBase * > Memories_
Definition: Sector.h:152

◆ addProc()

void Sector::addProc ( std::string  procType,
std::string  procName 
)

Definition at line 145 of file Sector.cc.

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

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

◆ addProcToVec()

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 140 of file Sector.h.

References writedatasetfile::args, and Processes_.

Referenced by addProc().

140  {
141  procvec.push_back(std::make_unique<TV>(procName, std::forward<Args>(args)...));
142  Processes_[procName] = procvec.back().get();
143  }
std::map< std::string, ProcessBase * > Processes_
Definition: Sector.h:171

◆ addStub()

bool Sector::addStub ( L1TStub  stub,
std::string  dtc 
)

Definition at line 72 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, Skims_PA_cff::name, trklet::Globals::phiCorr(), trklet::Stub::r(), trklet::Settings::reduced(), trklet::Stub::setPhiCorr(), settings_, and trklet::FPGAWord::value().

72  {
73  unsigned int layerdisk = stub.layerdisk();
74 
75  if (layerdisk < N_LAYER && globals_->phiCorr(layerdisk) == nullptr) {
76  globals_->phiCorr(layerdisk) = new TrackletLUT(settings_);
77  globals_->phiCorr(layerdisk)->initPhiCorrTable(layerdisk, 3);
78  }
79 
80  Stub fpgastub(stub, settings_, *globals_);
81 
82  if (layerdisk < N_LAYER) {
83  FPGAWord r = fpgastub.r();
84  int bendbin = fpgastub.bend().value();
85  int rbin = (r.value() + (1 << (r.nbits() - 1))) >> (r.nbits() - 3);
86  const TrackletLUT& phiCorrTable = *globals_->phiCorr(layerdisk);
87  int iphicorr = phiCorrTable.lookup(bendbin * (1 << 3) + rbin);
88  fpgastub.setPhiCorr(iphicorr);
89  }
90 
91  int nadd = 0;
92  for (unsigned int i = 0; i < DL_.size(); i++) {
93  const string& name = DL_[i]->getName();
94  if (name.find("_" + dtc) == string::npos)
95  continue;
96  DL_[i]->addStub(stub, fpgastub);
97  nadd++;
98  }
99 
100  if (!(settings_.reduced()))
101  assert(nadd == 1);
102 
103  return true;
104 }
int lookup(unsigned int index) const
Definition: TrackletLUT.cc:904
bool reduced() const
Definition: Settings.h:260
assert(be >=bs)
void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits)
Definition: TrackletLUT.cc:826
Settings const & settings_
Definition: Sector.h:147
Globals * globals_
Definition: Sector.h:148
TrackletLUT *& phiCorr(unsigned int layer)
Definition: Globals.h:42
int layerdisk() const
Definition: L1TStub.h:112
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:154
constexpr int N_LAYER
Definition: Settings.h:21

◆ addWire()

void Sector::addWire ( std::string  mem,
std::string  procinfull,
std::string  procoutfull 
)

Definition at line 185 of file Sector.cc.

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

185  {
186  stringstream ss1(procinfull);
187  string procin, output;
188  getline(ss1, procin, '.');
189  getline(ss1, output);
190 
191  stringstream ss2(procoutfull);
192  string procout, input;
193  getline(ss2, procout, '.');
194  getline(ss2, input);
195 
197 
198  if (!procin.empty()) {
199  ProcessBase* inProc = getProc(procin);
200  inProc->addOutput(memory, output);
201  }
202 
203  if (!procout.empty()) {
204  ProcessBase* outProc = getProc(procout);
205  outProc->addInput(memory, input);
206  }
207 }
virtual void addOutput(MemoryBase *memory, std::string output)=0
static std::string const input
Definition: EdmProvDump.cc:50
virtual void addInput(MemoryBase *memory, std::string input)=0
uint16_t mem[nChs][nEvts]
MemoryBase * getMem(std::string memName)
Definition: Sector.cc:219
ProcessBase * getProc(std::string procName)
Definition: Sector.cc:209
Definition: output.py:1

◆ clean()

void Sector::clean ( )

Definition at line 325 of file Sector.cc.

References mem, and MemoriesV_.

325  {
326  for (auto& mem : MemoriesV_) {
327  mem->clean();
328  }
329 }
uint16_t mem[nChs][nEvts]
std::vector< MemoryBase * > MemoriesV_
Definition: Sector.h:153

◆ executeFT()

void Sector::executeFT ( std::vector< std::vector< std::string >> &  streamsTrackRaw,
std::vector< std::vector< StubStreamData >> &  streamsStubRaw 
)

Definition at line 429 of file Sector.cc.

References FT_, mps_fire::i, isector_, trklet::N_SECTOR, settings_, trklet::Settings::storeTrackBuilderOutput(), and cms::cuda::stream.

429  {
430  const int numChannels = streamsTrackRaw.size() / N_SECTOR;
431  const int maxNumProjectionLayers = streamsStubRaw.size() / streamsTrackRaw.size();
432  const int offsetTrack = isector_ * numChannels;
433  int channelTrack(0);
434 
435  for (auto& i : FT_) {
436  // Temporary streams for a single TrackBuilder (i.e. seed type)
437  deque<string> streamTrackTmp;
438  vector<deque<StubStreamData>> streamsStubTmp(maxNumProjectionLayers);
439  i->execute(streamTrackTmp, streamsStubTmp, isector_);
441  continue;
442  const int offsetStub = (offsetTrack + channelTrack) * maxNumProjectionLayers;
443  streamsTrackRaw[offsetTrack + channelTrack] = vector<string>(streamTrackTmp.begin(), streamTrackTmp.end());
444  channelTrack++;
445  int channelStub(0);
446  for (auto& stream : streamsStubTmp)
447  streamsStubRaw[offsetStub + channelStub++] = vector<StubStreamData>(stream.begin(), stream.end());
448  }
449 }
int isector_
Definition: Sector.h:146
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Settings const & settings_
Definition: Sector.h:147
constexpr unsigned int N_SECTOR
Definition: Settings.h:19
bool storeTrackBuilderOutput() const
Definition: Settings.h:245
std::vector< std::unique_ptr< FitTrack > > FT_
Definition: Sector.h:186

◆ executeIR()

void Sector::executeIR ( )

Definition at line 331 of file Sector.cc.

References mps_fire::i, and IR_.

331  {
332  for (auto& i : IR_) {
333  i->execute();
334  }
335 }
std::vector< std::unique_ptr< InputRouter > > IR_
Definition: Sector.h:172

◆ executeMC()

void Sector::executeMC ( )

Definition at line 413 of file Sector.cc.

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

413  {
414  for (auto& i : MC_) {
415  i->execute(isector_, phimin_);
416  }
417 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< MatchCalculator > > MC_
Definition: Sector.h:184
double phimin_
Definition: Sector.h:149

◆ executeME()

void Sector::executeME ( )

Definition at line 407 of file Sector.cc.

References mps_fire::i, isector_, and ME_.

407  {
408  for (auto& i : ME_) {
409  i->execute(isector_);
410  }
411 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< MatchEngine > > ME_
Definition: Sector.h:183

◆ executeMP()

void Sector::executeMP ( )

Definition at line 419 of file Sector.cc.

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

419  {
420  for (auto& i : MP_) {
421  i->execute(isector_, phimin_);
422  }
423 }
int isector_
Definition: Sector.h:146
double phimin_
Definition: Sector.h:149
std::vector< std::unique_ptr< MatchProcessor > > MP_
Definition: Sector.h:185

◆ executePD()

void Sector::executePD ( std::vector< Track > &  tracks)

Definition at line 452 of file Sector.cc.

References mps_fire::i, isector_, PD_, and pwdgSkimBPark_cfi::tracks.

452  {
453  for (auto& i : PD_) {
454  i->execute(tracks, isector_);
455  }
456 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< PurgeDuplicate > > PD_
Definition: Sector.h:187

◆ executePR()

void Sector::executePR ( )

Definition at line 401 of file Sector.cc.

References mps_fire::i, and PR_.

401  {
402  for (auto& i : PR_) {
403  i->execute();
404  }
405 }
std::vector< std::unique_ptr< ProjectionRouter > > PR_
Definition: Sector.h:182

◆ executeTC()

void Sector::executeTC ( )

Definition at line 382 of file Sector.cc.

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

382  {
383  for (auto& i : TC_) {
384  i->execute(isector_, phimin_, phimax_);
385  }
386 
387  if (settings_.writeMonitorData("TrackProjOcc")) {
388  ofstream& out = globals_->ofstream("trackprojocc.txt");
389  for (auto& i : TPROJ_) {
390  out << i->getName() << " " << i->nTracklets() << endl;
391  }
392  }
393 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackletProjectionsMemory > > TPROJ_
Definition: Sector.h:163
Settings const & settings_
Definition: Sector.h:147
Globals * globals_
Definition: Sector.h:148
double phimin_
Definition: Sector.h:149
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
std::vector< std::unique_ptr< TrackletCalculator > > TC_
Definition: Sector.h:180
double phimax_
Definition: Sector.h:150

◆ executeTCD()

void Sector::executeTCD ( )

Definition at line 395 of file Sector.cc.

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

395  {
396  for (auto& i : TCD_) {
397  i->execute(isector_, phimin_, phimax_);
398  }
399 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackletCalculatorDisplaced > > TCD_
Definition: Sector.h:181
double phimin_
Definition: Sector.h:149
double phimax_
Definition: Sector.h:150

◆ executeTE()

void Sector::executeTE ( )

Definition at line 352 of file Sector.cc.

References mps_fire::i, and TE_.

352  {
353  for (auto& i : TE_) {
354  i->execute();
355  }
356 }
std::vector< std::unique_ptr< TrackletEngine > > TE_
Definition: Sector.h:175

◆ executeTED()

void Sector::executeTED ( )

Definition at line 358 of file Sector.cc.

References mps_fire::i, and TED_.

358  {
359  for (auto& i : TED_) {
360  i->execute();
361  }
362 }
std::vector< std::unique_ptr< TrackletEngineDisplaced > > TED_
Definition: Sector.h:176

◆ executeTP()

void Sector::executeTP ( )

Definition at line 370 of file Sector.cc.

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

370  {
371  for (auto& i : TP_) {
372  i->execute(isector_, phimin_, phimax_);
373  }
374 }
int isector_
Definition: Sector.h:146
double phimin_
Definition: Sector.h:149
std::vector< std::unique_ptr< TrackletProcessor > > TP_
Definition: Sector.h:178
double phimax_
Definition: Sector.h:150

◆ executeTPD()

void Sector::executeTPD ( )

Definition at line 376 of file Sector.cc.

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

376  {
377  for (auto& i : TPD_) {
378  i->execute(isector_, phimin_, phimax_);
379  }
380 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackletProcessorDisplaced > > TPD_
Definition: Sector.h:179
double phimin_
Definition: Sector.h:149
double phimax_
Definition: Sector.h:150

◆ executeTRE()

void Sector::executeTRE ( )

Definition at line 364 of file Sector.cc.

References mps_fire::i, and TRE_.

364  {
365  for (auto& i : TRE_) {
366  i->execute();
367  }
368 }
std::vector< std::unique_ptr< TripletEngine > > TRE_
Definition: Sector.h:177

◆ executeVMR()

void Sector::executeVMR ( )

Definition at line 337 of file Sector.cc.

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

337  {
338  if (settings_.writeMonitorData("IL")) {
339  ofstream& out = globals_->ofstream("inputlink.txt");
340  for (auto& i : IL_) {
341  out << i->getName() << " " << i->nStubs() << endl;
342  }
343  }
344  for (auto& i : VMR_) {
345  i->execute();
346  }
347  for (auto& i : VMRCM_) {
348  i->execute(isector_);
349  }
350 }
int isector_
Definition: Sector.h:146
Settings const & settings_
Definition: Sector.h:147
Globals * globals_
Definition: Sector.h:148
bool writeMonitorData(std::string module) const
Definition: Settings.h:109
std::vector< std::unique_ptr< VMRouter > > VMR_
Definition: Sector.h:173
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
std::vector< std::unique_ptr< VMRouterCM > > VMRCM_
Definition: Sector.h:174
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:155

◆ getAllTracklets()

std::vector< Tracklet * > Sector::getAllTracklets ( ) const

Definition at line 458 of file Sector.cc.

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

458  {
459  std::vector<Tracklet*> tmp;
460  for (auto& tpar : TPAR_) {
461  for (unsigned int j = 0; j < tpar->nTracklets(); j++) {
462  tmp.push_back(tpar->getTracklet(j));
463  }
464  }
465  return tmp;
466 }
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:162
tmp
align.sh
Definition: createJobs.py:716

◆ getMem()

MemoryBase * Sector::getMem ( std::string  memName)

Definition at line 219 of file Sector.cc.

References Exception, and Memories_.

Referenced by addWire().

219  {
220  auto it = Memories_.find(memName);
221 
222  if (it != Memories_.end()) {
223  return it->second;
224  }
225  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find memory : " << memName;
226  return nullptr;
227 }
std::map< std::string, MemoryBase * > Memories_
Definition: Sector.h:152

◆ getProc()

ProcessBase * Sector::getProc ( std::string  procName)

Definition at line 209 of file Sector.cc.

References Exception, and Processes_.

Referenced by addWire().

209  {
210  auto it = Processes_.find(procName);
211 
212  if (it != Processes_.end()) {
213  return it->second;
214  }
215  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find process : " << procName << endl;
216  return nullptr;
217 }
std::map< std::string, ProcessBase * > Processes_
Definition: Sector.h:171

◆ getStubs()

std::vector< const Stub * > Sector::getStubs ( ) const

Definition at line 468 of file Sector.cc.

References IL_, and createJobs::tmp.

468  {
469  std::vector<const Stub*> tmp;
470 
471  for (auto& imem : IL_) {
472  for (unsigned int istub = 0; istub < imem->nStubs(); istub++) {
473  tmp.push_back(imem->getStub(istub));
474  }
475  }
476 
477  return tmp;
478 }
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:155
tmp
align.sh
Definition: createJobs.py:716

◆ phimax()

double trklet::Sector::phimax ( ) const
inline

Definition at line 130 of file Sector.h.

References phimax_.

130 { return phimax_; }
double phimax_
Definition: Sector.h:150

◆ phimin()

double trklet::Sector::phimin ( ) const
inline

Definition at line 129 of file Sector.h.

References phimin_.

129 { return phimin_; }
double phimin_
Definition: Sector.h:149

◆ seedMatch()

std::unordered_set< int > Sector::seedMatch ( int  itp) const

Definition at line 480 of file Sector.cc.

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

480  {
481  std::unordered_set<int> tmpSeeds;
482  for (auto& i : TPAR_) {
483  unsigned int nTracklet = i->nTracklets();
484  for (unsigned int j = 0; j < nTracklet; j++) {
485  if (i->getTracklet(j)->tpseed() == itp) {
486  tmpSeeds.insert(i->getTracklet(j)->getISeed());
487  }
488  }
489  }
490  return tmpSeeds;
491 }
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:162

◆ setSector()

void Sector::setSector ( unsigned int  isector)

Definition at line 56 of file Sector.cc.

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

56  {
57  assert(isector < N_SECTOR);
58  isector_ = isector;
59  double dphi = 2 * M_PI / N_SECTOR;
60  double dphiHG = 0.5 * settings_.dphisectorHG() - M_PI / N_SECTOR;
61  phimin_ = isector_ * dphi - dphiHG;
62  phimax_ = phimin_ + dphi + 2 * dphiHG;
63  phimin_ -= M_PI / N_SECTOR;
64  phimax_ -= M_PI / N_SECTOR;
67  if (phimin_ > phimax_) {
68  phimin_ -= 2 * M_PI;
69  }
70 }
int isector_
Definition: Sector.h:146
constexpr T reduceRange(T x)
Definition: deltaPhi.h:18
double dphisectorHG() const
Definition: Settings.h:292
assert(be >=bs)
Settings const & settings_
Definition: Sector.h:147
double phimin_
Definition: Sector.h:149
#define M_PI
constexpr unsigned int N_SECTOR
Definition: Settings.h:19
double phimax_
Definition: Sector.h:150

◆ writeAIS()

void Sector::writeAIS ( bool  first)

Definition at line 259 of file Sector.cc.

References AIS_, dqmdumpme::first, mps_fire::i, and isector_.

259  {
260  for (auto& i : AIS_) {
261  i->writeStubs(first, isector_);
262  }
263 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< AllInnerStubsMemory > > AIS_
Definition: Sector.h:157

◆ writeAP()

void Sector::writeAP ( bool  first)

Definition at line 289 of file Sector.cc.

References AP_, dqmdumpme::first, mps_fire::i, and isector_.

289  {
290  for (auto& i : AP_) {
291  i->writeAP(first, isector_);
292  }
293 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< AllProjectionsMemory > > AP_
Definition: Sector.h:164

◆ writeAS()

void Sector::writeAS ( bool  first)

Definition at line 253 of file Sector.cc.

References AS_, dqmdumpme::first, mps_fire::i, and isector_.

253  {
254  for (auto& i : AS_) {
255  i->writeStubs(first, isector_);
256  }
257 }
std::vector< std::unique_ptr< AllStubsMemory > > AS_
Definition: Sector.h:156
int isector_
Definition: Sector.h:146

◆ writeCM()

void Sector::writeCM ( bool  first)

Definition at line 301 of file Sector.cc.

References CM_, dqmdumpme::first, mps_fire::i, and isector_.

301  {
302  for (auto& i : CM_) {
303  i->writeCM(first, isector_);
304  }
305 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< CandidateMatchMemory > > CM_
Definition: Sector.h:166

◆ writeCT()

void Sector::writeCT ( bool  first)

Definition at line 319 of file Sector.cc.

References CT_, dqmdumpme::first, mps_fire::i, and isector_.

319  {
320  for (auto& i : CT_) {
321  i->writeCT(first, isector_);
322  }
323 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< CleanTrackMemory > > CT_
Definition: Sector.h:169

◆ writeDTCStubs()

void Sector::writeDTCStubs ( bool  first)

Definition at line 229 of file Sector.cc.

References DL_, dqmdumpme::first, mps_fire::i, and isector_.

229  {
230  for (auto& i : DL_) {
231  i->writeStubs(first, isector_);
232  }
233 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:154

◆ writeIRStubs()

void Sector::writeIRStubs ( bool  first)

Definition at line 235 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, IL_, and isector_.

235  {
236  for (auto& i : IL_) {
237  i->writeStubs(first, isector_);
238  }
239 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< InputLinkMemory > > IL_
Definition: Sector.h:155

◆ writeMC()

void Sector::writeMC ( bool  first)

Definition at line 307 of file Sector.cc.

References dqmdumpme::first, FM_, mps_fire::i, and isector_.

307  {
308  for (auto& i : FM_) {
309  i->writeMC(first, isector_);
310  }
311 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< FullMatchMemory > > FM_
Definition: Sector.h:167

◆ writeSP()

void Sector::writeSP ( bool  first)

Definition at line 265 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and SP_.

265  {
266  for (auto& i : SP_) {
267  i->writeSP(first, isector_);
268  }
269 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< StubPairsMemory > > SP_
Definition: Sector.h:160

◆ writeST()

void Sector::writeST ( bool  first)

Definition at line 271 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and ST_.

271  {
272  for (auto& i : ST_) {
273  i->writeST(first, isector_);
274  }
275 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< StubTripletsMemory > > ST_
Definition: Sector.h:161

◆ writeTF()

void Sector::writeTF ( bool  first)

Definition at line 313 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and TF_.

313  {
314  for (auto& i : TF_) {
315  i->writeTF(first, isector_);
316  }
317 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackFitMemory > > TF_
Definition: Sector.h:168

◆ writeTPAR()

void Sector::writeTPAR ( bool  first)

Definition at line 277 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and TPAR_.

277  {
278  for (auto& i : TPAR_) {
279  i->writeTPAR(first, isector_);
280  }
281 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackletParametersMemory > > TPAR_
Definition: Sector.h:162

◆ writeTPROJ()

void Sector::writeTPROJ ( bool  first)

Definition at line 283 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and TPROJ_.

283  {
284  for (auto& i : TPROJ_) {
285  i->writeTPROJ(first, isector_);
286  }
287 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< TrackletProjectionsMemory > > TPROJ_
Definition: Sector.h:163

◆ writeVMPROJ()

void Sector::writeVMPROJ ( bool  first)

Definition at line 295 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and VMPROJ_.

295  {
296  for (auto& i : VMPROJ_) {
297  i->writeVMPROJ(first, isector_);
298  }
299 }
std::vector< std::unique_ptr< VMProjectionsMemory > > VMPROJ_
Definition: Sector.h:165
int isector_
Definition: Sector.h:146

◆ writeVMSME()

void Sector::writeVMSME ( bool  first)

Definition at line 247 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and VMSME_.

247  {
248  for (auto& i : VMSME_) {
249  i->writeStubs(first, isector_);
250  }
251 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< VMStubsMEMemory > > VMSME_
Definition: Sector.h:159

◆ writeVMSTE()

void Sector::writeVMSTE ( bool  first)

Definition at line 241 of file Sector.cc.

References dqmdumpme::first, mps_fire::i, isector_, and VMSTE_.

241  {
242  for (auto& i : VMSTE_) {
243  i->writeStubs(first, isector_);
244  }
245 }
int isector_
Definition: Sector.h:146
std::vector< std::unique_ptr< VMStubsTEMemory > > VMSTE_
Definition: Sector.h:158

Member Data Documentation

◆ AIS_

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

Definition at line 157 of file Sector.h.

Referenced by addMem(), and writeAIS().

◆ AP_

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

Definition at line 164 of file Sector.h.

Referenced by addMem(), and writeAP().

◆ AS_

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

Definition at line 156 of file Sector.h.

Referenced by addMem(), and writeAS().

◆ CM_

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

Definition at line 166 of file Sector.h.

Referenced by addMem(), and writeCM().

◆ CT_

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

Definition at line 169 of file Sector.h.

Referenced by addMem(), and writeCT().

◆ DL_

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

Definition at line 154 of file Sector.h.

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

◆ FM_

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

Definition at line 167 of file Sector.h.

Referenced by addMem(), and writeMC().

◆ FT_

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

Definition at line 186 of file Sector.h.

Referenced by addProc(), and executeFT().

◆ globals_

Globals* trklet::Sector::globals_
private

Definition at line 148 of file Sector.h.

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

◆ IL_

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

Definition at line 155 of file Sector.h.

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

◆ IR_

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

Definition at line 172 of file Sector.h.

Referenced by addProc(), and executeIR().

◆ isector_

int trklet::Sector::isector_
private

◆ MC_

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

Definition at line 184 of file Sector.h.

Referenced by addProc(), and executeMC().

◆ ME_

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

Definition at line 183 of file Sector.h.

Referenced by addProc(), and executeME().

◆ Memories_

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

Definition at line 152 of file Sector.h.

Referenced by addMemToVec(), and getMem().

◆ MemoriesV_

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

Definition at line 153 of file Sector.h.

Referenced by addMemToVec(), and clean().

◆ MP_

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

Definition at line 185 of file Sector.h.

Referenced by addProc(), and executeMP().

◆ PD_

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

Definition at line 187 of file Sector.h.

Referenced by addProc(), and executePD().

◆ phimax_

double trklet::Sector::phimax_
private

Definition at line 150 of file Sector.h.

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

◆ phimin_

double trklet::Sector::phimin_
private

◆ PR_

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

Definition at line 182 of file Sector.h.

Referenced by addProc(), and executePR().

◆ Processes_

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

Definition at line 171 of file Sector.h.

Referenced by addProcToVec(), and getProc().

◆ settings_

Settings const& trklet::Sector::settings_
private

Definition at line 147 of file Sector.h.

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

◆ SP_

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

Definition at line 160 of file Sector.h.

Referenced by addMem(), and writeSP().

◆ ST_

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

Definition at line 161 of file Sector.h.

Referenced by addMem(), and writeST().

◆ TC_

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

Definition at line 180 of file Sector.h.

Referenced by addProc(), and executeTC().

◆ TCD_

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

Definition at line 181 of file Sector.h.

Referenced by addProc(), and executeTCD().

◆ TE_

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

Definition at line 175 of file Sector.h.

Referenced by addProc(), and executeTE().

◆ TED_

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

Definition at line 176 of file Sector.h.

Referenced by addProc(), and executeTED().

◆ TF_

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

Definition at line 168 of file Sector.h.

Referenced by addMem(), and writeTF().

◆ TP_

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

Definition at line 178 of file Sector.h.

Referenced by addProc(), and executeTP().

◆ TPAR_

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

Definition at line 162 of file Sector.h.

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

◆ TPD_

std::vector<std::unique_ptr<TrackletProcessorDisplaced> > trklet::Sector::TPD_
private

Definition at line 179 of file Sector.h.

Referenced by addProc(), and executeTPD().

◆ TPROJ_

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

Definition at line 163 of file Sector.h.

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

◆ TRE_

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

Definition at line 177 of file Sector.h.

Referenced by addProc(), and executeTRE().

◆ VMPROJ_

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

Definition at line 165 of file Sector.h.

Referenced by addMem(), and writeVMPROJ().

◆ VMR_

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

Definition at line 173 of file Sector.h.

Referenced by addProc(), and executeVMR().

◆ VMRCM_

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

Definition at line 174 of file Sector.h.

Referenced by addProc(), and executeVMR().

◆ VMSME_

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

Definition at line 159 of file Sector.h.

Referenced by addMem(), and writeVMSME().

◆ VMSTE_

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

Definition at line 158 of file Sector.h.

Referenced by addMem(), and writeVMSTE().