Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPS DQM plots for new RPOTs 45-220-NR-HR and 56-220-NR-HR (backport of 41389) [13_1_X] #41520

Merged
merged 5 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions DQM/CTPPS/plugins/CTPPSCommonDQMSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CTPPSCommonDQMSource : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<s
private:
const unsigned int verbosity;
constexpr static int MAX_LUMIS = 6000;
constexpr static int MAX_VBINS = 18;
constexpr static int MAX_VBINS = 20;

const edm::EDGetTokenT<CTPPSRecord> ctppsRecordToken;
const edm::EDGetTokenT<std::vector<CTPPSLocalTrackLite>> tokenLocalTrackLite;
Expand Down Expand Up @@ -142,17 +142,19 @@ void CTPPSCommonDQMSource::GlobalPlots::Init(DQMStore::IBooker &ibooker) {
ya->SetBinLabel(5, "45, 220, FR-BT");
ya->SetBinLabel(6, "45, 220, FR-HR");
ya->SetBinLabel(7, "45, 220, FR-TP");
ya->SetBinLabel(8, "45, 220, NR-BP");
ya->SetBinLabel(9, "45, 220, NR-TP");
ya->SetBinLabel(10, "56, 210, FR-BT");
ya->SetBinLabel(11, "56, 210, FR-HR");
ya->SetBinLabel(12, "56, 210, FR-TP");
ya->SetBinLabel(13, "56, 220, C1");
ya->SetBinLabel(14, "56, 220, FR-BT");
ya->SetBinLabel(15, "56, 220, FR-HR");
ya->SetBinLabel(16, "56, 220, FR-TP");
ya->SetBinLabel(17, "56, 220, NR-BP");
ya->SetBinLabel(18, "56, 220, NR-TP");
ya->SetBinLabel(8, "45, 220, NR-BT");
ya->SetBinLabel(9, "45, 220, NR-HR");
ya->SetBinLabel(10, "45, 220, NR-TP");
ya->SetBinLabel(11, "56, 210, FR-BT");
ya->SetBinLabel(12, "56, 210, FR-HR");
ya->SetBinLabel(13, "56, 210, FR-TP");
ya->SetBinLabel(14, "56, 220, C1");
ya->SetBinLabel(15, "56, 220, FR-BT");
ya->SetBinLabel(16, "56, 220, FR-HR");
ya->SetBinLabel(17, "56, 220, FR-TP");
ya->SetBinLabel(18, "56, 220, NR-BT");
ya->SetBinLabel(19, "56, 220, NR-HR");
ya->SetBinLabel(20, "56, 220, NR-TP");
}

