diff --git a/core/base/CbmTrackingDetectorInterfaceBase.cxx b/core/base/CbmTrackingDetectorInterfaceBase.cxx index 9fad5ba1241c38f45e9c2784d4ecec64b2714b4a..997182b13d3b98efa3f69ea2456257e4214251f4 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.cxx +++ b/core/base/CbmTrackingDetectorInterfaceBase.cxx @@ -11,13 +11,17 @@ #include <Logger.h> +#include <iomanip> #include <limits> #include <set> #include <vector> +// --------------------------------------------------------------------------------------------------------------------- +// bool CbmTrackingDetectorInterfaceBase::Check() const { bool res = true; + LOG(info) << ToString(); std::stringstream msg; msg << "Errors in the detector interface initialization for " << this->GetDetectorName() << ":\n"; @@ -27,7 +31,6 @@ bool CbmTrackingDetectorInterfaceBase::Check() const res = false && res; } else { - // Station individual parameters check for (int iSt = 0; iSt < this->GetNtrackingStations(); ++iSt) { std::string prefix = std::string("\t- Station ") + std::to_string(iSt) + " has "; @@ -124,3 +127,42 @@ bool CbmTrackingDetectorInterfaceBase::Check() const return res; } + +// --------------------------------------------------------------------------------------------------------------------- +// +std::string CbmTrackingDetectorInterfaceBase::ToString() const +{ + using std::setfill; + using std::setw; + std::stringstream table; + table << "\nTracking detector interface: " << setw(5) << setfill(' ') << GetDetectorName() << '\n'; + table << setw(5) << setfill(' ') << "st.No" << ' '; + table << setw(10) << setfill(' ') << "z[cm]" << ' '; + table << setw(10) << setfill(' ') << "R_min[cm]" << ' '; + table << setw(10) << setfill(' ') << "R_max[cm]" << ' '; + table << setw(10) << setfill(' ') << "x_max[cm]" << ' '; + table << setw(10) << setfill(' ') << "y_max[cm]" << ' '; + table << setw(12) << setfill(' ') << "res.time[ns]" << ' '; + table << setw(11) << setfill(' ') << "angleF[rad]" << ' '; + table << setw(11) << setfill(' ') << "angleB[rad]" << ' '; + table << setw(10) << setfill(' ') << "res.F [cm]" << ' '; + table << setw(10) << setfill(' ') << "res.B [cm]" << ' '; + table << setw(10) << setfill(' ') << "dz [cm]" << ' '; + table << setw(10) << setfill(' ') << "RL [cm]" << '\n'; + for (int iSt = 0; iSt < GetNtrackingStations(); ++iSt) { + table << setw(5) << setfill(' ') << iSt << ' '; + table << setw(10) << setfill(' ') << GetZ(iSt) << ' '; + table << setw(10) << setfill(' ') << GetRmin(iSt) << ' '; + table << setw(10) << setfill(' ') << GetRmax(iSt) << ' '; + table << setw(10) << setfill(' ') << GetXmax(iSt) << ' '; + table << setw(10) << setfill(' ') << GetYmax(iSt) << ' '; + table << setw(12) << setfill(' ') << GetTimeResolution(iSt) << ' '; + table << setw(11) << setfill(' ') << GetStripsStereoAngleFront(iSt) << ' '; + table << setw(11) << setfill(' ') << GetStripsStereoAngleBack(iSt) << ' '; + table << setw(10) << setfill(' ') << GetStripsSpatialRmsFront(iSt) << ' '; + table << setw(10) << setfill(' ') << GetStripsSpatialRmsBack(iSt) << ' '; + table << setw(10) << setfill(' ') << GetThickness(iSt) << ' '; + table << setw(10) << setfill(' ') << GetRadLength(iSt) << '\n'; + } + return table.str(); +} diff --git a/core/base/CbmTrackingDetectorInterfaceBase.h b/core/base/CbmTrackingDetectorInterfaceBase.h index c5a5827beef8e149d269232ad143a33b357b5bdf..2c402a314f258235d3bea8d760cd640c3657df22 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.h +++ b/core/base/CbmTrackingDetectorInterfaceBase.h @@ -117,6 +117,9 @@ public: /// Checks detector interface: boundary conditions of the parameters bool Check() const; + + /// Prints all the parameters into table and saves the table as a string + std::string ToString() const; }; #endif // CbmTrackingDetectorInterfaceBase_h diff --git a/core/detectors/tof/CbmTofTrackingInterface.cxx b/core/detectors/tof/CbmTofTrackingInterface.cxx index ff5e3885590049815da59c8f4005898b881de88a..de024d1750ed18ac38d8cdb8848e4a029e37d895 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.cxx +++ b/core/detectors/tof/CbmTofTrackingInterface.cxx @@ -12,6 +12,7 @@ #include "CbmTofTrackingInterface.h" #include "CbmTofCell.h" +#include "CbmTofCreateDigiPar.h" #include "CbmTofDigiPar.h" #include "FairDetector.h" @@ -40,6 +41,10 @@ CbmTofTrackingInterface::~CbmTofTrackingInterface() // InitStatus CbmTofTrackingInterface::Init() { + // create digitization parameters from geometry file + CbmTofCreateDigiPar* tofDigiPar = new CbmTofCreateDigiPar("TOF Digi Producer", "TOF task"); + LOG(info) << "Create DigiPar"; + tofDigiPar->Init(); // ** ToF tracking station position z-components initialization ** // Init ToF stations position z-components. For each ToF tracking station the position z-component is calculated @@ -56,7 +61,6 @@ InitStatus CbmTofTrackingInterface::Init() int iAddr = CbmTofAddress::GetUniqueAddress(iSm, iRpc, 0, 0, iSmType); int station = fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc); auto* channelInfo = dynamic_cast<CbmTofCell*>(fDigiPar->GetCell(iAddr)); - if (nullptr == channelInfo) { break; } float z = channelInfo->GetZ(); @@ -103,6 +107,7 @@ InitStatus CbmTofTrackingInterface::ReInit() // void CbmTofTrackingInterface::SetParContainers() { + auto runtimeDb = FairRunAna::Instance()->GetRuntimeDb(); fDigiPar = dynamic_cast<CbmTofDigiPar*>(runtimeDb->getContainer("CbmTofDigiPar")); fDigiBdfPar = dynamic_cast<CbmTofDigiBdfPar*>(runtimeDb->getContainer("CbmTofDigiBdfPar")); diff --git a/macro/run/run_qa.C b/macro/run/run_qa.C index 2292beed81c6f4a8fe73c7250a1c4532abc38b1e..eae28b1e68ba5d4913fe5f318860799a733b206e 100644 --- a/macro/run/run_qa.C +++ b/macro/run/run_qa.C @@ -189,7 +189,15 @@ void run_qa(TString dataTra = "data/sis100_muon_jpsi_test", TString dataRaw = "d // ----- TRD QA --------------------------------- if (CbmSetup::Instance()->IsActive(ECbmModuleId::kTof)) { - run->AddTask(new CbmTrackerInputQaTof()); // Tracker requirements to TRD + // TODO: SZh 19.10.2022: + // After the proper TOF digi parameters initialization it is appeared, + // that CbmTrackerInputQaTof causes segmentation violation in + // CbmTrackerInputQaTof::ResolutionQa() for the event-based running + // (before the branch with the related code inside the task was never + // executed). Temporarily commented that task, till the bug would not be + // resolved. + + //run->AddTask(new CbmTrackerInputQaTof()); // Tracker requirements to TRD } // ------------------------------------------------------------------------ diff --git a/mvd/CbmMvdTrackingInterface.cxx b/mvd/CbmMvdTrackingInterface.cxx index f3e9655ade94324d20d88832f61ba8c5e60eefc3..7714dc6143c2081a8603dc6ed0cd8161a499c20d 100644 --- a/mvd/CbmMvdTrackingInterface.cxx +++ b/mvd/CbmMvdTrackingInterface.cxx @@ -44,7 +44,7 @@ InitStatus CbmMvdTrackingInterface::Init() // Check the validity of the parameters if (!this->Check()) { LOG(error) - << "Some errors occurred in the tracking detector interface initialization for MuCh (see information above)"; + << "Some errors occurred in the tracking detector interface initialization for MVD (see information above)"; return kFATAL; }