diff --git a/macro/run/run_unpack_online.C b/macro/run/run_unpack_online.C index 986bb3b6bd2b7961959cf2aaa9b36708f2d72bd5..4f2cc507656fa1671067cfc6096e7e9661977989 100644 --- a/macro/run/run_unpack_online.C +++ b/macro/run/run_unpack_online.C @@ -254,15 +254,37 @@ void run_unpack_online(std::vector<std::string> publisher = {"tcp://localhost:55 // Activate the line below to write Trd1D digis to a separate "TrdFaspDigi" branch. Can be used to separate between Fasp and Spadic digis //trdfasp2dconfig->SetOutputBranchName("TrdFaspDigi"); uint8_t map[NFASPMOD]; + uint16_t cri_map[NCRIMOD]; + for (int i(0); i < NFASPMOD; i++) + map[i] = i; if (runid <= 1588) { + const size_t nfasps = 12; uint8_t map21[] = {9, 2, 3, 11, 10, 7, 8, 0, 1, 4, 6, 5}; - for (int i(0); i < NFASPMOD; i++) - map[i] = (i < 12 ? map21[i] : i); + for (int i(0); i < nfasps; i++) + map[i] = map21[i]; + uint16_t crob_map21[] = {0x00f0, 0, 0, 0, 0}; + for (int i(0); i < NCROBMOD; i++) + crob_map[i] = crob_map21[i]; + } + else if (runid >= 2335) { + const size_t nfasp0 = 72; + const size_t nfasps = 36; + uint8_t map22[] = { + 84, 85, 86, 87, 88, 89, // FEB14/0xffc1 + 90, 91, 92, 93, 94, 95, // FEB17/0xffc1 + 96, 97, 98, 99, 100, 101, // FEB18/0xffc1 + 102, 103, 104, 105, 106, 107, // FEB16/0xffc1 + 72, 73, 74, 75, 76, 77, // FEB9/0xffc1 + 78, 79, 80, 81, 82, 83 // FEB8/0xffc1 + }; + for (int i(0); i < nfasps; i++) + map[i + nfasp0] = map22[i]; + uint16_t crob_map22[] = {0xffc2, 0xffc5, 0xffc1, 0, 0}; + for (int i(0); i < NCROBMOD; i++) + crob_map[i] = crob_map22[i]; } - else - for (int i(0); i < NFASPMOD; i++) - map[i] = i; trdfasp2dconfig->SetFaspMapping(5, map); + trdfasp2dconfig->SetCriMapping(5, cri_map); std::string parfilesbasepathTrdfasp2d = Form("%s/parameters/trd", srcDir.Data()); trdfasp2dconfig->SetParFilesBasePath(parfilesbasepathTrdfasp2d); trdfasp2dconfig->SetSystemTimeOffset(-1800); // [ns] value to be updated diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C index faed834f2d94a3f0a801f13b3fc58e78027fc3c4..a3f0a31786d783d599bde3a16487cc0ddac240df 100644 --- a/macro/run/run_unpack_tsa.C +++ b/macro/run/run_unpack_tsa.C @@ -282,15 +282,37 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid // Activate the line below to write Trd1D digis to a separate "TrdFaspDigi" branch. Can be used to separate between Fasp and Spadic digis // trdfasp2dconfig->SetOutputBranchName("TrdFaspDigi"); uint8_t map[NFASPMOD]; + uint16_t crob_map[NCROBMOD]; + for (int i(0); i < NFASPMOD; i++) + map[i] = i; if (runid <= 1588) { + const size_t nfasps = 12; uint8_t map21[] = {9, 2, 3, 11, 10, 7, 8, 0, 1, 4, 6, 5}; - for (int i(0); i < NFASPMOD; i++) - map[i] = (i < 12 ? map21[i] : i); + for (int i(0); i < nfasps; i++) + map[i] = map21[i]; + uint16_t crob_map21[] = {0x00f0, 0, 0, 0, 0}; + for (int i(0); i < NCROBMOD; i++) + crob_map[i] = crob_map21[i]; + } + else if (runid >= 2335) { + const size_t nfasp0 = 72; + const size_t nfasps = 36; + uint8_t map22[] = { + 84, 85, 86, 87, 88, 89, // FEB14/0xffc1 + 90, 91, 92, 93, 94, 95, // FEB17/0xffc1 + 96, 97, 98, 99, 100, 101, // FEB18/0xffc1 + 102, 103, 104, 105, 106, 107, // FEB16/0xffc1 + 72, 73, 74, 75, 76, 77, // FEB9/0xffc1 + 78, 79, 80, 81, 82, 83 // FEB8/0xffc1 + }; + for (int i(0); i < nfasps; i++) + map[i + nfasp0] = map22[i]; + uint16_t crob_map22[] = {0xffc2, 0xffc5, 0xffc1, 0, 0}; + for (int i(0); i < NCROBMOD; i++) + crob_map[i] = crob_map22[i]; } - else - for (int i(0); i < NFASPMOD; i++) - map[i] = i; trdfasp2dconfig->SetFaspMapping(5, map); + trdfasp2dconfig->SetCrobMapping(5, crob_map); std::string parfilesbasepathTrdfasp2d = Form("%s/parameters/trd", srcDir.Data()); trdfasp2dconfig->SetParFilesBasePath(parfilesbasepathTrdfasp2d); trdfasp2dconfig->SetSystemTimeOffset(-1800); // [ns] value to be updated