diff --git a/core/detectors/trd/CbmTrdParSpadic.cxx b/core/detectors/trd/CbmTrdParSpadic.cxx index ce42360dbfb1ed4f5c41c03e2370ca90e201e427..a3edb4c628187f70aefbf7c234ca6ccc1cabb0e8 100644 --- a/core/detectors/trd/CbmTrdParSpadic.cxx +++ b/core/detectors/trd/CbmTrdParSpadic.cxx @@ -189,10 +189,8 @@ Int_t CbmTrdParSpadic::GetAsicChAddress(const Int_t asicChannel) { Int_t address = -1; // Channel mapping based on channels 0-15 on the odd eLink and 16-31 on the even eLink, check setting in the unpacker for your dataset - std::vector<Int_t> chvec = {23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3, - 17, 16, 2, 1, 0, 31, 30, 29, 15, 14, 28, - 27, 13, 11, 26, 12, 10, 25, 9, 24, 8}; - address = chvec.at(asicChannel); + + address = fVecSpadicChannels.at(asicChannel); return address; } diff --git a/core/detectors/trd/CbmTrdParSpadic.h b/core/detectors/trd/CbmTrdParSpadic.h index 4d70a2b71696e81b260bf1aa7fc66252e98f728e..c99f97e3e1a18d754ebe551f712df64083aaf70d 100644 --- a/core/detectors/trd/CbmTrdParSpadic.h +++ b/core/detectors/trd/CbmTrdParSpadic.h @@ -78,8 +78,12 @@ private: static Double_t fgSizeY; ///< SPADIC half size in y [cm] static Double_t fgSizeZ; ///< SPADIC half size in z [cm] + const std::vector<Int_t> fVecSpadicChannels = { + 23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3, 17, 16, 2, 1, 0, + 31, 30, 29, 15, 14, 28, 27, 13, 11, 26, 12, 10, 25, 9, 24, 8}; - ClassDef(CbmTrdParSpadic, 1) // Definition of SPADIC ASIC parameters + + ClassDef(CbmTrdParSpadic, 2) // Definition of SPADIC ASIC parameters }; #endif