CMS 3D CMS Logo

L1GctJetFinderBase.cc
Go to the documentation of this file.
2 
7 
10 
12 
13 //DEFINE STATICS
14 const unsigned int L1GctJetFinderBase::MAX_JETS_OUT = 6;
15 const unsigned int L1GctJetFinderBase::N_EXTRA_REGIONS_ETA00 = 2;
16 const unsigned int L1GctJetFinderBase::COL_OFFSET = L1GctJetFinderParams::NUMBER_ETA_VALUES + N_EXTRA_REGIONS_ETA00;
18 
20 const unsigned int L1GctJetFinderBase::N_COLS = 2;
21 const unsigned int L1GctJetFinderBase::CENTRAL_COL0 = 0;
22 
24  : L1GctProcessor(),
25  m_id(id),
26  m_neighbourJetFinders(2),
27  m_idInRange(false),
28  m_gotNeighbourPointers(false),
29  m_gotJetFinderParams(false),
30  m_gotJetEtCalLuts(false),
31  m_gotChannelMask(false),
32  m_positiveEtaWheel(id >= (int)(L1CaloRegionDetId::N_PHI / 2)),
33  m_minColThisJf(0),
34  m_CenJetSeed(0),
35  m_FwdJetSeed(0),
36  m_TauJetSeed(0),
37  m_EtaBoundry(0),
38  m_jetEtCalLuts(),
39  m_useImprovedTauAlgo(false),
40  m_ignoreTauVetoBitsForIsolation(false),
41  m_tauIsolationThreshold(0),
42  m_HttSumJetThreshold(0),
43  m_HtmSumJetThreshold(0),
44  m_EttMask(),
45  m_EtmMask(),
46  m_HttMask(),
47  m_HtmMask(),
48  m_inputRegions(MAX_REGIONS_IN),
49  m_sentProtoJets(MAX_JETS_OUT),
50  m_rcvdProtoJets(MAX_JETS_OUT),
51  m_keptProtoJets(MAX_JETS_OUT),
52  m_outputJets(MAX_JETS_OUT),
53  m_sortedJets(MAX_JETS_OUT),
54  m_outputHfSums(),
55  m_outputJetsPipe(MAX_JETS_OUT),
56  m_outputEtSumPipe(),
57  m_outputExSumPipe(),
58  m_outputEySumPipe(),
59  m_outputHtSumPipe(),
60  m_outputHxSumPipe(),
61  m_outputHySumPipe() {
62  // Call reset to initialise vectors for input and output
63  this->reset();
64  //Check jetfinder setup
65  if (m_id < 0 || m_id >= static_cast<int>(L1CaloRegionDetId::N_PHI)) {
66  if (m_verbose) {
67  edm::LogWarning("L1GctSetupError") << "L1GctJetFinderBase::L1GctJetFinderBase() : Jet Finder ID " << m_id
68  << " has been incorrectly constructed!\n"
69  << "ID number should be between the range of 0 to "
70  << L1CaloRegionDetId::N_PHI - 1 << "\n";
71  }
72  } else {
73  m_idInRange = true;
74  }
75 }
76 
78 
80 void L1GctJetFinderBase::setNeighbourJetFinders(const std::vector<L1GctJetFinderBase*>& neighbours) {
82  if (neighbours.size() == 2) {
83  m_neighbourJetFinders = neighbours;
84  } else {
85  m_gotNeighbourPointers = false;
86  if (m_verbose) {
87  edm::LogWarning("L1GctSetupError") << "L1GctJetFinderBase::setNeighbourJetFinders() : In Jet Finder ID " << m_id
88  << " size of input vector should be 2, but is in fact " << neighbours.size()
89  << "\n";
90  }
91  }
92  if (m_neighbourJetFinders.at(0) == nullptr) {
93  m_gotNeighbourPointers = false;
94  if (m_verbose) {
95  edm::LogWarning("L1GctSetupError") << "L1GctJetFinderBase::setNeighbourJetFinders() : In Jet Finder ID " << m_id
96  << " first neighbour pointer is set to zero\n";
97  }
98  }
99  if (m_neighbourJetFinders.at(1) == nullptr) {
100  m_gotNeighbourPointers = false;
101  if (m_verbose) {
102  edm::LogWarning("L1GctSetupError") << "L1GctJetFinderBase::setNeighbourJetFinders() : In Jet Finder ID " << m_id
103  << " second neighbour pointer is set to zero\n";
104  }
105  }
107  edm::LogError("L1GctSetupError") << "Jet Finder ID " << m_id << " has incorrect assignment of neighbour pointers";
108  }
109 }
110 
113  m_CenJetSeed = jfpars->getCenJetEtSeedGct();
114  m_FwdJetSeed = jfpars->getForJetEtSeedGct();
115  m_TauJetSeed = jfpars->getTauJetEtSeedGct();
120  m_gotJetFinderParams = true;
121 }
122 
125  m_jetEtCalLuts = jfluts;
127 }
128 
131  bool matchCheckEttAndEtm = true;
132  if (chmask != nullptr) {
133  static const unsigned N_ETA = L1GctJetFinderParams::NUMBER_ETA_VALUES;
134  for (unsigned ieta = 0; ieta < N_ETA; ++ieta) {
135  unsigned globalEta = (m_positiveEtaWheel ? N_ETA + ieta : N_ETA - (ieta + 1));
136  m_EttMask[ieta] = chmask->totalEtMask(globalEta);
137  m_EtmMask[ieta] = chmask->missingEtMask(globalEta);
138  m_HttMask[ieta] = chmask->totalHtMask(globalEta);
139  m_HtmMask[ieta] = chmask->missingHtMask(globalEta);
140 
141  matchCheckEttAndEtm &= (m_EttMask[ieta] == m_EtmMask[ieta]);
142  }
143  if (!matchCheckEttAndEtm)
144  edm::LogWarning("L1GctSetupError")
145  << "L1GctJetFinderBase::setEnergySumMasks() : In Jet Finder ID " << m_id
146  << " setting eta-dependent masks for Et sums: you cannot have different masks for total and missing Et\n";
147  m_gotChannelMask = true;
148  }
149 }
150 
151 std::ostream& operator<<(std::ostream& os, const L1GctJetFinderBase& algo) {
152  using std::endl;
153  os << "ID = " << algo.m_id << endl;
154  os << "Calibration lut pointers stored for " << algo.m_jetEtCalLuts.size() << " eta bins" << endl;
155  for (unsigned ieta = 0; ieta < algo.m_jetEtCalLuts.size(); ieta++) {
156  os << "Eta bin " << ieta << ", JetEtCalibrationLut* = " << algo.m_jetEtCalLuts.at(ieta) << endl;
157  }
158  os << "No of input regions " << algo.m_inputRegions.size() << endl;
159  // for(unsigned i=0; i < algo.m_inputRegions.size(); ++i)
160  // {
161  // os << algo.m_inputRegions.at(i);
162  // }
163  os << "No of output jets " << algo.m_outputJets.size() << endl;
164  // for(unsigned i=0; i < algo.m_outputJets.size(); ++i)
165  // {
166  // os << algo.m_outputJets.at(i);
167  // }
168  os << "Output total scalar Et " << algo.m_outputEtSum << endl;
169  os << "Output vector Et x component " << algo.m_outputExSum << endl;
170  os << "Output vector Et y component " << algo.m_outputEySum << endl;
171  os << "Output total scalar Ht " << algo.m_outputHtSum << endl;
172  os << "Output vector Ht x component " << algo.m_outputHxSum << endl;
173  os << "Output vector Ht y component " << algo.m_outputHySum << endl;
174  os << endl;
175 
176  return os;
177 }
178 
180  m_inputRegions.clear();
181  m_inputRegions.resize(this->maxRegionsIn());
182  m_outputJets.clear();
183  m_outputJets.resize(MAX_JETS_OUT);
184  m_sortedJets.clear();
185  m_sortedJets.resize(MAX_JETS_OUT);
186 
187  m_sentProtoJets.clear();
189  m_rcvdProtoJets.clear();
191  m_keptProtoJets.clear();
193 
194  m_outputEtSum = 0;
195  m_outputExSum = 0;
196  m_outputEySum = 0;
197  m_outputHtSum = 0;
198  m_outputHxSum = 0;
199  m_outputHySum = 0;
200 
202 }
203 
206  m_outputEtSumPipe.reset(numOfBx());
207  m_outputExSumPipe.reset(numOfBx());
208  m_outputEySumPipe.reset(numOfBx());
209  m_outputHtSumPipe.reset(numOfBx());
210  m_outputHxSumPipe.reset(numOfBx());
211  m_outputHySumPipe.reset(numOfBx());
212 }
213 
220  L1GctRegion tempRgn;
221  tempRgn.setBx(bxAbs());
222  m_inputRegions.assign(this->maxRegionsIn(), tempRgn);
223 
226  m_sentProtoJets.assign(MAX_JETS_OUT, tempRgn);
227  m_rcvdProtoJets.assign(MAX_JETS_OUT, tempRgn);
228  m_keptProtoJets.assign(MAX_JETS_OUT, tempRgn);
229 
231  L1GctJet tempJet;
232  tempJet.setBx(bxAbs());
233  m_outputJets.assign(MAX_JETS_OUT, tempJet);
234 }
235 
236 // This is how the regions from the RCT get into the GCT for processing
238  static const unsigned NPHI = L1CaloRegionDetId::N_PHI;
239  static const unsigned N_00 = N_EXTRA_REGIONS_ETA00;
240  unsigned crate = region.rctCrate();
241  // Find the column for this region in a global (eta,phi) array
242  // Note the column numbers here are not the same as region->gctPhi()
243  // because the RCT crates are not numbered from phi=0.
244  unsigned colAbsolute = (crate + 1) * 2 + region.rctPhi();
245  unsigned colRelative = ((colAbsolute + NPHI) - m_minColThisJf) % NPHI;
246  if (colRelative < this->nCols()) {
247  // We are in the right range in phi
248  // Now check we are in the right wheel (positive or negative eta)
249  if ((crate / N_JF_PER_WHEEL) == (m_id / N_JF_PER_WHEEL)) {
250  unsigned i = colRelative * COL_OFFSET + N_00 + region.rctEta();
252  } else {
253  // Accept neighbouring regions from the other wheel
254  if (region.rctEta() < N_00) {
255  unsigned i = colRelative * COL_OFFSET + N_00 - (region.rctEta() + 1);
257  }
258  }
259  }
260 }
261 
263 std::vector<L1GctInternJetData> L1GctJetFinderBase::getInternalJets() const {
264  std::vector<L1GctInternJetData> result;
265  for (RawJetVector::const_iterator jet = m_outputJetsPipe.contents.begin(); jet != m_outputJetsPipe.contents.end();
266  jet++) {
268  jet->bx(),
269  jet->calibratedEt(m_jetEtCalLuts.at(jet->rctEta())),
270  jet->overFlow(),
271  jet->tauVeto(),
272  jet->hwEta(),
273  jet->hwPhi(),
274  jet->rank(m_jetEtCalLuts.at(jet->rctEta()))));
275  }
276  return result;
277 }
278 
280 std::vector<L1GctInternEtSum> L1GctJetFinderBase::getInternalEtSums() const {
281  std::vector<L1GctInternEtSum> result;
282  for (int bx = 0; bx < numOfBx(); bx++) {
283  result.push_back(L1GctInternEtSum::fromEmulatorJetTotEt(m_outputEtSumPipe.contents.at(bx).value(),
284  m_outputEtSumPipe.contents.at(bx).overFlow(),
285  static_cast<int16_t>(bx - bxMin())));
287  m_outputExSumPipe.contents.at(bx).overFlow(),
288  static_cast<int16_t>(bx - bxMin())));
290  m_outputEySumPipe.contents.at(bx).overFlow(),
291  static_cast<int16_t>(bx - bxMin())));
292  result.push_back(L1GctInternEtSum::fromEmulatorJetTotHt(m_outputHtSumPipe.contents.at(bx).value(),
293  m_outputHtSumPipe.contents.at(bx).overFlow(),
294  static_cast<int16_t>(bx - bxMin())));
295  }
296  return result;
297 }
298 
299 std::vector<L1GctInternHtMiss> L1GctJetFinderBase::getInternalHtMiss() const {
300  std::vector<L1GctInternHtMiss> result;
301  result.reserve(numOfBx());
302  for (int bx = 0; bx < numOfBx(); bx++) {
303  result.push_back(L1GctInternHtMiss::emulatorJetMissHt(m_outputHxSumPipe.contents.at(bx).value(),
304  m_outputHySumPipe.contents.at(bx).value(),
305  m_outputHxSumPipe.contents.at(bx).overFlow(),
306  static_cast<int16_t>(bx - bxMin())));
307  }
308  return result;
309 }
310 
311 // PROTECTED METHODS BELOW
314  switch (ft) {
315  case TOP:
316  m_rcvdProtoJets = m_neighbourJetFinders.at(0)->getSentProtoJets();
317  break;
318  case BOT:
319  m_rcvdProtoJets = m_neighbourJetFinders.at(1)->getSentProtoJets();
320  break;
321  case TOPBOT:
322  // Copy half the jets from each neighbour
323  static const unsigned int MAX_TOPBOT_JETS = MAX_JETS_OUT / 2;
324  unsigned j = 0;
326  temp = m_neighbourJetFinders.at(0)->getSentProtoJets();
327  for (; j < MAX_TOPBOT_JETS; ++j) {
328  m_rcvdProtoJets.at(j) = temp.at(j);
329  }
330  temp = m_neighbourJetFinders.at(1)->getSentProtoJets();
331  for (; j < MAX_JETS_OUT; ++j) {
332  m_rcvdProtoJets.at(j) = temp.at(j);
333  }
334  break;
335  }
336 }
337 
340  JetVector tempJets(MAX_JETS_OUT);
341  for (unsigned j = 0; j < MAX_JETS_OUT; j++) {
342  tempJets.at(j) = m_outputJets.at(j).jetCand(m_jetEtCalLuts);
343  }
344 
345  // Sort the jets
346  L1GctJetSorter jSorter(tempJets);
347  m_sortedJets = jSorter.getSortedJets();
348 
349  //store jets in "pipeline memory" for checking
351 }
352 
355  // Refactored energy sums code - find scalar and vector sums
356  // of Et and Ht instead of strip stums
357  doEtSums();
358  doHtSums();
359 
360  //calculate the Hf tower Et sums and tower-over-threshold counts
362 
363  return;
364 }
365 
366 // Calculates scalar and vector sum of Et over input regions
368  unsigned et0 = 0;
369  unsigned et1 = 0;
370  bool of = false;
371 
372  // Add the Et values from regions 2 to 12 for strip 0,
373  // the Et values from regions 15 to 25 for strip 1.
374  unsigned offset = COL_OFFSET * centralCol0();
375  unsigned ieta = 0;
376  for (UShort i = offset + N_EXTRA_REGIONS_ETA00; i < offset + COL_OFFSET; ++i, ++ieta) {
377  if (!m_EttMask[ieta]) {
378  et0 += m_inputRegions.at(i).et();
379  of |= m_inputRegions.at(i).overFlow();
380  et1 += m_inputRegions.at(i + COL_OFFSET).et();
381  of |= m_inputRegions.at(i + COL_OFFSET).overFlow();
382  }
383  }
384 
385  etTotalType etStrip0(et0);
386  etTotalType etStrip1(et1);
387  etStrip0.setOverFlow(etStrip0.overFlow() || of);
388  etStrip1.setOverFlow(etStrip1.overFlow() || of);
389  unsigned xfact0 = (4 * m_id + 6) % 36;
390  unsigned xfact1 = (4 * m_id + 8) % 36;
391  unsigned yfact0 = (4 * m_id + 15) % 36;
392  unsigned yfact1 = (4 * m_id + 17) % 36;
393  m_outputEtSum = etStrip0 + etStrip1;
394  if (m_outputEtSum.overFlow())
396  m_outputExSum = etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternEtSum::kJetMissEtNBits>(
397  etStrip0, xfact0, etStrip1, xfact1);
398  m_outputEySum = etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternEtSum::kJetMissEtNBits>(
399  etStrip0, yfact0, etStrip1, yfact1);
400 
404 }
405 
406 // Calculates scalar and vector sum of Ht over calibrated jets
408  unsigned htt = 0;
409  unsigned ht0 = 0;
410  unsigned ht1 = 0;
411  bool of = false;
412 
413  for (UShort i = 0; i < MAX_JETS_OUT; ++i) {
414  // Only sum Ht for valid jets
415  if (!m_outputJets.at(i).isNullJet()) {
416  unsigned ieta = m_outputJets.at(i).rctEta();
417  unsigned htJet = m_outputJets.at(i).calibratedEt(m_jetEtCalLuts.at(ieta));
418  // Scalar sum of Htt, with associated threshold
419  if (htJet >= m_HttSumJetThreshold && !m_HttMask[ieta]) {
420  htt += htJet;
421  }
422  // Strip sums, for input to Htm calculation, with associated threshold
423  if (htJet >= m_HtmSumJetThreshold && !m_HtmMask[ieta]) {
424  if (m_outputJets.at(i).rctPhi() == 0) {
425  ht0 += htJet;
426  }
427  if (m_outputJets.at(i).rctPhi() == 1) {
428  ht1 += htJet;
429  }
430  of |= m_outputJets.at(i).overFlow();
431  }
432  }
433  }
434 
435  etHadType httTotal(htt);
436  etHadType htStrip0(ht0);
437  etHadType htStrip1(ht1);
438  httTotal.setOverFlow(httTotal.overFlow() || of);
439  if (httTotal.overFlow())
440  httTotal.setValue(htTotalMaxValue);
441  htStrip0.setOverFlow(htStrip0.overFlow() || of);
442  htStrip1.setOverFlow(htStrip1.overFlow() || of);
443  unsigned xfact0 = (4 * m_id + 10) % 36;
444  unsigned xfact1 = (4 * m_id + 4) % 36;
445  unsigned yfact0 = (4 * m_id + 19) % 36;
446  unsigned yfact1 = (4 * m_id + 13) % 36;
447  m_outputHtSum = httTotal;
448  m_outputHxSum = etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternHtMiss::kJetMissHtNBits>(
449  htStrip0, xfact0, htStrip1, xfact1);
450  m_outputHySum = etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternHtMiss::kJetMissHtNBits>(
451  htStrip0, yfact0, htStrip1, yfact1);
452 
453  // Common overflow for Ht components
454  bool htmOverFlow = m_outputHxSum.overFlow() || m_outputHySum.overFlow();
455  m_outputHxSum.setOverFlow(htmOverFlow);
456  m_outputHySum.setOverFlow(htmOverFlow);
457 
461 }
462 
463 // Calculates Hf inner rings Et sum, and counts number of "fineGrain" bits set
465  static const UShort NUMBER_OF_FRWRD_RINGS = 4;
466  static const UShort NUMBER_OF_INNER_RINGS = 2;
467  std::vector<unsigned> et(NUMBER_OF_INNER_RINGS, 0);
468  std::vector<bool> of(NUMBER_OF_INNER_RINGS, false);
469  std::vector<unsigned> nt(NUMBER_OF_INNER_RINGS, 0);
470 
471  UShort offset = COL_OFFSET * (centralCol0() + 1);
472  for (UShort i = 0; i < NUMBER_OF_FRWRD_RINGS; ++i) {
473  offset--;
474 
475  // Sum HF Et and count jets above threshold over "inner rings"
476  if (i < NUMBER_OF_INNER_RINGS) {
477  et.at(i) += m_inputRegions.at(offset).et();
478  of.at(i) = of.at(i) || m_inputRegions.at(offset).overFlow();
479 
480  et.at(i) += m_inputRegions.at(offset + COL_OFFSET).et();
481  of.at(i) = of.at(i) || m_inputRegions.at(offset + COL_OFFSET).overFlow();
482 
483  if (m_inputRegions.at(offset).fineGrain())
484  nt.at(i)++;
485  if (m_inputRegions.at(offset + COL_OFFSET).fineGrain())
486  nt.at(i)++;
487  }
488  }
489  hfTowerSumsType temp(et.at(0), et.at(1), nt.at(0), nt.at(1));
490  temp.etSum0.setOverFlow(temp.etSum0.overFlow() || of.at(0));
491  temp.etSum1.setOverFlow(temp.etSum1.overFlow() || of.at(1));
492  return temp;
493 }
494 
495 // Here is where the rotations are actually done
496 // Procedure suitable for implementation in hardware, using
497 // integer multiplication and bit shifting operations
498 
499 template <int kBitsInput, int kBitsOutput>
501  const L1GctUnsignedInt<kBitsInput>& etStrip0,
502  const unsigned& fact0,
503  const L1GctUnsignedInt<kBitsInput>& etStrip1,
504  const unsigned& fact1) {
505  // typedefs and constants
506  typedef L1GctTwosComplement<kBitsOutput> OutputType;
507 
508  // The sin(phi), cos(phi) factors are represented in 15 bits,
509  // as numbers in the range -2^14 to 2^14.
510  // We multiply each input strip Et by the required factor
511  // then shift, to divide by 2^13. This gives an extra bit
512  // of precision on the LSB of the output values.
513  // It's important to avoid systematically biasing the Ex, Ey
514  // component values because this results in an asymmetric
515  // distribution in phi for the final MEt.
516  // The extra LSB is required because one of the factors is 0.5.
517  // Applying this factor without the extra LSB corrects odd values
518  // systematically down by 0.5; or all values by 0.25
519  // on average, giving a shift of -2 units in Ex.
520 
521  static const int internalComponentSize = 15;
522  static const int maxEt = 1 << internalComponentSize;
523 
524  static const int kBitsFactor = internalComponentSize + kBitsInput + 1;
525  static const int maxFactor = 1 << kBitsFactor;
526 
527  static const int bitsToShift = internalComponentSize - 2;
528  static const int halfInputLsb = 1 << (bitsToShift - 1);
529 
530  // These factors correspond to the sine of angles from -90 degrees to
531  // 90 degrees in 10 degree steps, multiplied by 16383 and written
532  // as a <kBitsFactor>-bit 2s-complement number.
533  const int factors[19] = {maxFactor - 16383,
534  maxFactor - 16134,
535  maxFactor - 15395,
536  maxFactor - 14188,
537  maxFactor - 12550,
538  maxFactor - 10531,
539  maxFactor - 8192,
540  maxFactor - 5603,
541  maxFactor - 2845,
542  0,
543  2845,
544  5603,
545  8192,
546  10531,
547  12550,
548  14188,
549  15395,
550  16134,
551  16383};
552 
553  int rotatedValue0, rotatedValue1, myFact;
554  int etComponentSum = 0;
555 
556  if (fact0 >= 36 || fact1 >= 36) {
557  if (m_verbose) {
558  edm::LogError("L1GctProcessingError") << "L1GctJetLeafCard::rotateEtValue() has been called with factor numbers "
559  << fact0 << " and " << fact1 << "; should be less than 36 \n";
560  }
561  } else {
562  // First strip - choose the required multiplication factor
563  if (fact0 > 18) {
564  myFact = factors[(36 - fact0)];
565  } else {
566  myFact = factors[fact0];
567  }
568 
569  // Multiply the Et value by the factor.
570  rotatedValue0 = static_cast<int>(etStrip0.value()) * myFact;
571 
572  // Second strip - choose the required multiplication factor
573  if (fact1 > 18) {
574  myFact = factors[(36 - fact1)];
575  } else {
576  myFact = factors[fact1];
577  }
578 
579  // Multiply the Et value by the factor.
580  rotatedValue1 = static_cast<int>(etStrip1.value()) * myFact;
581 
582  // Add the two scaled values together, with full resolution including
583  // fractional parts from the sin(phi), cos(phi) scaling.
584  // Adjust the value to avoid truncation errors since these
585  // accumulate and cause problems for the missing Et measurement.
586  // Then discard the 13 LSB and interpret the result as
587  // a 15-bit twos complement integer.
588  etComponentSum = ((rotatedValue0 + rotatedValue1) + halfInputLsb) >> bitsToShift;
589 
590  etComponentSum = etComponentSum & (maxEt - 1);
591  if (etComponentSum >= (maxEt / 2)) {
592  etComponentSum = etComponentSum - maxEt;
593  }
594  }
595 
596  // Store as a TwosComplement format integer and return
597  OutputType temp(etComponentSum);
598  temp.setOverFlow(temp.overFlow() || etStrip0.overFlow() || etStrip1.overFlow());
599  return temp;
600 }
601 
602 // Declare the specific versions we want to use, to help the linker out
603 // One for the MET components
605 L1GctJetFinderBase::etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternEtSum::kJetMissEtNBits>(
606  const L1GctJetFinderBase::etTotalType&, const unsigned&, const L1GctJetFinderBase::etTotalType&, const unsigned&);
607 
608 // One for the MHT components
610 L1GctJetFinderBase::etComponentForJetFinder<L1GctInternEtSum::kTotEtOrHtNBits, L1GctInternHtMiss::kJetMissHtNBits>(
611  const L1GctJetFinderBase::etTotalType&, const unsigned&, const L1GctJetFinderBase::etTotalType&, const unsigned&);
L1GctJetFinderBase::COL_OFFSET
static const unsigned int COL_OFFSET
The index offset between columns.
Definition: L1GctJetFinderBase.h:112
L1GctJetFinderParams::getCenJetEtSeedGct
unsigned getCenJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:47
L1GctJetEtCalibrationLut.h
L1GctJetFinderBase::UShort
unsigned short int UShort
Definition: L1GctJetFinderBase.h:52
L1GctJetFinderBase::RegionsVector
std::vector< L1GctRegion > RegionsVector
Definition: L1GctJetFinderBase.h:53
L1GctJetFinderBase::m_jetEtCalLuts
lutPtrVector m_jetEtCalLuts
Jet Et Conversion LUT pointer.
Definition: L1GctJetFinderBase.h:266
L1GctUnsignedInt::setValue
void setValue(unsigned value)
Set value from unsigned.
Definition: L1GctUnsignedInt.h:111
L1GctJetFinderBase::m_TauJetSeed
unsigned m_TauJetSeed
Definition: L1GctJetFinderBase.h:262
L1GctJetFinderBase::m_outputHySum
htCompInternJfType m_outputHySum
Definition: L1GctJetFinderBase.h:321
mps_fire.i
i
Definition: mps_fire.py:428
L1GctJetFinderBase::etTotalMaxValue
Definition: L1GctJetFinderBase.h:63
L1GctJetFinderBase::getInternalJets
std::vector< L1GctInternJetData > getInternalJets() const
get output jets in raw format - to be stored in the event
Definition: L1GctJetFinderBase.cc:263
L1GctJetFinderBase::N_EXTRA_REGIONS_ETA00
static const unsigned int N_EXTRA_REGIONS_ETA00
Number of additional regions to process on the "wrong" side of eta=0 (determines COL_OFFSET)
Definition: L1GctJetFinderBase.h:115
L1GctJetFinderBase::m_outputEySumPipe
Pipeline< etCompInternJfType > m_outputEySumPipe
Definition: L1GctJetFinderBase.h:372
L1CaloRegion::setBx
void setBx(int16_t bx)
set bx
Definition: L1CaloRegion.cc:103
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
L1GctJetFinderBase::m_keptProtoJets
RegionsVector m_keptProtoJets
List of pre-clustered jets retained locally as input to the final clustering.
Definition: L1GctJetFinderBase.h:309
L1GctJetFinderBase::m_gotChannelMask
bool m_gotChannelMask
Remember whether channel mask have been stored.
Definition: L1GctJetFinderBase.h:244
L1GctJetFinderParams::getTauJetEtSeedGct
unsigned getTauJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:49
L1GctJetFinderBase::m_EtmMask
bool m_EtmMask[11]
Definition: L1GctJetFinderBase.h:290
L1GctJetFinderBase::m_neighbourJetFinders
std::vector< L1GctJetFinderBase * > m_neighbourJetFinders
Store neighbour pointers.
Definition: L1GctJetFinderBase.h:229
L1GctJetFinderBase::MAX_REGIONS_IN
static const unsigned int MAX_REGIONS_IN
The real jetFinders must define these constants.
Definition: L1GctJetFinderBase.h:362
L1CaloRegion
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
L1GctJetFinderBase::m_outputJetsPipe
RawJetPipeline m_outputJetsPipe
Output jets "pipeline memory" for checking.
Definition: L1GctJetFinderBase.h:367
L1GctJetSorter::getSortedJets
JetVector getSortedJets() const
Definition: L1GctJetSorter.cc:12
L1GctJetFinderBase::MAX_JETS_OUT
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
Definition: L1GctJetFinderBase.h:111
nt
int nt
Definition: AMPTWrapper.h:42
L1GctJetFinderBase::m_positiveEtaWheel
bool m_positiveEtaWheel
Definition: L1GctJetFinderBase.h:250
L1GctJetFinderBase::htTotalMaxValue
Definition: L1GctJetFinderBase.h:64
L1GctJetFinderBase::setEnergySumMasks
void setEnergySumMasks(const L1GctChannelMask *chmask)
Set masks for energy summing.
Definition: L1GctJetFinderBase.cc:130
L1GctJetFinderBase::m_outputJets
RawJetVector m_outputJets
output jets
Definition: L1GctJetFinderBase.h:312
L1GctJetFinderBase::m_EtaBoundry
unsigned m_EtaBoundry
Definition: L1GctJetFinderBase.h:263
L1GctJetFinderBase
Base class to allow implementation of jetFinder algorithms.
Definition: L1GctJetFinderBase.h:48
L1GctProcessor::numOfBx
int numOfBx() const
Definition: L1GctProcessor.h:79
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1GctJetFinderBase::doEtSums
void doEtSums()
Calculates scalar and vector sum of Et over input regions.
Definition: L1GctJetFinderBase.cc:367
L1GctProcessor::bxRel
int bxRel() const
Definition: L1GctProcessor.h:81
L1GctRegion::makeJfInputRegion
static L1GctRegion makeJfInputRegion(const L1CaloRegion &)
Definition: L1GctRegion.cc:7
L1GctJetSorter.h
L1GctJetFinderBase::lutPtrVector
std::vector< lutPtr > lutPtrVector
Definition: L1GctJetFinderBase.h:108
L1GctJetFinderBase::resetPipelines
void resetPipelines() override
Definition: L1GctJetFinderBase.cc:204
L1GctUnsignedInt::value
unsigned value() const
access value as unsigned
Definition: L1GctUnsignedInt.h:53
L1GctJetFinderBase::m_EttMask
bool m_EttMask[11]
Definition: L1GctJetFinderBase.h:289
L1GctJetFinderBase::setInputRegion
void setInputRegion(const L1CaloRegion &region)
Set input data.
Definition: L1GctJetFinderBase.cc:237
L1GctJetFinderBase::m_outputExSumPipe
Pipeline< etCompInternJfType > m_outputExSumPipe
Definition: L1GctJetFinderBase.h:371
L1GctJetFinderBase::maxRegionsIn
virtual unsigned maxRegionsIn() const
Definition: L1GctJetFinderBase.h:333
L1GctJetFinderParams.h
L1GctJetFinderBase::m_outputHtSumPipe
Pipeline< etHadType > m_outputHtSumPipe
Definition: L1GctJetFinderBase.h:373
L1GctJetFinderBase::getInternalEtSums
std::vector< L1GctInternEtSum > getInternalEtSums() const
get et sums in raw format - to be stored in the event
Definition: L1GctJetFinderBase.cc:280
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1GctJetFinderParams::getTauIsoEtThresholdGct
unsigned getTauIsoEtThresholdGct() const
Definition: L1GctJetFinderParams.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1GctJet::setBx
void setBx(const int16_t bx)
Definition: L1GctJet.h:53
L1GctJetFinderBase::etComponentForJetFinder
L1GctTwosComplement< kBitsOutput > etComponentForJetFinder(const L1GctUnsignedInt< kBitsInput > &etStrip0, const unsigned &fact0, const L1GctUnsignedInt< kBitsInput > &etStrip1, const unsigned &fact1)
Private method for calculating MEt and MHt components.
Definition: L1GctJetFinderBase.cc:500
L1GctInternJetData::fromEmulator
static L1GctInternJetData fromEmulator(L1CaloRegionDetId rgn, int16_t bx, uint16_t et, bool overFlow, bool tauVeto, uint8_t eta, uint8_t phi, uint16_t rank)
Definition: L1GctInternJetData.cc:24
L1GctProcessor::bxAbs
int bxAbs() const
Definition: L1GctProcessor.h:80
L1GctJetFinderParams::getCenForJetEtaBoundary
unsigned getCenForJetEtaBoundary() const
Definition: L1GctJetFinderParams.h:43
L1GctJetFinderBase::N_COLS
static const unsigned int N_COLS
Definition: L1GctJetFinderBase.h:363
L1GctJetFinderBase::setNeighbourJetFinders
void setNeighbourJetFinders(const std::vector< L1GctJetFinderBase * > &neighbours)
Set pointers to neighbours - needed to complete the setup.
Definition: L1GctJetFinderBase.cc:80
L1GctJetFinderBase::fetchProtoJetsFromNeighbour
void fetchProtoJetsFromNeighbour(const fetchType ft)
fetch the protoJets from neighbour jetFinder
Definition: L1GctJetFinderBase.cc:313
cmsdt::algo
algo
Definition: constants.h:164
L1GctProcessor::Pipeline::contents
std::vector< T > contents
Definition: L1GctProcessor.h:85
L1GctJetFinderBase.h
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
L1GctJetFinderBase::m_rcvdProtoJets
RegionsVector m_rcvdProtoJets
List of pre-clustered jets received from neighbour before the final stage of clustering.
Definition: L1GctJetFinderBase.h:307
L1GctJetFinderBase::m_gotJetEtCalLuts
bool m_gotJetEtCalLuts
Remember whether jet Et calibration Lut pointers have been stored.
Definition: L1GctJetFinderBase.h:241
L1GctJetFinderBase::setupObjects
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
Definition: L1GctJetFinderBase.cc:217
L1GctJetFinderBase::calcHfSums
hfTowerSumsType calcHfSums() const
Calculates Et sum and number of towers over threshold in Hf.
Definition: L1GctJetFinderBase.cc:464
L1GctJetFinderBase::CENTRAL_COL0
static const unsigned int CENTRAL_COL0
Definition: L1GctJetFinderBase.h:364
L1GctInternHtMiss::emulatorJetMissHt
static L1GctInternHtMiss emulatorJetMissHt(const int htx, const int hty, const bool overFlow, const int16_t bx)
Named ctor for making missing Ht x & y components object from emulator (jetFinder output).
Definition: L1GctInternHtMiss.cc:36
L1GctJetFinderBase::m_outputHfSums
hfTowerSumsType m_outputHfSums
Definition: L1GctJetFinderBase.h:323
L1GctJetFinderBase::setJetEtCalibrationLuts
void setJetEtCalibrationLuts(const lutPtrVector &jfluts)
Set pointer to calibration Lut - needed to complete the setup.
Definition: L1GctJetFinderBase.cc:124
L1GctJetFinderBase::m_gotNeighbourPointers
bool m_gotNeighbourPointers
Remember whether the neighbour pointers have been stored.
Definition: L1GctJetFinderBase.h:235
L1GctJetFinderBase::m_minColThisJf
unsigned m_minColThisJf
parameter to determine which Regions belong in our acceptance
Definition: L1GctJetFinderBase.h:253
L1GctTwosComplement
Definition of signed integer types with overflow.
Definition: L1GctTwosComplement.h:28
L1GctProcessor::reset
void reset()
complete reset of processor
Definition: L1GctProcessor.h:28
L1GctChannelMask::totalEtMask
bool totalEtMask(unsigned ieta) const
Definition: L1GctChannelMask.cc:64
L1GctJetFinderBase::m_inputRegions
RegionsVector m_inputRegions
Definition: L1GctJetFinderBase.h:302
L1GctJetFinderParams::getForJetEtSeedGct
unsigned getForJetEtSeedGct() const
Definition: L1GctJetFinderParams.h:48
L1GctJetFinderBase::m_outputExSum
etCompInternJfType m_outputExSum
Definition: L1GctJetFinderBase.h:317
L1GctChannelMask::totalHtMask
bool totalHtMask(unsigned ieta) const
Definition: L1GctChannelMask.cc:78
L1GctJetFinderParams
Definition: L1GctJetFinderParams.h:10
L1GctJetFinderBase::m_idInRange
bool m_idInRange
Remember whether range check on the input ID was ok.
Definition: L1GctJetFinderBase.h:232
L1GctInternJetData.h
L1GctJetFinderBase::setJetFinderParams
void setJetFinderParams(const L1GctJetFinderParams *jfpars)
Set pointer to parameters - needed to complete the setup.
Definition: L1GctJetFinderBase.cc:112
L1GctProcessor::Pipeline::store
void store(const T &thisBx, const int bxNum)
Definition: L1GctProcessor.h:98
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
L1GctJetFinderBase::m_sentProtoJets
RegionsVector m_sentProtoJets
List of pre-clustered jets to be sent to neighbour after the first stage of clustering.
Definition: L1GctJetFinderBase.h:305
L1GctJetFinderBase::JetVector
std::vector< L1GctJetCand > JetVector
Definition: L1GctJetFinderBase.h:55
L1GctJetFinderBase::doHtSums
void doHtSums()
Calculates scalar and vector sum of Ht over calibrated jets.
Definition: L1GctJetFinderBase.cc:407
L1GctJetFinderBase::m_id
int m_id
algo ID
Definition: L1GctJetFinderBase.h:226
L1GctChannelMask.h
L1GctJetFinderBase::m_outputHxSumPipe
Pipeline< htCompInternJfType > m_outputHxSumPipe
Definition: L1GctJetFinderBase.h:374
L1GctJetFinderBase::TOPBOT
Definition: L1GctJetFinderBase.h:223
L1GctJetFinderBase::m_HtmSumJetThreshold
unsigned m_HtmSumJetThreshold
Definition: L1GctJetFinderBase.h:286
L1GctProcessor::m_verbose
bool m_verbose
Flag to control output messages.
Definition: L1GctProcessor.h:109
L1GctJetSorter
Definition: L1GctJetSorter.h:8
L1GctJetFinderBase::TOP
Definition: L1GctJetFinderBase.h:223
L1GctJetFinderBase::~L1GctJetFinderBase
~L1GctJetFinderBase() override
Definition: L1GctJetFinderBase.cc:77
L1GctProcessor::bxMin
int bxMin() const
Support for multiple beam crossing operation.
Definition: L1GctProcessor.h:77
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
createfilelist.int
int
Definition: createfilelist.py:10
L1GctJetFinderParams::getMHtJetEtThresholdGct
unsigned getMHtJetEtThresholdGct() const
Definition: L1GctJetFinderParams.h:52
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1GctJetFinderBase::resetProcessor
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines.
Definition: L1GctJetFinderBase.cc:179
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
L1GctJetFinderBase::hfTowerSumsType::reset
void reset()
Definition: L1GctJetFinderBase.h:91
L1GctInternEtSum::fromEmulatorJetMissEt
static L1GctInternEtSum fromEmulatorJetMissEt(int missEtxOrEty, bool overFlow, int16_t bx)
Definition: L1GctInternEtSum.cc:109
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >
L1GctJetFinderBase::m_HtmMask
bool m_HtmMask[11]
Definition: L1GctJetFinderBase.h:292
L1CaloRegionDetId::N_PHI
static const unsigned N_PHI
Definition: L1CaloRegionDetId.h:20
L1GctJetFinderBase::m_gotJetFinderParams
bool m_gotJetFinderParams
Remember whether jetfinder parameters have been stored.
Definition: L1GctJetFinderBase.h:238
L1GctJetFinderBase::L1GctJetFinderBase
L1GctJetFinderBase(int id)
id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi.
Definition: L1GctJetFinderBase.cc:23
L1GctJet
A Level-1 jet candidate, used within GCT emulation.
Definition: L1GctJet.h:26
L1GctJetFinderBase::getInternalHtMiss
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
Definition: L1GctJetFinderBase.cc:299
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
metsig::jet
Definition: SignAlgoResolutions.h:47
L1GctJetFinderBase::m_outputHxSum
htCompInternJfType m_outputHxSum
Definition: L1GctJetFinderBase.h:320
L1GctJetFinderBase::m_outputHySumPipe
Pipeline< htCompInternJfType > m_outputHySumPipe
Definition: L1GctJetFinderBase.h:375
L1GctUnsignedInt::overFlow
bool overFlow() const
access overflow
Definition: L1GctUnsignedInt.h:56
L1GctUnsignedInt::setOverFlow
void setOverFlow(bool oflow)
set the overflow bit
Definition: L1GctUnsignedInt.h:50
heavyionUCCDQM_cfi.maxEt
maxEt
Definition: heavyionUCCDQM_cfi.py:14
L1GctJetFinderBase::m_sortedJets
JetVector m_sortedJets
Definition: L1GctJetFinderBase.h:313
L1GctTwosComplement::overFlow
bool overFlow() const
access overflow
Definition: L1GctTwosComplement.h:62
L1GctJetFinderBase::m_outputEtSumPipe
Pipeline< etTotalType > m_outputEtSumPipe
"Pipeline memories" for energy sums
Definition: L1GctJetFinderBase.h:370
L1GctJetFinderBase::m_CenJetSeed
unsigned m_CenJetSeed
Definition: L1GctJetFinderBase.h:260
L1GctChannelMask::missingHtMask
bool missingHtMask(unsigned ieta) const
Definition: L1GctChannelMask.cc:85
L1GctChannelMask::missingEtMask
bool missingEtMask(unsigned ieta) const
Definition: L1GctChannelMask.cc:71
L1GctJetFinderBase::m_outputHtSum
etHadType m_outputHtSum
Definition: L1GctJetFinderBase.h:319
L1GctJetFinderBase::doEnergySums
void doEnergySums()
Fill the Et strip sums and Ht sum. All jetFinders should call this in process().
Definition: L1GctJetFinderBase.cc:354
L1GctJetFinderBase::hfTowerSumsType
Definition: L1GctJetFinderBase.h:73
L1GctJetFinderBase::fetchType
fetchType
different ways of getting the neighbour data
Definition: L1GctJetFinderBase.h:223
L1GctJetFinderBase::N_JF_PER_WHEEL
static const unsigned int N_JF_PER_WHEEL
No of jetFinders per Wheel.
Definition: L1GctJetFinderBase.h:113
L1GctJetFinderBase::m_outputEySum
etCompInternJfType m_outputEySum
Definition: L1GctJetFinderBase.h:318
mps_fire.result
result
Definition: mps_fire.py:311
L1GctJetFinderBase::nCols
virtual unsigned nCols() const
Definition: L1GctJetFinderBase.h:335
L1GctTwosComplement::setOverFlow
void setOverFlow(bool oflow)
set the overflow bit
Definition: L1GctTwosComplement.h:53
L1GctChannelMask
Definition: L1GctChannelMask.h:8
L1GctInternEtSum::fromEmulatorJetTotHt
static L1GctInternEtSum fromEmulatorJetTotHt(unsigned totHt, bool overFlow, int16_t bx)
Definition: L1GctInternEtSum.cc:99
L1GctRegion
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
L1GctProcessor
ABC for a GCT trigger data processing unit.
Definition: L1GctProcessor.h:22
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
L1GctJetFinderBase::m_HttMask
bool m_HttMask[11]
Definition: L1GctJetFinderBase.h:291
L1GctJetFinderBase::m_HttSumJetThreshold
unsigned m_HttSumJetThreshold
Definition: L1GctJetFinderBase.h:285
L1GctJetFinderBase::m_tauIsolationThreshold
unsigned m_tauIsolationThreshold
Definition: L1GctJetFinderBase.h:282
L1GctJetFinderBase::centralCol0
virtual unsigned centralCol0() const
Definition: L1GctJetFinderBase.h:334
L1GctJetFinderParams::NUMBER_ETA_VALUES
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
Definition: L1GctJetFinderParams.h:12
L1GctJetFinderBase::m_outputEtSum
etTotalType m_outputEtSum
output Et strip sums and Ht - refactored
Definition: L1GctJetFinderBase.h:316
L1GctProcessor::Pipeline::reset
void reset(const unsigned nBx)
Definition: L1GctProcessor.h:93
L1GctJetFinderBase::m_FwdJetSeed
unsigned m_FwdJetSeed
Definition: L1GctJetFinderBase.h:261
L1GctJetFinderParams::getHtJetEtThresholdGct
unsigned getHtJetEtThresholdGct() const
Definition: L1GctJetFinderParams.h:51
L1GctJetFinderBase::sortJets
void sortJets()
Sort the found jets. All jetFinders should call this in process().
Definition: L1GctJetFinderBase.cc:339
L1GctInternEtSum::fromEmulatorJetTotEt
static L1GctInternEtSum fromEmulatorJetTotEt(unsigned totEt, bool overFlow, int16_t bx)
Emulator constructors.
Definition: L1GctInternEtSum.cc:89
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctJetFinderBase &algo)
Definition: L1GctJetFinderBase.cc:151
L1CaloRegion.h
L1GctJetFinderBase::BOT
Definition: L1GctJetFinderBase.h:223