225 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection";
231 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
232 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
234 std::vector<int> nrpctftrack_b(3,0);
235 std::vector<int> nrpctftrack_e(3,0);
237 vector<L1TRPCTF::BxDelays> all_bxdelays;
240 for( RRItr = gmt_records.begin() ;
241 RRItr != gmt_records.end() ;
245 if (
verbose_)
cout <<
"Readout Record " << RRItr->getBxInEvent() << endl;
247 vector<vector<L1MuRegionalCand> > brlAndFwdCands;
248 brlAndFwdCands.push_back(RRItr->getBrlRPCCands());
249 brlAndFwdCands.push_back(RRItr->getFwdRPCCands());
252 vector<vector<L1MuRegionalCand> >::iterator RPCTFCands = brlAndFwdCands.begin();
253 for(; RPCTFCands!= brlAndFwdCands.end(); ++RPCTFCands)
256 for( vector<L1MuRegionalCand>::const_iterator
257 ECItr = RPCTFCands->begin() ;
258 ECItr != RPCTFCands->end() ;
263 if (ECItr->bx() > 0) bxindex = 2;
264 if (ECItr->bx() < 0) bxindex = 0;
266 if (!ECItr->empty()) {
269 if (beIndex == 0) ++nrpctftrack_b[bxindex];
270 if (beIndex == 1) ++nrpctftrack_e[bxindex];
272 if (
verbose_)
cout <<
"RPCTFCand bx " << ECItr->bx() << endl;
274 int tower = ECItr->eta_packed();
276 tower = - ( (~tower & 63) + 1);
282 if (
verbose_)
cout <<
"\tRPCTFCand eta value " << ECItr->etaValue() << endl;
285 if (
verbose_)
cout <<
"\tRPCTFCand phi value " << ECItr->phiValue() << endl;
288 if (
verbose_)
cout <<
"\tRPCTFCand pt value " << ECItr->ptValue()<< endl;
291 if (
verbose_)
cout <<
"\tRPCTFCand charge value " << ECItr->chargeValue() << endl;
294 if (
verbose_)
cout <<
"\tRPCTFCand quality " << ECItr->quality() << endl;
301 bx_del.bx = ECItr->bx();
302 bx_del.eta_t = tower;
303 bx_del.phi_p = ECItr->phi_packed();
304 all_bxdelays.push_back(bx_del);
312 for (
int bxI = 0; bxI < 3; ++bxI){
318 for(
unsigned int i = 0;
i < all_bxdelays.size();
i++) {
320 int sector= ((all_bxdelays[
i].phi_p+ 142)%144)/12;
321 if (sector>11 || sector < 0)
continue;
322 int eta_tower = all_bxdelays[
i].eta_t;
323 for(
unsigned int j = 0; j < all_bxdelays.size(); j++) {
325 int sector2= ((all_bxdelays[j].phi_p + 142)%144)/12;
327 int distance_cut = 1;
328 int distance = ((sector+12)-sector2)%12;
329 distance =
min(distance, 11-distance);
330 if(distance<distance_cut)
continue;
332 int bxDiff = all_bxdelays[
i].bx-all_bxdelays[j].bx;
346 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
std::set< unsigned long long int > m_globBX
MonitorElement * rpctfcratesynchro[12]
MonitorElement * rpctfchargevalue[3]
MonitorElement * rpctfetavalue[3]
MonitorElement * rpctfptvalue[3]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * rpctfquality[3]
MonitorElement * rpctfphivalue[3]
MonitorElement * m_bxDiff
MonitorElement * m_muonsEtaPhi[3]
MonitorElement * m_qualVsEta[3]
T const * product() const
long long int m_lastUsedBxInBxdiff
MonitorElement * rpctfntrack_e[3]
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * rpctfntrack_b[3]
edm::EDGetTokenT< L1MuGMTReadoutCollection > rpctfSource_