diff --git a/algo/kf/core/geo/KfField.h b/algo/kf/core/geo/KfField.h index df48b5c5095f2a2f9e0ffa7eea5f4d9e2dd60bff..dc1f4895022757b6cea2b4e81e9fcf95ef76b8fc 100644 --- a/algo/kf/core/geo/KfField.h +++ b/algo/kf/core/geo/KfField.h @@ -218,7 +218,7 @@ namespace cbm::algo::kf , foFldOrig(fldMode == EFieldMode::Orig ? std::make_optional(detail::FieldBase<T, EFieldMode::Orig>()) : std::nullopt) , fPrimVertexField(FieldRegion<T>(fldMode, fldType)) - , fFieldType(EFieldType::Normal) + , fFieldType(fldType) , fFieldMode(fldMode) { } diff --git a/algo/kf/core/geo/KfMaterialMap.h b/algo/kf/core/geo/KfMaterialMap.h index 7c25dca012a8f82f73e63c106ea98e3f5d3505d3..37a850a69c77593569b2a8643334ff56cc103659 100644 --- a/algo/kf/core/geo/KfMaterialMap.h +++ b/algo/kf/core/geo/KfMaterialMap.h @@ -97,6 +97,26 @@ namespace cbm::algo::kf } } + + /// \brief Gets material thickness in units of radiational length X0 + /// \tparam I Type of the x and y (floating point) + /// \param iX Bin number along x axis + /// \param iY Bin number along y axis + template<typename I> + I GetBinThicknessX0(int iX, int iY) const + { + if constexpr (std::is_same_v<I, fvec>) { + fvec res; + for (size_t i = 0; i < utils::simd::Size<I>(); ++i) { + res[i] = GetBinThicknessX0<fscal>(iX, iY); + } + return res; + } + else { + return fTable[iX + iY * fNbins]; + } + } + /// \brief Function to test the instance for NaN bool IsUndefined() const { diff --git a/core/base/CMakeLists.txt b/core/base/CMakeLists.txt index 5fe27362d381b5a6763ed14281794bcc1ebe9fa3..ca11909b3d371d32014d168d806ad6afc411dc75 100644 --- a/core/base/CMakeLists.txt +++ b/core/base/CMakeLists.txt @@ -55,7 +55,7 @@ set(PRIVATE_DEPENDENCIES generate_cbm_library() -Install(FILES CbmDigitize.h CbmTrackingDetectorInterfaceBase.h report/CbmReportElement.h +Install(FILES CbmDigitize.h CbmTrackingDetectorInterfaceBase.h report/CbmReportElement.h utils/CbmEnumArray.h DESTINATION include ) diff --git a/reco/L1/qa/CbmCaInputQaSetup.cxx b/reco/L1/qa/CbmCaInputQaSetup.cxx index 41bb8fe5f67f19c84661e3d75f5f4fca03ae3921..7dfc29fa8c197233b230d39d594852ab00e4970f 100644 --- a/reco/L1/qa/CbmCaInputQaSetup.cxx +++ b/reco/L1/qa/CbmCaInputQaSetup.cxx @@ -415,14 +415,14 @@ try { auto [detID, stationID] = kfSetup.GetIndexMap().GlobalToLocal(iLayer); TString sN = Form("%s/mat_budget_%s_st%d", dir.Data(), kDetName[detID], stationID); TString sT = - Form("Material budget map for %s station %d;x [cm];y [cm]; X/X_{0} [\%]", kDetName[detID], stationID); + Form("Material budget map for %s station %d;x [cm];y [cm]; X/X_{0} [%%]", kDetName[detID], stationID); auto nBins{matMap.GetNbins()}; auto xMin{-matMap.GetXYmax()}; auto xMax{+matMap.GetXYmax()}; auto* pHist = MakeQaObject<TH2F>(sN, sT, nBins, xMin, xMax, nBins, xMin, xMax); for (int iX = 0; iX < nBins; ++iX) { for (int iY = 0; iY < nBins; ++iY) { - pHist->SetBinContent(iX + 1, iY + 1, 100. * matMap.GetThicknessX0(iX, iY)); + pHist->SetBinContent(iX + 1, iY + 1, 100. * matMap.template GetBinThicknessX0<float>(iX, iY)); } } } @@ -434,7 +434,7 @@ try { MakeQaDirectory("TrackingKFSetup/active"); CreateMaterialBudgetHistograms(fpParameters->GetActiveSetup(), "TrackingKFSetup/active"); - LOG(error) << fName << ": initializing... \033[1;32mDone\033[0m"; + LOG(info) << fName << ": initializing... \033[1;32mDone\033[0m"; return kSUCCESS; } catch (const std::exception& e) {