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

[13_0_X] Modify EMTF unpacker to support new reduced DAQ window for 2023 data taking #40948

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
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ namespace l1t {
bool run3_DAQ_format =
(getAlgoVersion() >=
11546); // Firmware from 26.08.22 which enabled new Run 3 DAQ format for GEMs - EY 13.09.22
bool reducedDAQWindow =
(getAlgoVersion() >=
11656); // Firmware from 08.12.22 which is used as a flag for new reduced readout window - EY 01.03.23

int nTPs = run3_DAQ_format ? 2 : 1;

Expand Down Expand Up @@ -172,7 +175,10 @@ namespace l1t {
GEM_.set_partition(GetHexBits(GEMa, 9, 11));
GEM_.set_cluster_size(GetHexBits(GEMa, 12, 14));

GEM_.set_tbin(GetHexBits(GEMb, 0, 2));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
GEM_.set_tbin(GetHexBits(GEMb, 0, 2) + 1);
else
GEM_.set_tbin(GetHexBits(GEMb, 0, 2));
GEM_.set_vp(GetHexBits(GEMb, 3, 3));
GEM_.set_bc0(GetHexBits(GEMb, 7, 7));
GEM_.set_cluster_id(GetHexBits(GEMb, 8, 11));
Expand All @@ -182,7 +188,10 @@ namespace l1t {
GEM_.set_partition(GetHexBits(GEMc, 9, 11));
GEM_.set_cluster_size(GetHexBits(GEMc, 12, 14));

GEM_.set_tbin(GetHexBits(GEMd, 0, 2));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
GEM_.set_tbin(GetHexBits(GEMd, 0, 2) + 1);
else
GEM_.set_tbin(GetHexBits(GEMd, 0, 2));
GEM_.set_vp(GetHexBits(GEMd, 3, 3));
GEM_.set_bc0(GetHexBits(GEMd, 7, 7));
GEM_.set_cluster_id(GetHexBits(GEMd, 8, 11));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ namespace l1t {
// Computed as (Year - 2000)*2^9 + Month*2^5 + Day (see Block.cc and EMTFBlockTrailers.cc)
bool run3_DAQ_format =
(getAlgoVersion() >= 11460); // Firmware from 04.06.22 which enabled new Run 3 DAQ format - EY 04.07.22
bool reducedDAQWindow =
(getAlgoVersion() >=
11656); // Firmware from 08.12.22 which is used as a flag for new reduced readout window - EY 01.03.23

// Set fields assuming Run 2 format. Modify for Run 3 later
ME_.set_clct_pattern(GetHexBits(MEa, 0, 3));
Expand All @@ -205,7 +208,10 @@ namespace l1t {
ME_.set_cik(GetHexBits(MEc, 13, 13));
ME_.set_afff(GetHexBits(MEc, 14, 14));

ME_.set_tbin(GetHexBits(MEd, 0, 2));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
ME_.set_tbin(GetHexBits(MEd, 0, 2) + 1);
else
ME_.set_tbin(GetHexBits(MEd, 0, 2));
ME_.set_vp(GetHexBits(MEd, 3, 3));
ME_.set_station(GetHexBits(MEd, 4, 6));
ME_.set_af(GetHexBits(MEd, 7, 7));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ namespace l1t {
bool run3_DAQ_format =
(getAlgoVersion() >=
11546); // Firmware from 26.08.22 which enabled new Run 3 DAQ format for RPCs - EY 13.09.22
bool reducedDAQWindow =
(getAlgoVersion() >=
11656); // Firmware from 08.12.22 which is used as a flag for new reduced readout window - EY 01.03.23

int nTPs = run3_DAQ_format ? 2 : 1;

Expand Down Expand Up @@ -165,7 +168,10 @@ namespace l1t {
RPC_.set_word(GetHexBits(RPCa, 11, 12));
RPC_.set_frame(GetHexBits(RPCa, 13, 14));

RPC_.set_tbin(GetHexBits(RPCb, 0, 2));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
RPC_.set_tbin(GetHexBits(RPCb, 0, 2) + 1);
else
RPC_.set_tbin(GetHexBits(RPCb, 0, 2));
RPC_.set_vp(GetHexBits(RPCb, 3, 3));
RPC_.set_theta(GetHexBits(RPCb, 4, 8));
RPC_.set_bc0(GetHexBits(RPCb, 9, 9));
Expand All @@ -175,7 +181,10 @@ namespace l1t {
RPC_.set_word(GetHexBits(RPCc, 11, 12));
RPC_.set_frame(GetHexBits(RPCc, 13, 14));

RPC_.set_tbin(GetHexBits(RPCd, 0, 2));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
RPC_.set_tbin(GetHexBits(RPCd, 0, 2) + 1);
else
RPC_.set_tbin(GetHexBits(RPCd, 0, 2));
RPC_.set_vp(GetHexBits(RPCd, 3, 3));
RPC_.set_theta(GetHexBits(RPCd, 4, 8));
RPC_.set_bc0(GetHexBits(RPCd, 9, 9));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ namespace l1t {
// FW version is computed as (Year - 2000)*2^9 + Month*2^5 + Day (see Block.cc and EMTFBlockTrailers.cc)
bool useNNBits_ = getAlgoVersion() >= 11098; // FW versions >= 26.10.2021
bool useHMTBits_ = getAlgoVersion() >= 11306; // FW versions >= 10.01.2022
bool reducedDAQWindow =
(getAlgoVersion() >=
11656); // Firmware from 08.12.22 which is used as a flag for new reduced readout window - EY 01.03.23

static constexpr int nominalShower_ = 1;
static constexpr int tightShower_ = 3;
Expand Down Expand Up @@ -260,7 +263,10 @@ namespace l1t {
SP_.set_me2_delay(GetHexBits(SP2b, 3, 5));
SP_.set_me3_delay(GetHexBits(SP2b, 6, 8));
SP_.set_me4_delay(GetHexBits(SP2b, 9, 11));
SP_.set_tbin(GetHexBits(SP2b, 12, 14));
if (reducedDAQWindow) // reduced DAQ window is used only after run3 DAQ format
SP_.set_tbin(GetHexBits(SP2b, 12, 14) + 1);
else
SP_.set_tbin(GetHexBits(SP2b, 12, 14));

if (useNNBits_) {
SP_.set_pt_dxy_GMT(GetHexBits(SP2c, 0, 7));
Expand Down