CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1RCTRegion Class Reference

#include <L1RCTRegion.h>

Public Member Functions

unsigned short getActivityBit (int i, int j) const
 
unsigned short getEtIn7Bits (int i, int j) const
 
unsigned short getEtIn9Bits (int i, int j) const
 
unsigned short getHE_FGBit (int i, int j) const
 
unsigned short getMuonBit (int i, int j) const
 
std::vector< unsigned short > giveEastEt () const
 
std::vector< unsigned short > giveEastHE_FG () const
 
unsigned short giveNEEt () const
 
unsigned short giveNEHE_FG () const
 
std::vector< unsigned short > giveNorthEt () const
 
std::vector< unsigned short > giveNorthHE_FG () const
 
unsigned short giveNWEt () const
 
unsigned short giveNWHE_FG () const
 
unsigned short giveSEEt () const
 
unsigned short giveSEHE_FG () const
 
std::vector< unsigned short > giveSouthEt () const
 
std::vector< unsigned short > giveSouthHE_FG () const
 
unsigned short giveSWEt () const
 
unsigned short giveSWHE_FG () const
 
std::vector< unsigned short > giveWestEt () const
 
std::vector< unsigned short > giveWestHE_FG () const
 
 L1RCTRegion ()
 
void print ()
 
void printEdges ()
 
void setActivityBit (int i, int j, unsigned short activity)
 
void setEastEt (const std::vector< unsigned short > &east)
 
void setEastHE_FG (const std::vector< unsigned short > &east)
 
void setEtIn7Bits (int i, int j, unsigned short energy)
 
void setEtIn9Bits (int i, int j, unsigned short energy)
 
void setHE_FGBit (int i, int j, unsigned short HE_FG)
 
void setMuonBit (int i, int j, unsigned short muon)
 
void setNEEt (unsigned short ne)
 
void setNEHE_FG (unsigned short ne)
 
void setNorthEt (const std::vector< unsigned short > &north)
 
void setNorthHE_FG (const std::vector< unsigned short > &north)
 
void setNWEt (unsigned short nw)
 
void setNWHE_FG (unsigned short nw)
 
void setSEEt (unsigned short se)
 
void setSEHE_FG (unsigned short se)
 
void setSouthEt (const std::vector< unsigned short > &south)
 
void setSouthHE_FG (const std::vector< unsigned short > &south)
 
void setSWEt (unsigned short sw)
 
void setSWHE_FG (unsigned short sw)
 
void setWestEt (const std::vector< unsigned short > &west)
 
void setWestHE_FG (const std::vector< unsigned short > &west)
 
 ~L1RCTRegion ()
 

Private Attributes

std::vector< unsigned short > activityBit
 
std::vector< unsigned short > etIn9Bits
 
std::vector< unsigned short > muonBit
 
std::vector< unsigned short > totalRegionEt
 
std::vector< unsigned short > totalRegionHE_FG
 

Detailed Description

Definition at line 6 of file L1RCTRegion.h.

Constructor & Destructor Documentation

◆ L1RCTRegion()

L1RCTRegion::L1RCTRegion ( )

Definition at line 11 of file L1RCTRegion.cc.

11 : totalRegionEt(36), totalRegionHE_FG(36), etIn9Bits(16), muonBit(16), activityBit(16) {}

◆ ~L1RCTRegion()

L1RCTRegion::~L1RCTRegion ( )

Definition at line 13 of file L1RCTRegion.cc.

13 {}

Member Function Documentation

◆ getActivityBit()

unsigned short L1RCTRegion::getActivityBit ( int  i,
int  j 
) const

Definition at line 60 of file L1RCTRegion.cc.

60 { return activityBit.at(4 * i + j); }

References activityBit, mps_fire::i, and dqmiolumiharvest::j.

◆ getEtIn7Bits()

unsigned short L1RCTRegion::getEtIn7Bits ( int  i,
int  j 
) const

Definition at line 25 of file L1RCTRegion.cc.

25  {
26  // i & j run 0-3
27  return totalRegionEt.at(6 * (i + 1) + j + 1);
28 }

References mps_fire::i, dqmiolumiharvest::j, and totalRegionEt.

Referenced by giveEastEt(), giveNEEt(), giveNorthEt(), giveNWEt(), giveSEEt(), giveSouthEt(), giveSWEt(), giveWestEt(), and print().

◆ getEtIn9Bits()

unsigned short L1RCTRegion::getEtIn9Bits ( int  i,
int  j 
) const

Definition at line 45 of file L1RCTRegion.cc.

