35 edm::LogError(
"RPCTTUMonitor") <<
"can't find L1GlobalTriggerRecord with label: "
45 edm::LogError(
"RPCTTUMonitor") <<
"can't find L1GtTechnicalTriggerRecord (emulator) with label: "
56 if ( dGMT < 0 )
return;
58 std::map<int,bool> ttuDec;
59 std::map<int,bool>::iterator decItr;
64 for(
int iebx=0; iebx<=2; iebx++) {
66 ttuDec[iebx-1] = gtTTWord[ 24+
k ];
74 for( decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr ){
75 if ( (*decItr).second ) {
76 int bx2 = (*decItr).first;
77 float bxdiffPacTT = 1.0*( bx1 - bx2);
89 for( decItr = ttuDec.begin(); decItr != ttuDec.end(); ++decItr ){
90 if ( (*decItr).second ) {
91 int bx2 = (*decItr).first;
92 float bxdiffDtTT = 1.0*( bx1 - bx2);
111 std::vector<L1GtTechnicalTrigger> ttVec = emuTTRecord->gtTechnicalTrigger();
113 std::vector<unsigned>::iterator bitsItr;
116 bool hasDataTrigger =
false;
117 bool hasEmulatorTrigger =
false;
119 if ( ttVec.size() <= 0 )
return;
123 hasDataTrigger = gtTTWord.at( (*bitsItr) );
126 hasEmulatorTrigger = ttVec[
k].gtTechnicalTriggerResult();
146 if ( ! pCollection.
isValid() ) {
147 edm::LogError(
"discriminateGMT") <<
"can't find L1MuGMTReadoutCollection with label "
156 bool rpcBar_l1a =
false;
157 bool dtBar_l1a =
false;
166 std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
167 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtRC->
getRecords();
169 edm::LogInfo(
"DiscriminateGMT") <<
"nRecords: " << gmt_records.size() <<
'\n';
171 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr ) {
173 int BxInEvent = RRItr->getBxInEvent();
174 int BxInEventNew = RRItr->getBxNr();
180 std::vector<L1MuRegionalCand> BrlRpcCands = RRItr->getBrlRPCCands();
181 std::vector<L1MuRegionalCand> BrlDtCands = RRItr->getDTBXCands ();
183 std::vector<L1MuRegionalCand>::const_iterator RCItr;
185 for( RCItr = BrlRpcCands.begin(); RCItr !=BrlRpcCands.end(); ++RCItr) {
186 if ( !(*RCItr).empty() ) {
194 for( RCItr = BrlDtCands.begin(); RCItr !=BrlDtCands.end(); ++RCItr) {
195 if ( !(*RCItr).empty() ) {
201 if( BxInEvent == 0 && nrpcB > 0) rpcBar_l1a =
true;
202 if( BxInEvent == 0 && ndtB > 0) dtBar_l1a =
true;
224 if ( data == 1 && emu == 1 )
227 if ( data == 1 && emu == 0 )
230 if ( data == 0 && emu == 1 )
233 if ( data == 0 && emu == 0 )
252 "Technical Trigger bits : Summary",
256 "Technical Trigger bits : Summary",
260 std::ostringstream hname;
262 hname <<
"BX.diff.PAC-TTU.bit." <<
m_ttBits[
k];
265 "Timing difference between PAC and TTU",
270 hname <<
"BX.diff.DT-TTU.bit." << m_ttBits[
k];
273 "Timing difference between DT and TTU",
278 hname <<
"Emu.Ttu.Compare.bit." << m_ttBits[
k];
281 "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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
int bunchCrossing() const
edm::InputTag m_gmtReadoutLabel
std::vector< unsigned > m_ttBits
edm::InputTag m_gtReadoutLabel
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * m_dataVsemulator[8]
MonitorElement * m_ttBitsDecisionEmulator
MonitorElement * m_bxDistDiffDt[8]
edm::InputTag m_rpcTechTrigEmu
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
virtual void beginRun(const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int discriminateGMT(const edm::Event &iEvent, const edm::EventSetup &iSetup)
T const * product() const
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 showDirStructure(void) const
void discriminateDecision(bool, bool, int)
MonitorElement * m_ttBitsDecisionData
void setCurrentFolder(const std::string &fullpath)