22 : enableTruncation_(iConfig.getParameter<
bool>(
"EnableTruncation")),
24 dataFormats_(dataFormats),
26 input_(dataFormats->numChannel(
Process::mht)),
46 if (
frame.first.isNonnull()) {
51 stubs.push_back(stub);
90 const double baseCot =
93 auto different = [&
id](
StubZHT* stub) {
return !stub ||
id != stub->trackId(); };
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();
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);
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();
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);
295 return (*s)->ttStubRef() == stub.first;
302 const int size = accumulate(
tracks.begin(),
tracks.end(), 0, [](
int sum,
const deque<FrameStub>&
stubs) {
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)
tt::FrameStub frame() const
double sectorCot(int eta) const
Power< A, B >::type pow(const A &a, const B &b)