34 edm::LogError(
"RPCTTUMonitor") <<
"can nout find L1GlobalTriggerRecord \n";
43 edm::LogError(
"RPCTTUMonitor") <<
"can not find L1GtTechnicalTriggerRecord (emulator) \n";
53 if ( dGMT < 0 )
return;
55 std::map<int,bool> ttuDec;
56 std::map<int,bool>::iterator decItr;
61 for(
int iebx=0; iebx<=2; iebx++) {
63 ttuDec[iebx-1] = gtTTWord[ 24+
k ];
71 for( decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr ){
72 if ( (*decItr).second ) {
73 int bx2 = (*decItr).first;
74 float bxdiffPacTT = 1.0*( bx1 - bx2);
86 for( decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr ){
87 if ( (*decItr).second ) {
88 int bx2 = (*decItr).first;
89 float bxdiffDtTT = 1.0*( bx1 - bx2);
108 std::vector<L1GtTechnicalTrigger> ttVec = emuTTRecord->gtTechnicalTrigger();
110 std::vector<unsigned>::iterator bitsItr;
113 bool hasDataTrigger =
false;
114 bool hasEmulatorTrigger =
false;
116 if ( ttVec.size() <= 0 )
return;
120 hasDataTrigger = gtTTWord.at( (*bitsItr) );
123 hasEmulatorTrigger = ttVec[
k].gtTechnicalTriggerResult();
143 if ( ! pCollection.
isValid() ) {
144 edm::LogError(
"discriminateGMT") <<
"can't find L1MuGMTReadoutCollection with label \n";
153 bool rpcBar_l1a =
false;
154 bool dtBar_l1a =
false;
163 std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
164 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtRC->
getRecords();
166 edm::LogInfo(
"DiscriminateGMT") <<
"nRecords: " << gmt_records.size() <<
'\n';
168 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr ) {
170 int BxInEvent = RRItr->getBxInEvent();
171 int BxInEventNew = RRItr->getBxNr();
177 std::vector<L1MuRegionalCand> BrlRpcCands = RRItr->getBrlRPCCands();
178 std::vector<L1MuRegionalCand> BrlDtCands = RRItr->getDTBXCands ();
180 std::vector<L1MuRegionalCand>::const_iterator RCItr;
182 for( RCItr = BrlRpcCands.begin(); RCItr !=BrlRpcCands.end(); ++RCItr) {
183 if ( !(*RCItr).empty() ) {
191 for( RCItr = BrlDtCands.begin(); RCItr !=BrlDtCands.end(); ++RCItr) {
192 if ( !(*RCItr).empty() ) {
198 if( BxInEvent == 0 && nrpcB > 0) rpcBar_l1a =
true;
199 if( BxInEvent == 0 && ndtB > 0) dtBar_l1a =
true;
220 if ( data == 1 && emu == 1 ){
222 }
else if ( data == 1 && emu == 0 ){
224 }
else if ( data == 0 && emu == 1 ){
226 }
else if ( data == 0 && emu == 0 ){
241 "Technical Trigger bits : Summary",
245 "Technical Trigger bits : Summary",
249 std::ostringstream hname;
251 hname <<
"BX.diff.PAC-TTU.bit." <<
m_ttBits[
k];
254 "Timing difference between PAC and TTU",
259 hname <<
"BX.diff.DT-TTU.bit." << m_ttBits[
k];
262 "Timing difference between DT and TTU",
267 hname <<
"Emu.Ttu.Compare.bit." << m_ttBits[
k];
270 "Comparison between emulator and TT decisions",
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > m_DTcandidatesBx
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtReadoutLabel
int bunchCrossing() const
edm::EDGetTokenT< L1MuGMTReadoutCollection > m_gmtReadoutLabel
std::vector< unsigned > m_ttBits
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * m_dataVsemulator[8]
MonitorElement * m_ttBitsDecisionEmulator
MonitorElement * m_bxDistDiffDt[8]
MonitorElement * book1D(Args &&...args)
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
int discriminateGMT(const edm::Event &iEvent, const edm::EventSetup &iSetup)
void setCurrentFolder(const std::string &fullpath)
T const * product() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * m_bxDistDiffPac[8]
std::vector< int > m_GMTcandidatesBx
char data[epos_bytes_allocation]
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
RPCTTUMonitor(const edm::ParameterSet &)
void discriminateDecision(bool, bool, int)
MonitorElement * m_ttBitsDecisionData
edm::EDGetTokenT< L1GtTechnicalTriggerRecord > m_rpcTechTrigEmu