4 #include <fmt/format.h> 27 edm::LogError(
"RPCTTUMonitor") <<
"can nout find L1GlobalTriggerRecord \n";
36 edm::LogError(
"RPCTTUMonitor") <<
"can not find L1GtTechnicalTriggerRecord (emulator) \n";
48 std::map<int, bool> ttuDec;
50 const int bxX =
iEvent.bunchCrossing();
53 for (
int iebx = 0; iebx <= 2; iebx++) {
55 ttuDec[iebx - 1] = gtTTWord[24 +
k];
61 for (
const auto&
dec : ttuDec) {
63 const int bx2 =
dec.first;
64 const float bxdiffPacTT = 1.0 * (bx1 - bx2);
73 for (
const auto&
dec : ttuDec) {
75 const int bx2 =
dec.first;
76 const float bxdiffDtTT = 1.0 * (bx1 - bx2);
97 bool hasDataTrigger =
false;
98 bool hasEmulatorTrigger =
false;
104 hasDataTrigger = gtTTWord.at(
bits);
107 hasEmulatorTrigger = ttVec[
k].gtTechnicalTriggerResult();
121 edm::LogError(
"discriminateGMT") <<
"can't find L1MuGMTReadoutCollection with label \n";
128 bool rpcBar_l1a =
false;
129 bool dtBar_l1a =
false;
138 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtRC->
getRecords();
140 edm::LogInfo(
"DiscriminateGMT") <<
"nRecords: " << gmt_records.size() <<
'\n';
142 for (
const auto&
rr : gmt_records) {
143 const int BxInEvent =
rr.getBxInEvent();
144 const int BxInEventNew =
rr.getBxNr();
150 std::vector<L1MuRegionalCand> BrlRpcCands =
rr.getBrlRPCCands();
151 std::vector<L1MuRegionalCand> BrlDtCands =
rr.getDTBXCands();
153 for (
const auto& rc : BrlRpcCands) {
161 for (
const auto& rc : BrlDtCands) {
168 if (BxInEvent == 0 && nrpcB > 0)
170 if (BxInEvent == 0 && ndtB > 0)
188 if (
data == 1 && emu == 1) {
190 }
else if (
data == 1 && emu == 0) {
192 }
else if (
data == 0 && emu == 1) {
194 }
else if (
data == 0 && emu == 0) {
206 ibooker.
book1D(
"TechTrigger.Bits.Emulator",
"Technical Trigger bits : Summary", 10, 23, 33);
T getParameter(std::string const &) const
std::vector< int > m_DTcandidatesBx
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtReadoutLabel
T const * product() const
edm::EDGetTokenT< L1MuGMTReadoutCollection > m_gmtReadoutLabel
Log< level::Error, false > LogError
std::vector< unsigned > m_ttBits
MonitorElement * m_dataVsemulator[8]
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * m_ttBitsDecisionEmulator
MonitorElement * m_bxDistDiffDt[8]
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const std::vector< L1GtTechnicalTrigger > & gtTechnicalTrigger() const
get / set the vector of technical triggers
Log< level::Info, false > LogInfo
int discriminateGMT(const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< L1MuGMTReadoutRecord > const & getRecords() 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]
RPCTTUMonitor(const edm::ParameterSet &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void discriminateDecision(bool, bool, int)
MonitorElement * m_ttBitsDecisionData
edm::EDGetTokenT< L1GtTechnicalTriggerRecord > m_rpcTechTrigEmu