216 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection";
222 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
223 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
225 std::vector<int> nrpctftrack_b(3,0);
226 std::vector<int> nrpctftrack_e(3,0);
228 vector<L1TRPCTF::BxDelays> all_bxdelays;
231 for( RRItr = gmt_records.begin() ;
232 RRItr != gmt_records.end() ;
236 if (
verbose_)
cout <<
"Readout Record " << RRItr->getBxInEvent() << endl;
238 vector<vector<L1MuRegionalCand> > brlAndFwdCands;
239 brlAndFwdCands.push_back(RRItr->getBrlRPCCands());
240 brlAndFwdCands.push_back(RRItr->getFwdRPCCands());
243 vector<vector<L1MuRegionalCand> >::iterator RPCTFCands = brlAndFwdCands.begin();
244 for(; RPCTFCands!= brlAndFwdCands.end(); ++RPCTFCands)
247 for( vector<L1MuRegionalCand>::const_iterator
248 ECItr = RPCTFCands->begin() ;
249 ECItr != RPCTFCands->end() ;
254 if (ECItr->bx() > 0) bxindex = 2;
255 if (ECItr->bx() < 0) bxindex = 0;
257 if (!ECItr->empty()) {
260 if (beIndex == 0) ++nrpctftrack_b[bxindex];
261 if (beIndex == 1) ++nrpctftrack_e[bxindex];
263 if (
verbose_)
cout <<
"RPCTFCand bx " << ECItr->bx() << endl;
265 int tower = ECItr->eta_packed();
267 tower = - ( (~tower & 63) + 1);
273 if (
verbose_)
cout <<
"\tRPCTFCand eta value " << ECItr->etaValue() << endl;
276 if (
verbose_)
cout <<
"\tRPCTFCand phi value " << ECItr->phiValue() << endl;
279 if (
verbose_)
cout <<
"\tRPCTFCand pt value " << ECItr->ptValue()<< endl;
282 if (
verbose_)
cout <<
"\tRPCTFCand charge value " << ECItr->chargeValue() << endl;
285 if (
verbose_)
cout <<
"\tRPCTFCand quality " << ECItr->quality() << endl;
292 bx_del.bx = ECItr->bx();
293 bx_del.eta_t = tower;
294 bx_del.phi_p = ECItr->phi_packed();
295 all_bxdelays.push_back(bx_del);
303 for (
int bxI = 0; bxI < 3; ++bxI){
309 for(
unsigned int i = 0;
i < all_bxdelays.size();
i++) {
311 int sector= ((all_bxdelays[
i].phi_p+ 142)%144)/12;
312 if (sector>11 || sector < 0)
continue;
313 int eta_tower = all_bxdelays[
i].eta_t;
314 for(
unsigned int j = 0; j < all_bxdelays.size(); j++) {
316 int sector2= ((all_bxdelays[j].phi_p + 142)%144)/12;
318 int distance_cut = 1;
319 int distance = ((sector+12)-sector2)%12;
320 distance =
min(distance, 11-distance);
321 if(distance<distance_cut)
continue;
323 int bxDiff = all_bxdelays[
i].bx-all_bxdelays[j].bx;
337 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_