45 { return etIn9Bits.at(4 * i + j); }

References etIn9Bits, mps_fire::i, and dqmiolumiharvest::j.

Referenced by print().

◆ getHE_FGBit()

unsigned short L1RCTRegion::getHE_FGBit ( int  i,
int  j 
) const

◆ getMuonBit()

unsigned short L1RCTRegion::getMuonBit ( int  i,
int  j 
) const

Definition at line 54 of file L1RCTRegion.cc.

54 { return muonBit.at(4 * i + j); }

References mps_fire::i, dqmiolumiharvest::j, and muonBit.

Referenced by print().

◆ giveEastEt()

vector< unsigned short > L1RCTRegion::giveEastEt ( ) const

Definition at line 138 of file L1RCTRegion.cc.

138  {
139  std::vector<unsigned short> east(4);
140  for (int i = 0; i < 4; i++)
141  east.at(i) = getEtIn7Bits(i, 0);
142  return east;
143 }

References east, getEtIn7Bits(), and mps_fire::i.

◆ giveEastHE_FG()

vector< unsigned short > L1RCTRegion::giveEastHE_FG ( ) const

Definition at line 149 of file L1RCTRegion.cc.

149  {
150  std::vector<unsigned short> east(4);
151  for (int i = 0; i < 4; i++)
152  east.at(i) = getHE_FGBit(i, 0);
153  return east;
154 }

References east, getHE_FGBit(), and mps_fire::i.

◆ giveNEEt()

unsigned short L1RCTRegion::giveNEEt ( ) const

Definition at line 160 of file L1RCTRegion.cc.

160  {
161  unsigned short et = getEtIn7Bits(3, 0);
162  if (et > 7)
163  return 7;
164  else
165  return et;
166 }

References EgHLTOffHistBins_cfi::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

◆ giveNEHE_FG()

unsigned short L1RCTRegion::giveNEHE_FG ( ) const

Definition at line 167 of file L1RCTRegion.cc.

167 { return getHE_FGBit(3, 0); }

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

◆ giveNorthEt()

vector< unsigned short > L1RCTRegion::giveNorthEt ( ) const

Definition at line 73 of file L1RCTRegion.cc.

73  {
74  std::vector<unsigned short> north(4);
75  for (int i = 0; i < 4; i++)
76  north.at(i) = getEtIn7Bits(3, i);
77  return north;
78 }

References getEtIn7Bits(), mps_fire::i, and north.

◆ giveNorthHE_FG()

vector< unsigned short > L1RCTRegion::giveNorthHE_FG ( ) const

Definition at line 83 of file L1RCTRegion.cc.

83  {
84  std::vector<unsigned short> north(4);
85  for (int i = 0; i < 4; i++)
86  north.at(i) = getHE_FGBit(3, i);
87  return north;
88 }

References getHE_FGBit(), mps_fire::i, and north.

◆ giveNWEt()

unsigned short L1RCTRegion::giveNWEt ( ) const

Definition at line 171 of file L1RCTRegion.cc.

171  {
172  unsigned short et = getEtIn7Bits(3, 3);
173  if (et > 7)
174  return 7;
175  else
176  return et;
177 }

References EgHLTOffHistBins_cfi::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

◆ giveNWHE_FG()

unsigned short L1RCTRegion::giveNWHE_FG ( ) const

Definition at line 178 of file L1RCTRegion.cc.

178 { return getHE_FGBit(3, 3); }

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

◆ giveSEEt()

unsigned short L1RCTRegion::giveSEEt ( ) const

Definition at line 193 of file L1RCTRegion.cc.

193  {
194  unsigned short et = getEtIn7Bits(0, 0);
195  if (et > 7)
196  return 7;
197  else
198  return et;
199 }

References EgHLTOffHistBins_cfi::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

◆ giveSEHE_FG()

unsigned short L1RCTRegion::giveSEHE_FG ( ) const

Definition at line 200 of file L1RCTRegion.cc.

200 { return getHE_FGBit(0, 0); }

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

◆ giveSouthEt()

vector< unsigned short > L1RCTRegion::giveSouthEt ( ) const

Definition at line 94 of file L1RCTRegion.cc.

94  {
95  std::vector<unsigned short> south(4);
96  for (int i = 0; i < 4; i++)
97  south.at(i) = getEtIn7Bits(0, i);
98  return south;
99 }

References getEtIn7Bits(), mps_fire::i, and south.

◆ giveSouthHE_FG()

vector< unsigned short > L1RCTRegion::giveSouthHE_FG ( ) const

