14 : rpctpgSource_( ps.getParameter<
InputTag >(
"rpctpgSource") ),
16 rpctfSource_( ps.getParameter<
InputTag >(
"rpctfSource") ),
23 if(
verbose_)
cout <<
"L1TRPCTPG: constructor...." << endl;
35 cout <<
"L1T Monitoring histograms will be saved to " <<
outputFile_.c_str() << endl;
72 "RPC digis bx - all events", 9, -4.5, 4.5 ) ;
75 "RPCTPG nDigi bx 0", 100, -0.5, 99.5 ) ;
77 "RPCTPG nDigi bx +1", 100, -0.5, 99.5 ) ;
79 "RPCTPG nDigi bx -1", 100, -0.5, 99.5 ) ;
84 "RPC digis bx - RPC, !DT", 9, -4.5, 4.5 ) ;
87 "RPC digis bx - RPC, !CSC", 9, -4.5, 4.5 ) ;
90 "RPC digis bx - !RPC, DT", 9, -4.5, 4.5 ) ;
93 "RPC digis bx - !RPC, CSC", 9, -4.5, 4.5 ) ;
101 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
118 edm::LogInfo(
"DataNotFound") <<
"can't find RPCGeometry" << endl;
139 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label "
145 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
146 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
148 static int nRPCTrackBarrel, nRPCTrackEndcap , nDTTrack, nCSCTrack;
154 for( RRItr = gmt_records.begin() ;
155 RRItr != gmt_records.end() ;
159 vector<L1MuRegionalCand> DTCands = RRItr->getDTBXCands();
160 for( vector<L1MuRegionalCand>::const_iterator
161 ECItr = DTCands.begin() ;
162 ECItr != DTCands.end() ;
165 if (!ECItr->empty()) { ++nDTTrack; }
168 vector<L1MuRegionalCand> CSCCands = RRItr->getCSCCands();
169 for( vector<L1MuRegionalCand>::const_iterator
170 ECItr = CSCCands.begin() ;
171 ECItr != CSCCands.end() ;
174 if (!ECItr->empty()) { ++nCSCTrack; }
178 vector<L1MuRegionalCand> RPCBCands = RRItr->getBrlRPCCands();
179 for( vector<L1MuRegionalCand>::const_iterator
180 ECItr = RPCBCands.begin() ;
181 ECItr != RPCBCands.end() ;
184 if (!ECItr->empty()) { ++nRPCTrackBarrel; }
188 vector<L1MuRegionalCand> RPCECands = RRItr->getFwdRPCCands();
189 for( vector<L1MuRegionalCand>::const_iterator
190 ECItr = RPCECands.begin() ;
191 ECItr != RPCECands.end() ;
194 if (!ECItr->empty()) { ++nRPCTrackEndcap; }
198 int numberofDigi[3] = {0,0,0};
202 for(collectionItr=rpcdigis->begin(); collectionItr!=rpcdigis->end(); ++collectionItr){
225 for (digiItr = ((*collectionItr ).second).first;
226 digiItr!=((*collectionItr).second).
second; ++digiItr){
231 int bx=(*digiItr).bx();
235 if ( nRPCTrackBarrel == 0 && nDTTrack != 0) {
237 }
else if ( nRPCTrackBarrel != 0 && nDTTrack == 0) {
241 if ( nRPCTrackEndcap == 0 && nCSCTrack != 0) {
243 }
else if ( nRPCTrackEndcap != 0 && nCSCTrack == 0) {
edm::EDGetTokenT< RPCDigiCollection > rpctpgSource_token_
T getUntrackedParameter(std::string const &, T const &) const
void beginRun(edm::Run const &iRun, edm::EventSetup const &iSetup)
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * m_digiBxCSC
U second(std::pair< T, U > const &p)
L1TRPCTPG(const edm::ParameterSet &ps)
void setVerbose(unsigned level)
MonitorElement * rpctpgndigi[3]
edm::EDGetTokenT< L1MuGMTReadoutCollection > rpctfSource_token_
std::vector< RPCDigi >::const_iterator const_iterator
edm::InputTag rpctpgSource_
T const * product() const
MonitorElement * m_digiBxRPCBar
MonitorElement * m_digiBxRPCEnd
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
edm::InputTag rpctfSource_
MonitorElement * rpctpgbx
MonitorElement * m_digiBxDT
void setCurrentFolder(const std::string &fullpath)