22 : enableTruncation_(iConfig.getParameter<
bool>(
"EnableTruncation")),
24 dataFormats_(dataFormats),
41 vector<StubZHT*>& stubs =
input_[channel];
42 stubs.reserve(
stream.size());
46 if (
frame.first.isNonnull()) {
51 stubs.push_back(stub);
78 deque<StubZHT*>& stubs =
streams[channel];
90 const double baseCot =
93 auto different = [&
id](
StubZHT* stub) {
return !stub ||
id != stub->trackId(); };
94 for (
auto it = stubs.begin(); it != stubs.end();) {
96 const auto begin = find_if(it, stubs.end(), [](
StubZHT* stub) {
return stub; });
103 const auto start = it;
104 const double cotGlobal = (*start)->cotf() +
setup_->
sectorCot((*start)->sectorEta());
105 id = (*it)->trackId();
106 it = find_if(it, stubs.end(), different);
110 for (vector<StubZHT*>& mhtCell : mhtCells)
111 mhtCell.reserve(
size);
113 for (
auto stub =
start; stub != it; stub++) {
115 const double chi = (*stub)->chi();
116 const double dChi =
setup_->
dZ((*stub)->ttStubRef(), cotGlobal);
121 const bool compA = 2. *
abs(chi) < baseZT + dChi;
122 const bool compB = 2. *
abs(chi) <
abs(
r) * baseCot + dChi;
123 const bool compC = 2. *
abs(chi) < dChi;
124 if (chi >= 0. &&
r >= 0.) {
133 if (chi >= 0. &&
r < 0.) {
142 if (chi < 0. && r >= 0.) {
151 if (chi < 0. &&
r < 0.) {
160 for (
int cell :
cells) {
164 mhtCells[cell].push_back(&
stubsZHT_.back());
170 vector<StubZHT*>& mhtCell = mhtCells[
sel];
172 auto toLayer = [](
StubZHT* stub) {
return stub->layer(); };
193 id = (*it)->trackId();
214 if (all_of(
inputs.begin(),
inputs.end(), [](
const deque<StubZHT*>& stubs) {
return stubs.empty(); }))
222 while (!all_of(
inputs.begin(),
inputs.end(), [](
const deque<StubZHT*>&
d) {
return d.empty(); })
or 223 !all_of(stacks.begin(), stacks.end(), [](
const deque<StubZHT*>&
d) {
return d.empty(); })) {
228 stacks[channel].push_back(stub);
234 const int iEnableOld =
enable.plEncode();
237 const int iNotEmpty =
empty.plEncode(
false);
238 if (iNotEmpty < setup_->zhtNumCells())
242 const int iEnable =
enable.plEncode();
244 accepted.push_back(
pop_front(stacks[iEnable]));
247 accepted.push_back(
nullptr);
252 auto valid = [](
int& sum,
StubZHT* stub) {
return sum += stub ? 1 : 0; };
253 const int nLost = accumulate(
limit, accepted.end(), 0,
valid);
255 for (
auto it =
limit; it != accepted.end(); it++)
257 lost.emplace_back((*it)->frame());
258 accepted.erase(
limit, accepted.end());
261 for (
auto it = accepted.end(); it != accepted.begin();)
262 it = (*--it) ==
nullptr ? accepted.erase(it) : accepted.begin();
267 stubs.erase(
remove(stubs.begin(), stubs.end(),
nullptr), stubs.end());
273 for (
const StubZHT* stub : stubs)
276 for (
auto it = stubs.begin(); it != stubs.end();) {
277 const auto start = it;
278 const int id = (*it)->trackId();
279 const int candId =
id /
weight;
281 pair<int, int> cotp(9e9, -9e9);
282 pair<int, int> zTp(9e9, -9e9);
283 for (
const pair<int, int>& para :
m->second) {
284 cotp = {
min(cotp.first, para.first),
max(cotp.second, para.first)};
285 zTp = {
min(zTp.first, para.second),
max(zTp.second, para.second)};
287 const int cot = (cotp.first + cotp.second) / 2;
288 const int zT = (cotp.first + cotp.second) / 2;
291 auto different = [
id](
const StubZHT* stub) {
return id != stub->trackId(); };
292 it = find_if(it, stubs.end(), different);
293 for (
auto s =
start;
s != it;
s++) {
295 return (*s)->ttStubRef() == stub.first;
302 const int size = accumulate(
tracks.begin(),
tracks.end(), 0, [](
int& sum,
const deque<FrameStub>& stubs) {
303 return sum += (
int)stubs.size();
double dZ(const TTStubRef &ttStubRef, double cot) const
double chosenRofZ() const
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
double chosenRofPhi() const
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
auto const & tracks
cannot be loose
tt::FrameStub frame() const
double sectorCot(int eta) const
Power< A, B >::type pow(const A &a, const B &b)