diff --git a/core/detectors/sts/CbmStsParAsic.h b/core/detectors/sts/CbmStsParAsic.h index 6815acc24132085777dd13fe1a41d7d2b536f2cd..6959814da6bcf455fdfd1e651f3fcb1199d608fd 100644 --- a/core/detectors/sts/CbmStsParAsic.h +++ b/core/detectors/sts/CbmStsParAsic.h @@ -180,7 +180,7 @@ public: /** @brief Set coefficients for walk correction ** @param par Array of correction parameters **/ - void SetWalkCoef(std::array<double, 32> par) { fWalkCoef = par; } + void SetWalkCoef(std::array<double, 31> par) { fWalkCoef = par; } /** @brief Get one of the coefficients for walk correction ** @param uIdx Index of the correction parameter @@ -188,7 +188,7 @@ public: **/ double GetWalkCoef(uint32_t uIdx) const { - if (uIdx < 32) return fWalkCoef[uIdx]; + if (uIdx < 31) return fWalkCoef[uIdx]; return 0.; } @@ -206,9 +206,7 @@ private: double fNoise = 0.; ///< RMS of noise [e] double fZeroNoiseRate = 0.; ///< Zero-crossing noise rate [1/ns] double fTimeOffset = 0.; ///< Time offset [ns] - std::array<double, 32> fWalkCoef = {{0., 0., 0., 0., ///< Parameters for correction of walk effect - 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., - 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}}; + std::array<double, 31> fWalkCoef = {}; ///< Parameters for correction of walk effect std::set<uint16_t> fDeadChannels {}; ///< Map of dead channels bool fIsInit = kFALSE; //! Flag for being initialised diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C index a7419c6d6973a8c5a32b5429e737a3443522b79c..4c0717ec4459ce75067653ca22bd720aea6f49b5 100644 --- a/macro/run/run_unpack_tsa.C +++ b/macro/run/run_unpack_tsa.C @@ -185,9 +185,7 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid auto parAsic = new CbmStsParAsic(128, 31, 31., 1., 5., 800., 1000., 3.9789e-3); // Default ASIC parameters auto parMod = new CbmStsParModule(2048, 128); // Generic STS module parameter object - std::array<double, 32> tw_map = {{0., 0., 0., 0., // Default time walk map - 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., - 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}}; + std::array<double, 31> tw_map = {}; // Default time walk map parAsic->SetWalkCoef(tw_map); // Set generic ASIC par with no time walk correction parMod->SetAllAsics(*parAsic); // Set generic module ASIC as default ASIC parameter configuration @@ -198,7 +196,7 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid int sensor, asic; std::ifstream asicTimeWalk_par(Form("%s/mStsAsicTimeWalk.par", parfilesbasepathSts.data())); while (asicTimeWalk_par >> std::hex >> sensor >> std::dec >> asic) { // Read module and ASIC - LOG(info) << Form("[STS] Reading %x %u", sensor, asic); + LOG(debug) << Form("[STS] Reading %x %u", sensor, asic); for (int adc = 0; adc < 31; adc++) { // Read time offset by ADC asicTimeWalk_par >> tw_map[adc]; // Set time walk map offset value for given ADC if (std::fabs(tw_map[adc]) > 100) { @@ -213,7 +211,7 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid } moduleWalkMap[sensor].SetAsic(asic, *parAsic); // Set ASIC parameter - LOG(info) << Form("\n[STS] Time Walk parameters loaded for: module %x, ASIC %u\n", sensor, asic); + LOG(debug) << Form("\n[STS] Time Walk parameters loaded for: module %x, ASIC %u\n", sensor, asic); } stsconfig->SetWalkMap(moduleWalkMap); diff --git a/reco/detectors/sts/unpack/CbmStsUnpackAlgoBase.cxx b/reco/detectors/sts/unpack/CbmStsUnpackAlgoBase.cxx index 378a82c9444f14879f4504bd8bde7a62aa1ed1a1..8c6dba7d467363fe08bf04718b2be9cfce59ce9c 100644 --- a/reco/detectors/sts/unpack/CbmStsUnpackAlgoBase.cxx +++ b/reco/detectors/sts/unpack/CbmStsUnpackAlgoBase.cxx @@ -31,8 +31,8 @@ void CbmStsUnpackAlgoBase::SetWalkMap(const std::map<uint32_t, CbmStsParModule>& fWalkLookup[mapInEntry.first].resize(uNbAsics); LOG(debug) << Form("[STS-UNPACKER] setting TW parameters: %x\n", mapInEntry.first); for (uint32_t asicIdx = 0; asicIdx < uNbAsics; ++asicIdx) { - fWalkLookup[mapInEntry.first][asicIdx].resize(32); - for (uint32_t uAdc = 0; uAdc < 32; ++uAdc) { + fWalkLookup[mapInEntry.first][asicIdx].resize(31); + for (uint32_t uAdc = 0; uAdc < 31; ++uAdc) { fWalkLookup[mapInEntry.first][asicIdx][uAdc] = asicPars[asicIdx].GetWalkCoef(uAdc); } }