14 : rpctpgSource_(ps.getParameter<
InputTag>(
"rpctpgSource")),
16 rpctfSource_(ps.getParameter<
InputTag>(
"rpctfSource")),
22 cout <<
"L1TRPCTPG: constructor...." << endl;
26 cout <<
"L1T Monitoring histograms will be saved to " <<
outputFile_.c_str() << endl;
47 rpctpgbx = ibooker.
book1D(
"RPCTPG_bx",
"RPC digis bx - all events", 9, -4.5, 4.5);
49 rpctpgndigi[1] = ibooker.
book1D(
"RPCTPG_ndigi",
"RPCTPG nDigi bx 0", 100, -0.5, 99.5);
50 rpctpgndigi[2] = ibooker.
book1D(
"RPCTPG_ndigi_+1",
"RPCTPG nDigi bx +1", 100, -0.5, 99.5);
51 rpctpgndigi[0] = ibooker.
book1D(
"RPCTPG_ndigi_-1",
"RPCTPG nDigi bx -1", 100, -0.5, 99.5);
53 m_digiBxRPCBar = ibooker.
book1D(
"RPCDigiRPCBmu_noDTmu_bx",
"RPC digis bx - RPC, !DT", 9, -4.5, 4.5);
55 m_digiBxRPCEnd = ibooker.
book1D(
"RPCDigiRPCEmu_noCSCmu_bx",
"RPC digis bx - RPC, !CSC", 9, -4.5, 4.5);
57 m_digiBxDT = ibooker.
book1D(
"RPCDigiDTmu_noRPCBmu_bx",
"RPC digis bx - !RPC, DT", 9, -4.5, 4.5);
59 m_digiBxCSC = ibooker.
book1D(
"RPCDigiCSCmu_noRPCEmu_bx",
"RPC digis bx - !RPC, CSC", 9, -4.5, 4.5);
65 cout <<
"L1TRPCTPG: analyze...." << endl;
69 if (!rpcGeo.isValid()) {
70 edm::LogInfo(
"DataNotFound") <<
"can't find RPCGeometry" << endl;
95 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
96 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
98 int nRPCTrackBarrel, nRPCTrackEndcap, nDTTrack, nCSCTrack;
104 for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++) {
106 vector<L1MuRegionalCand> DTCands = RRItr->getDTBXCands();
107 for (vector<L1MuRegionalCand>::const_iterator ECItr = DTCands.begin(); ECItr != DTCands.end(); ++ECItr) {
108 if (!ECItr->empty()) {
113 vector<L1MuRegionalCand> CSCCands = RRItr->getCSCCands();
114 for (vector<L1MuRegionalCand>::const_iterator ECItr = CSCCands.begin(); ECItr != CSCCands.end(); ++ECItr) {
115 if (!ECItr->empty()) {
121 vector<L1MuRegionalCand> RPCBCands = RRItr->getBrlRPCCands();
122 for (vector<L1MuRegionalCand>::const_iterator ECItr = RPCBCands.begin(); ECItr != RPCBCands.end(); ++ECItr) {
123 if (!ECItr->empty()) {
129 vector<L1MuRegionalCand> RPCECands = RRItr->getFwdRPCCands();
130 for (vector<L1MuRegionalCand>::const_iterator ECItr = RPCECands.begin(); ECItr != RPCECands.end(); ++ECItr) {
131 if (!ECItr->empty()) {
137 int numberofDigi[3] = {0, 0, 0};
140 for (collectionItr = rpcdigis->begin(); collectionItr != rpcdigis->end(); ++collectionItr) {
142 for (digiItr = ((*collectionItr).second).first; digiItr != ((*collectionItr).second).
second; ++digiItr) {
146 int bx = (*digiItr).bx();
150 if (nRPCTrackBarrel == 0 && nDTTrack != 0) {
152 }
else if (nRPCTrackBarrel != 0 && nDTTrack == 0) {
156 if (nRPCTrackEndcap == 0 && nCSCTrack != 0) {
158 }
else if (nRPCTrackEndcap != 0 && nCSCTrack == 0) {
186 cout <<
"L1TRPCTPG: end job...." << endl;
187 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
edm::EDGetTokenT< RPCDigiCollection > rpctpgSource_token_
virtual void setCurrentFolder(std::string const &fullpath)
T const * product() const
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * m_digiBxCSC
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcgeomToken_
T getUntrackedParameter(std::string const &, T const &) const
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)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * rpctpgndigi[3]
Log< level::Info, false > LogInfo
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
edm::EDGetTokenT< L1MuGMTReadoutCollection > rpctfSource_token_
std::vector< RPCDigi >::const_iterator const_iterator
edm::InputTag rpctpgSource_
MonitorElement * m_digiBxRPCBar
MonitorElement * m_digiBxRPCEnd
edm::InputTag rpctfSource_
MonitorElement * rpctpgbx
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * m_digiBxDT