h_trackCorr_hor = ibooker.book2D("track correlation hor", "ctpps_common_rp_hor", 8, -0.5, 7.5, 8, -0.5, 7.5);
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/OnlineMetaData/interface/CTPPSRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CTPPSRecord {
RP_45_220_FR_HR,
RP_45_220_FR_TP,
RP_45_220_NR_BT,
RP_45_220_NR_HR,
RP_45_220_NR_TP,
RP_56_210_FR_BT,
RP_56_210_FR_HR,
Expand All @@ -37,6 +38,7 @@ class CTPPSRecord {
RP_56_220_FR_HR,
RP_56_220_FR_TP,
RP_56_220_NR_BT,
RP_56_220_NR_HR,
RP_56_220_NR_TP,
Last
};
Expand Down
23 changes: 5 additions & 18 deletions DataFormats/OnlineMetaData/src/CTPPSRecord.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@
#include "DataFormats/OnlineMetaData/interface/CTPPSRecord.h"
#include "DataFormats/OnlineMetaData/interface/OnlineMetaDataRaw.h"

const CTPPSRecord::RomanPotNames CTPPSRecord::romanPotNames_ = {{"RP_45_210_FR_BT",
"RP_45_210_FR_HR",
"RP_45_210_FR_TP",
"RP_45_220_C1",
"RP_45_220_FR_BT",
"RP_45_220_FR_HR",
"RP_45_220_FR_TP",
"RP_45_220_NR_BT",
"RP_45_220_NR_TP",
"RP_56_210_FR_BT",
"RP_56_210_FR_HR",
"RP_56_210_FR_TP",
"RP_56_220_C1",
"RP_56_220_FR_BT",
"RP_56_220_FR_HR",
"RP_56_220_FR_TP",
"RP_56_220_NR_BT",
"RP_56_220_NR_TP"}};
const CTPPSRecord::RomanPotNames CTPPSRecord::romanPotNames_ = {
{"RP_45_210_FR_BT", "RP_45_210_FR_HR", "RP_45_210_FR_TP", "RP_45_220_C1", "RP_45_220_FR_BT",
"RP_45_220_FR_HR", "RP_45_220_FR_TP", "RP_45_220_NR_BT", "RP_45_220_NR_HR", "RP_45_220_NR_TP",
"RP_56_210_FR_BT", "RP_56_210_FR_HR", "RP_56_210_FR_TP", "RP_56_220_C1", "RP_56_220_FR_BT",
"RP_56_220_FR_HR", "RP_56_220_FR_TP", "RP_56_220_NR_BT", "RP_56_220_NR_HR", "RP_56_220_NR_TP"}};

const std::array<std::string, 4> CTPPSRecord::statusNames_ = {{"unused", "bad", "warning", "ok"}};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
==================== DUMP ======================
Reason for dump: Requested by user
00000000 : 0003fe00 500017f7 00000003 00000000 | human readable swapped : 500017f7 0003fe00 00000000 00000003 : 00000000
00000010 : 99d65448 00000187 0010006d 00000000 | human readable swapped : 00000187 99d65448 00000000 0010006d : 00000010
00000020 : 00000000 00000000 99d62140 00000187 | human readable swapped : 00000000 00000000 00000187 99d62140 : 00000020
00000030 : 00000000 00000000 00000000 00000000 | human readable swapped : 00000000 00000000 00000000 00000000 : 00000030
00000040 : 00000000 00000000 00000000 00000000 | human readable swapped : 00000000 00000000 00000000 00000000 : 00000040
00000050 : 00000000 00000000 00000000 00000000 | human readable swapped : 00000000 00000000 00000000 00000000 : 00000050
00000060 : 00000000 00000000 00000000 00000000 | human readable swapped : 00000000 00000000 00000000 00000000 : 00000060
00000070 : 99d62e9a 00000187 44410444 00000010 | human readable swapped : 00000187 99d62e9a 00000010 44410444 : 00000070
00000080 : 99b0cc96 00000187 01fe7fff 07fe7fff | human readable swapped : 00000187 99b0cc96 07fe7fff 01fe7fff : 00000080
00000090 : 468de7e5 00000000 d41e0000 a0000014 | human readable swapped : 00000000 468de7e5 a0000014 d41e0000 : 00000090
================ END OF DUMP ===================
12 changes: 6 additions & 6 deletions DataFormats/OnlineMetaData/test/onlineMetaDataRecord_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ void TestOnlineMetaDataRecord::testOnlineLuminosityRecord_v2() {
}

void TestOnlineMetaDataRecord::testCTPPSRecord_v2() {
const unsigned char* payload = readPayload("dump_run000001_event00013761_fed1022.txt");
const unsigned char* payload = readPayload("dump_run000001_event6135_fed1022.txt");
const online::Data_v2* data_v2 = reinterpret_cast<online::Data_v2 const*>(payload + FEDHeader::length);
CTPPSRecord ctpps(data_v2->ctpps);
std::cout << ctpps << std::endl;

// DIP timestamp is in milliseconds
const uint64_t ts = ctpps.timestamp().unixTime() * 1000UL + ctpps.timestamp().microsecondOffset() / 1000;
CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(0x1616b5a0e5f), ts);
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::bad, ctpps.status(CTPPSRecord::RomanPot::RP_45_210_FR_BT));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::ok, ctpps.status(CTPPSRecord::RomanPot::RP_45_220_FR_TP));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::warning, ctpps.status(CTPPSRecord::RomanPot::RP_45_220_NR_TP));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::unused, ctpps.status(CTPPSRecord::RomanPot::RP_56_220_NR_TP));
CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(0x18799D62E9A), ts);
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::unused, ctpps.status(CTPPSRecord::RomanPot::RP_45_210_FR_BT));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::unused, ctpps.status(CTPPSRecord::RomanPot::RP_45_220_FR_TP));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::unused, ctpps.status(CTPPSRecord::RomanPot::RP_45_220_NR_TP));
CPPUNIT_ASSERT_EQUAL(CTPPSRecord::Status::bad, ctpps.status(CTPPSRecord::RomanPot::RP_56_220_NR_HR));
}