CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctChannelMask.cc
Go to the documentation of this file.
2 
4  for (unsigned i=0; i<18; ++i) {
5  emCrateMask_[i] = false;
6  }
7  for (unsigned ieta=0; ieta<22; ++ieta) {
8  for (unsigned iphi=0; iphi<18; ++iphi) {
9  regionMask_[ieta][iphi] = false;
10  }
11  }
12  for (unsigned i=0; i<22; ++i) {
13  tetMask_[i] = false;
14  metMask_[i] = false;
15  htMask_[i] = false;
16  mhtMask_[i] = false;
17  }
18 }
19 
20 
21 void L1GctChannelMask::maskEmCrate(unsigned crate) {
22  if (crate < 18) emCrateMask_[crate] = true;
23 }
24 
25 
26 void L1GctChannelMask::maskRegion(unsigned ieta, unsigned iphi) {
27  if (ieta < 22 && iphi < 18) regionMask_[ieta][iphi] = true;
28 }
29 
30 
31 void L1GctChannelMask::maskTotalEt(unsigned ieta) {
32  if (ieta < 22) tetMask_[ieta] = true;
33 }
34 
35 
36 void L1GctChannelMask::maskMissingEt(unsigned ieta) {
37  if (ieta < 22) metMask_[ieta] = true;
38 }
39 
40 
41 void L1GctChannelMask::maskTotalHt(unsigned ieta) {
42  if (ieta < 22) htMask_[ieta] = true;
43 }
44 
45 
46 void L1GctChannelMask::maskMissingHt(unsigned ieta) {
47  if (ieta < 22) mhtMask_[ieta] = true;
48 }
49 
50 
51 bool L1GctChannelMask::emCrateMask(unsigned crate) const {
52  if (crate < 18) { return emCrateMask_[crate]; }
53  else return true;
54 }
55 
56 
57 bool L1GctChannelMask::regionMask(unsigned ieta, unsigned iphi) const {
58  if (ieta < 22 && iphi < 18) { return regionMask_[ieta][iphi]; }
59  else return true;
60 }
61 
62 
63 bool L1GctChannelMask::totalEtMask(unsigned ieta) const {
64  if (ieta < 22) return tetMask_[ieta];
65  else return true;
66 }
67 
68 
69 bool L1GctChannelMask::missingEtMask(unsigned ieta) const {
70  if (ieta < 22) return metMask_[ieta];
71  else return true;
72 }
73 
74 
75 bool L1GctChannelMask::totalHtMask(unsigned ieta) const {
76  if (ieta < 22) return htMask_[ieta];
77  else return true;
78 }
79 
80 
81 bool L1GctChannelMask::missingHtMask(unsigned ieta) const {
82  if (ieta < 22) return mhtMask_[ieta];
83  else return true;
84 }
85 
86 std::ostream& operator << (std::ostream& os, const L1GctChannelMask obj) {
87  os << "L1GctChannelMask :" << std::endl;
88 // os << " EM crate mask = " << obj.emCrateMask_ << std::endl;
89 // os << " EtTot mask = " << obj.tetMask_ << std::endl;
90 // os << " EtMiss mask = " << obj.metMask_ << std::endl;
91 // os << " HtTot mask = " << obj.htMask_ << std::endl;
92 // os << " HtMiss mask = " << obj.mhtMask_ << std::endl;
93  for (unsigned ieta=0; ieta<22; ++ieta) {
94  for (unsigned iphi=0; iphi<18; ++iphi) {
95  if ( obj.regionMask(ieta, iphi) ) {
96  os << " Region mask : " << ieta << ", " << iphi << std::endl;
97  }
98  }
99  }
100  return os;
101 }
int i
Definition: DBlmapReader.cc:9
void maskMissingEt(unsigned ieta)
mask eta range from missing Et sum
bool totalHtMask(unsigned ieta) const
bool missingHtMask(unsigned ieta) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
void maskEmCrate(unsigned crate)
mask EM candidates from an RCT crate
bool emCrateMask(unsigned crate) const
get EM masks for an RCT crate
bool regionMask(unsigned ieta, unsigned iphi) const
get region masks
tuple obj
Example code starts here #.
Definition: VarParsing.py:655
void maskTotalHt(unsigned ieta)
mask eta range from total Ht sum
L1GctChannelMask()
default constructor sets all masks to false
void maskRegion(unsigned ieta, unsigned iphi)
mask a region
bool regionMask_[22][18]
void maskTotalEt(unsigned ieta)
mask eta range from total Et sum
bool totalEtMask(unsigned ieta) const
void maskMissingHt(unsigned ieta)
mask eta range from missing Ht sum
bool missingEtMask(unsigned ieta) const