diff --git a/core/base/CbmTrackingDetectorInterfaceBase.cxx b/core/base/CbmTrackingDetectorInterfaceBase.cxx index 8dc142c8c0fb27bc5f166db7c0d02a34e5c56ffd..017d17256d754f5cea28d0859daad82d2ab80cbd 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.cxx +++ b/core/base/CbmTrackingDetectorInterfaceBase.cxx @@ -37,7 +37,7 @@ bool CbmTrackingDetectorInterfaceBase::Check() const { // Position along Z-axis double z0 = this->GetZmin(iSt); - double z1 = this->GetZ(iSt); + double z1 = this->GetZref(iSt); double z2 = this->GetZmax(iSt); if (!std::isfinite(z0) || !std::isfinite(z1) || !std::isfinite(z2) || !(z0 < z1 && z1 < z2)) { msg << prefix << " wrong Z position (" << z0 << " < " << z1 << " < " << z2 << " cm)\n"; @@ -52,7 +52,7 @@ bool CbmTrackingDetectorInterfaceBase::Check() const msg << prefix << " zero, negative or NaN X-size (xMin = " << xMin << ", xMax = " << xMax << " cm)\n"; res = false && res; } - } + } { // Size along Y-axis auto yMax = this->GetYmax(iSt); @@ -67,7 +67,7 @@ bool CbmTrackingDetectorInterfaceBase::Check() const { // Position along beam axis std::vector<double> zPositions(this->GetNtrackingStations()); for (int iSt = 0; iSt < this->GetNtrackingStations(); ++iSt) { - zPositions[iSt] = this->GetZ(iSt); + zPositions[iSt] = this->GetZref(iSt); } std::set<double> zPositionSet(zPositions.begin(), zPositions.end()); if (zPositions.size() != zPositionSet.size()) { @@ -81,7 +81,8 @@ bool CbmTrackingDetectorInterfaceBase::Check() const } if (!res) { - LOG(error) << msg.str() << "\033[4mErrors above mean that the CA tracking cannot be used with the current version of " + LOG(error) << msg.str() + << "\033[4mErrors above mean that the CA tracking cannot be used with the current version of " << this->GetDetectorName() << " setup. Please, check if the " << this->GetDetectorName() << " setup parameters and the corresponding tracking detector interface are initialized properly\033[0m"; } @@ -99,7 +100,7 @@ std::string CbmTrackingDetectorInterfaceBase::ToString() const table << std::boolalpha; table << "\nTracking detector interface: " << setw(5) << GetDetectorName() << '\n'; table << setw(5) << "st.No" << ' '; - table << setw(10) << "z[cm]" << ' '; + table << setw(10) << "z_ref[cm]" << ' '; table << setw(10) << "z_min[cm]" << ' '; table << setw(10) << "z_max[cm]" << ' '; table << setw(10) << "x_min[cm]" << ' '; @@ -110,7 +111,7 @@ std::string CbmTrackingDetectorInterfaceBase::ToString() const table << '\n'; for (int iSt = 0; iSt < GetNtrackingStations(); ++iSt) { table << setw(5) << iSt << ' '; - table << setw(10) << GetZ(iSt) << ' '; + table << setw(10) << GetZref(iSt) << ' '; table << setw(10) << GetZmin(iSt) << ' '; table << setw(10) << GetZmax(iSt) << ' '; table << setw(10) << GetXmin(iSt) << ' '; diff --git a/core/base/CbmTrackingDetectorInterfaceBase.h b/core/base/CbmTrackingDetectorInterfaceBase.h index b532e2deb39c73c370d13d64d41fae68927d905a..ebbc8ce74084e7cb76b2e28718d6c8f9b36c05b8 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.h +++ b/core/base/CbmTrackingDetectorInterfaceBase.h @@ -29,7 +29,7 @@ class CbmTrackingDetectorInterfaceBase { public: /// @brief Virtual destructor virtual ~CbmTrackingDetectorInterfaceBase() {} - + /// @brief Checks detector interface: boundary conditions of the parameters bool Check() const; @@ -60,7 +60,7 @@ public: /// /// The function searches for the closest station in beam axis direction int GetTrackingStationIndex(double zPos) const; - + /// @brief Gets upper bound of a station along the X-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the X-axis [cm] @@ -80,11 +80,11 @@ public: /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the Y-axis [cm] virtual double GetYmin(int stationId) const = 0; - + /// @brief Gets reference z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of the station [cm] - virtual double GetZ(int stationId) const = 0; + /// @return Reference z position of the station [cm] + virtual double GetZref(int stationId) const = 0; /// @brief Gets min z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) @@ -122,7 +122,7 @@ inline int CbmTrackingDetectorInterfaceBase::GetTrackingStationIndex(double zPos int nStations = GetNtrackingStations(); int iStSelected = -1; for (int iSt = 0; iSt < nStations; ++iSt) { - auto dist = std::fabs(zPos - GetZ(iSt)); + auto dist = std::fabs(zPos - GetZref(iSt)); if (dist < bestDist) { bestDist = dist; iStSelected = iSt; diff --git a/core/detectors/much/CbmMuchTrackingInterface.h b/core/detectors/much/CbmMuchTrackingInterface.h index 7f15c29783f27188e8bcd3531e6def9093c31d5e..ee8ec963934f71567f232d6286b8d08b98f55439 100644 --- a/core/detectors/much/CbmMuchTrackingInterface.h +++ b/core/detectors/much/CbmMuchTrackingInterface.h @@ -29,7 +29,7 @@ class CbmMuchLayer; -/// @class CbmMuchTrackingInterface +/// @class CbmMuchTrackingInterface /// @brief A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow /// settings. /// @@ -42,16 +42,16 @@ public: /// @brief Destructor ~CbmMuchTrackingInterface(); - + /// @brief Copy constructor CbmMuchTrackingInterface(const CbmMuchTrackingInterface&) = delete; - + /// @brief Move constructor CbmMuchTrackingInterface(CbmMuchTrackingInterface&&) = delete; - + /// @brief Copy assignment operator CbmMuchTrackingInterface& operator=(const CbmMuchTrackingInterface&) = delete; - + /// @brief Move assignment operator CbmMuchTrackingInterface& operator=(CbmMuchTrackingInterface&&) = delete; @@ -72,18 +72,18 @@ public: /// @brief Gets reference z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of the station [cm] - double GetZ(int stationId) const { return GetMuchLayer(stationId)->GetZ(); } + /// @return Reference z position of the station [cm] + double GetZref(int stationId) const { return GetMuchLayer(stationId)->GetZ(); } /// @brief Gets min z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return min Z of the station [cm] - double GetZmin(int stationId) const { return GetZ(stationId) - 0.5 * GetMuchLayer(stationId)->GetDz(); } + double GetZmin(int stationId) const { return GetZref(stationId) - 0.5 * GetMuchLayer(stationId)->GetDz(); } /// @brief Gets max z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return max Z of the station [cm] - double GetZmax(int stationId) const { return GetZ(stationId) + 0.5 * GetMuchLayer(stationId)->GetDz(); } + double GetZmax(int stationId) const { return GetZref(stationId) + 0.5 * GetMuchLayer(stationId)->GetDz(); } /// @brief Gets a tracking station of a CbmPixelHit /// @param hit A pointer to CbmPixelHit diff --git a/core/detectors/mvd/CbmMvdTrackingInterface.h b/core/detectors/mvd/CbmMvdTrackingInterface.h index d8410cb07392eeb882d7db265989f6e675c3e90c..c2854be0568f797694f5d1825d1c259ae4b527cf 100644 --- a/core/detectors/mvd/CbmMvdTrackingInterface.h +++ b/core/detectors/mvd/CbmMvdTrackingInterface.h @@ -30,8 +30,8 @@ class TBuffer; class TClass; class TMemberInspector; -/// @brief CbmMvdTrackingInterface -/// @brief A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow +/// @brief CbmMvdTrackingInterface +/// @brief A CbmL1 subtask, which provides necessary methods for L1 tracker to access the geometry and dataflow /// settings. /// class CbmMvdTrackingInterface : public FairTask, public CbmTrackingDetectorInterfaceBase, public CbmMvdDetectorId { @@ -44,13 +44,13 @@ public: /// @brief Copy constructor CbmMvdTrackingInterface(const CbmMvdTrackingInterface&) = delete; - + /// @brief Move constructor CbmMvdTrackingInterface(CbmMvdTrackingInterface&&) = delete; - + /// @brief Copy assignment operator CbmMvdTrackingInterface& operator=(const CbmMvdTrackingInterface&) = delete; - + /// @brief Move assignment operator CbmMvdTrackingInterface& operator=(CbmMvdTrackingInterface&&) = delete; @@ -63,8 +63,7 @@ public: /// --- to be removed --- Gets the tracking station radiation length /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Radiation length [cm] - [[deprecated]] - double GetRadLength(int stationId) const + [[deprecated]] double GetRadLength(int stationId) const { return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId)); } @@ -78,9 +77,8 @@ public: /// --- to be removed --- Gets the tracking station thickness along the Z-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Station thickness [cm] - [[deprecated]] - double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); } - + [[deprecated]] double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); } + /// @brief Gets a tracking station of a CbmPixelHit /// @param hit A pointer to CbmPixelHit /// @return Local index of the tracking station @@ -104,7 +102,7 @@ public: /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the X-axis [cm] double GetXmax(int stationId) const { return fMvdStationPar->GetWidth(stationId); } - + /// @brief Gets lower bound of a tracking station along the X-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the X-axis [cm] @@ -122,25 +120,25 @@ public: /// @brief Gets reference z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of the station [cm] - double GetZ(int stationId) const { return fMvdStationPar->GetZPosition(stationId); } + /// @return Reference z position of the station [cm] + double GetZref(int stationId) const { return fMvdStationPar->GetZPosition(stationId); } /// @brief Gets max z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return max Z of the station [cm] - double GetZmax(int stationId) const { return GetZ(stationId) + 0.5 * fMvdStationPar->GetZThickness(stationId); } + double GetZmax(int stationId) const { return GetZref(stationId) + 0.5 * fMvdStationPar->GetZThickness(stationId); } /// @brief Gets min z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return min Z of the station [cm] - double GetZmin(int stationId) const { return GetZ(stationId) - 0.5 * fMvdStationPar->GetZThickness(stationId); } + double GetZmin(int stationId) const { return GetZref(stationId) - 0.5 * fMvdStationPar->GetZThickness(stationId); } /// @brief FairTask: Init method InitStatus Init(); /// @brief Gets pointer to the instance of the CbmMvdTrackingInterface static CbmMvdTrackingInterface* Instance() { return fpInstance; } - + /// @brief Check if the detector provides time measurements /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Flag: true - station provides time measurements, false - station does not provide time measurements diff --git a/core/detectors/sts/CbmStsTrackingInterface.h b/core/detectors/sts/CbmStsTrackingInterface.h index 9b2484618fb759edc58f61f52f778c4aa1ad2f9d..5cc2203fd0d3c63a032e199d4f87ba600bc1c3b9 100644 --- a/core/detectors/sts/CbmStsTrackingInterface.h +++ b/core/detectors/sts/CbmStsTrackingInterface.h @@ -27,8 +27,8 @@ #include <iostream> -/// @class CbmStsTrackingInterface -/// @brief A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow +/// @class CbmStsTrackingInterface +/// @brief A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow /// settings /// class CbmStsTrackingInterface : public FairTask, public CbmTrackingDetectorInterfaceBase { @@ -41,13 +41,13 @@ public: /// @brief Copy constructor CbmStsTrackingInterface(const CbmStsTrackingInterface&) = delete; - + /// @brief Move constructor CbmStsTrackingInterface(CbmStsTrackingInterface&&) = delete; - + /// @brief Copy assignment operator CbmStsTrackingInterface& operator=(const CbmStsTrackingInterface&) = delete; - + /// @brief Move assignment operator CbmStsTrackingInterface& operator=(CbmStsTrackingInterface&&) = delete; @@ -105,8 +105,8 @@ public: /// @brief Gets reference Z position of the station: approximately == mean Z of all its component /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of station [cm] - double GetZ(int stationId) const { return GetStsStation(stationId)->GetZ(); } + /// @return Reference z position of station [cm] + double GetZref(int stationId) const { return GetStsStation(stationId)->GetZ(); } /// @brief Gets maximal z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) @@ -128,14 +128,12 @@ public: /// -- to be removed -- Gets station radiation length /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Radiation length [cm] - [[deprecated]] - double GetRadLength(int stationId) const { return GetStsStation(stationId)->GetRadLength(); } + [[deprecated]] double GetRadLength(int stationId) const { return GetStsStation(stationId)->GetRadLength(); } /// -- to be removed -- Gets station thickness along the Z-axis /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return Station thickness [cm] - [[deprecated]] - double GetSensorThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); } + [[deprecated]] double GetSensorThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); } /// @brief FairTask: sets parameter containers up void SetParContainers(); diff --git a/core/detectors/tof/CbmTofTrackingInterface.cxx b/core/detectors/tof/CbmTofTrackingInterface.cxx index 11707595da51c000fd326e394929e8f0186132fc..5d2e2b26e0bbf87c85cd0378362c0bd71421cd9b 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.cxx +++ b/core/detectors/tof/CbmTofTrackingInterface.cxx @@ -16,6 +16,7 @@ #include "FairDetector.h" #include "FairRunAna.h" #include <Logger.h> + #include <limits> ClassImp(CbmTofTrackingInterface) @@ -41,9 +42,9 @@ CbmTofTrackingInterface::~CbmTofTrackingInterface() InitStatus CbmTofTrackingInterface::Init() { // create digitization parameters from geometry file - auto tofDigiPar = CbmTofCreateDigiPar("TOF Digi Producer", "TOF task"); + auto tofDigiPar = new CbmTofCreateDigiPar("TOF Digi Producer", "TOF task"); LOG(info) << "Create DigiPar"; - tofDigiPar.Init(); + tofDigiPar->Init(); // ** ToF tracking station geometrical information initialization ** @@ -71,50 +72,42 @@ InitStatus CbmTofTrackingInterface::Init() for (int iSmType = 0; iSmType < fDigiBdfPar->GetNbSmTypes(); ++iSmType) { for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) { for (int iRpc = 0; iRpc < fDigiBdfPar->GetNbRpc(iSmType); ++iRpc) { - for (int iCh = 0; iCh < fDigiBdfPar->GetNbChan(iSmType, iRpc); ++iCh) { - for (int iSide = 0; iSide < 1; ++iSide) { - auto address = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, iSide, iSmType); - - int iStation = fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc); // Local index of tracking station - - auto* pChannelInfo = dynamic_cast<CbmTofCell*>(fDigiPar->GetCell(address)); - if (nullptr == pChannelInfo) { - LOG(warn) << fName << ": CbmTofCell object is not defined for iSmType = " << iSmType << ", iSm = " << iSm - << ", iRpc = " << iRpc; - continue; - } - - // Tracking station sizes - auto chPosX = pChannelInfo->GetX(); - auto chPosY = pChannelInfo->GetY(); - auto chPosZ = pChannelInfo->GetZ(); - auto chSizeX = pChannelInfo->GetSizex(); - auto chSizeY = pChannelInfo->GetSizey(); - auto chLoBoarderX = chPosX - chSizeX; - auto chUpBoarderX = chPosX + chSizeX; - auto chLoBoarderY = chPosY - chSizeY; - auto chUpBoarderY = chPosY + chSizeY; - - LOG(info) << "TOF Cell: iSmType = " << iSmType << ", iSm = " << iSm << ", iRpc = " << iRpc - << ", iCh = " << iCh << ", iSide = " << iSide << ", addr = " << address << ", sta = " - << iStation << ", pos = " << chPosX << ',' << chPosY << ',' << chPosZ << ", xRange = " - << chLoBoarderX << "," << chUpBoarderX << ", yRange = " << chLoBoarderY << "," << chUpBoarderY; - - // Cuts on T0 and undefined station ID - if (5 == iSmType) { continue; } // Skip T0 - if (iStation < 0) { continue; } - - fTofStationZ[iStation] += chPosZ; - if (chPosZ > fTofStationZMax[iStation]) { fTofStationZMax[iStation] = chPosZ; } - if (chPosZ < fTofStationZMin[iStation]) { fTofStationZMin[iStation] = chPosZ; } - if (chUpBoarderX > fTofStationXMax[iStation]) { fTofStationXMax[iStation] = chUpBoarderX; } - if (chUpBoarderY > fTofStationYMax[iStation]) { fTofStationYMax[iStation] = chUpBoarderY; } - if (chLoBoarderX < fTofStationXMin[iStation]) { fTofStationXMin[iStation] = chLoBoarderX; } - if (chLoBoarderY < fTofStationYMin[iStation]) { fTofStationYMin[iStation] = chLoBoarderY; } - - nTofStationModules[iStation] += 1; - } + auto address = CbmTofAddress::GetUniqueAddress(iSm, iRpc, 0, 0, iSmType); + + int iStation = fDigiBdfPar->GetTrackingStation(iSmType, iSm, iRpc); // Local index of tracking station + + auto* pChannelInfo = dynamic_cast<CbmTofCell*>(fDigiPar->GetCell(address)); + if (nullptr == pChannelInfo) { + LOG(warn) << fName << ": CbmTofCell object is not defined for iSmType = " << iSmType << ", iSm = " << iSm + << ", iRpc = " << iRpc; + continue; } + + // Tracking station sizes + auto chPosX = pChannelInfo->GetX(); + auto chPosY = pChannelInfo->GetY(); + auto chPosZ = pChannelInfo->GetZ(); + auto chSizeX = pChannelInfo->GetSizex(); + auto chSizeY = pChannelInfo->GetSizey(); + auto chLoBoarderX = chPosX - chSizeX; + auto chUpBoarderX = chPosX + chSizeX; + auto chLoBoarderY = chPosY - chSizeY; + auto chUpBoarderY = chPosY + chSizeY; + + // Cuts on T0 and undefined station ID + if (5 == iSmType) { continue; } // Skip T0 + if (iStation < 0) { continue; } + + fTofStationZ[iStation] += chPosZ; + // FIXME: Sizes of stations are incorrect + if (chPosZ > fTofStationZMax[iStation]) { fTofStationZMax[iStation] = chPosZ; } + if (chPosZ < fTofStationZMin[iStation]) { fTofStationZMin[iStation] = chPosZ; } + if (chUpBoarderX > fTofStationXMax[iStation]) { fTofStationXMax[iStation] = chUpBoarderX; } + if (chUpBoarderY > fTofStationYMax[iStation]) { fTofStationYMax[iStation] = chUpBoarderY; } + if (chLoBoarderX < fTofStationXMin[iStation]) { fTofStationXMin[iStation] = chLoBoarderX; } + if (chLoBoarderY < fTofStationYMin[iStation]) { fTofStationYMin[iStation] = chLoBoarderY; } + + nTofStationModules[iStation] += 1; } } } diff --git a/core/detectors/tof/CbmTofTrackingInterface.h b/core/detectors/tof/CbmTofTrackingInterface.h index be2c2a37aa260ff26ff5e2cc169bc529d8b4b6d1..060fee3695ba8c5cf6750044193b116818d44b91 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.h +++ b/core/detectors/tof/CbmTofTrackingInterface.h @@ -39,16 +39,16 @@ public: /// @brief Destructor ~CbmTofTrackingInterface(); - + /// @brief Copy constructor CbmTofTrackingInterface(const CbmTofTrackingInterface&) = delete; - + /// @brief Move constructor CbmTofTrackingInterface(CbmTofTrackingInterface&&) = delete; - + /// @brief Copy assignment operator CbmTofTrackingInterface& operator=(const CbmTofTrackingInterface&) = delete; - + /// @brief Move assignment operator CbmTofTrackingInterface& operator=(CbmTofTrackingInterface&&) = delete; @@ -83,40 +83,40 @@ public: /// @brief Gets upper bound of a station along the X-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the X-axis [cm] - double GetXmax(int stationId) const { return 100; } + double GetXmax(int /*stationId*/) const { return 100; } // TODO: SZh. 10.09.2023: Provide automatic definition /// @brief Gets lower bound of a station along the X-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the X-axis [cm] - double GetXmin(int stationId) const { return -100; } + double GetXmin(int /*stationId*/) const { return -100; } // TODO: SZh. 10.09.2023: Provide automatic definition /// @brief Gets max size of a station along the Y-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the Y-axis [cm] - double GetYmax(int stationId) const { return 100; } + double GetYmax(int /*stationId*/) const { return 100; } // TODO: SZh. 10.09.2023: Provide automatic definition /// @brief Gets max size of a station along the Y-axis /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return Size of station along the Y-axis [cm] - double GetYmin(int stationId) const { return -100; } - + double GetYmin(int /*stationId*/) const { return -100; } + /// @brief Gets reference z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of the station [cm] - double GetZ(int stationId) const { return fTofStationZ[stationId]; } + /// @return Reference z position of the station [cm] + double GetZref(int stationId) const { return fTofStationZ[stationId]; } /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// \return max Z of the station [cm] - double GetZmax(int stationId) const { return fTofStationZMax[stationId] + 5.; } + double GetZmax(int stationId) const { return GetZref(stationId) + 5.; } /// @brief Gets min z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return min Z of the station [cm] - double GetZmin(int stationId) const { return fTofStationZMin[stationId] - 5.; } + double GetZmin(int stationId) const { return GetZref(stationId) - 5.; } /// @brief Check if station provides time measurements /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) diff --git a/core/detectors/trd/CbmTrdTrackingInterface.h b/core/detectors/trd/CbmTrdTrackingInterface.h index 5f03e1e20668a80bd8b7e4c173f5ccaefcd8dd18..be853c115f91fd852ac82800f44229bdc4f0c060 100644 --- a/core/detectors/trd/CbmTrdTrackingInterface.h +++ b/core/detectors/trd/CbmTrdTrackingInterface.h @@ -25,7 +25,7 @@ #include <iostream> #include <vector> -/// @class CbmTrdTrackingInterface +/// @class CbmTrdTrackingInterface /// @brief A CbmL1 subtask, which provides necessary methods for CA tracker to access the geometry and dataflow s /// ettings. /// @@ -41,13 +41,13 @@ public: /// @brief Copy constructor CbmTrdTrackingInterface(const CbmTrdTrackingInterface&) = delete; - + /// @brief Move constructor CbmTrdTrackingInterface(CbmTrdTrackingInterface&&) = delete; - + /// @brief Copy assignment operator CbmTrdTrackingInterface& operator=(const CbmTrdTrackingInterface&) = delete; - + /// @brief Move assignment operator CbmTrdTrackingInterface& operator=(CbmTrdTrackingInterface&&) = delete; @@ -95,18 +95,18 @@ public: /// @brief Gets reference z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// @return Z position of the station [cm] - double GetZ(int stationId) const { return GetTrdModulePar(stationId)->GetZ(); } + /// @return Reference z position of the station [cm] + double GetZref(int stationId) const { return GetTrdModulePar(stationId)->GetZ(); } /// @brief Gets max z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return max Z of the station [cm] - double GetZmax(int stationId) const { return GetZ(stationId) + GetTrdModulePar(stationId)->GetSizeZ(); } + double GetZmax(int stationId) const { return GetZref(stationId) + GetTrdModulePar(stationId)->GetSizeZ(); } /// @brief Gets min z of the station /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) /// @return min Z of the station [cm] - double GetZmin(int stationId) const { return GetZ(stationId) - GetTrdModulePar(stationId)->GetSizeZ(); } + double GetZmin(int stationId) const { return GetZref(stationId) - GetTrdModulePar(stationId)->GetSizeZ(); } /// @brief Check if station provides time measurements /// @param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) diff --git a/reco/KF/CbmKF.cxx b/reco/KF/CbmKF.cxx index 102359af8bef87a71432210df9c85e2bb2f6dbee..f0ed83263a13979d1a5131faa60c71c71f058c2b 100644 --- a/reco/KF/CbmKF.cxx +++ b/reco/KF/CbmKF.cxx @@ -157,7 +157,7 @@ InitStatus CbmKF::Init() tube.ID = 1101 + ist; // tube.F = 1.; - tube.z = mvdInterface->GetZ(ist); + tube.z = mvdInterface->GetZref(ist); tube.dz = mvdInterface->GetSensorThickness(ist); // TODO: verify the thickness of MVD stations tube.RadLength = mvdInterface->GetRadLength(ist); @@ -193,7 +193,7 @@ InitStatus CbmKF::Init() tube.ID = 1000 + ist; tube.F = 1.; - tube.z = stsInterface->GetZ(ist); + tube.z = stsInterface->GetZref(ist); tube.dz = stsInterface->GetSensorThickness(ist); tube.RadLength = stsInterface->GetRadLength(ist); tube.r = 0.; diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 01f8f836b13f559560fc35515e34f5634231d9df..bf0a7c1cdd5f357226fbb5d2b540c6cc263a6fae 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -469,7 +469,7 @@ InitStatus CbmL1::Init() stationInfo.SetStationType(1); // MVD stationInfo.SetTimeInfo(mvdInterface->IsTimeInfoProvided(iSt)); stationInfo.SetFieldStatus(fTrackingMode == L1Algo::TrackingMode::kMcbm ? 0 : 1); - stationInfo.SetZref(mvdInterface->GetZ(iSt)); + stationInfo.SetZref(mvdInterface->GetZref(iSt)); stationInfo.SetZmin(mvdInterface->GetZmin(iSt)); stationInfo.SetZmax(mvdInterface->GetZmax(iSt)); stationInfo.SetXmax(mvdInterface->GetXmax(iSt)); @@ -493,7 +493,7 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(L1Algo::TrackingMode::kMcbm == fTrackingMode ? 0 : 1); - stationInfo.SetZref(stsInterface->GetZ(iSt)); + stationInfo.SetZref(stsInterface->GetZref(iSt)); stationInfo.SetZmin(stsInterface->GetZmin(iSt)); stationInfo.SetZmax(stsInterface->GetZmax(iSt)); stationInfo.SetXmax(stsInterface->GetXmax(iSt)); @@ -518,7 +518,7 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZref(muchInterface->GetZ(iSt)); + stationInfo.SetZref(muchInterface->GetZref(iSt)); stationInfo.SetZmin(muchInterface->GetZmin(iSt)); stationInfo.SetZmax(muchInterface->GetZmax(iSt)); stationInfo.SetXmax(muchInterface->GetXmax(iSt)); @@ -543,7 +543,7 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZref(trdInterface->GetZ(iSt)); + stationInfo.SetZref(trdInterface->GetZref(iSt)); stationInfo.SetZmin(trdInterface->GetZmin(iSt)); stationInfo.SetZmax(trdInterface->GetZmax(iSt)); stationInfo.SetXmax(trdInterface->GetXmax(iSt)); @@ -569,7 +569,7 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZref(tofInterface->GetZ(iSt)); + stationInfo.SetZref(tofInterface->GetZref(iSt)); stationInfo.SetZmin(tofInterface->GetZmin(iSt)); stationInfo.SetZmax(tofInterface->GetZmax(iSt)); stationInfo.SetXmax(tofInterface->GetXmax(iSt)); diff --git a/reco/L1/CbmL1DetectorID.h b/reco/L1/CbmL1DetectorID.h index 792d212511f1f4f7fe4644f7294eb0fef3d40622..d8678178a5ebe076d8c4714c941bcd48c853187f 100644 --- a/reco/L1/CbmL1DetectorID.h +++ b/reco/L1/CbmL1DetectorID.h @@ -81,8 +81,8 @@ namespace cbm::ca /// @brief Name of point branches for each detector constexpr DetIdArr_t<const char*> kDetPointBrName = {{"MvdPoint", "StsPoint", "MuchPoint", "TrdPoint", "TofPoint"}}; - - /// @brief Name + + /// @brief Name /// @brief Types of MC point objects for each detector using PointTypes_t = DetIdTypeArr_t<CbmMvdPoint, CbmStsPoint, CbmMuchPoint, CbmTrdPoint, CbmTofPoint>; diff --git a/reco/L1/qa/CbmCaHitQaData.cxx b/reco/L1/qa/CbmCaHitQaData.cxx index 0c295c22ff0511b1a4cf5e66cea1f1b3055c8efd..d4c3dbbfad5b6ca62ea0bbb8a8c3336bc9606e1c 100644 --- a/reco/L1/qa/CbmCaHitQaData.cxx +++ b/reco/L1/qa/CbmCaHitQaData.cxx @@ -13,8 +13,4 @@ using cbm::ca::HitQaData; // --------------------------------------------------------------------------------------------------------------------- // -void HitQaData::Reset() -{ - this->operator=(HitQaData()); -} - +void HitQaData::Reset() { this->operator=(HitQaData()); } diff --git a/reco/L1/qa/CbmCaHitQaData.h b/reco/L1/qa/CbmCaHitQaData.h index b453d0c69b4f35b776dd3559b5cbb19a4e8c3aec..08be69d94ee3d3cb6b7fd738aa6ad11ff38fab58 100644 --- a/reco/L1/qa/CbmCaHitQaData.h +++ b/reco/L1/qa/CbmCaHitQaData.h @@ -10,11 +10,12 @@ #ifndef CbmCaHitQaData_h #define CbmCaHitQaData_h 1 -#include <cmath> #include <limits> #include <tuple> -namespace cbm::ca +#include <cmath> + +namespace cbm::ca { /// @class HitQaData /// @brief Contains necessary data to calculate hit residuals and pulls @@ -27,20 +28,20 @@ namespace cbm::ca ~HitQaData() = default; /// @brief Copy constructor - HitQaData(const HitQaData& ) = default; + HitQaData(const HitQaData&) = default; /// @brief Move constructor - HitQaData(HitQaData&& ) = default; + HitQaData(HitQaData&&) = default; /// @brief Copy assignment operator - HitQaData& operator=(const HitQaData& ) = default; + HitQaData& operator=(const HitQaData&) = default; /// @brief Move assignment operator - HitQaData& operator=(HitQaData&& ) = default; + HitQaData& operator=(HitQaData&&) = default; /// @brief Gets hit u-coordinate error /// @return Hit u-coordinate error [cm] - double GetHitDu() const + double GetHitDu() const { auto cU = cos(fPhiU); auto sU = sin(fPhiU); @@ -49,7 +50,7 @@ namespace cbm::ca /// @brief Gets hit v-coordinate error /// @return Hit v-coordinate error [cm] - double GetHitDv() const + double GetHitDv() const { auto cV = cos(fPhiV); auto sV = sin(fPhiV); @@ -66,7 +67,7 @@ namespace cbm::ca auto sV = sin(fPhiV); return GetHitDx() * GetHitDx() * cU * cV + GetHitDxy() * (sU * cV + cU * sV) + GetHitDy() * GetHitDy() * sU * sV; } - + /// @brief Gets hit x-coordinate error /// @return Hit x-coordinate error [cm] double GetHitDx() const { return fHitDx; } @@ -94,7 +95,7 @@ namespace cbm::ca /// @brief Gets hit time error /// @return Hit time error [ns] double GetHitTimeError() const { return fHitTimeError; } - + /// @brief Gets hit u-coordinate /// @return hit u-coordinate [cm] double GetHitU() const { return GetHitX() * cos(fPhiU) + GetHitY() * sin(fPhiU); } @@ -112,7 +113,7 @@ namespace cbm::ca double GetHitY() const { return fHitY; } /// @brief Gets hit z-coordinate - /// @return hit z-coordinate [cm] + /// @return hit z-coordinate [cm] double GetHitZ() const { return fHitZ; } /// @brief Gets Flag: if track has hits @@ -153,10 +154,7 @@ namespace cbm::ca /// @brief Gets point index /// @return A tuple (pointID, eventID, fileID) - std::tuple<int, int, int> GetPointID() const - { - return std::make_tuple(fPointID, fMCEventID, fMCFileID); - } + std::tuple<int, int, int> GetPointID() const { return std::make_tuple(fPointID, fMCEventID, fMCFileID); } /// @brief Gets point time /// @return Point time [ns] @@ -294,31 +292,30 @@ namespace cbm::ca private: static constexpr double kNAN = std::numeric_limits<double>::signaling_NaN(); - - double fPhiU = kNAN; ///< Stereo angle for front strips [rad] - double fPhiV = kNAN; ///< Stereo anele for back strips [rad] - double fHitX = kNAN; ///< Hit x-coordinate [cm] - double fHitY = kNAN; ///< Hit y-coordinate [cm] - double fHitZ = kNAN; ///< Hit z-coordinate [cm] - double fHitTime = kNAN; ///< Hit time [ns] - double fHitDx = kNAN; ///< Hit x-coordinate error [cm] - double fHitDy = kNAN; ///< Hit y-coordinate error [cm] - double fHitDxy = kNAN; ///< Hit x- and y-coordinate covariance [cm2] - double fHitTimeError = kNAN; ///< Hit time error [ns] - double fPointX = kNAN; ///< Point x-coordinate [cm] - double fPointY = kNAN; ///< Point y-coordinate [cm] - double fPointZ = kNAN; ///< Point z-coordinate [cm] - double fPointTime = kNAN; ///< Point time [ns] - int fStationID = -1; ///< Local index of tracking station - int fHitID = -1; ///< Index of hit - int fPointID = -1; ///< Index of MC point - int fMCEventID = -1; ///< Index of MC event - int fMCFileID = -1; ///< Index of MC file id - bool fbTrackSelected = false; ///< Flag: if track selected - bool fbTrackHasHits = false; ///< Flag: if track has hits + double fPhiU = kNAN; ///< Stereo angle for front strips [rad] + double fPhiV = kNAN; ///< Stereo anele for back strips [rad] + double fHitX = kNAN; ///< Hit x-coordinate [cm] + double fHitY = kNAN; ///< Hit y-coordinate [cm] + double fHitZ = kNAN; ///< Hit z-coordinate [cm] + double fHitTime = kNAN; ///< Hit time [ns] + double fHitDx = kNAN; ///< Hit x-coordinate error [cm] + double fHitDy = kNAN; ///< Hit y-coordinate error [cm] + double fHitDxy = kNAN; ///< Hit x- and y-coordinate covariance [cm2] + double fHitTimeError = kNAN; ///< Hit time error [ns] + double fPointX = kNAN; ///< Point x-coordinate [cm] + double fPointY = kNAN; ///< Point y-coordinate [cm] + double fPointZ = kNAN; ///< Point z-coordinate [cm] + double fPointTime = kNAN; ///< Point time [ns] + int fStationID = -1; ///< Local index of tracking station + int fHitID = -1; ///< Index of hit + int fPointID = -1; ///< Index of MC point + int fMCEventID = -1; ///< Index of MC event + int fMCFileID = -1; ///< Index of MC file id + bool fbTrackSelected = false; ///< Flag: if track selected + bool fbTrackHasHits = false; ///< Flag: if track has hits }; -} +} // namespace cbm::ca #endif // CbmCaHitQaData_h diff --git a/reco/L1/qa/CbmCaInputQaBase.cxx b/reco/L1/qa/CbmCaInputQaBase.cxx index 552a16737318f56d30f7a1413f836070285b9bb2..2315e109560133de3f83bb834bb4f33e316c6307 100644 --- a/reco/L1/qa/CbmCaInputQaBase.cxx +++ b/reco/L1/qa/CbmCaInputQaBase.cxx @@ -8,32 +8,31 @@ /// @author S.Zharko <s.zharko@gsi.de> #include "CbmCaInputQaBase.h" -#include "CbmTrackingDetectorInterfaceBase.h" -#include "Logger.h" + #include "CbmAddress.h" #include "CbmMCDataArray.h" #include "CbmMCEventList.h" #include "CbmMCTrack.h" #include "CbmMatch.h" +#include "CbmMuchPixelHit.h" +#include "CbmMuchPoint.h" +#include "CbmMvdHit.h" +#include "CbmMvdPoint.h" #include "CbmQaCanvas.h" #include "CbmQaTable.h" #include "CbmQaUtil.h" -#include "CbmMvdHit.h" -#include "CbmMvdPoint.h" #include "CbmStsCluster.h" #include "CbmStsHit.h" #include "CbmStsPoint.h" -#include "CbmMuchPixelHit.h" -#include "CbmMuchPoint.h" +#include "CbmTimeSlice.h" #include "CbmTofAddress.h" -#include "CbmTrdHit.h" -#include "CbmTrdPoint.h" #include "CbmTofHit.h" #include "CbmTofPoint.h" +#include "CbmTrackingDetectorInterfaceBase.h" +#include "CbmTrdHit.h" +#include "CbmTrdPoint.h" -#include "CbmTimeSlice.h" #include "FairMCPoint.h" - #include "FairRootManager.h" #include "Logger.h" @@ -63,14 +62,15 @@ namespace phys = L1Constants::phys; // from L1Constants.h // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> CbmCaInputQaBase<DetID>::CbmCaInputQaBase(const char* name, int verbose, bool isMCUsed) -: CbmQaTask(name, verbose, isMCUsed) -{} + : CbmQaTask(name, verbose, isMCUsed) +{ +} // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> bool CbmCaInputQaBase<DetID>::Check() { bool res = true; @@ -101,7 +101,7 @@ bool CbmCaInputQaBase<DetID>::Check() // std::vector<double> vStationPos(nSt, 0.); for (int iSt = 0; iSt < nSt; ++iSt) { - vStationPos[iSt] = fpDetInterface->GetZ(iSt); + vStationPos[iSt] = fpDetInterface->GetZref(iSt); } if (!std::is_sorted(vStationPos.cbegin(), vStationPos.cend(), [](int l, int r) { return l <= r; })) { @@ -223,7 +223,7 @@ bool CbmCaInputQaBase<DetID>::Check() pPullsTable->SetCell(iSt, 2, fvph_pull_y[iSt]->GetStdDev()); pPullsTable->SetCell(iSt, 3, fvph_pull_t[iSt]->GetStdDev()); } - + LOG(info) << '\n' << pPullsTable->ToString(3); } // McUsed @@ -232,7 +232,7 @@ bool CbmCaInputQaBase<DetID>::Check() // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> void CbmCaInputQaBase<DetID>::DeInit() { // Vectors with pointers to histograms @@ -287,7 +287,7 @@ void CbmCaInputQaBase<DetID>::DeInit() // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> void CbmCaInputQaBase<DetID>::FillHistograms() { int nSt = fpDetInterface->GetNtrackingStations(); @@ -322,7 +322,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() if constexpr (L1DetectorID::kTof == DetID) { auto address = pHit->GetAddress(); if (0x00202806 == address || 0x00002806 == address) { continue; } // TEST - if (5 == CbmTofAddress::GetSmType(address)) { continue; } // Skip T0 hits + if (5 == CbmTofAddress::GetSmType(address)) { continue; } // Skip T0 hits } // ************************* @@ -353,7 +353,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() fvph_hit_zx[iSt]->Fill(fHitQaData.GetHitZ(), fHitQaData.GetHitX()); fvph_hit_zy[iSt]->Fill(fHitQaData.GetHitZ(), fHitQaData.GetHitY()); - fvph_hit_station_delta_z[iSt]->Fill(fHitQaData.GetHitZ() - fpDetInterface->GetZ(iSt)); + fvph_hit_station_delta_z[iSt]->Fill(fHitQaData.GetHitZ() - fpDetInterface->GetZref(iSt)); fvph_hit_dx[iSt]->Fill(fHitQaData.GetHitDx()); fvph_hit_dy[iSt]->Fill(fHitQaData.GetHitDy()); @@ -367,7 +367,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() fvph_hit_zx[nSt]->Fill(fHitQaData.GetHitZ(), fHitQaData.GetHitX()); fvph_hit_zy[nSt]->Fill(fHitQaData.GetHitZ(), fHitQaData.GetHitY()); - fvph_hit_station_delta_z[nSt]->Fill(fHitQaData.GetHitZ() - fpDetInterface->GetZ(iSt)); + fvph_hit_station_delta_z[nSt]->Fill(fHitQaData.GetHitZ() - fpDetInterface->GetZref(iSt)); fvph_hit_dx[nSt]->Fill(fHitQaData.GetHitDx()); fvph_hit_dy[nSt]->Fill(fHitQaData.GetHitDy()); @@ -459,7 +459,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() //double pdg = pMCTrack->GetPdgCode(); // Entrance position and time - // NOTE: SZh 04.09.2023: Methods GetX(), GetY(), GetZ() for MVD, STS, MUCH, TRD and TOF always return + // NOTE: SZh 04.09.2023: Methods GetX(), GetY(), GetZ() for MVD, STS, MUCH, TRD and TOF always return // positions of track at entrance to the active volume. double xMC = pMCPoint->FairMCPoint::GetX(); double yMC = pMCPoint->FairMCPoint::GetY(); @@ -467,7 +467,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() double tMC = pMCPoint->GetTime() + t0MC; // MC point entrance momenta - // NOTE: SZh 04.09.2023: Methods GetPx(), GetPy(), GetPz() for MVD, STS, MUCH, TRD and TOF always return + // NOTE: SZh 04.09.2023: Methods GetPx(), GetPy(), GetPz() for MVD, STS, MUCH, TRD and TOF always return // the momentum components of track at entrance to the active volume. double pxMC = pMCPoint->GetPx(); double pyMC = pMCPoint->GetPy(); @@ -481,7 +481,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() // double pMCo = sqrt(pxMCo * pxMCo + pyMCo * pyMCo + pzMCo * pzMCo); // Position and time shifted to z-coordinate of the hit - // TODO: SZh 04.09.2023: Probably, the approximation + // TODO: SZh 04.09.2023: Probably, the approximation double shiftZ = fHitQaData.GetHitZ() - zMC; // Difference between hit and point z positions double xMCs = xMC + shiftZ * pxMC / pzMC; double yMCs = yMC + shiftZ * pyMC / pzMC; @@ -493,9 +493,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() fHitQaData.SetPointZ(fHitQaData.GetHitZ()); double zRes = kNAN; - if constexpr (L1DetectorID::kTof == DetID) { - zRes = fHitQaData.GetHitZ() - pMCPoint->GetZ(); - } + if constexpr (L1DetectorID::kTof == DetID) { zRes = fHitQaData.GetHitZ() - pMCPoint->GetZ(); } else { zRes = fHitQaData.GetHitZ() - 0.5 * (pMCPoint->GetZ() + pMCPoint->GetZOut()); } @@ -512,7 +510,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() double uPull = fHitQaData.GetPullU(); double vPull = fHitQaData.GetPullV(); double tPull = fHitQaData.GetPullTime(); - + fvph_res_x[iSt]->Fill(xRes); fvph_res_y[iSt]->Fill(yRes); fvph_res_u[iSt]->Fill(uRes); @@ -564,7 +562,6 @@ void CbmCaInputQaBase<DetID>::FillHistograms() fvph_pull_u_vs_u[nSt]->Fill(fHitQaData.GetPointU(), uPull); fvph_pull_v_vs_v[nSt]->Fill(fHitQaData.GetPointV(), vPull); fvph_pull_t_vs_t[nSt]->Fill(fHitQaData.GetPointTime(), tPull); - } FillHistogramsPerHit(); } // loop over hits: end @@ -597,7 +594,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() << fName << ": MC point for FEI = " << iFile << ", " << iEvent << ", " << iP << " and address " << address << " has wrong station index: iSt = " << iSt; - // NOTE: SZh 04.09.2023: Methods GetX(), GetY(), GetZ() for MVD, STS, MUCH, TRD and TOF always return + // NOTE: SZh 04.09.2023: Methods GetX(), GetY(), GetZ() for MVD, STS, MUCH, TRD and TOF always return // positions of track at entrance to the active volume. fHitQaData.SetPointX(pMCPoint->FairMCPoint::GetX()); fHitQaData.SetPointY(pMCPoint->FairMCPoint::GetY()); @@ -644,7 +641,7 @@ void CbmCaInputQaBase<DetID>::FillHistograms() // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> InitStatus CbmCaInputQaBase<DetID>::InitDataBranches() { LOG_IF(fatal, !fpDetInterface) << "\033[1;31m" << fName << ": tracking detector interface is undefined\033[0m"; @@ -683,7 +680,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitDataBranches() // Hit matches const char* hitMatchName = Form("%sMatch", cbm::ca::kDetHitBrName[DetID]); - fpHitMatches = dynamic_cast<TClonesArray*>(pFairRootManager->GetObject(hitMatchName)); + fpHitMatches = dynamic_cast<TClonesArray*>(pFairRootManager->GetObject(hitMatchName)); LOG_IF(fatal, !fpHitMatches) << "\033[1;31m]" << fName << ": hit match branch is not found\033[0m"; } @@ -747,7 +744,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitDataBranches() // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> InitStatus CbmCaInputQaBase<DetID>::InitHistograms() { int nSt = fpDetInterface->GetNtrackingStations(); @@ -780,7 +777,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms() for (int iSt = 0; iSt <= nSt; ++iSt) { TString sF = ""; // Subfolder sF += (iSt == nSt) ? "All stations/" : Form("Station %d/", iSt); - TString nsuff = (iSt == nSt) ? "" : Form("_st%d", iSt); // Histogram name suffix + TString nsuff = (iSt == nSt) ? "" : Form("_st%d", iSt); // Histogram name suffix TString tsuff = (iSt == nSt) ? "" : Form(" in %s station %d", detName.c_str(), iSt); // Histogram title suffix TString sN = ""; TString sT = ""; @@ -877,7 +874,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms() for (int iSt = 0; iSt <= nSt; ++iSt) { TString sF = ""; // Subfolder sF += (iSt == nSt) ? "All stations/" : Form("Station %d/", iSt); - TString nsuff = (iSt == nSt) ? "" : Form("_st%d", iSt); // Histogram name suffix + TString nsuff = (iSt == nSt) ? "" : Form("_st%d", iSt); // Histogram name suffix TString tsuff = (iSt == nSt) ? "" : Form(" in %s station %d", detName.c_str(), iSt); // Histogram title suffix TString sN = ""; TString sT = ""; @@ -988,8 +985,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms() MakeQaObject<TH2F>(sF + "pull/" + sN, sT, fNbins, frXmin[iSt], frXmax[iSt], kNbinsPull, kRPull[0], kRPull[1]); sN = (TString) "pull_v_vs_v" + nsuff; - sT = - (TString) "Pulls for Back strip coordinate" + tsuff + ";v_{MC} [cm];(v_{reco} - v_{MC}) / #sigma_{v}^{reco}"; + sT = (TString) "Pulls for Back strip coordinate" + tsuff + ";v_{MC} [cm];(v_{reco} - v_{MC}) / #sigma_{v}^{reco}"; fvph_pull_v_vs_v[iSt] = MakeQaObject<TH2F>(sF + "pull/" + sN, sT, fNbins, frXmin[iSt], frXmax[iSt], kNbinsPull, kRPull[0], kRPull[1]); @@ -1014,7 +1010,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitHistograms() // // TODO: rename the method to Finish or Finalise or MakeSummary, since it does more than just canvases // -template <L1DetectorID DetID> +template<L1DetectorID DetID> InitStatus CbmCaInputQaBase<DetID>::InitCanvases() { gStyle->SetOptFit(1); @@ -1383,7 +1379,7 @@ InitStatus CbmCaInputQaBase<DetID>::InitCanvases() // --------------------------------------------------------------------------------------------------------------------- // -template <L1DetectorID DetID> +template<L1DetectorID DetID> bool CbmCaInputQaBase<DetID>::IsTrackSelected(const CbmMCTrack* track, const Point_t* point) const { assert(point); @@ -1403,7 +1399,7 @@ bool CbmCaInputQaBase<DetID>::IsTrackSelected(const CbmMCTrack* track, const Poi py = point->GetPyOut(); pz = point->GetPzOut(); } - double p = sqrt(px * px + py * py + pz * pz); + double p = sqrt(px * px + py * py + pz * pz); if (pz <= 0.) { return false; } @@ -1419,5 +1415,3 @@ template class CbmCaInputQaBase<L1DetectorID::kSts>; template class CbmCaInputQaBase<L1DetectorID::kMuch>; template class CbmCaInputQaBase<L1DetectorID::kTrd>; template class CbmCaInputQaBase<L1DetectorID::kTof>; - - diff --git a/reco/L1/qa/CbmCaInputQaBase.h b/reco/L1/qa/CbmCaInputQaBase.h index ea0b4791f9a8f6e0e0ed547a9ac8d2f7f6ce1973..cc0272beabb84478c6faa9f6b0bdb240501a6ce3 100644 --- a/reco/L1/qa/CbmCaInputQaBase.h +++ b/reco/L1/qa/CbmCaInputQaBase.h @@ -10,9 +10,9 @@ #ifndef CbmCaInputQaBase_h #define CbmCaInputQaBase_h 1 -#include "CbmL1DetectorID.h" -#include "CbmCaInputQaBase.h" #include "CbmCaHitQaData.h" +#include "CbmCaInputQaBase.h" +#include "CbmL1DetectorID.h" #include "CbmMCDataManager.h" #include "CbmQaTask.h" @@ -40,7 +40,7 @@ class TProfile2D; /// A QA-task class, which provides assurance of MuCh hits and geometry -template <L1DetectorID DetID> +template<L1DetectorID DetID> class CbmCaInputQaBase : public CbmQaTask { protected: using Point_t = cbm::ca::PointTypes_t::at<DetID>; ///< Point type for detector ID @@ -121,7 +121,7 @@ protected: /// @brief Defines parameter for a derived class virtual void DefineParameters() = 0; - + /// @brief Checks ranges for mean and standard deviation /// @return False, if variable exits the range bool CheckRangePull(TH1* h) @@ -155,19 +155,19 @@ protected: //TODO: remove check of residuals // ----- QA constants (thresholds, ranges etc.) - double fResMeanThrsh = kNAN; ///< Maximum allowed deviation of residual mean from zero [sigma] + double fResMeanThrsh = kNAN; ///< Maximum allowed deviation of residual mean from zero [sigma] double fPullMeanThrsh = kNAN; ///< Maximum allowed deviation of pull mean from zero - double fPullWidthThrsh = kNAN; ///< Maximum allowed deviation of pull width from unity - double fEffThrsh = kNAN; ///< Threshold for hit efficiency in the selected range - double fMaxDiffZStHit = kNAN; ///< Maximum allowed difference between z-position of hit and station [cm] + double fPullWidthThrsh = kNAN; ///< Maximum allowed deviation of pull width from unity + double fEffThrsh = kNAN; ///< Threshold for hit efficiency in the selected range + double fMaxDiffZStHit = kNAN; ///< Maximum allowed difference between z-position of hit and station [cm] double fMinMomentum = kNAN; ///< Minimum momentum of particle [GeV/c] - + std::array<double, 2> fEffRange = {kNAN, kNAN}; ///< Range for hit efficiency approximation - + // ----- Track selection for efficiencies and pulls bool fTrackSelectionPrimary = true; ///< must the track come from the primary vertex - double fTrackSelectionMomentum = kNAN; ///< track momentum GeV when it exits the tracking station - double fTrackSelectionAngle = kNAN; ///< track incl. angle [grad] when it exits the station + double fTrackSelectionMomentum = kNAN; ///< track momentum GeV when it exits the tracking station + double fTrackSelectionAngle = kNAN; ///< track incl. angle [grad] when it exits the station // ----- Histogram binning parameters int fNbins = 200; ///< General number of bins @@ -177,18 +177,18 @@ protected: std::array<double, 2> fRHitDy = {kNAN, kNAN}; ///< Range for hit y coordinate error [cm] std::array<double, 2> fRHitDu = {kNAN, kNAN}; ///< Range for hit u coordinate error [cm] std::array<double, 2> fRHitDv = {kNAN, kNAN}; ///< Range for hit v coordinate error [cm] - std::array<double, 2> fRHitDt = {kNAN, kNAN}; ///< Range for hit time error [ns] + std::array<double, 2> fRHitDt = {kNAN, kNAN}; ///< Range for hit time error [ns] std::array<double, 2> fRResX = {kNAN, kNAN}; ///< Range for residual of x coordinate [cm] - std::array<double, 2> fRResY = {kNAN, kNAN}; ///< Range for residual of y coordinate [cm] + std::array<double, 2> fRResY = {kNAN, kNAN}; ///< Range for residual of y coordinate [cm] std::array<double, 2> fRResU = {kNAN, kNAN}; ///< Range for residual of u coordinate [cm] std::array<double, 2> fRResV = {kNAN, kNAN}; ///< Range for residual of v coordinate [cm] std::array<double, 2> fRResT = {kNAN, kNAN}; ///< Range for residual of time [ns] - // NOTE: Pull binning is fixed by convention, since it is used for hit finder calibrations. Please, + // NOTE: Pull binning is fixed by convention, since it is used for hit finder calibrations. Please, // do not modify! - static constexpr int kNbinsPull = 200; - static constexpr double kRPull[2] = {-10., 10.}; ///< Range for pull histograms coordinate + static constexpr int kNbinsPull = 200; + static constexpr double kRPull[2] = {-10., 10.}; ///< Range for pull histograms coordinate std::vector<double> frXmin; ///< Range for hit x coordinate [cm] std::vector<double> frXmax; ///< Range for hit x coordinate [cm] @@ -218,12 +218,9 @@ protected: TClonesArray* fpHitMatches = nullptr; ///< Array of hit matches - // ----- Histograms - - // NOTE: the last element of each vector stands for integral distribution over all stations // ----- Additional histograms @@ -281,10 +278,9 @@ protected: std::vector<TProfile2D*> fvpe_reco_eff_vs_xy; ///< Efficiency of hit reconstruction vs. x and y coordinates of MC std::vector<TH1F*> fvph_reco_eff; ///< Distribution of hit reconstruction efficiency in bins of fvpe_reco_eff_vs_xy -// FIXME: change to private + // FIXME: change to private protected: cbm::ca::HitQaData fHitQaData {}; ///< Current hit QA data object - }; #endif // CbmCaInputQaBase_h diff --git a/reco/L1/qa/CbmCaInputQaMuch.cxx b/reco/L1/qa/CbmCaInputQaMuch.cxx index 4ca71307bd5453c939c63361aebe147ed2a8bfc1..c39121e8c42434cf6ed4b0c4388761292577da89 100644 --- a/reco/L1/qa/CbmCaInputQaMuch.cxx +++ b/reco/L1/qa/CbmCaInputQaMuch.cxx @@ -14,7 +14,7 @@ ClassImp(CbmCaInputQaMuch); // --------------------------------------------------------------------------------------------------------------------- // -CbmCaInputQaMuch::CbmCaInputQaMuch(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaMuch", verbose, isMCUsed) +CbmCaInputQaMuch::CbmCaInputQaMuch(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaMuch", verbose, isMCUsed) { // Default parameters of task DefineParameters(); @@ -31,16 +31,16 @@ bool CbmCaInputQaMuch::Check() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaMuch::DeInit() -{ - CbmCaInputQaBase::DeInit(); -} +void CbmCaInputQaMuch::DeInit() { CbmCaInputQaBase::DeInit(); } // --------------------------------------------------------------------------------------------------------------------- // void CbmCaInputQaMuch::DefineParameters() { - auto SetRange = [] (std::array<double, 2>& range, double min, double max) { range[0] = min; range[1] = max; }; + auto SetRange = [](std::array<double, 2>& range, double min, double max) { + range[0] = min; + range[1] = max; + }; // Hit errors SetRange(fRHitDx, 0.0000, 5.00); // [cm] SetRange(fRHitDy, 0.0000, 5.00); // [cm] @@ -55,13 +55,13 @@ void CbmCaInputQaMuch::DefineParameters() SetRange(fRResT, -5.00, 5.00); // QA result selection criteria SetRange(fEffRange, 10.0, 30.0); ///< Range for hit efficiency approximation - fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] - fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero - fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity - fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range - fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] - fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] - // Track selection criteria + fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] + fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero + fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity + fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range + fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] + fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] + // Track selection criteria fTrackSelectionPrimary = true; ///< must the track come from the primary vertex fTrackSelectionMomentum = 0.1; ///< track momentum GeV when it exits the tracking station fTrackSelectionAngle = 60.; ///< track incl. angle [grad] when it exits the station @@ -69,9 +69,7 @@ void CbmCaInputQaMuch::DefineParameters() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaMuch::FillHistogramsPerHit() -{ -} +void CbmCaInputQaMuch::FillHistogramsPerHit() {} // --------------------------------------------------------------------------------------------------------------------- // @@ -82,7 +80,7 @@ InitStatus CbmCaInputQaMuch::InitDataBranches() auto baseInitStatus = CbmCaInputQaBase::InitDataBranches(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } @@ -92,7 +90,7 @@ InitStatus CbmCaInputQaMuch::InitCanvases() { auto baseInitStatus = CbmCaInputQaBase::InitCanvases(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } @@ -105,4 +103,3 @@ InitStatus CbmCaInputQaMuch::InitHistograms() return kSUCCESS; } - diff --git a/reco/L1/qa/CbmCaInputQaMuch.h b/reco/L1/qa/CbmCaInputQaMuch.h index c8f190a712bd7479d41cfeb6396674146b85a370..89091144398d152f6c31e4b482ba798057497619 100644 --- a/reco/L1/qa/CbmCaInputQaMuch.h +++ b/reco/L1/qa/CbmCaInputQaMuch.h @@ -47,12 +47,11 @@ protected: /// @brief Fills histograms per hit void FillHistogramsPerHit(); - + /// @brief Fills histograms per MC point void FillHistogramsPerPoint() {} private: - ClassDef(CbmCaInputQaMuch, 0); }; diff --git a/reco/L1/qa/CbmCaInputQaMvd.cxx b/reco/L1/qa/CbmCaInputQaMvd.cxx index 92050240f0d128c73a2885c6fc645af0a73ab8d8..ce92ecf45231142565b97bf762efc45e22016356 100644 --- a/reco/L1/qa/CbmCaInputQaMvd.cxx +++ b/reco/L1/qa/CbmCaInputQaMvd.cxx @@ -8,13 +8,14 @@ /// @author S.Zharko <s.zharko@gsi.de> #include "CbmCaInputQaMvd.h" + #include "CbmMvdTrackingInterface.h" ClassImp(CbmCaInputQaMvd); // --------------------------------------------------------------------------------------------------------------------- // -CbmCaInputQaMvd::CbmCaInputQaMvd(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaMvd", verbose, isMCUsed) +CbmCaInputQaMvd::CbmCaInputQaMvd(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaMvd", verbose, isMCUsed) { // Default parameters of task DefineParameters(); @@ -31,16 +32,16 @@ bool CbmCaInputQaMvd::Check() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaMvd::DeInit() -{ - CbmCaInputQaBase::DeInit(); -} +void CbmCaInputQaMvd::DeInit() { CbmCaInputQaBase::DeInit(); } // --------------------------------------------------------------------------------------------------------------------- // void CbmCaInputQaMvd::DefineParameters() { - auto SetRange = [] (std::array<double, 2>& range, double min, double max) { range[0] = min; range[1] = max; }; + auto SetRange = [](std::array<double, 2>& range, double min, double max) { + range[0] = min; + range[1] = max; + }; // Hit errors SetRange(fRHitDx, 0.0000, 5.00); // [cm] SetRange(fRHitDy, 0.0000, 5.00); // [cm] @@ -55,13 +56,13 @@ void CbmCaInputQaMvd::DefineParameters() SetRange(fRResT, -0.50, 0.50); // QA result selection criteria SetRange(fEffRange, 10.0, 30.0); ///< Range for hit efficiency approximation - fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] - fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero - fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity - fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range - fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] - fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] - // Track selection criteria + fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] + fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero + fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity + fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range + fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] + fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] + // Track selection criteria fTrackSelectionPrimary = true; ///< must the track come from the primary vertex fTrackSelectionMomentum = 0.1; ///< track momentum GeV when it exits the tracking station fTrackSelectionAngle = 60.; ///< track incl. angle [grad] when it exits the station @@ -69,9 +70,7 @@ void CbmCaInputQaMvd::DefineParameters() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaMvd::FillHistogramsPerHit() -{ -} +void CbmCaInputQaMvd::FillHistogramsPerHit() {} // --------------------------------------------------------------------------------------------------------------------- // @@ -82,7 +81,7 @@ InitStatus CbmCaInputQaMvd::InitDataBranches() auto baseInitStatus = CbmCaInputQaBase::InitDataBranches(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } @@ -92,7 +91,7 @@ InitStatus CbmCaInputQaMvd::InitCanvases() { auto baseInitStatus = CbmCaInputQaBase::InitCanvases(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } diff --git a/reco/L1/qa/CbmCaInputQaMvd.h b/reco/L1/qa/CbmCaInputQaMvd.h index 7715156b76b8a73d18c9b4595af62a6a78c632f6..3c5c0daa71a772310086bdf70bd07c6b9e4bd012 100644 --- a/reco/L1/qa/CbmCaInputQaMvd.h +++ b/reco/L1/qa/CbmCaInputQaMvd.h @@ -47,12 +47,11 @@ protected: /// @brief Fills histograms per hit void FillHistogramsPerHit(); - + /// @brief Fills histograms per MC point void FillHistogramsPerPoint() {} private: - ClassDef(CbmCaInputQaMvd, 0); }; diff --git a/reco/L1/qa/CbmCaInputQaSts.cxx b/reco/L1/qa/CbmCaInputQaSts.cxx index e512ec3d6dda119d01c230d0b15b407d2723e4f1..f52fcbb5bd89fc47a65e256d1b8e27d521406351 100644 --- a/reco/L1/qa/CbmCaInputQaSts.cxx +++ b/reco/L1/qa/CbmCaInputQaSts.cxx @@ -53,7 +53,7 @@ namespace phys = L1Constants::phys; // from L1Constants.h // --------------------------------------------------------------------------------------------------------------------- // -CbmCaInputQaSts::CbmCaInputQaSts(int verbose, bool isMCUsed): CbmCaInputQaBase("CbmCaInputQaSts", verbose, isMCUsed) +CbmCaInputQaSts::CbmCaInputQaSts(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaSts", verbose, isMCUsed) { // Default parameters of task DefineParameters(); @@ -64,7 +64,7 @@ CbmCaInputQaSts::CbmCaInputQaSts(int verbose, bool isMCUsed): CbmCaInputQaBase(" bool CbmCaInputQaSts::Check() { bool res = CbmCaInputQaBase::Check(); - + if (IsMCUsed()) { for (int idig = 0; idig <= fkMaxDigisInClusterForPulls; idig++) { cbm::qa::util::SetLargeStats(fvph_pull_u_Ndig[idig]); @@ -93,7 +93,10 @@ void CbmCaInputQaSts::DeInit() // void CbmCaInputQaSts::DefineParameters() { - auto SetRange = [] (std::array<double, 2>& range, double min, double max) { range[0] = min; range[1] = max; }; + auto SetRange = [](std::array<double, 2>& range, double min, double max) { + range[0] = min; + range[1] = max; + }; // Hit errors SetRange(fRHitDx, 0.0000, 0.0050); // [cm] SetRange(fRHitDy, 0.0000, 0.0200); // [cm] @@ -108,17 +111,16 @@ void CbmCaInputQaSts::DefineParameters() SetRange(fRResT, -25.0, 25.0); // QA result selection criteria SetRange(fEffRange, 0.0, 100.0); ///< Range for hit efficiency approximation - fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] - fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero - fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity - fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range - fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] - fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] - // Track selection criteria + fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] + fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero + fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity + fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range + fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] + fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] + // Track selection criteria fTrackSelectionPrimary = true; ///< must the track come from the primary vertex fTrackSelectionMomentum = 0.1; ///< track momentum GeV when it exits the tracking station fTrackSelectionAngle = 60.; ///< track incl. angle [grad] when it exits the station - } // --------------------------------------------------------------------------------------------------------------------- @@ -126,8 +128,8 @@ void CbmCaInputQaSts::DefineParameters() void CbmCaInputQaSts::FillHistogramsPerHit() { const auto* pHit = dynamic_cast<const CbmStsHit*>(fpHits->At(fHitQaData.GetHitIndex())); - - { // u-coordinate residual per number of digis + + { // u-coordinate residual per number of digis const auto* pCluster = dynamic_cast<const CbmStsCluster*>(fpClusters->At(pHit->GetFrontClusterId())); assert(pCluster); int nDigis = pCluster->GetNofDigis(); @@ -135,7 +137,7 @@ void CbmCaInputQaSts::FillHistogramsPerHit() fvph_pull_u_Ndig[nDigis]->Fill(fHitQaData.GetPullU()); } - { // v-coordinate residual per number of digis + { // v-coordinate residual per number of digis const auto* pCluster = dynamic_cast<const CbmStsCluster*>(fpClusters->At(pHit->GetBackClusterId())); assert(pCluster); int nDigis = pCluster->GetNofDigis(); @@ -157,7 +159,7 @@ InitStatus CbmCaInputQaSts::InitDataBranches() auto baseInitStatus = CbmCaInputQaBase::InitDataBranches(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + // Clusters container fpClusters = dynamic_cast<TClonesArray*>(FairRootManager::Instance()->GetObject("StsCluster")); LOG_IF(fatal, !fpClusters) << "\033[1;31m" << fName << ": container of hit clusters in STS is not found\033[0m"; diff --git a/reco/L1/qa/CbmCaInputQaTof.cxx b/reco/L1/qa/CbmCaInputQaTof.cxx index 81704750adddbd6284fe235ec0da9941d0cdca46..7554768a3c258f14d408997050e01a3e501161db 100644 --- a/reco/L1/qa/CbmCaInputQaTof.cxx +++ b/reco/L1/qa/CbmCaInputQaTof.cxx @@ -14,9 +14,9 @@ #include "CbmTofPoint.h" #include "CbmTofTrackingInterface.h" +#include "FairRootManager.h" #include "FairRunAna.h" #include "FairRuntimeDb.h" -#include "FairRootManager.h" #include "Logger.h" #include "TBox.h" @@ -41,7 +41,7 @@ namespace phys = L1Constants::phys; // from L1Constants.h // --------------------------------------------------------------------------------------------------------------------- // -CbmCaInputQaTof::CbmCaInputQaTof(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaTof", verbose, isMCUsed) +CbmCaInputQaTof::CbmCaInputQaTof(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaTof", verbose, isMCUsed) { // Default parameters of task DefineParameters(); @@ -70,7 +70,10 @@ void CbmCaInputQaTof::DeInit() // void CbmCaInputQaTof::DefineParameters() { - auto SetRange = [] (std::array<double, 2>& range, double min, double max) { range[0] = min; range[1] = max; }; + auto SetRange = [](std::array<double, 2>& range, double min, double max) { + range[0] = min; + range[1] = max; + }; // Hit errors SetRange(fRHitDx, 0.0000, 5.00); // [cm] SetRange(fRHitDy, 0.0000, 5.00); // [cm] @@ -85,17 +88,16 @@ void CbmCaInputQaTof::DefineParameters() SetRange(fRResT, -0.50, 0.50); // QA result selection criteria SetRange(fEffRange, 10.0, 30.0); ///< Range for hit efficiency approximation - fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] - fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero - fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity - fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range - fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] - fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] - // Track selection criteria + fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] + fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero + fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity + fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range + fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] + fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] + // Track selection criteria fTrackSelectionPrimary = true; ///< must the track come from the primary vertex fTrackSelectionMomentum = 0.1; ///< track momentum GeV when it exits the tracking station fTrackSelectionAngle = 60.; ///< track incl. angle [grad] when it exits the station - } // --------------------------------------------------------------------------------------------------------------------- @@ -106,22 +108,19 @@ void CbmCaInputQaTof::FillHistogramsPerHit() auto iHit = GetHitQaData().GetHitIndex(); const auto* pHit = dynamic_cast<const Hit_t*>(fpHits->At(iHit)); LOG_IF(fatal, !pHit) << fName << "::FillHistogramsPerHit: hit with index " << iHit << " not found"; - + { // Check, if the hit is created on the one of the defined RPCs. If not, save to address into map - auto address = pHit->GetAddress(); - - auto iSmType = CbmTofAddress::GetSmType(address); - auto iSm = CbmTofAddress::GetSmId(address); - auto iRpc = CbmTofAddress::GetRpcId(address); - auto iCh = CbmTofAddress::GetChannelId(address); - double xHit = pHit->GetX(); - double yHit = pHit->GetY(); - double zHit = pHit->GetZ(); - LOG(info) << "Filling " << iSmType << ' ' << iSm << ' ' << iRpc << ' ' << iCh << " |-> " << xHit << ' ' << yHit << ' ' - << zHit; - fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh]->Fill(xHit, yHit); - fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh]->Fill(zHit, xHit); - fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh]->Fill(zHit, yHit); + auto address = pHit->GetAddress(); + + auto iSmType = CbmTofAddress::GetSmType(address); + auto iSm = CbmTofAddress::GetSmId(address); + auto iRpc = CbmTofAddress::GetRpcId(address); + double xHit = pHit->GetX(); + double yHit = pHit->GetY(); + double zHit = pHit->GetZ(); + fvph_hit_xy_vs_cell[iSmType][iSm][iRpc]->Fill(xHit, yHit); + fvph_hit_zx_vs_cell[iSmType][iSm][iRpc]->Fill(zHit, xHit); + fvph_hit_zy_vs_cell[iSmType][iSm][iRpc]->Fill(zHit, yHit); } } @@ -134,7 +133,7 @@ InitStatus CbmCaInputQaTof::InitDataBranches() auto baseInitStatus = CbmCaInputQaBase::InitDataBranches(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + auto* pRuntimeDb = FairRunAna::Instance()->GetRuntimeDb(); fDigiPar = dynamic_cast<CbmTofDigiPar*>(pRuntimeDb->getContainer("CbmTofDigiPar")); fDigiBdfPar = dynamic_cast<CbmTofDigiBdfPar*>(pRuntimeDb->getContainer("CbmTofDigiBdfPar")); @@ -148,55 +147,57 @@ InitStatus CbmCaInputQaTof::InitCanvases() { auto baseInitStatus = CbmCaInputQaBase::InitCanvases(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + // Hit occupancy vs TOF cell { - auto DrawBox = [&] (double xLo, double yLo, double xUp, double yUp) { - auto* pBox = new TBox(xLo, yLo, xUp, yUp); - pBox->SetLineWidth(kOrange + 7); - pBox->SetLineStyle(2); - pBox->SetLineColor(2); - pBox->SetFillStyle(0); - pBox->Draw("SAME"); - }; - - - for (int iSmType = 0; iSmType < fDigiBdfPar->GetNbSmTypes(); ++iSmType) { - if (iSmType == 5) { continue; } // skip T0 - for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) { - for (int iRpc = 0; iRpc < fDigiBdfPar->GetNbRpc(iSmType); ++iRpc) { - for (int iCh = 0; iCh < fDigiBdfPar->GetNbChan(iSmType, iRpc); ++iCh) { - const char* dir = "occup_cell/"; - TString name = Form("%s/occup_xy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh); - - auto address = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, /*side = */ 0, iSmType); - const auto* pCell = dynamic_cast<const CbmTofCell*>(fDigiPar->GetCell(address)); - auto xLo = pCell->GetX() - 0.5 * pCell->GetSizex(); - auto xUp = pCell->GetX() + 0.5 * pCell->GetSizex(); - auto yLo = pCell->GetY() - 0.5 * pCell->GetSizey(); - auto yUp = pCell->GetY() + 0.5 * pCell->GetSizey(); - auto zLo = pCell->GetZ() - 1.0; - auto zUp = pCell->GetZ() + 1.0; - - auto* canv = MakeQaObject<CbmQaCanvas>(name, "", 1500, 800); - canv->Divide(3,1); - { - canv->cd(1); - fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); - DrawBox(xLo, yLo, xUp, yUp); - - canv->cd(2); - fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); - DrawBox(zLo, xLo, zUp, xUp); - - canv->cd(3); - fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); - DrawBox(zLo, yLo, zUp, yUp); - } - } - } - } - } + //auto DrawBox = [&](double xLo, double yLo, double xUp, double yUp) { + // auto* pBox = new TBox(xLo, yLo, xUp, yUp); + // pBox->SetLineWidth(kOrange + 7); + // pBox->SetLineStyle(2); + // pBox->SetLineColor(2); + // pBox->SetFillStyle(0); + // pBox->Draw("SAME"); + //}; + + // NOTE: SZh 11.09.2023: Causes memory overconsumption + //for (int iSt = 0; iSt < fpDetInterface->GetNtrackingStations(); ++iSt) { + // for (int iSmType = 0; iSmType < fDigiBdfPar->GetNbSmTypes(); ++iSmType) { + // if (iSmType == 5) { continue; } // skip T0 + // for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) { + // for (int iRpc = 0; iRpc < fDigiBdfPar->GetNbRpc(iSmType); ++iRpc) { + // for (int iCh = 0; iCh < fDigiBdfPar->GetNbChan(iSmType, iRpc); ++iCh) { + // const char* dir = "occup_cell/"; + // TString name = Form("%s/occup_xy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh); + + // auto address = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, /*side = */ 0, iSmType); + // const auto* pCell = dynamic_cast<const CbmTofCell*>(fDigiPar->GetCell(address)); + // auto xLo = pCell->GetX() - 0.5 * pCell->GetSizex(); + // auto xUp = pCell->GetX() + 0.5 * pCell->GetSizex(); + // auto yLo = pCell->GetY() - 0.5 * pCell->GetSizey(); + // auto yUp = pCell->GetY() + 0.5 * pCell->GetSizey(); + // auto zLo = pCell->GetZ() - 1.0; + // auto zUp = pCell->GetZ() + 1.0; + + // auto* canv = MakeQaObject<CbmQaCanvas>(name, "", 1500, 800); + // canv->Divide(3, 1); + // { + // canv->cd(1); + // fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); + // DrawBox(xLo, yLo, xUp, yUp); + + // canv->cd(2); + // fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); + // DrawBox(zLo, xLo, zUp, xUp); + + // canv->cd(3); + // fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh]->DrawCopy("colz", ""); + // DrawBox(zLo, yLo, zUp, yUp); + // } + // } + // } + // } + // } + //} } return kSUCCESS; @@ -220,40 +221,31 @@ InitStatus CbmCaInputQaTof::InitHistograms() MakeQaDirectory(Form("occup_cell/sm_type_%d", iSmType)); int nSm = fDigiBdfPar->GetNbSm(iSmType); int nRpc = fDigiBdfPar->GetNbRpc(iSmType); - fvph_hit_xy_vs_cell[iSmType].resize(nSm); fvph_hit_zx_vs_cell[iSmType].resize(nSm); fvph_hit_zy_vs_cell[iSmType].resize(nSm); for (int iSm = 0; iSm < fDigiBdfPar->GetNbSm(iSmType); ++iSm) { MakeQaDirectory(Form("occup_cell/sm_type_%d/sm_%d/", iSmType, iSm)); - fvph_hit_xy_vs_cell[iSmType][iSm].resize(nRpc); - fvph_hit_zx_vs_cell[iSmType][iSm].resize(nRpc); - fvph_hit_zy_vs_cell[iSmType][iSm].resize(nRpc); + fvph_hit_xy_vs_cell[iSmType][iSm].resize(nRpc, nullptr); + fvph_hit_zx_vs_cell[iSmType][iSm].resize(nRpc, nullptr); + fvph_hit_zy_vs_cell[iSmType][iSm].resize(nRpc, nullptr); for (int iRpc = 0; iRpc < nRpc; ++iRpc) { - int nCh = fDigiBdfPar->GetNbChan(iSmType, iRpc); - fvph_hit_xy_vs_cell[iSmType][iSm][iRpc].resize(nCh, nullptr); - fvph_hit_zx_vs_cell[iSmType][iSm][iRpc].resize(nCh, nullptr); - fvph_hit_zy_vs_cell[iSmType][iSm][iRpc].resize(nCh, nullptr); - for (int iCh = 0; iCh < nCh; ++iCh) { - const char* dir = Form("occup_cell/sm_type_%d/sm_%d/rpc%d_ch%d", iSmType, iSm, iRpc, iCh); - TString name = Form("%s/occup_xy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh); - TString title = Form("Hit Occupancy in xy-Plane for iSmType = %d, iSm = %d, iRpc = %d, iCh = %d", - iSmType, iSm, iRpc, iCh); - title += ";x_{hit} [cm];y_{hit} [cm]"; - fvph_hit_xy_vs_cell[iSmType][iSm][iRpc][iCh] - = MakeQaObject<TH2F>(name, title, fNbXo, fLoXo, fUpXo, fNbYo, fLoYo, fUpYo); - name = Form("%s/occup_zx_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh); - title = Form("Hit Occupancy in zx-Plane for iSmType = %d, iSm = %d, iRpc = %d, iCh = %d", - iSmType, iSm, iRpc, iCh); - title += ";z_{hit} [cm];x_{hit} [cm]"; - fvph_hit_zx_vs_cell[iSmType][iSm][iRpc][iCh] - = MakeQaObject<TH2F>(name, title, fNbinsZ, frZmin.back(), frZmax.back(), fNbXo, fLoXo, fUpXo); - name = Form("%s/occup_zy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc, iCh); - title = Form("Hit Occupancy in zy-Plane for iSmType = %d, iSm = %d, iRpc = %d", iSmType, iSm, iRpc); - title += ";z_{hit} [cm];y_{hit} [cm]"; - fvph_hit_zy_vs_cell[iSmType][iSm][iRpc][iCh] - = MakeQaObject<TH2F>(name, title, fNbinsZ, frZmin.back(), frZmax.back(), fNbYo, fLoYo, fUpYo); - } + const char* dir = Form("occup_cell/sm_type_%d/sm_%d/rpc%d", iSmType, iSm, iRpc); + TString name = Form("%s/occup_xy_smt%d_sm%d_rpc%d", dir, iSmType, iSm, iRpc); + TString title = Form("Hit Occupancy in xy-Plane for iSmType = %d, iSm = %d, iRpc = %d", iSmType, iSm, iRpc); + title += ";x_{hit} [cm];y_{hit} [cm]"; + fvph_hit_xy_vs_cell[iSmType][iSm][iRpc] = + MakeQaObject<TH2F>(name, title, fNbXo, fLoXo, fUpXo, fNbYo, fLoYo, fUpYo); + name = Form("%s/occup_zx_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc); + title = Form("Hit Occupancy in zx-Plane for iSmType = %d, iSm = %d, iRpc = %d", iSmType, iSm, iRpc); + title += ";z_{hit} [cm];x_{hit} [cm]"; + fvph_hit_zx_vs_cell[iSmType][iSm][iRpc] = + MakeQaObject<TH2F>(name, title, fNbinsZ, frZmin.back(), frZmax.back(), fNbXo, fLoXo, fUpXo); + name = Form("%s/occup_zy_smt%d_sm%d_rpc%d_ch%d", dir, iSmType, iSm, iRpc); + title = Form("Hit Occupancy in zy-Plane for iSmType = %d, iSm = %d, iRpc = %d", iSmType, iSm, iRpc); + title += ";z_{hit} [cm];y_{hit} [cm]"; + fvph_hit_zy_vs_cell[iSmType][iSm][iRpc] = + MakeQaObject<TH2F>(name, title, fNbinsZ, frZmin.back(), frZmax.back(), fNbYo, fLoYo, fUpYo); } } } diff --git a/reco/L1/qa/CbmCaInputQaTof.h b/reco/L1/qa/CbmCaInputQaTof.h index 58b440a149636cae6526fdb3a84a1944ff1e23d1..349691bba9b72294a9087f621fec7325bbd57348 100644 --- a/reco/L1/qa/CbmCaInputQaTof.h +++ b/reco/L1/qa/CbmCaInputQaTof.h @@ -18,12 +18,12 @@ #include "TMath.h" +#include <iomanip> +#include <sstream> +#include <string> #include <tuple> #include <unordered_map> #include <vector> -#include <string> -#include <sstream> -#include <iomanip> class CbmMCEventList; class CbmMCDataArray; @@ -74,15 +74,15 @@ protected: /// @brief Fills histograms per hit void FillHistogramsPerHit(); - + /// @brief Fills histograms per MC point void FillHistogramsPerPoint() {} private: /// @brief Fills channel info map void FillChannelInfoMap(); - - CbmTofDigiPar* fDigiPar = nullptr; + + CbmTofDigiPar* fDigiPar = nullptr; CbmTofDigiBdfPar* fDigiBdfPar = nullptr; int fNbXo = 400; ///< Number of bins in occupancy @@ -91,11 +91,11 @@ private: int fLoXo = -100; ///< X min in occupancy [cm] int fUpYo = +100; ///< Y max in occupancy [cm] int fLoYo = -100; ///< Y min in occupancy [cm] - template <typename T> - using Vector4D_t = std::vector<std::vector<std::vector<std::vector<T>>>>; - Vector4D_t<TH2F*> fvph_hit_xy_vs_cell; ///< Hit occupancy vs. TOF cell ix XY-plane - Vector4D_t<TH2F*> fvph_hit_zx_vs_cell; ///< Hit occupancy vs. TOF cell in ZX-plane - Vector4D_t<TH2F*> fvph_hit_zy_vs_cell; ///< Hit occupancy vs. TOF cell in ZY-plane + template<typename T> + using Vector3D_t = std::vector<std::vector<std::vector<T>>>; + Vector3D_t<TH2F*> fvph_hit_xy_vs_cell; ///< Hit occupancy vs. TOF cell ix XY-plane + Vector3D_t<TH2F*> fvph_hit_zx_vs_cell; ///< Hit occupancy vs. TOF cell in ZX-plane + Vector3D_t<TH2F*> fvph_hit_zy_vs_cell; ///< Hit occupancy vs. TOF cell in ZY-plane ClassDef(CbmCaInputQaTof, 0); }; diff --git a/reco/L1/qa/CbmCaInputQaTrd.cxx b/reco/L1/qa/CbmCaInputQaTrd.cxx index 22d13ada4f7b1bfbcf65b75947b5421cf397522c..5f21a2c15cd3919ced237307ba6a6a83e86bf0e5 100644 --- a/reco/L1/qa/CbmCaInputQaTrd.cxx +++ b/reco/L1/qa/CbmCaInputQaTrd.cxx @@ -14,7 +14,7 @@ ClassImp(CbmCaInputQaTrd); // --------------------------------------------------------------------------------------------------------------------- // -CbmCaInputQaTrd::CbmCaInputQaTrd(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaTrd", verbose, isMCUsed) +CbmCaInputQaTrd::CbmCaInputQaTrd(int verbose, bool isMCUsed) : CbmCaInputQaBase("CbmCaInputQaTrd", verbose, isMCUsed) { // Default parameters of task DefineParameters(); @@ -31,21 +31,21 @@ bool CbmCaInputQaTrd::Check() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaTrd::DeInit() -{ - CbmCaInputQaBase::DeInit(); -} +void CbmCaInputQaTrd::DeInit() { CbmCaInputQaBase::DeInit(); } // --------------------------------------------------------------------------------------------------------------------- // void CbmCaInputQaTrd::DefineParameters() { - auto SetRange = [] (std::array<double, 2>& range, double min, double max) { range[0] = min; range[1] = max; }; + auto SetRange = [](std::array<double, 2>& range, double min, double max) { + range[0] = min; + range[1] = max; + }; // Hit errors - SetRange(fRHitDx, 0.0000, 5.00); // [cm] - SetRange(fRHitDy, 0.0000, 5.00); // [cm] - SetRange(fRHitDu, 0.0000, 5.00); // [cm] - SetRange(fRHitDv, 0.0000, 5.00); // [cm] + SetRange(fRHitDx, 0.0000, 5.00); // [cm] + SetRange(fRHitDy, 0.0000, 5.00); // [cm] + SetRange(fRHitDu, 0.0000, 5.00); // [cm] + SetRange(fRHitDv, 0.0000, 5.00); // [cm] SetRange(fRHitDt, 0.0000, 10.00); // [ns] // Residuals SetRange(fRResX, -2.00, 2.00); @@ -55,13 +55,13 @@ void CbmCaInputQaTrd::DefineParameters() SetRange(fRResT, -0.50, 0.50); // QA result selection criteria SetRange(fEffRange, 10.0, 30.0); ///< Range for hit efficiency approximation - fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] - fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero - fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity - fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range - fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] - fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] - // Track selection criteria + fResMeanThrsh = 0.50; ///< Maximum allowed deviation of residual mean from zero [sigma] + fPullMeanThrsh = 0.10; ///< Maximum allowed deviation of pull mean from zero + fPullWidthThrsh = 2.00; ///< Maximum allowed deviation of pull width from unity + fEffThrsh = 0.50; ///< Threshold for hit efficiency in the selected range + fMaxDiffZStHit = 1.00; ///< Maximum allowed difference between z-position of hit and station [cm] + fMinMomentum = 0.05; ///< Minimum momentum of particle [GeV/c] + // Track selection criteria fTrackSelectionPrimary = true; ///< must the track come from the primary vertex fTrackSelectionMomentum = 0.1; ///< track momentum GeV when it exits the tracking station fTrackSelectionAngle = 60.; ///< track incl. angle [grad] when it exits the station @@ -69,9 +69,7 @@ void CbmCaInputQaTrd::DefineParameters() // --------------------------------------------------------------------------------------------------------------------- // -void CbmCaInputQaTrd::FillHistogramsPerHit() -{ -} +void CbmCaInputQaTrd::FillHistogramsPerHit() {} // --------------------------------------------------------------------------------------------------------------------- // @@ -82,7 +80,7 @@ InitStatus CbmCaInputQaTrd::InitDataBranches() auto baseInitStatus = CbmCaInputQaBase::InitDataBranches(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } @@ -92,7 +90,7 @@ InitStatus CbmCaInputQaTrd::InitCanvases() { auto baseInitStatus = CbmCaInputQaBase::InitCanvases(); if (kSUCCESS != baseInitStatus) { return baseInitStatus; } - + return kSUCCESS; } diff --git a/reco/L1/qa/CbmCaInputQaTrd.h b/reco/L1/qa/CbmCaInputQaTrd.h index 54b2303368ff3ba85311e7d9856d17d8c61e4f4b..4d5c498260e253927d707423b8b674194f087adf 100644 --- a/reco/L1/qa/CbmCaInputQaTrd.h +++ b/reco/L1/qa/CbmCaInputQaTrd.h @@ -47,12 +47,11 @@ protected: /// @brief Fills histograms per hit void FillHistogramsPerHit(); - + /// @brief Fills histograms per MC point void FillHistogramsPerPoint() {} private: - ClassDef(CbmCaInputQaTrd, 0); }; diff --git a/reco/L1/qa/CbmTrackerInputQaTof.cxx b/reco/L1/qa/CbmTrackerInputQaTof.cxx index 5f374d598320bd84558f1902e48d0da08f17b2a7..88b71474421b58edb389aa2d4a2a4acb871b6f90 100644 --- a/reco/L1/qa/CbmTrackerInputQaTof.cxx +++ b/reco/L1/qa/CbmTrackerInputQaTof.cxx @@ -375,8 +375,8 @@ int CbmTrackerInputQaTof::GetStationIndex(CbmTofPoint* p) int iSta = -1; auto tofInterface = CbmTofTrackingInterface::Instance(); for (int iSt = 0; iSt < fNtrackingStations; iSt++) { - if (fabs(p->GetZ() - tofInterface->GetZ(iSt)) < dist) { - dist = fabs(p->GetZ() - tofInterface->GetZ(iSt)); + if (fabs(p->GetZ() - tofInterface->GetZref(iSt)) < dist) { + dist = fabs(p->GetZ() - tofInterface->GetZref(iSt)); iSta = iSt; } } @@ -396,11 +396,11 @@ InitStatus CbmTrackerInputQaTof::GeometryQa() double lastZ = -1; for (int iStation = 0; iStation < fNtrackingStations; iStation++) { - // tofInterface->GetZ(iStation); + // tofInterface->GetZref(iStation); // tofInterface->GetTimeResolution(iStation); // tofInterface->IsTimeInfoProvided(iStation); - double staZ = tofInterface->GetZ(iStation); + double staZ = tofInterface->GetZref(iStation); // check that the stations are properly ordered in Z if (((iStation > 0) && (staZ <= lastZ)) || ((staZ != staZ))) { @@ -566,7 +566,7 @@ void CbmTrackerInputQaTof::ResolutionQa() // return; // } - // double staZ = tofInterface->GetZ(StationIndex); // module->GetZ(); //+ 410; + // double staZ = tofInterface->GetZref(StationIndex); // module->GetZ(); //+ 410; // if ((staZ < p->GetZ() - 1.) || (staZ > p->GetZ() + 1.)) { // LOG(error) << "Tof station " << StationIndex << ": active material Z[" << p->GetZ() << " cm," << p->GetZ() // << " cm] is too far from the nominal station Z " << staZ << " cm";