Definition at line 105 of file L1RCTRegion.cc.

105  {
106  std::vector<unsigned short> south(4);
107  for (int i = 0; i < 4; i++)
108  south.at(i) = getHE_FGBit(0, i);
109  return south;
110 }

References getHE_FGBit(), mps_fire::i, and south.

◆ giveSWEt()

unsigned short L1RCTRegion::giveSWEt ( ) const

Definition at line 182 of file L1RCTRegion.cc.

182  {
183  unsigned short et = getEtIn7Bits(0, 3);
184  if (et > 7)
185  return 7;
186  else
187  return et;
188 }

References EgHLTOffHistBins_cfi::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

◆ giveSWHE_FG()

unsigned short L1RCTRegion::giveSWHE_FG ( ) const

Definition at line 189 of file L1RCTRegion.cc.

189 { return getHE_FGBit(0, 3); }

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

◆ giveWestEt()

vector< unsigned short > L1RCTRegion::giveWestEt ( ) const

Definition at line 116 of file L1RCTRegion.cc.

116  {
117  std::vector<unsigned short> west(4);
118  for (int i = 0; i < 4; i++)
119  west.at(i) = getEtIn7Bits(i, 3);
120  return west;
121 }

References getEtIn7Bits(), mps_fire::i, and west.

◆ giveWestHE_FG()

vector< unsigned short > L1RCTRegion::giveWestHE_FG ( ) const

Definition at line 127 of file L1RCTRegion.cc.

127  {
128  std::vector<unsigned short> west(4);
129  for (int i = 0; i < 4; i++)
130  west.at(i) = getHE_FGBit(i, 3);
131  return west;
132 }

References getHE_FGBit(), mps_fire::i, and west.

◆ print()

void L1RCTRegion::print ( void  )

Definition at line 204 of file L1RCTRegion.cc.

204  {
205  std::cout << " 7 Bit Energies ";
206  for (int i = 0; i < 4; i++) {
207  std::cout << std::endl;
208  for (int j = 0; j < 4; j++) {
209  std::cout << " " << getEtIn7Bits(i, j) << " ";
210  }
211  }
212 
213  std::cout << std::endl << std::endl;
214  std::cout << " 9 Bit Energies ";
215  for (int i = 0; i < 4; i++) {
216  std::cout << std::endl;
217  for (int j = 0; j < 4; j++) {
218  std::cout << " " << getEtIn9Bits(i, j) << " ";
219  }
220  }
221 
222  std::cout << std::endl << std::endl;
223  std::cout << " HE || FG bit ";
224  for (int i = 0; i < 4; i++) {
225  std::cout << std::endl;
226  for (int j = 0; j < 4; j++) {
227  std::cout << " " << getHE_FGBit(i, j) << " ";
228  }
229  }
230 
231  std::cout << std::endl << std::endl;
232  std::cout << " Muon Bit ";
233  for (int i = 0; i < 4; i++) {
234  std::cout << std::endl;
235  for (int j = 0; j < 4; j++) {
236  std::cout << " " << getMuonBit(i, j) << " ";
237  }
238  }
239  std::cout << std::endl;
240 }

References gather_cfg::cout, getEtIn7Bits(), getEtIn9Bits(), getHE_FGBit(), getMuonBit(), mps_fire::i, and dqmiolumiharvest::j.

◆ printEdges()

void L1RCTRegion::printEdges ( )

Definition at line 242 of file L1RCTRegion.cc.

242  {
243  std::cout << "North" << std::endl;
244  for (int i = 0; i < 4; i++)
245  std::cout << totalRegionEt.at(i + 1) << std::endl;
246 
247  std::cout << "West" << std::endl;
248  for (int i = 0; i < 4; i++)
249  std::cout << totalRegionEt.at(6 * (i + 1)) << std::endl;
250 
251  std::cout << "East" << std::endl;
252  for (int i = 0; i < 4; i++)
253  std::cout << totalRegionEt.at(6 * (i + 1) + 5) << std::endl;
254 
255  std::cout << "South" << std::endl;
256  for (int i = 0; i < 4; i++)
257  std::cout << totalRegionEt.at(31 + i) << std::endl;
258 
259  std::cout << "NE " << totalRegionEt.at(5) << std::endl;
260  std::cout << "SE " << totalRegionEt.at(35) << std::endl;
261  std::cout << "NW " << totalRegionEt.at(0) << std::endl;
262  std::cout << "SW " << totalRegionEt.at(30) << std::endl;
263 }

References gather_cfg::cout, mps_fire::i, and totalRegionEt.

