14 : rpctpgSource_( ps.getParameter<
InputTag >(
"rpctpgSource") ),
16 rpctfSource_( ps.getParameter<
InputTag >(
"rpctfSource") ),
23 if(
verbose_)
cout <<
"L1TRPCTPG: constructor...." << endl;
27 cout <<
"L1T Monitoring histograms will be saved to " <<
outputFile_.c_str() << endl;
54 "RPC digis bx - all events", 9, -4.5, 4.5 ) ;
57 "RPCTPG nDigi bx 0", 100, -0.5, 99.5 ) ;
59 "RPCTPG nDigi bx +1", 100, -0.5, 99.5 ) ;
61 "RPCTPG nDigi bx -1", 100, -0.5, 99.5 ) ;
66 "RPC digis bx - RPC, !DT", 9, -4.5, 4.5 ) ;
69 "RPC digis bx - RPC, !CSC", 9, -4.5, 4.5 ) ;
72 "RPC digis bx - !RPC, DT", 9, -4.5, 4.5 ) ;
75 "RPC digis bx - !RPC, CSC", 9, -4.5, 4.5 ) ;
89 edm::LogInfo(
"DataNotFound") <<
"can't find RPCGeometry" << endl;
110 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label " 116 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
117 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
119 int nRPCTrackBarrel, nRPCTrackEndcap , nDTTrack, nCSCTrack;
125 for( RRItr = gmt_records.begin() ;
126 RRItr != gmt_records.end() ;
130 vector<L1MuRegionalCand> DTCands = RRItr->getDTBXCands();
131 for( vector<L1MuRegionalCand>::const_iterator
132 ECItr = DTCands.begin() ;
133 ECItr != DTCands.end() ;
136 if (!ECItr->empty()) { ++nDTTrack; }
139 vector<L1MuRegionalCand> CSCCands = RRItr->getCSCCands();
140 for( vector<L1MuRegionalCand>::const_iterator
141 ECItr = CSCCands.begin() ;
142 ECItr != CSCCands.end() ;
145 if (!ECItr->empty()) { ++nCSCTrack; }
149 vector<L1MuRegionalCand> RPCBCands = RRItr->getBrlRPCCands();
150 for( vector<L1MuRegionalCand>::const_iterator
151 ECItr = RPCBCands.begin() ;
152 ECItr != RPCBCands.end() ;
155 if (!ECItr->empty()) { ++nRPCTrackBarrel; }
159 vector<L1MuRegionalCand> RPCECands = RRItr->getFwdRPCCands();
160 for( vector<L1MuRegionalCand>::const_iterator
161 ECItr = RPCECands.begin() ;
162 ECItr != RPCECands.end() ;
165 if (!ECItr->empty()) { ++nRPCTrackEndcap; }
169 int numberofDigi[3] = {0,0,0};
173 for(collectionItr=rpcdigis->begin(); collectionItr!=rpcdigis->end(); ++collectionItr){
176 for (digiItr = ((*collectionItr ).second).first;
177 digiItr!=((*collectionItr).second).
second; ++digiItr){
182 int bx=(*digiItr).bx();
186 if ( nRPCTrackBarrel == 0 && nDTTrack != 0) {
188 }
else if ( nRPCTrackBarrel != 0 && nDTTrack == 0) {
192 if ( nRPCTrackEndcap == 0 && nCSCTrack != 0) {
194 }
else if ( nRPCTrackEndcap != 0 && nCSCTrack == 0) {
231 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
edm::EDGetTokenT< RPCDigiCollection > rpctpgSource_token_
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * m_digiBxCSC
U second(std::pair< T, U > const &p)
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
L1TRPCTPG(const edm::ParameterSet &ps)
MonitorElement * book1D(Args &&...args)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * rpctpgndigi[3]
void setCurrentFolder(const std::string &fullpath)
T const * product() const
edm::EDGetTokenT< L1MuGMTReadoutCollection > rpctfSource_token_
std::vector< RPCDigi >::const_iterator const_iterator
edm::InputTag rpctpgSource_
MonitorElement * m_digiBxRPCBar
MonitorElement * m_digiBxRPCEnd
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
edm::InputTag rpctfSource_
MonitorElement * rpctpgbx
MonitorElement * m_digiBxDT