CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Stage1Layer2HFMinimumBias.cc
Go to the documentation of this file.
1 
12 
14  : params_(params)
15 {}
16 
17 
19 {}
20 
21 
22 void l1t::Stage1Layer2HFMinimumBias::processEvent(const std::vector<l1t::CaloRegion> & regions,
23  const std::vector<l1t::CaloEmCand> & EMCands,
24  l1t::CaloSpare * spare) {
25 
26  int sumBits[4] = {0,0,0,0};
27 
28  for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region != regions.end(); region++) {
29  switch(region->hwEta() )
30  {
31  case 0: //1-
32  sumBits[1] += region->hwQual();
33  break;
34  case 1: //2-
35  sumBits[3] += region->hwQual();
36  break;
37  case 20: //2+
38  sumBits[2] += region->hwQual();
39  break;
40  case 21: //1+
41  sumBits[0] += region->hwQual();
42  break;
43  default:
44  break;
45  }
46  }
47 
48  for(int i = 0; i < 4; i++)
49  {
50  if(sumBits[i] > 0x7)
51  sumBits[i] = 0x7;
52 
53  spare->SetRing(i, sumBits[i]);
54  }
55 
56  const bool verbose = false;
57  if(verbose)
58  {
59  std::cout << "HF Bit Counts (HFMinimumBias)" << std::endl;
60  std::cout << bitset<12>(spare->hwPt()).to_string() << std::endl;
61  }
62 }
int i
Definition: DBlmapReader.cc:9
void SetRing(unsigned index, int value)
Definition: CaloSpare.cc:42
std::string to_string(const T &t)
Definition: Logger.cc:26
Stage1Layer2HFMinimumBias(CaloParamsHelper *params)
int hwPt() const
Definition: L1Candidate.cc:69
virtual void processEvent(const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, l1t::CaloSpare *spare)
tuple cout
Definition: gather_cfg.py:121