◆ setActivityBit()

void L1RCTRegion::setActivityBit ( int  i,
int  j,
unsigned short  activity 
)

Definition at line 58 of file L1RCTRegion.cc.

58 { activityBit.at(4 * i + j) = activity; }

References activityBit, mps_fire::i, and dqmiolumiharvest::j.

◆ setEastEt()

void L1RCTRegion::setEastEt ( const std::vector< unsigned short > &  east)

Definition at line 144 of file L1RCTRegion.cc.

144  {
145  for (int i = 0; i < 4; i++)
146  totalRegionEt.at(6 * (i + 1) + 5) = east.at(i);
147 }

References east, mps_fire::i, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setEastHE_FG()

void L1RCTRegion::setEastHE_FG ( const std::vector< unsigned short > &  east)

Definition at line 155 of file L1RCTRegion.cc.

155  {
156  for (int i = 0; i < 4; i++)
157  totalRegionHE_FG.at(6 * (i + 1) + 5) = east.at(i);
158 }

References east, mps_fire::i, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setEtIn7Bits()

void L1RCTRegion::setEtIn7Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 30 of file L1RCTRegion.cc.

30  {
31  // i & j should be 0-3
32  if (energy <= 127)
33  totalRegionEt.at(6 * (i + 1) + j + 1) = energy;
34  else
35  totalRegionEt.at(6 * (i + 1) + j + 1) = 127;
36 }

References HCALHighEnergyHPDFilter_cfi::energy, mps_fire::i, dqmiolumiharvest::j, and totalRegionEt.

◆ setEtIn9Bits()

void L1RCTRegion::setEtIn9Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 47 of file L1RCTRegion.cc.

47  {
48  if (energy <= 511)
49  etIn9Bits.at(4 * i + j) = energy;
50  else
51  etIn9Bits.at(4 * i + j) = 511;
52 }

References HCALHighEnergyHPDFilter_cfi::energy, etIn9Bits, mps_fire::i, and dqmiolumiharvest::j.

◆ setHE_FGBit()

void L1RCTRegion::setHE_FGBit ( int  i,
int  j,
unsigned short  HE_FG 
)

Definition at line 40 of file L1RCTRegion.cc.

40 { totalRegionHE_FG.at(6 * (i + 1) + j + 1) = HE_FG; }

References mps_fire::i, dqmiolumiharvest::j, and totalRegionHE_FG.

◆ setMuonBit()

void L1RCTRegion::setMuonBit ( int  i,
int  j,
unsigned short  muon 
)

Definition at line 56 of file L1RCTRegion.cc.

56 { muonBit.at(4 * i + j) = muon; }

References mps_fire::i, dqmiolumiharvest::j, HLT_FULL_cff::muon, and muonBit.

◆ setNEEt()

void L1RCTRegion::setNEEt ( unsigned short  ne)

Definition at line 168 of file L1RCTRegion.cc.

168 { totalRegionEt.at(5) = ne; }

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setNEHE_FG()

void L1RCTRegion::setNEHE_FG ( unsigned short  ne)

Definition at line 169 of file L1RCTRegion.cc.

169 { totalRegionHE_FG.at(5) = ne; }

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setNorthEt()

void L1RCTRegion::setNorthEt ( const std::vector< unsigned short > &  north)

Definition at line 79 of file L1RCTRegion.cc.

79  {
80  for (int i = 0; i < 4; i++)
81  totalRegionEt.at(i + 1) = north.at(i);
82 }

References mps_fire::i, north, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setNorthHE_FG()

void L1RCTRegion::setNorthHE_FG ( const std::vector< unsigned short > &  north)

Definition at line 89 of file L1RCTRegion.cc.

89  {
90  for (int i = 0; i < 4; i++)
91  totalRegionHE_FG.at(i + 1) = north.at(i);
92 }

References mps_fire::i, north, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setNWEt()

void L1RCTRegion::setNWEt ( unsigned short  nw)

Definition at line 179 of file L1RCTRegion.cc.

179 { totalRegionEt.at(0) = nw; }

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setNWHE_FG()

void L1RCTRegion::setNWHE_FG ( unsigned short  nw)

Definition at line 180 of file L1RCTRegion.cc.

180 { totalRegionHE_FG.at(0) = nw; }

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setSEEt()

void L1RCTRegion::setSEEt ( unsigned short  se)

Definition at line 201 of file L1RCTRegion.cc.

201 { totalRegionEt.at(35) = se; }

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setSEHE_FG()

void L1RCTRegion::setSEHE_FG ( unsigned short  se)

