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 107 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_.

107  {
108  if (memType == "DTCLink:") {
109  addMemToVec(DL_, memName, settings_, phimin_, phimax_);
110  } else if (memType == "InputLink:") {
111  addMemToVec(IL_, memName, settings_, phimin_, phimax_);
112  } else if (memType == "AllStubs:") {
113  addMemToVec(AS_, memName, settings_);
114  } else if (memType == "AllInnerStubs:") {
115  addMemToVec(AIS_, memName, settings_);
116  } else if (memType == "VMStubsTE:") {
117  addMemToVec(VMSTE_, memName, settings_);
118  } else if (memType == "VMStubsME:") {
119  addMemToVec(VMSME_, memName, settings_);
120  } else if (memType == "StubPairs:" || memType == "StubPairsDisplaced:") {
121  addMemToVec(SP_, memName, settings_);
122  } else if (memType == "StubTriplets:") {
123  addMemToVec(ST_, memName, settings_);
124  } else if (memType == "TrackletParameters:") {
125  addMemToVec(TPAR_, memName, settings_);
126  } else if (memType == "TrackletProjections:") {
127  addMemToVec(TPROJ_, memName, settings_);
128  } else if (memType == "AllProj:") {
129  addMemToVec(AP_, memName, settings_);
130  } else if (memType == "VMProjections:") {
131  addMemToVec(VMPROJ_, memName, settings_);
132  } else if (memType == "CandidateMatch:") {
133  addMemToVec(CM_, memName, settings_);
134  } else if (memType == "FullMatch:") {
135  addMemToVec(FM_, memName, settings_);
136  } else if (memType == "TrackFit:") {
137  addMemToVec(TF_, memName, settings_, phimin_, phimax_);
138  } else if (memType == "CleanTrack:") {
139  addMemToVec(CT_, memName, settings_, phimin_, phimax_);
140  } else {
141  edm::LogPrint("Tracklet") << "Don't know of memory type: " << memType;
142  exit(0);
143  }
144 }
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 146 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_.

146  {
147  if (procType == "InputRouter:") {
148  addProcToVec(IR_, procName, settings_, globals_);
149  } else if (procType == "VMRouter:") {
150  addProcToVec(VMR_, procName, settings_, globals_);
151  } else if (procType == "VMRouterCM:") {
152  addProcToVec(VMRCM_, procName, settings_, globals_);
153  } else if (procType == "TrackletEngine:") {
154  addProcToVec(TE_, procName, settings_, globals_);
155  } else if (procType == "TrackletEngineDisplaced:") {
156  addProcToVec(TED_, procName, settings_, globals_);
157  } else if (procType == "TripletEngine:") {
158  addProcToVec(TRE_, procName, settings_, globals_);
159  } else if (procType == "TrackletCalculator:") {
160  addProcToVec(TC_, procName, settings_, globals_);
161  } else if (procType == "TrackletProcessor:") {
162  addProcToVec(TP_, procName, settings_, globals_);
163  } else if (procType == "TrackletProcessorDisplaced:") {
164  addProcToVec(TPD_, procName, settings_, globals_);
165  } else if (procType == "TrackletCalculatorDisplaced:") {
166  addProcToVec(TCD_, procName, settings_, globals_);
167  } else if (procType == "ProjectionRouter:") {
168  addProcToVec(PR_, procName, settings_, globals_);
169  } else if (procType == "MatchEngine:") {
170  addProcToVec(ME_, procName, settings_, globals_);
171  } else if (procType == "MatchCalculator:" ||
172  procType == "DiskMatchCalculator:") { //TODO should not be used in configurations
173  addProcToVec(MC_, procName, settings_, globals_);
174  } else if (procType == "MatchProcessor:") {
175  addProcToVec(MP_, procName, settings_, globals_);
176  } else if (procType == "FitTrack:") {
177  addProcToVec(FT_, procName, settings_, globals_);
178  } else if (procType == "PurgeDuplicate:") {
179  addProcToVec(PD_, procName, settings_, globals_);
180  } else {
181  edm::LogPrint("Tracklet") << "Don't know of processing type: " << procType;
182  exit(0);
183  }
184 }
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, mergeVDriftHistosByStation::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  int nrbits = 3;
75 
76  if (layerdisk < N_LAYER && globals_->phiCorr(layerdisk) == nullptr) {
77  globals_->phiCorr(layerdisk) = new TrackletLUT(settings_);
78  globals_->phiCorr(layerdisk)->initPhiCorrTable(layerdisk, nrbits);
79  }
80 
81  Stub fpgastub(stub, settings_, *globals_);
82 
83  if (layerdisk < N_LAYER) {
84  FPGAWord r = fpgastub.r();
85  int bendbin = fpgastub.bend().value();
86  int rbin = (r.value() + (1 << (r.nbits() - 1))) >> (r.nbits() - nrbits);
87  const TrackletLUT& phiCorrTable = *globals_->phiCorr(layerdisk);
88  int iphicorr = phiCorrTable.lookup(bendbin * (1 << nrbits) + rbin);
89  fpgastub.setPhiCorr(iphicorr);
90  }
91 
92  int nadd = 0;
93  for (unsigned int i = 0; i < DL_.size(); i++) {
94  const string& name = DL_[i]->getName();
95  if (name.find("_" + dtc) == string::npos)
96  continue;
97  DL_[i]->addStub(stub, fpgastub);
98  nadd++;
99  }
100 
101  if (!(settings_.reduced()))
102  assert(nadd == 1);
103 
104  return true;
105 }
int lookup(unsigned int index) const
bool reduced() const
Definition: Settings.h:279
assert(be >=bs)
void initPhiCorrTable(unsigned int layerdisk, unsigned int rbits)
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:119
std::vector< std::unique_ptr< DTCLinkMemory > > DL_
Definition: Sector.h:154
constexpr int N_LAYER
Definition: Settings.h:25

