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;
57 "RPC digis bx - all events", 9, -4.5, 4.5 ) ;
60 "RPCTPG nDigi bx 0", 100, -0.5, 99.5 ) ;
62 "RPCTPG nDigi bx +1", 100, -0.5, 99.5 ) ;
64 "RPCTPG nDigi bx -1", 100, -0.5, 99.5 ) ;
69 "RPC digis bx - RPC, !DT", 9, -4.5, 4.5 ) ;
72 "RPC digis bx - RPC, !CSC", 9, -4.5, 4.5 ) ;
75 "RPC digis bx - !RPC, DT", 9, -4.5, 4.5 ) ;
78 "RPC digis bx - !RPC, CSC", 9, -4.5, 4.5 ) ;
92 edm::LogInfo(
"DataNotFound") <<
"can't find RPCGeometry" << endl;
113 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label "
119 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
120 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
122 int nRPCTrackBarrel, nRPCTrackEndcap , nDTTrack, nCSCTrack;
128 for( RRItr = gmt_records.begin() ;
129 RRItr != gmt_records.end() ;
133 vector<L1MuRegionalCand> DTCands = RRItr->getDTBXCands();
134 for( vector<L1MuRegionalCand>::const_iterator
135 ECItr = DTCands.begin() ;
136 ECItr != DTCands.end() ;
139 if (!ECItr->empty()) { ++nDTTrack; }
142 vector<L1MuRegionalCand> CSCCands = RRItr->getCSCCands();
143 for( vector<L1MuRegionalCand>::const_iterator
144 ECItr = CSCCands.begin() ;
145 ECItr != CSCCands.end() ;
148 if (!ECItr->empty()) { ++nCSCTrack; }
152 vector<L1MuRegionalCand> RPCBCands = RRItr->getBrlRPCCands();
153 for( vector<L1MuRegionalCand>::const_iterator
154 ECItr = RPCBCands.begin() ;
155 ECItr != RPCBCands.end() ;
158 if (!ECItr->empty()) { ++nRPCTrackBarrel; }
162 vector<L1MuRegionalCand> RPCECands = RRItr->getFwdRPCCands();
163 for( vector<L1MuRegionalCand>::const_iterator
164 ECItr = RPCECands.begin() ;
165 ECItr != RPCECands.end() ;
168 if (!ECItr->empty()) { ++nRPCTrackEndcap; }
172 int numberofDigi[3] = {0,0,0};
176 for(collectionItr=rpcdigis->begin(); collectionItr!=rpcdigis->end(); ++collectionItr){
179 for (digiItr = ((*collectionItr ).second).first;
180 digiItr!=((*collectionItr).second).
second; ++digiItr){
185 int bx=(*digiItr).bx();
189 if ( nRPCTrackBarrel == 0 && nDTTrack != 0) {
191 }
else if ( nRPCTrackBarrel != 0 && nDTTrack == 0) {
195 if ( nRPCTrackEndcap == 0 && nCSCTrack != 0) {
197 }
else if ( nRPCTrackEndcap != 0 && nCSCTrack == 0) {
234 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
edm::EDGetTokenT< RPCDigiCollection > rpctpgSource_token_
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &e, const edm::EventSetup &c)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * m_digiBxCSC
U second(std::pair< T, U > const &p)
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
L1TRPCTPG(const edm::ParameterSet &ps)
MonitorElement * book1D(Args &&...args)
MonitorElement * rpctpgndigi[3]
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
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
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * m_digiBxRPCEnd
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
edm::InputTag rpctfSource_
MonitorElement * rpctpgbx
MonitorElement * m_digiBxDT