ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/src/LayerCoincManager.cc
Revision: 1.1
Committed: Wed Feb 8 07:19:26 2012 UTC (13 years, 2 months ago) by konec
Content type: text/plain
Branch: MAIN
CVS Tags: Artur_11_07_2013_B, Artur_11_07_2013_A, Artur_11_07_2013, Artur_28_06_2013, Mikolaj_cmssw533, Mikolaj_cmssw52x, HEAD
Error occurred while calculating annotation data.
Log Message:
*** empty log message ***

File Contents

# Content
1 #include "UserCode/L1RpcTriggerAnalysis/interface/LayerCoincManager.h"
2 #include <cmath>
3
4 bool LayerCoincManager:: matched( float eta, std::bitset<6> & items) const
5 {
6 bool result = false;
7
8
9 const std::vector< std::bitset<6> > *layers = 0;
10 if (fabs(eta) < 0.83) layers = &theLayersB;
11 else if (fabs(eta) < 0.93) layers = &theLayersT6;
12 else if (fabs(eta) < 1.04) layers = &theLayersT7;
13 else if (fabs(eta) < 1.14) layers = &theLayersT8;
14 else layers = &theLayersE;
15
16 typedef std::vector< std::bitset<6> >::const_iterator IT;
17 for (IT it= layers->begin(); it != layers->end(); ++it) if (it->to_ulong() == items.to_ulong()) result = true;
18 // for (IT it= theLayersB.begin(); it != theLayersB.end(); ++it) if (it->to_ulong() == items.to_ulong()) result = true;
19 return result;
20 }
21
22 LayerCoincManager::LayerCoincManager()
23 {
24 theLayersB.push_back(std::bitset<6>(std::string("011110")));
25 theLayersB.push_back(std::bitset<6>(std::string("101110")));
26 theLayersB.push_back(std::bitset<6>(std::string("110110")));
27 theLayersB.push_back(std::bitset<6>(std::string("111010")));
28 theLayersB.push_back(std::bitset<6>(std::string("111100")));
29 theLayersB.push_back(std::bitset<6>(std::string("001111")));
30 theLayersB.push_back(std::bitset<6>(std::string("010111")));
31 theLayersB.push_back(std::bitset<6>(std::string("100111")));
32 theLayersB.push_back(std::bitset<6>(std::string("011011")));
33 theLayersB.push_back(std::bitset<6>(std::string("101011")));
34 theLayersB.push_back(std::bitset<6>(std::string("110011")));
35 theLayersB.push_back(std::bitset<6>(std::string("011101")));
36 theLayersB.push_back(std::bitset<6>(std::string("101101")));
37 theLayersB.push_back(std::bitset<6>(std::string("110101")));
38 theLayersB.push_back(std::bitset<6>(std::string("111001")));
39 theLayersB.push_back(std::bitset<6>(std::string("011111")));
40 theLayersB.push_back(std::bitset<6>(std::string("101111")));
41 theLayersB.push_back(std::bitset<6>(std::string("110111")));
42 theLayersB.push_back(std::bitset<6>(std::string("111011")));
43 theLayersB.push_back(std::bitset<6>(std::string("111101")));
44 theLayersB.push_back(std::bitset<6>(std::string("111110")));
45 theLayersB.push_back(std::bitset<6>(std::string("111111")));
46 theLayersB.push_back(std::bitset<6>(std::string("111000")));
47 theLayersB.push_back(std::bitset<6>(std::string("110100")));
48 theLayersB.push_back(std::bitset<6>(std::string("110010")));
49 theLayersB.push_back(std::bitset<6>(std::string("110001")));
50 theLayersB.push_back(std::bitset<6>(std::string("100101")));
51 theLayersB.push_back(std::bitset<6>(std::string("101001")));
52 theLayersB.push_back(std::bitset<6>(std::string("101010")));
53 theLayersB.push_back(std::bitset<6>(std::string("101100")));
54 theLayersB.push_back(std::bitset<6>(std::string("010101")));
55 theLayersB.push_back(std::bitset<6>(std::string("011001")));
56 theLayersB.push_back(std::bitset<6>(std::string("011010")));
57 theLayersB.push_back(std::bitset<6>(std::string("011100")));
58 theLayersB.push_back(std::bitset<6>(std::string("000111")));
59 theLayersB.push_back(std::bitset<6>(std::string("001011")));
60 theLayersB.push_back(std::bitset<6>(std::string("001101")));
61 theLayersB.push_back(std::bitset<6>(std::string("001110")));
62
63 theLayersT6.push_back(std::bitset<6>(std::string("001111")));
64 theLayersT6.push_back(std::bitset<6>(std::string("010111")));
65 theLayersT6.push_back(std::bitset<6>(std::string("011011")));
66 theLayersT6.push_back(std::bitset<6>(std::string("011101")));
67 theLayersT6.push_back(std::bitset<6>(std::string("011110")));
68 theLayersT6.push_back(std::bitset<6>(std::string("011111")));
69 theLayersT6.push_back(std::bitset<6>(std::string("010101")));
70 theLayersT6.push_back(std::bitset<6>(std::string("011001")));
71 theLayersT6.push_back(std::bitset<6>(std::string("011010")));
72 theLayersT6.push_back(std::bitset<6>(std::string("011100")));
73 theLayersT6.push_back(std::bitset<6>(std::string("000111")));
74 theLayersT6.push_back(std::bitset<6>(std::string("001011")));
75 theLayersT6.push_back(std::bitset<6>(std::string("001101")));
76 theLayersT6.push_back(std::bitset<6>(std::string("001110")));
77
78 theLayersT7.push_back(std::bitset<6>(std::string("001111")));
79 theLayersT7.push_back(std::bitset<6>(std::string("010111")));
80 theLayersT7.push_back(std::bitset<6>(std::string("011011")));
81 theLayersT7.push_back(std::bitset<6>(std::string("011101")));
82 theLayersT7.push_back(std::bitset<6>(std::string("011110")));
83 theLayersT7.push_back(std::bitset<6>(std::string("011111")));
84 theLayersT7.push_back(std::bitset<6>(std::string("010101")));
85 theLayersT7.push_back(std::bitset<6>(std::string("011001")));
86 theLayersT7.push_back(std::bitset<6>(std::string("011010")));
87 theLayersT7.push_back(std::bitset<6>(std::string("011100")));
88 theLayersT7.push_back(std::bitset<6>(std::string("000111")));
89 theLayersT7.push_back(std::bitset<6>(std::string("001011")));
90 theLayersT7.push_back(std::bitset<6>(std::string("001101")));
91 theLayersT7.push_back(std::bitset<6>(std::string("001110")));
92
93 theLayersT8.push_back(std::bitset<6>(std::string("000111")));
94 theLayersT8.push_back(std::bitset<6>(std::string("001011")));
95 theLayersT8.push_back(std::bitset<6>(std::string("001101")));
96 theLayersT8.push_back(std::bitset<6>(std::string("001110")));
97 theLayersT8.push_back(std::bitset<6>(std::string("001111")));
98
99 theLayersE.push_back(std::bitset<6>(std::string("000111")));
100 }