22 : enableTruncation_(iConfig.getParameter<
bool>(
"EnableTruncation")),
24 dataFormats_(dataFormats),
28 numBinsInv2R_(setup_->htNumBinsInv2R()),
29 numCells_(setup_->mhtNumCells()),
30 numNodes_(setup_->mhtNumDLBNodes()),
31 numChannel_(setup_->mhtNumDLBChannel()),
32 input_(numBinsInv2R_) {}
38 for (
int binInv2R = 0; binInv2R <
numBinsInv2R_; binInv2R++) {
44 for (
int binInv2R = 0; binInv2R <
numBinsInv2R_; binInv2R++) {
47 vector<StubHT*>& stubs =
input_[binInv2R];
48 stubs.reserve(
stream.size());
52 if (
frame.first.isNonnull()) {
56 stubs.push_back(stub);
74 slb(
tmp, streamsSLB[channel], lost[channel]);
78 for (
int node = 0; node <
numNodes_; node++) {
89 for (
int node = 0; node <
numNodes_; node++) {
100 const vector<StubMHT*>& stubs = streamsMHT[channel];
102 stream.reserve(stubs.size());
113 auto differentHT = [&
id](
StubHT* stub) {
return id != stub->trackId(); };
114 auto differentMHT = [&
id](
StubMHT* stub) {
return !stub ||
id != stub->trackId(); };
115 for (
auto it = stubs.begin(); it != stubs.end();) {
116 const auto start = it;
117 id = (*it)->trackId();
118 it = find_if(it, stubs.end(), differentHT);
121 vector<vector<StubMHT*>> mhtCells(
numCells_);
122 for (vector<StubMHT*>& mhtCell : mhtCells)
123 mhtCell.reserve(
size);
125 for (
auto stub =
start; stub != it; stub++) {
126 const double r = (*stub)->r();
127 const double chi = (*stub)->phi();
134 const bool compAB = compA && compB;
135 if (chi >= 0. &&
r >= 0.) {
142 if (chi >= 0. &&
r < 0.) {
149 if (chi < 0. && r >= 0.) {
156 if (chi < 0. &&
r < 0.) {
164 for (
int cell :
cells) {
168 mhtCells[cell].push_back(&
stubsMHT_.back());
174 vector<StubMHT*>& mhtCell = mhtCells[
sel];
176 auto toLayer = [](
StubMHT* stub) {
return stub->layer(); };
197 id = (*it)->trackId();
217 if (all_of(
inputs.begin(),
inputs.end(), [](
const deque<StubMHT*>& stubs) {
return stubs.empty(); }))
219 auto size = [](
int& sum,
const deque<StubMHT*>& stubs) {
return sum += stubs.size(); };
221 accepted.reserve(nFrames);
223 vector<deque<StubMHT*>> stacks(
numCells_);
228 while (!all_of(
inputs.begin(),
inputs.end(), [](
const deque<StubMHT*>&
d) {
return d.empty(); })
or 229 !all_of(stacks.begin(), stacks.end(), [](
const deque<StubMHT*>&
d) {
return d.empty(); })) {
231 for (
int channel = 0; channel <
numCells_; channel++) {
234 stacks[channel].push_back(stub);
237 for (
int channel = 0; channel <
numCells_; channel++)
240 const int iEnableOld =
enable.plEncode();
243 const int iNotEmpty =
empty.plEncode(
false);
248 const int iEnable =
enable.plEncode();
250 accepted.push_back(
pop_front(stacks[iEnable]));
253 accepted.push_back(
nullptr);
258 auto valid = [](
int& sum,
StubMHT* stub) {
return sum += stub ? 1 : 0; };
259 const int nLost = accumulate(
limit, accepted.end(), 0,
valid);
261 for (
auto it =
limit; it != accepted.end(); it++)
263 lost.emplace_back((*it)->frame());
264 accepted.erase(
limit, accepted.end());
267 for (
auto it = accepted.end(); it != accepted.begin();)
268 it = (*--it) ==
nullptr ? accepted.erase(it) : accepted.begin();
273 if (all_of(
streams.begin(),
streams.end(), [](
const vector<StubMHT*>& stubs) {
return stubs.empty(); }))
280 bool swapping(
false);
282 for (
int i = 0;
i <
nMax;
i++) {
291 swapping = !swapping;
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
std::pair< TTStubRef, Frame > FrameStub
Class to process and provide run-time constants used by Track Trigger emulators.
std::vector< StreamStub > StreamsStub
std::vector< FrameStub > StreamStub
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void swap(Association< C > &lhs, Association< C > &rhs)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Abs< T >::type abs(const T &t)
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
int mhtNumBinsPhiT() const