◆ addWire()

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

Definition at line 186 of file Sector.cc.

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

186  {
187  stringstream ss1(procinfull);
188  string procin, output;
189  getline(ss1, procin, '.');
190  getline(ss1, output);
191 
192  stringstream ss2(procoutfull);
193  string procout, input;
194  getline(ss2, procout, '.');
195  getline(ss2, input);
196 
198 
199  if (!procin.empty()) {
200  ProcessBase* inProc = getProc(procin);
201  inProc->addOutput(memory, output);
202  }
203 
204  if (!procout.empty()) {
205  ProcessBase* outProc = getProc(procout);
206  outProc->addInput(memory, input);
207  }
208 }
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:220
ProcessBase * getProc(std::string procName)
Definition: Sector.cc:210
Definition: output.py:1

◆ clean()

void Sector::clean ( )

Definition at line 326 of file Sector.cc.

References mem, and MemoriesV_.

326  {
327  for (auto& mem : MemoriesV_) {
328  mem->clean();
329  }
330 }
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 430 of file Sector.cc.

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

430  {
431  const int numChannels = streamsTrackRaw.size() / N_SECTOR;
432  const int maxNumProjectionLayers = streamsStubRaw.size() / streamsTrackRaw.size();
433  const int offsetTrack = isector_ * numChannels;
434  int channelTrack(0);
435 
436  for (auto& i : FT_) {
437  // Temporary streams for a single TrackBuilder (i.e. seed type)
438  deque<string> streamTrackTmp;
439  vector<deque<StubStreamData>> streamsStubTmp(maxNumProjectionLayers);
440  i->execute(streamTrackTmp, streamsStubTmp, isector_);
442  continue;
443  const int offsetStub = (offsetTrack + channelTrack) * maxNumProjectionLayers;
444  streamsTrackRaw[offsetTrack + channelTrack] = vector<string>(streamTrackTmp.begin(), streamTrackTmp.end());
445  channelTrack++;
446  int channelStub(0);
447  for (auto& stream : streamsStubTmp)
448  streamsStubRaw[offsetStub + channelStub++] = vector<StubStreamData>(stream.begin(), stream.end());
449  }
450 }
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:23
bool storeTrackBuilderOutput() const
Definition: Settings.h:257
std::vector< std::unique_ptr< FitTrack > > FT_
Definition: Sector.h:186

◆ executeIR()

void Sector::executeIR ( )

Definition at line 332 of file Sector.cc.

References mps_fire::i, and IR_.

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

◆ executeMC()

void Sector::executeMC ( )

Definition at line 414 of file Sector.cc.

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

414  {
415  for (auto& i : MC_) {
416  i->execute(isector_, phimin_);
417  }
418 }
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 408 of file Sector.cc.

References mps_fire::i, isector_, and ME_.

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

◆ executeMP()

void Sector::executeMP ( )

Definition at line 420 of file Sector.cc.

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

420  {
421  for (auto& i : MP_) {
422  i->execute(isector_, phimin_);
423  }
424 }
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 453 of file Sector.cc.

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

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

◆ executePR()

void Sector::executePR ( )

Definition at line 402 of file Sector.cc.

References mps_fire::i, and PR_.

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

◆ executeTC()

void Sector::executeTC ( )

Definition at line 383 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().

383  {
384  for (auto& i : TC_) {
385  i->execute(isector_, phimin_, phimax_);
386  }
387 
388  if (settings_.writeMonitorData("TrackProjOcc")) {
389  ofstream& out = globals_->ofstream("trackprojocc.txt");
390  for (auto& i : TPROJ_) {
391  out << i->getName() << " " << i->nTracklets() << endl;
392  }
393  }
394 }
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:118
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 396 of file Sector.cc.

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

396  {
397  for (auto& i : TCD_) {
398  i->execute(isector_, phimin_, phimax_);
399  }
400 }
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 353 of file Sector.cc.

References mps_fire::i, and TE_.

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

◆ executeTED()

void Sector::executeTED ( )

Definition at line 359 of file Sector.cc.

References mps_fire::i, and TED_.

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

◆ executeTP()

void Sector::executeTP ( )

