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];
62 for (
const auto&
dec : ttuDec) {
64 const int bx2 =
dec.first;
65 const float bxdiffPacTT = 1.0 * (bx1 - bx2);
76 for (
const auto&
dec : ttuDec) {
78 const int bx2 =
dec.first;
79 const float bxdiffDtTT = 1.0 * (bx1 - bx2);
101 bool hasDataTrigger =
false;
102 bool hasEmulatorTrigger =
false;
108 hasDataTrigger = gtTTWord.at(bits);
111 hasEmulatorTrigger = ttVec[
k].gtTechnicalTriggerResult();
125 edm::LogError(
"discriminateGMT") <<
"can't find L1MuGMTReadoutCollection with label \n";
132 bool rpcBar_l1a =
false;
133 bool dtBar_l1a =
false;
142 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtRC->
getRecords();
144 edm::LogInfo(
"DiscriminateGMT") <<
"nRecords: " << gmt_records.size() <<
'\n';
146 for (
const auto&
rr : gmt_records) {
147 const int BxInEvent =
rr.getBxInEvent();
148 const int BxInEventNew =
rr.getBxNr();
154 std::vector<L1MuRegionalCand> BrlRpcCands =
rr.getBrlRPCCands();
155 std::vector<L1MuRegionalCand> BrlDtCands =
rr.getDTBXCands();
157 for (
const auto& rc : BrlRpcCands) {
165 for (
const auto& rc : BrlDtCands) {
172 if (BxInEvent == 0 && nrpcB > 0)
174 if (BxInEvent == 0 && ndtB > 0)
192 if (
data == 1 && emu == 1) {
194 }
else if (
data == 1 && emu == 0) {
196 }
else if (
data == 0 && emu == 1) {
198 }
else if (
data == 0 && emu == 0) {
210 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