20 : m_maxBxWindow{3}, m_debug{
false} {
21 m_ptr_rpcGeom = &rpcGeom;
24 m_lbin = std::make_unique<RBCLinkBoardGLSignal>(&m_data);
49 std::cout <<
"looping over digis 1 ..." << std::endl;
51 auto digiItr = detUnit.second.first;
52 int bx = (*digiItr).bx();
56 std::cout <<
"RBCProcessRPCDigis> found a bx bigger than max allowed: " <<
bx << std::endl;
63 if ((
roll->isForward())) {
65 std::cout <<
"RBCProcessRPCDigis: roll is forward" << std::endl;
74 int rollid =
id.roll();
79 digipos = 30000 + digipos;
81 digipos = 30000 + digipos;
84 digipos = 20000 + digipos;
86 digipos = 20000 + digipos;
90 <<
"Station: " <<
station <<
'\t' <<
"Layer: " <<
layer <<
'\t' <<
"B-Layer: " << blayer <<
'\t' 91 <<
"Roll id: " << rollid <<
'\t' <<
"Digi at: " << digipos <<
'\n';
109 (*wheelCounter).second.incrementSector(
sector);
112 std::cout <<
"looping over digis 2 ..." << std::endl;
128 std::cout <<
"RBCProcessRPCDigis: DataSize: " <<
m_data.size() <<
" ndigis " << ndigis << std::endl;
131 wheelCounter.second.evalCounters();
133 wheelCounter.second.printSummary();
151 dataVec.reserve(maxWheels);
152 for (
int i = 0;
i < maxWheels; ++
i) {
153 auto&
block = dataVec.emplace_back();
157 for (
int j = 0;
j < maxRbcBrds; ++
j) {
160 block.m_orsignals[
j].input_sec[0].reset();
161 block.m_orsignals[
j].input_sec[1].reset();
162 block.m_orsignals[
j].needmapping =
false;
163 block.m_orsignals[
j].hasData =
false;
168 std::cout <<
"initialize: completed" << std::endl;
173 int bx = vecData.first;
181 for (
auto&
item : vecData.second) {
182 for (
int k = 0;
k < 6; ++
k) {
183 int code = bxsign * (1000000 *
abs(
bx) + 10000 *
item.wheelIdx() + 100 *
item.m_sec1[
k] + 1 *
item.m_sec2[
k]);
186 signal->needmapping =
false;
189 m_data.emplace(code, signal);
195 std::cout <<
"builddata: completed. size of data: " <<
m_data.size() << std::endl;
203 blayer = ((_station - 1) * 2) + _layer;
205 blayer = _station + 2;
235 block.m_orsignals[
pos].hasData =
true;
241 std::cout <<
"setDigiAt completed" << std::endl;
247 std::cout <<
"Bitpos: " << bitpos << std::endl;
248 signals.set(bitpos,
true);
252 std::cout <<
"RBCProcessRPCDigis> Output starts" << std::endl;
258 std::cout <<
"RBCProcessRPCDigis> Output ends" << std::endl;
constexpr std::array< int, 6 > s_sec2id
void setInputBit(std::bitset< 15 > &, int)
constexpr std::array< int, 6 > s_sec1id
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
constexpr std::array< int, 5 > s_wheelid
std::map< int, std::vector< RPCData > > m_vecDataperBx
Abs< T >::type abs(const T &t)
const std::map< int, int > s_layermap
std::map< int, RBCInput * > m_data
const edm::Handle< RPCDigiCollection > * m_ptr_digiColl
RBCProcessRPCDigis(const edm::ESHandle< RPCGeometry > &, const edm::Handle< RPCDigiCollection > &)
Standard constructor.
std::map< int, l1trigger::Counters > m_digiCounters
void initialize(std::vector< RPCData > &) const
void setDigiAt(int, int, RPCData &)
int getBarrelLayer(const int &, const int &)
~RBCProcessRPCDigis() override
Destructor.