Definition at line 371 of file Sector.cc.

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

371  {
372  for (auto& i : TP_) {
373  i->execute(isector_, phimin_, phimax_);
374  }
375 }
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 377 of file Sector.cc.

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

377  {
378  for (auto& i : TPD_) {
379  i->execute(isector_, phimin_, phimax_);
380  }
381 }
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 365 of file Sector.cc.

References mps_fire::i, and TRE_.

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

◆ executeVMR()

void Sector::executeVMR ( )

Definition at line 338 of file Sector.cc.

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

338  {
339  if (settings_.writeMonitorData("IL")) {
340  ofstream& out = globals_->ofstream("inputlink.txt");
341  for (auto& i : IL_) {
342  out << i->getName() << " " << i->nStubs() << endl;
343  }
344  }
345  for (auto& i : VMR_) {
346  i->execute();
347  }
348  for (auto& i : VMRCM_) {
349  i->execute(isector_);
350  }
351 }
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:118
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 459 of file Sector.cc.

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

459  {
460  std::vector<Tracklet*> tmp;
461  for (auto& tpar : TPAR_) {
462  for (unsigned int j = 0; j < tpar->nTracklets(); j++) {
463  tmp.push_back(tpar->getTracklet(j));
464  }
465  }
466  return tmp;
467 }
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 220 of file Sector.cc.

References Exception, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and Memories_.

Referenced by addWire().

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

◆ getProc()

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

Definition at line 210 of file Sector.cc.

References Exception, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and Processes_.

Referenced by addWire().

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

◆ getStubs()

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

Definition at line 469 of file Sector.cc.

References IL_, and createJobs::tmp.

469  {
470  std::vector<const Stub*> tmp;
471 
472  for (auto& imem : IL_) {
473  for (unsigned int istub = 0; istub < imem->nStubs(); istub++) {
474  tmp.push_back(imem->getStub(istub));
475  }
476  }
477 
478  return tmp;
479 }
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 481 of file Sector.cc.

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

481  {
482  std::unordered_set<int> tmpSeeds;
483  for (auto& i : TPAR_) {
484  unsigned int nTracklet = i->nTracklets();
485  for (unsigned int j = 0; j < nTracklet; j++) {
486  if (i->getTracklet(j)->tpseed() == itp) {
487  tmpSeeds.insert(i->getTracklet(j)->getISeed());
488  }
489  }
490  }
491  return tmpSeeds;
492 }
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:327
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:23
double phimax_
Definition: Sector.h:150

◆ writeAIS()

void Sector::writeAIS ( bool  first)

Definition at line 260 of file Sector.cc.

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

260  {
261  for (auto& i : AIS_) {
262  i->writeStubs(first, isector_);
263  }
264 }
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 290 of file Sector.cc.

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

290  {
291  for (auto& i : AP_) {
292  i->writeAP(first, isector_);
293  }
294 }
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 254 of file Sector.cc.

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

254  {
255  for (auto& i : AS_) {
256  i->writeStubs(first, isector_);
257  }
258 }
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 302 of file Sector.cc.

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

302  {
303  for (auto& i : CM_) {
304  i->writeCM(first, isector_);
305  }
306 }
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 320 of file Sector.cc.

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

320  {
321  for (auto& i : CT_) {
322  i->writeCT(first, isector_);
323  }
324 }
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 230 of file Sector.cc.

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

230  {
231  for (auto& i : DL_) {
232  i->writeStubs(first, isector_);
233  }
234 }
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 236 of file Sector.cc.

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

236  {
237  for (auto& i : IL_) {
238  i->writeStubs(first, isector_);
239  }
240 }
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 308 of file Sector.cc.

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

308  {
309  for (auto& i : FM_) {
310  i->writeMC(first, isector_);
311  }
312 }
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 266 of file Sector.cc.

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

266  {
267  for (auto& i : SP_) {
268  i->writeSP(first, isector_);
269  }
270 }
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 272 of file Sector.cc.

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

272  {
273  for (auto& i : ST_) {
274  i->writeST(first, isector_);
275  }
276 }
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 314 of file Sector.cc.

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

314  {
315  for (auto& i : TF_) {
316  i->writeTF(first, isector_);
317  }
318 }
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 278 of file Sector.cc.

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

278  {
279  for (auto& i : TPAR_) {
280  i->writeTPAR(first, isector_);
281  }
282 }
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 284 of file Sector.cc.

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

284  {
285  for (auto& i : TPROJ_) {
286  i->writeTPROJ(first, isector_);
287  }
288 }
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 296 of file Sector.cc.

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

296  {
297  for (auto& i : VMPROJ_) {
298  i->writeVMPROJ(first, isector_);
299  }
300 }
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 248 of file Sector.cc.

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

248  {
249  for (auto& i : VMSME_) {
250  i->writeStubs(first, isector_);
251  }
252 }
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 242 of file Sector.cc.

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

242  {
243  for (auto& i : VMSTE_) {
244  i->writeStubs(first, isector_);
245  }
246 }
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().