CMS 3D CMS Logo

Stage1Layer2HFMinimumBias.cc
Go to the documentation of this file.
1 
12 
14 {}
15 
16 
17 void l1t::Stage1Layer2HFMinimumBias::processEvent(const std::vector<l1t::CaloRegion> & regions,
18  const std::vector<l1t::CaloEmCand> & EMCands,
19  l1t::CaloSpare * spare) {
20 
21  int sumBits[4] = {0,0,0,0};
22 
23  for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region != regions.end(); region++) {
24  switch(region->hwEta() )
25  {
26  case 0: //1-
27  sumBits[1] += region->hwQual();
28  break;
29  case 1: //2-
30  sumBits[3] += region->hwQual();
31  break;
32  case 20: //2+
33  sumBits[2] += region->hwQual();
34  break;
35  case 21: //1+
36  sumBits[0] += region->hwQual();
37  break;
38  default:
39  break;
40  }
41  }
42 
43  for(int i = 0; i < 4; i++)
44  {
45  if(sumBits[i] > 0x7)
46  sumBits[i] = 0x7;
47 
48  spare->SetRing(i, sumBits[i]);
49  }
50 }
void SetRing(unsigned index, int value)
Definition: CaloSpare.cc:42
void processEvent(const std::vector< l1t::CaloRegion > &regions, const std::vector< l1t::CaloEmCand > &EMCands, l1t::CaloSpare *spare) override
Stage1Layer2HFMinimumBias(CaloParamsHelper const *)