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;
221 if ( data == 1 && emu == 1 )
224 if ( data == 1 && emu == 0 )
227 if ( data == 0 && emu == 1 )
230 if ( data == 0 && emu == 0 )
251 "Technical Trigger bits : Summary",
255 "Technical Trigger bits : Summary",
259 std::ostringstream hname;
261 hname <<
"BX.diff.PAC-TTU.bit." <<
m_ttBits[
k];
264 "Timing difference between PAC and TTU",
269 hname <<
"BX.diff.DT-TTU.bit." << m_ttBits[
k];
272 "Timing difference between DT and TTU",
277 hname <<
"Emu.Ttu.Compare.bit." << m_ttBits[
k];
280 "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.
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]
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
virtual void beginRun(const edm::EventSetup &)
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
edm::EDGetTokenT< L1GtTechnicalTriggerRecord > m_rpcTechTrigEmu
void setCurrentFolder(const std::string &fullpath)