Definition at line 202 of file L1RCTRegion.cc.

202 { totalRegionHE_FG.at(35) = se; }

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setSouthEt()

void L1RCTRegion::setSouthEt ( const std::vector< unsigned short > &  south)

Definition at line 100 of file L1RCTRegion.cc.

100  {
101  for (int i = 0; i < 4; i++)
102  totalRegionEt.at(31 + i) = south.at(i);
103 }

References mps_fire::i, south, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setSouthHE_FG()

void L1RCTRegion::setSouthHE_FG ( const std::vector< unsigned short > &  south)

Definition at line 111 of file L1RCTRegion.cc.

111  {
112  for (int i = 0; i < 4; i++)
113  totalRegionHE_FG.at(31 + i) = south.at(i);
114 }

References mps_fire::i, south, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setSWEt()

void L1RCTRegion::setSWEt ( unsigned short  sw)

Definition at line 190 of file L1RCTRegion.cc.

190 { totalRegionEt.at(30) = sw; }

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

◆ setSWHE_FG()

void L1RCTRegion::setSWHE_FG ( unsigned short  sw)

Definition at line 191 of file L1RCTRegion.cc.

191 { totalRegionHE_FG.at(30) = sw; }

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

◆ setWestEt()

void L1RCTRegion::setWestEt ( const std::vector< unsigned short > &  west)

Definition at line 122 of file L1RCTRegion.cc.

122  {
123  for (int i = 0; i < 4; i++)
124  totalRegionEt.at(6 * (i + 1)) = west.at(i);
125 }

References mps_fire::i, totalRegionEt, and west.

Referenced by L1RCT::shareNeighbors().

◆ setWestHE_FG()

void L1RCTRegion::setWestHE_FG ( const std::vector< unsigned short > &  west)

Definition at line 133 of file L1RCTRegion.cc.

133  {
134  for (int i = 0; i < 4; i++)
135  totalRegionHE_FG.at(6 * (i + 1)) = west.at(i);
136 }

References mps_fire::i, totalRegionHE_FG, and west.

Referenced by L1RCT::shareNeighbors().

Member Data Documentation

◆ activityBit

std::vector<unsigned short> L1RCTRegion::activityBit
private

Definition at line 71 of file L1RCTRegion.h.

Referenced by getActivityBit(), and setActivityBit().

◆ etIn9Bits

std::vector<unsigned short> L1RCTRegion::etIn9Bits
private

Definition at line 68 of file L1RCTRegion.h.

Referenced by getEtIn9Bits(), and setEtIn9Bits().

◆ muonBit

std::vector<unsigned short> L1RCTRegion::muonBit
private

Definition at line 70 of file L1RCTRegion.h.

Referenced by getMuonBit(), and setMuonBit().

◆ totalRegionEt

std::vector<unsigned short> L1RCTRegion::totalRegionEt
private

◆ totalRegionHE_FG

std::vector<unsigned short> L1RCTRegion::totalRegionHE_FG
private
mps_fire.i
i
Definition: mps_fire.py:428
L1RCTRegion::getEtIn9Bits
unsigned short getEtIn9Bits(int i, int j) const
Definition: L1RCTRegion.cc:45
east
Definition: EcalBoundaryInfoCalculator.h:24
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1RCTRegion::activityBit
std::vector< unsigned short > activityBit
Definition: L1RCTRegion.h:71
L1RCTRegion::getHE_FGBit
unsigned short getHE_FGBit(int i, int j) const
Definition: L1RCTRegion.cc:38
L1RCTRegion::getEtIn7Bits
unsigned short getEtIn7Bits(int i, int j) const
Definition: L1RCTRegion.cc:25
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11725
south
Definition: EcalBoundaryInfoCalculator.h:24
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
L1RCTRegion::etIn9Bits
std::vector< unsigned short > etIn9Bits
Definition: L1RCTRegion.h:68
L1RCTRegion::muonBit
std::vector< unsigned short > muonBit
Definition: L1RCTRegion.h:70
L1RCTRegion::getMuonBit
unsigned short getMuonBit(int i, int j) const
Definition: L1RCTRegion.cc:54
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
north
Definition: EcalBoundaryInfoCalculator.h:24
L1RCTRegion::totalRegionHE_FG
std::vector< unsigned short > totalRegionHE_FG
Definition: L1RCTRegion.h:66
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
west
Definition: EcalBoundaryInfoCalculator.h:24
L1RCTRegion::totalRegionEt
std::vector< unsigned short > totalRegionEt
Definition: L1RCTRegion.h:65