28 edm::LogError(
"RPCTTUMonitor") <<
"can nout find L1GlobalTriggerRecord \n";
37 edm::LogError(
"RPCTTUMonitor") <<
"can not find L1GtTechnicalTriggerRecord (emulator) \n";
50 std::map<int, bool> ttuDec;
51 std::map<int, bool>::iterator decItr;
53 int bxX =
iEvent.bunchCrossing();
56 for (
int iebx = 0; iebx <= 2; iebx++) {
58 ttuDec[iebx - 1] = gtTTWord[24 +
k];
65 for (decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr) {
66 if ((*decItr).second) {
67 int bx2 = (*decItr).first;
68 float bxdiffPacTT = 1.0 * (bx1 - bx2);
79 for (decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr) {
80 if ((*decItr).second) {
81 int bx2 = (*decItr).first;
82 float bxdiffDtTT = 1.0 * (bx1 - bx2);
102 std::vector<unsigned>::iterator bitsItr;
105 bool hasDataTrigger =
false;
106 bool hasEmulatorTrigger =
false;
112 hasDataTrigger = gtTTWord.at((*bitsItr));
115 hasEmulatorTrigger = ttVec[
k].gtTechnicalTriggerResult();
131 edm::LogError(
"discriminateGMT") <<
"can't find L1MuGMTReadoutCollection with label \n";
140 bool rpcBar_l1a =
false;
141 bool dtBar_l1a =
false;
150 std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
151 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtRC->
getRecords();
153 edm::LogInfo(
"DiscriminateGMT") <<
"nRecords: " << gmt_records.size() <<
'\n';
155 for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr) {
156 int BxInEvent = RRItr->getBxInEvent();
157 int BxInEventNew = RRItr->getBxNr();
163 std::vector<L1MuRegionalCand> BrlRpcCands = RRItr->getBrlRPCCands();
164 std::vector<L1MuRegionalCand> BrlDtCands = RRItr->getDTBXCands();
166 std::vector<L1MuRegionalCand>::const_iterator RCItr;
168 for (RCItr = BrlRpcCands.begin(); RCItr != BrlRpcCands.end(); ++RCItr) {
169 if (!(*RCItr).empty()) {
176 for (RCItr = BrlDtCands.begin(); RCItr != BrlDtCands.end(); ++RCItr) {
177 if (!(*RCItr).empty()) {
183 if (BxInEvent == 0 && nrpcB > 0)
185 if (BxInEvent == 0 && ndtB > 0)
203 if (
data == 1 && emu == 1) {
205 }
else if (
data == 1 && emu == 0) {
207 }
else if (
data == 0 && emu == 1) {
209 }
else if (
data == 0 && emu == 0) {
220 ibooker.
book1D(
"TechTrigger.Bits.Emulator",
"Technical Trigger bits : Summary", 10, 23, 33);
222 std::ostringstream hname;
224 hname <<
"BX.diff.PAC-TTU.bit." <<
m_ttBits[
k];
226 m_bxDistDiffPac[
k] = ibooker.
book1D(hname.str().c_str(),
"Timing difference between PAC and TTU", 7, -3, 3);
230 hname <<
"BX.diff.DT-TTU.bit." <<
m_ttBits[
k];
232 m_bxDistDiffDt[
k] = ibooker.
book1D(hname.str().c_str(),
"Timing difference between DT and TTU", 7, -3, 3);
236 hname <<
"Emu.Ttu.Compare.bit." <<
m_ttBits[
k];
239 ibooker.
book1D(hname.str().c_str(),
"Comparison between emulator and TT decisions", 10, 0, 10);