diff --git a/core/base/CbmTrackingDetectorInterfaceBase.cxx b/core/base/CbmTrackingDetectorInterfaceBase.cxx index 8a46391ae24ce7376a8f65604a704f8dd1e5ceb0..0548f85f72e7f44db3dc14ee66f26a0f2873f25b 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.cxx +++ b/core/base/CbmTrackingDetectorInterfaceBase.cxx @@ -34,10 +34,15 @@ bool CbmTrackingDetectorInterfaceBase::Check() const // Station individual parameters check for (int iSt = 0; iSt < this->GetNtrackingStations(); ++iSt) { std::string prefix = std::string("\t- Station ") + std::to_string(iSt) + " has "; - // Position along Z-axis - if (std::isnan(this->GetZ(iSt))) { - msg << prefix << " NaN component along Z-axis (" << this->GetZ(iSt) << " cm)\n"; - res = false && res; + + { // Position along Z-axis + double z0 = this->GetZmin(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"; + res = false && res; + } } // Size along X-axis @@ -53,26 +58,12 @@ bool CbmTrackingDetectorInterfaceBase::Check() const msg << prefix << " zero, negative or NaN Y-size (" << yMax << " cm)\n"; res = false && res; } - - // Max station radius - auto rMax = this->GetRmax(iSt); - if (rMax < std::numeric_limits<double>::epsilon() || std::isnan(rMax)) { - msg << prefix << " zero, negative or NaN outer radius (" << rMax << " cm)\n"; - res = false && res; - } - - // Min station radius - auto rMin = this->GetRmin(iSt); - if (rMin < 0 || std::isnan(rMin)) { - msg << prefix << " negative or NaN inner radius (" << rMin << " cm)\n"; - res = false && res; - } } // 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()) { @@ -103,23 +94,21 @@ std::string CbmTrackingDetectorInterfaceBase::ToString() const 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(' ') << "z_min[cm]" << ' '; + table << setw(10) << setfill(' ') << "z_max[cm]" << ' '; table << setw(10) << setfill(' ') << "x_max[cm]" << ' '; table << setw(10) << setfill(' ') << "y_max[cm]" << ' '; table << setw(11) << setfill(' ') << "angleF[rad]" << ' '; table << setw(11) << setfill(' ') << "angleB[rad]" << ' '; - table << setw(10) << setfill(' ') << "dz [cm]" << ' '; - table << setw(10) << setfill(' ') << "RL [cm]" << '\n'; + table << '\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(' ') << GetZref(iSt) << ' '; + table << setw(10) << setfill(' ') << GetZmin(iSt) << ' '; + table << setw(10) << setfill(' ') << GetZmax(iSt) << ' '; table << setw(10) << setfill(' ') << GetXmax(iSt) << ' '; table << setw(10) << setfill(' ') << GetYmax(iSt) << ' '; - table << setw(10) << setfill(' ') << GetThickness(iSt) << ' '; - table << setw(10) << setfill(' ') << GetRadLength(iSt) << '\n'; + table << '\n'; } return table.str(); } diff --git a/core/base/CbmTrackingDetectorInterfaceBase.h b/core/base/CbmTrackingDetectorInterfaceBase.h index c0928d96a1b45df8f36980c7d5034ba281530072..ab62e284aaa025d2bba71d8bd772cdfb359d7652 100644 --- a/core/base/CbmTrackingDetectorInterfaceBase.h +++ b/core/base/CbmTrackingDetectorInterfaceBase.h @@ -35,30 +35,6 @@ public: /// Gets actual number of stations, provided by the current geometry setup virtual int GetNtrackingStations() const = 0; - // TODO: SZh 17.10.2022: At the moment the radiation length and the station thickness are not used for the tracking - // initialization as soon as the material budget maps are in use. Should we keep these - // accessors here, or just remove them from the interfaces? - - /// Gets station radiation length - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - virtual double GetRadLength(int stationId) const = 0; - - /// Gets size of inner radius of station - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - virtual double GetRmin(int stationId) const = 0; - - /// Gets size of outer radius of station - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - virtual double GetRmax(int stationId) const = 0; - - /// 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] - virtual double GetThickness(int stationId) const = 0; - /// Gets a tracking station of a CbmPixelHit /// \param hit A pointer to CbmPixelHit /// \return Local index of the tracking station @@ -85,10 +61,20 @@ public: /// \return Size of station along the Y-axis [cm] virtual double GetYmax(int stationId) const = 0; - /// Gets z component of the station position + /// 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 GetZref(int stationId) const = 0; + + /// 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] + virtual double GetZmin(int stationId) const = 0; + + /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Z position of station [cm] - virtual double GetZ(int stationId) const = 0; + /// \return max Z of the station [cm] + virtual double GetZmax(int stationId) const = 0; /// Check if station provides time measurements /// \param stationId Tracking station ID in the setup @@ -125,7 +111,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 bb84f4942a21777efed1fd501762fd8830b418a3..c5c78cf7bde686ba9e6078356306042d0bb5fdc4 100644 --- a/core/detectors/much/CbmMuchTrackingInterface.h +++ b/core/detectors/much/CbmMuchTrackingInterface.h @@ -57,25 +57,20 @@ public: /// Gets actual number of tracking stations, provided by the current geometry setup int GetNtrackingStations() const; - /// Gets station radiation length + /// Gets reference z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - double GetRadLength(int /*stationId*/) const { return 0; } // TODO: Replace with correct value + /// \return Z position of the station [cm] + double GetZref(int stationId) const { return GetMuchLayer(stationId)->GetZ(); } - /// Gets size of outer radius of station + /// Gets min z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - double GetRmax(int /*stationId*/) const { return 100.; } + /// \return min Z of the station [cm] + double GetZmin(int stationId) const { return GetZref(stationId) - 0.5 * GetMuchLayer(stationId)->GetDz(); } - /// Gets size of inner radius of station + /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - double GetRmin(int /*stationId*/) const { return 10.; } - - /// 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] - double GetThickness(int stationId) const { return GetMuchLayer(stationId)->GetDz(); }; + /// \return max Z of the station [cm] + double GetZmax(int stationId) const { return GetZref(stationId) + 0.5 * GetMuchLayer(stationId)->GetDz(); } /// Gets a tracking station of a CbmPixelHit /// \param hit A pointer to CbmPixelHit @@ -97,11 +92,6 @@ public: /// \return Size of station along the Y-axis [cm] double GetYmax(int /*stationId*/) const { return 100.; } - /// Gets z component of the station position - /// \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 GetMuchLayer(stationId)->GetZ(); } - /// Check if station 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/mvd/CbmMvdTrackingInterface.h b/core/detectors/mvd/CbmMvdTrackingInterface.h index e26f52c7987c7e8d9c4f9cde9d9f43b842e2e2e8..47e5201530c0a9c883d7aef9a327d86a30a1b550 100644 --- a/core/detectors/mvd/CbmMvdTrackingInterface.h +++ b/core/detectors/mvd/CbmMvdTrackingInterface.h @@ -56,34 +56,20 @@ public: /// Gets actual number of tracking stations, provided by the current geometry setup int GetNtrackingStations() const { return fMvdStationPar->GetStationCount(); } - /// Gets the tracking station radiation length + /// Gets reference z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - double GetRadLength(int stationId) const - { - return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId)); - } - - /// Gets size of outer radius of a tracking station - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - double GetRmax(int stationId) const - { - return std::max(fMvdStationPar->GetHeight(stationId), fMvdStationPar->GetWidth(stationId)); - } + /// \return Z position of the station [cm] + double GetZref(int stationId) const { return fMvdStationPar->GetZPosition(stationId); } - /// Gets size of inner radius of a tracking station + /// Gets min z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - double GetRmin(int stationId) const - { - return std::min(fMvdStationPar->GetBeamHeight(stationId), fMvdStationPar->GetBeamWidth(stationId)); - } + /// \return min Z of the station [cm] + double GetZmin(int stationId) const { return GetZref(stationId) - 0.5 * fMvdStationPar->GetZThickness(stationId); } - /// Gets the tracking station thickness along the Z-axis + /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Station thickness [cm] - double GetThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); } + /// \return max Z of the station [cm] + double GetZmax(int stationId) const { return GetZref(stationId) + 0.5 * fMvdStationPar->GetZThickness(stationId); } /// Gets a tracking station of a CbmPixelHit /// \param hit A pointer to CbmPixelHit @@ -107,17 +93,12 @@ public: /// Gets max size 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] - double GetXmax(int stationId) const { return this->GetRmax(stationId); } + double GetXmax(int stationId) const { return fMvdStationPar->GetWidth(stationId); } /// Gets max size of a tracking 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 this->GetRmax(stationId); } - - /// Gets z component of the tracking station position - /// \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 fMvdStationPar->GetZPosition(stationId); } + double GetYmax(int stationId) const { return fMvdStationPar->GetHeight(stationId); } /// Check if the detector provides time measurements /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) @@ -133,6 +114,19 @@ public: /// FairTask: sets parameter containers up void SetParContainers(); + /// --- 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] + double GetRadLength(int stationId) const + { + return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId)); + } + + /// --- 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] + double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); } + /// Copy and move constructers and assign operators are prohibited CbmMvdTrackingInterface(const CbmMvdTrackingInterface&) = delete; CbmMvdTrackingInterface(CbmMvdTrackingInterface&&) = delete; diff --git a/core/detectors/sts/CbmStsTrackingInterface.h b/core/detectors/sts/CbmStsTrackingInterface.h index a629218908e76a3f9935eb99bdc9b847c807b4c9..f78b2fd8165acad3189b02261a483d5d55c79e2d 100644 --- a/core/detectors/sts/CbmStsTrackingInterface.h +++ b/core/detectors/sts/CbmStsTrackingInterface.h @@ -53,35 +53,12 @@ public: /// Gets actual number of the tracking stations, provided by the current geometry setup int GetNtrackingStations() const { return CbmStsSetup::Instance()->GetNofStations(); } - /// Gets station radiation length - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - double GetRadLength(int stationId) const { return GetStsStation(stationId)->GetRadLength(); } - - /// Gets size of outer radius of station - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - double GetRmax(int stationId) const - { - return GetXmax(stationId) > GetYmax(stationId) ? GetXmax(stationId) : GetYmax(stationId); - } - - /// Gets size of inner radius of station - /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - double GetRmin(int /*stationId*/) const { return 0.; } - /// Gets stereo angles of the two independent measured coordinates /// The tracking does not use this method. It is only used by the QA task. /// \param address detector unique identifier /// \return [phiU, phiV] - Stereo angles [rad] std::tuple<double, double> GetStereoAnglesSensor(int address) const; - /// 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] - double GetThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); } - /// Gets a tracking station of a CbmPixelHit /// \param hit A pointer to CbmPixelHit /// \return Local index of the tracking station @@ -139,6 +116,16 @@ public: /// \return Flag: true - station provides time measurements, false - station does not provide time measurements bool IsTimeInfoProvided(int /*stationId*/) const { return true; } + /// -- 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] + 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] + double GetSensorThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); } + /// FairTask: sets parameter containers up void SetParContainers(); diff --git a/core/detectors/tof/CbmTofTrackingInterface.h b/core/detectors/tof/CbmTofTrackingInterface.h index 923ea541892b3ad997e017d0e4f56a635b16b5eb..3d50fad01e7661ff7cb8005d94e1746d54e60ce3 100644 --- a/core/detectors/tof/CbmTofTrackingInterface.h +++ b/core/detectors/tof/CbmTofTrackingInterface.h @@ -56,25 +56,20 @@ public: /// Gets actual number of tracking stations, provided by the current geometry setup int GetNtrackingStations() const { return fDigiBdfPar->GetNbTrackingStations(); } - /// Gets station radiation length + /// Gets reference z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - double GetRadLength(int /*stationId*/) const { return 2.; } + /// \return Z position of the station [cm] + double GetZref(int stationId) const { return fTofStationZ[stationId]; } - /// Gets size of outer radius of station + /// Gets min z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - double GetRmax(int /*stationId*/) const { return 150.; } + /// \return min Z of the station [cm] + double GetZmin(int stationId) const { return GetZref(stationId) - 5.; } - /// Gets size of inner radius of station + /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - double GetRmin(int /*stationId*/) const { return 0.; } - - /// 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] - double GetThickness(int /*stationId*/) const { return 10.; } + /// \return max Z of the station [cm] + double GetZmax(int stationId) const { return GetZref(stationId) + 5.; } /// Gets a tracking station of a ToF hit /// \param hit A pointer to ToF hit @@ -108,11 +103,6 @@ public: /// \return Size of station along the Y-axis [cm] double GetYmax(int /*stationId*/) const { return 20.; } - /// Gets z component of the station position - /// \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 fTofStationZ[stationId]; } - /// Check if station 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/trd/CbmTrdTrackingInterface.h b/core/detectors/trd/CbmTrdTrackingInterface.h index be23a9472bba68a7ef614d900ae322b3103bc900..590c3fa4a160e2ff818f2cedab9f2ce436087906 100644 --- a/core/detectors/trd/CbmTrdTrackingInterface.h +++ b/core/detectors/trd/CbmTrdTrackingInterface.h @@ -53,25 +53,20 @@ public: /// Gets actual number of tracking stations, provided by the current geometry setup int GetNtrackingStations() const; - /// Gets station radiation length + /// Gets reference z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Radiation length [cm] - double GetRadLength(int /*stationId*/) const { return 1.6; } + /// \return Z position of the station [cm] + double GetZref(int stationId) const { return GetTrdModulePar(stationId)->GetZ(); } - /// Gets size of outer radius of station + /// Gets min z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station outer radius [cm] - double GetRmax(int stationId) const { return 2. * this->GetXmax(stationId); } + /// \return min Z of the station [cm] + double GetZmin(int stationId) const { return GetZref(stationId) - GetTrdModulePar(stationId)->GetSizeZ(); } - /// Gets size of inner radius of station + /// Gets max z of the station /// \param stationId Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1]) - /// \return Size of station inner radius [cm] - double GetRmin(int /*stationId*/) const { return 0.; } - - /// 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] - double GetThickness(int stationId) const { return 2. * GetTrdModulePar(stationId)->GetSizeZ(); } + /// \return max Z of the station [cm] + double GetZmax(int stationId) const { return GetZref(stationId) + GetTrdModulePar(stationId)->GetSizeZ(); } /// Gets a tracking station of a CbmPixelHit /// \param hit A pointer to CbmPixelHit @@ -93,11 +88,6 @@ public: /// \return Size of station along the Y-axis [cm] double GetYmax(int stationId) const { return GetTrdModulePar(stationId)->GetSizeY(); } - /// Gets z component of the station position - /// \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 GetTrdModulePar(stationId)->GetZ(); } - /// Check if station 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/reco/KF/CbmKF.cxx b/reco/KF/CbmKF.cxx index 2660b1c58cb982c44b14f8443ce0729750194625..f0ed83263a13979d1a5131faa60c71c71f058c2b 100644 --- a/reco/KF/CbmKF.cxx +++ b/reco/KF/CbmKF.cxx @@ -157,12 +157,14 @@ InitStatus CbmKF::Init() tube.ID = 1101 + ist; // tube.F = 1.; - tube.z = mvdInterface->GetZ(ist); - tube.dz = mvdInterface->GetThickness(ist); + tube.z = mvdInterface->GetZref(ist); + tube.dz = mvdInterface->GetSensorThickness(ist); // TODO: verify the thickness of MVD stations tube.RadLength = mvdInterface->GetRadLength(ist); - tube.r = mvdInterface->GetRmin(ist); - tube.R = mvdInterface->GetRmax(ist); + tube.r = 0.; + double dx = mvdInterface->GetXmax(ist); + double dy = mvdInterface->GetYmax(ist); + tube.R = sqrt(dx * dx + dy * dy); tube.rr = tube.r * tube.r; tube.RR = tube.R * tube.R; tube.ZThickness = tube.dz; @@ -191,11 +193,13 @@ InitStatus CbmKF::Init() tube.ID = 1000 + ist; tube.F = 1.; - tube.z = stsInterface->GetZ(ist); - tube.dz = stsInterface->GetThickness(ist); + tube.z = stsInterface->GetZref(ist); + tube.dz = stsInterface->GetSensorThickness(ist); tube.RadLength = stsInterface->GetRadLength(ist); - tube.r = stsInterface->GetRmin(ist); - tube.R = stsInterface->GetRmax(ist); + tube.r = 0.; + double dx = stsInterface->GetXmax(ist); + double dy = stsInterface->GetYmax(ist); + tube.R = sqrt(dx * dx + dy * dy); tube.rr = tube.r * tube.r; tube.RR = tube.R * tube.R; tube.ZThickness = tube.dz; diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 30a908259f2ea5087c37e6f812a73d3fa0b08bc4..add7f7e4dc0f3be3d389d3d4dbb0b80e31c64e33 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -467,18 +467,17 @@ InitStatus CbmL1::Init() stationInfo.SetStationType(1); // MVD stationInfo.SetTimeInfo(mvdInterface->IsTimeInfoProvided(iSt)); stationInfo.SetFieldStatus(fTrackingMode == L1Algo::TrackingMode::kMcbm ? 0 : 1); - stationInfo.SetZ(mvdInterface->GetZ(iSt)); + stationInfo.SetZref(mvdInterface->GetZref(iSt)); + stationInfo.SetZmin(mvdInterface->GetZmin(iSt)); + stationInfo.SetZmax(mvdInterface->GetZmax(iSt)); stationInfo.SetXmax(mvdInterface->GetXmax(iSt)); stationInfo.SetYmax(mvdInterface->GetYmax(iSt)); - stationInfo.SetRmin(mvdInterface->GetRmin(iSt)); - stationInfo.SetRmax(mvdInterface->GetRmax(iSt)); - stationInfo.SetZthickness(mvdInterface->GetThickness(iSt)); - stationInfo.SetTrackingStatus(fTargetZ < stationInfo.GetZdouble() ? true : false); + stationInfo.SetTrackingStatus(true); if (fvmDisabledStationIDs[L1DetectorID::kMvd].find(iSt) != fvmDisabledStationIDs[L1DetectorID::kMvd].cend()) { stationInfo.SetTrackingStatus(false); } fInitManager.AddStation(stationInfo); - LOG(info) << "- MVD station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm "; + LOG(info) << "- MVD station " << iSt << " at z = " << stationInfo.GetZref() << " cm "; } } @@ -492,19 +491,18 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(L1Algo::TrackingMode::kMcbm == fTrackingMode ? 0 : 1); - stationInfo.SetZ(stsInterface->GetZ(iSt)); + stationInfo.SetZref(stsInterface->GetZref(iSt)); + stationInfo.SetZmin(stsInterface->GetZmin(iSt)); + stationInfo.SetZmax(stsInterface->GetZmax(iSt)); stationInfo.SetXmax(stsInterface->GetXmax(iSt)); stationInfo.SetYmax(stsInterface->GetYmax(iSt)); - stationInfo.SetRmin(stsInterface->GetRmin(iSt)); - stationInfo.SetRmax(stsInterface->GetRmax(iSt)); - stationInfo.SetZthickness(stsInterface->GetThickness(iSt)); - stationInfo.SetTrackingStatus(fTargetZ < stationInfo.GetZdouble() ? true : false); + stationInfo.SetTrackingStatus(true); if (fvmDisabledStationIDs[L1DetectorID::kSts].find(iSt) != fvmDisabledStationIDs[L1DetectorID::kSts].cend()) { stationInfo.SetTrackingStatus(false); } fInitManager.AddStation(stationInfo); - LOG(info) << "- STS station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm "; + LOG(info) << "- STS station " << iSt << " at z = " << stationInfo.GetZref() << " cm "; } } @@ -518,18 +516,18 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZ(muchInterface->GetZ(iSt)); + stationInfo.SetZref(muchInterface->GetZref(iSt)); + stationInfo.SetZmin(muchInterface->GetZmin(iSt)); + stationInfo.SetZmax(muchInterface->GetZmax(iSt)); stationInfo.SetXmax(muchInterface->GetXmax(iSt)); stationInfo.SetYmax(muchInterface->GetYmax(iSt)); - stationInfo.SetRmin(muchInterface->GetRmin(iSt)); - stationInfo.SetRmax(muchInterface->GetRmax(iSt)); - stationInfo.SetZthickness(muchInterface->GetThickness(iSt)); - stationInfo.SetTrackingStatus(fTargetZ < stationInfo.GetZdouble() ? true : false); + + stationInfo.SetTrackingStatus(true); if (fvmDisabledStationIDs[L1DetectorID::kMuch].find(iSt) != fvmDisabledStationIDs[L1DetectorID::kMuch].cend()) { stationInfo.SetTrackingStatus(false); } fInitManager.AddStation(stationInfo); - LOG(info) << "- MuCh station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + LOG(info) << "- MuCh station " << iSt << " at z = " << stationInfo.GetZref() << " cm"; } } @@ -543,14 +541,14 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZ(trdInterface->GetZ(iSt)); + stationInfo.SetZref(trdInterface->GetZref(iSt)); + stationInfo.SetZmin(trdInterface->GetZmin(iSt)); + stationInfo.SetZmax(trdInterface->GetZmax(iSt)); stationInfo.SetXmax(trdInterface->GetXmax(iSt)); stationInfo.SetYmax(trdInterface->GetYmax(iSt)); - stationInfo.SetRmin(trdInterface->GetRmin(iSt)); - stationInfo.SetRmax(trdInterface->GetRmax(iSt)); - stationInfo.SetZthickness(trdInterface->GetThickness(iSt)); + if (L1Algo::TrackingMode::kGlobal == fTrackingMode) { stationInfo.SetTimeInfo(false); } - stationInfo.SetTrackingStatus(fTargetZ < stationInfo.GetZdouble() ? true : false); + stationInfo.SetTrackingStatus(true); if (iSt == 1 && L1Algo::TrackingMode::kMcbm == fTrackingMode && fMissingHits) { stationInfo.SetTrackingStatus(false); } @@ -558,7 +556,7 @@ InitStatus CbmL1::Init() stationInfo.SetTrackingStatus(false); } fInitManager.AddStation(stationInfo); - LOG(info) << "- TRD station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + LOG(info) << "- TRD station " << iSt << " at z = " << stationInfo.GetZref() << " cm"; } } @@ -572,19 +570,18 @@ InitStatus CbmL1::Init() stationInfo.SetTimeInfo(L1Algo::TrackingMode::kMcbm != fTrackingMode ? stsInterface->IsTimeInfoProvided(iSt) : false); stationInfo.SetFieldStatus(0); - stationInfo.SetZ(tofInterface->GetZ(iSt)); - auto thickness = tofInterface->GetThickness(iSt); - stationInfo.SetZthickness(thickness); + stationInfo.SetZref(tofInterface->GetZref(iSt)); + stationInfo.SetZmin(tofInterface->GetZmin(iSt)); + stationInfo.SetZmax(tofInterface->GetZmax(iSt)); stationInfo.SetXmax(tofInterface->GetXmax(iSt)); stationInfo.SetYmax(tofInterface->GetYmax(iSt)); - stationInfo.SetRmin(tofInterface->GetRmin(iSt)); - stationInfo.SetRmax(tofInterface->GetRmax(iSt)); - stationInfo.SetTrackingStatus(fTargetZ < stationInfo.GetZdouble() ? true : false); + + stationInfo.SetTrackingStatus(true); if (fvmDisabledStationIDs[L1DetectorID::kTof].find(iSt) != fvmDisabledStationIDs[L1DetectorID::kTof].cend()) { stationInfo.SetTrackingStatus(false); } fInitManager.AddStation(stationInfo); - LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZdouble() << " cm"; + LOG(info) << "- TOF station " << iSt << " at z = " << stationInfo.GetZref() << " cm"; } } @@ -960,7 +957,7 @@ void CbmL1::Reconstruct(CbmEvent* event) // Material monitoring: mark active areas { for (L1HitIndex_t i = 0; i < fpAlgo->GetInputData().GetNhits(); i++) { - const L1Hit& h = fpAlgo->GetInputData().GetHit(i); + const L1Hit& h = fpAlgo->GetInputData().GetHit(i); fMaterialMonitor[h.iSt].MarkActiveBin(h.x, h.y); } } @@ -1167,27 +1164,27 @@ void CbmL1::GenerateMaterialMaps() auto& vStations = fInitManager.GetStationInfo(); for (unsigned int ist = 0; ist < vStations.size(); ist++) { auto& station = vStations[ist]; - double z1 = station.GetZdouble() + station.GetZthickness()[0] / 2.; + double z1 = station.GetZmax(); double z2 = z1; if (ist < vStations.size() - 1) { // split materials between the stations at the middle auto& stationNext = vStations[ist + 1]; - z2 = stationNext.GetZdouble() - stationNext.GetZthickness()[0] / 2.; + z2 = stationNext.GetZmin(); } double zNew = 0.5 * (z1 + z2); - double maxXY = 1.3 * station.GetRmax()[0]; + double maxXY = 1.3 * std::max(station.GetXmax(), station.GetYmax()); //double maxXY = 80; // calculate n bins from the minimal pitch int nBins = static_cast<int>(std::ceil(2. * maxXY / fMatBudgetPitch)); if (nBins < 1) { LOG(fatal) << " material nBins " << nBins << " is not positive, something is wrong"; } if (nBins > fMatBudgetNbins) { nBins = fMatBudgetNbins; } - L1Material matBudget = matHelper.GenerateMaterialMap(station.GetZdouble(), zLast, zNew, maxXY, nBins); + L1Material matBudget = matHelper.GenerateMaterialMap(station.GetZref(), zLast, zNew, maxXY, nBins); station.SetMaterialMap(matBudget); - LOG(info) << "Generated material map for tracking station " << ist << " at z = " << station.GetZdouble() << " cm." + LOG(info) << "Generated material map for tracking station " << ist << " at z = " << station.GetZref() << " cm." << " Material is collected between z = " << zLast << " and z = " << zNew; zLast = zNew; diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index 6f44303449d1585daaa5e7df284d72ad5c042c2f..e490df8e6ed79567c725a4ca0cc7fe1745383a6f 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -1645,8 +1645,8 @@ void CbmL1::FieldApproxCheck() const L1Station& st = fpAlgo->GetParameters()->GetStation(ist); double z = st.fZ[0]; - double Xmax = st.Rmax[0]; - double Ymax = Xmax; + double Xmax = st.Xmax[0]; + double Ymax = st.Ymax[0]; // float step = 1.; diff --git a/reco/L1/L1Algo/L1BaseStationInfo.cxx b/reco/L1/L1Algo/L1BaseStationInfo.cxx index 18c9073d431b83234ebb32f0b1ea31aa133398fd..ee99e8f4e493adab40211bd32f5e5050f3cfb929 100644 --- a/reco/L1/L1Algo/L1BaseStationInfo.cxx +++ b/reco/L1/L1Algo/L1BaseStationInfo.cxx @@ -30,13 +30,6 @@ // CONSTRUCTORS AND DESTRUCTOR // -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo::L1BaseStationInfo() noexcept -{ - LOG(debug) << "L1BaseStationInfo: Default constructor called for " << this << '\n'; // Temporary -} - //------------------------------------------------------------------------------------------------------------------------ // L1BaseStationInfo::L1BaseStationInfo(L1DetectorID detectorID, int stationID) noexcept @@ -48,58 +41,6 @@ L1BaseStationInfo::L1BaseStationInfo(L1DetectorID detectorID, int stationID) noe fInitController.SetFlag(EInitKey::kStationID); } -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo::~L1BaseStationInfo() noexcept -{ - LOG(debug) << "L1BaseStationInfo: Destructor called for " << this << '\n'; // Temporary -} - -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo::L1BaseStationInfo(const L1BaseStationInfo& other) noexcept - : fDetectorID(other.fDetectorID) - , fStationID(other.fStationID) - , fTrackingStatus(other.fTrackingStatus) - , fXmax(other.fXmax) - , fYmax(other.fYmax) - , fZPos(other.fZPos) - , fL1Station(other.fL1Station) - , fThicknessMap(other.fThicknessMap) - , fInitController(other.fInitController) -{ - LOG(debug) << "L1BaseStationInfo: Copy constructor called: " << &other << " was copied into " << this; -} - -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo::L1BaseStationInfo(L1BaseStationInfo&& other) noexcept -{ - LOG(debug) << "L1BaseStationInfo: Move constructor called: " << &other << " was moved into " << this; - this->Swap(other); -} - -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo& L1BaseStationInfo::operator=(const L1BaseStationInfo& other) noexcept -{ - LOG(debug) << "L1BaseStationInfo: Copy operator= called for " << &other << " was copied into" << this; - if (this != &other) { L1BaseStationInfo(other).Swap(*this); } - return *this; -} - -//------------------------------------------------------------------------------------------------------------------------ -// -L1BaseStationInfo& L1BaseStationInfo::operator=(L1BaseStationInfo&& other) noexcept -{ - LOG(debug) << "L1BaseStationInfo: Move operator= called for " << &other << " was copied into" << this; - if (this != &other) { - L1BaseStationInfo tmp(std::move(other)); - this->Swap(tmp); - } - return *this; -} - // // BASIC METHODS @@ -117,7 +58,7 @@ void L1BaseStationInfo::Print(int verbosity) const LOG(info) << "L1BaseStationInfo object: at " << this; LOG(info) << "\tStation ID: " << fStationID; LOG(info) << "\tDetector ID: " << static_cast<int>(fDetectorID); - LOG(info) << "\tStation z position: " << fZPos; + LOG(info) << "\tStation z position: " << fZref; LOG(info) << "\tTracking status: " << fTrackingStatus; fL1Station.Print(verbosity - 1); LOG(info) << "\tAdditional fields:"; @@ -179,21 +120,6 @@ void L1BaseStationInfo::SetDetectorID(L1DetectorID inID) } } -//------------------------------------------------------------------------------------------------------------------------ -// -void L1BaseStationInfo::SetRmax(double inRmax) -{ - fL1Station.Rmax = inRmax; - fInitController.SetFlag(EInitKey::kRmax); -} - -//------------------------------------------------------------------------------------------------------------------------ -// -void L1BaseStationInfo::SetRmin(double inRmin) -{ - fL1Station.Rmin = inRmin; - fInitController.SetFlag(EInitKey::kRmin); -} //------------------------------------------------------------------------------------------------------------------------ // @@ -206,7 +132,7 @@ void L1BaseStationInfo::SetFieldFunction( return; } - L1MASSERT(0, fInitController.GetFlag(EInitKey::kZ), + L1MASSERT(0, fInitController.GetFlag(EInitKey::kZref), "Attempt to set magnetic field slice before setting z position of the station"); L1MASSERT(0, fInitController.GetFlag(EInitKey::kXmax), "Attempt to set magnetic field slice before Xmax size of the station"); @@ -226,7 +152,7 @@ void L1BaseStationInfo::SetFieldFunction( for (double y = -fYmax; y <= fYmax; y += dy) { double r = sqrt(fabs(x * x / fXmax / fXmax + y / fYmax * y / fYmax)); if (r > 1.) { continue; } - double p[D] = {x, y, fZPos}; + double p[D] = {x, y, fZref}; double B[D] = {}; getFieldValue(p, B); @@ -292,16 +218,6 @@ void L1BaseStationInfo::SetFieldStatus(int fieldStatus) } -//------------------------------------------------------------------------------------------------------------------------ -// -void L1BaseStationInfo::SetZthickness(double inThickness) -{ - //L1MASSERT(0, inRL, "Attempt of entering zero inRL (radiational length) value"); - - fL1Station.fZthick = inThickness; - fInitController.SetFlag(EInitKey::kZthickness); -} - //------------------------------------------------------------------------------------------------------------------------ // void L1BaseStationInfo::SetMaterialMap(const L1Material& thicknessMap) @@ -360,7 +276,8 @@ void L1BaseStationInfo::SetStationType(int inType) // void L1BaseStationInfo::SetXmax(double aSize) { - fXmax = aSize; + fXmax = aSize; + fL1Station.Xmax = aSize; fInitController.SetFlag(EInitKey::kXmax); } @@ -369,6 +286,7 @@ void L1BaseStationInfo::SetXmax(double aSize) void L1BaseStationInfo::SetYmax(double aSize) { fYmax = aSize; + fL1Station.Ymax = aSize; fInitController.SetFlag(EInitKey::kYmax); } @@ -391,11 +309,27 @@ void L1BaseStationInfo::SetTrackingStatus(bool flag) //------------------------------------------------------------------------------------------------------------------------ // -void L1BaseStationInfo::SetZ(double inZ) +void L1BaseStationInfo::SetZref(double inZ) { fL1Station.fZ = inZ; // setting simd vector of single-precision floats, which is passed to high performanced L1Algo - fZPos = inZ; // setting precised value to use in field approximation etc - fInitController.SetFlag(EInitKey::kZ); + fZref = inZ; // setting precised value to use in field approximation etc + fInitController.SetFlag(EInitKey::kZref); +} + +//------------------------------------------------------------------------------------------------------------------------ +// +void L1BaseStationInfo::SetZmin(double inZ) +{ + fZmin = inZ; // setting precised value to use in field approximation etc + fInitController.SetFlag(EInitKey::kZmin); +} + +//------------------------------------------------------------------------------------------------------------------------ +// +void L1BaseStationInfo::SetZmax(double inZ) +{ + fZmax = inZ; // setting precised value to use in field approximation etc + fInitController.SetFlag(EInitKey::kZmax); } //------------------------------------------------------------------------------------------------------------------------ @@ -407,7 +341,9 @@ void L1BaseStationInfo::Swap(L1BaseStationInfo& other) noexcept std::swap(fTrackingStatus, other.fTrackingStatus); std::swap(fXmax, other.fXmax); std::swap(fYmax, other.fYmax); - std::swap(fZPos, other.fZPos); + std::swap(fZref, other.fZref); + std::swap(fZmin, other.fZmin); + std::swap(fZmax, other.fZmax); std::swap(fL1Station, other.fL1Station); std::swap(fThicknessMap, other.fThicknessMap); std::swap(fInitController, other.fInitController); @@ -446,7 +382,7 @@ std::string L1BaseStationInfo::ToString(int verbosityLevel, int indentLevel) con if (verbosityLevel == 0) { aStream << indent << "L1BaseStationInfo object: {stationID, detectorID, z, address} = {" << fStationID << ", " - << static_cast<int>(fDetectorID) << ", " << fZPos << ", " << this << '}'; + << static_cast<int>(fDetectorID) << ", " << fZref << ", " << this << '}'; } else if (verbosityLevel > 0) { aStream << indent << "L1BaseStationInfo object: at " << this << '\n'; @@ -455,6 +391,8 @@ std::string L1BaseStationInfo::ToString(int verbosityLevel, int indentLevel) con aStream << indent << indentChar << "L1Station object:" << '\n'; aStream << fL1Station.ToString(verbosityLevel - 1, indentLevel + 1) << '\n'; aStream << indent << indentChar << "Additional fields:\n"; + aStream << indent << indentChar << indentChar << "Zmin: " << fZmin << '\n'; + aStream << indent << indentChar << indentChar << "Zmax: " << fZmax << '\n'; aStream << indent << indentChar << indentChar << "Xmax: " << fXmax << '\n'; aStream << indent << indentChar << indentChar << "Ymax: " << fYmax << '\n'; } diff --git a/reco/L1/L1Algo/L1BaseStationInfo.h b/reco/L1/L1Algo/L1BaseStationInfo.h index 906ebafde32d13f8f633df0b929c9796a732b007..60df5ababc6711910fca50f7180963f9f1b31d2c 100644 --- a/reco/L1/L1Algo/L1BaseStationInfo.h +++ b/reco/L1/L1Algo/L1BaseStationInfo.h @@ -46,15 +46,14 @@ public: kXmax, ///< max size in X direction kYmax, ///< max size in Y direction // L1Station initialization - kType, ///< station type - kTimeInfo, ///< if time info is used (flag) - kFieldStatus, ///< if station is placed in field (flag) - kZ, ///< z coordinate of the station position - kRmin, ///< internal radius of station (gap size) - kRmax, ///< exteranl radius of station - kZthickness, ///< Z thickness of the station - kThicknessMap, ///< thickness map of the station (optional?) - kFieldSlice, ///< L1Station.L1FieldSlice object initialization + kType, ///< station type + kTimeInfo, ///< if time info is used (flag) + kFieldStatus, ///< if station is placed in field (flag) + kZref, ///< reference z of the station + kZmin, ///< min z of the station + kZmax, ///< max z of the station + kThicknessMap, ///< thickness map of the station (optional?) + kFieldSlice, ///< L1Station.L1FieldSlice object initialization // The last item is equal to the number of bits in fInitFlags kEnd }; @@ -65,31 +64,19 @@ public: // CONSTRUCTORS AND DESTRUCTORS // /// Default constructor - L1BaseStationInfo() noexcept; + L1BaseStationInfo() = default; /// Constructor from stationID and detectorID L1BaseStationInfo(L1DetectorID detetorID, int stationID) noexcept; /// Destructor - ~L1BaseStationInfo() noexcept; + ~L1BaseStationInfo() noexcept = default; /// Copy constructor - L1BaseStationInfo(const L1BaseStationInfo& other) noexcept; - - /// Move constructor - L1BaseStationInfo(L1BaseStationInfo&& other) noexcept; - - /// Copy assignment operator - L1BaseStationInfo& operator=(const L1BaseStationInfo& other) noexcept; - - /// Move assignment operator - L1BaseStationInfo& operator=(L1BaseStationInfo&& other) noexcept; + L1BaseStationInfo(const L1BaseStationInfo& other) = default; /// Less operator for L1BaseStationInfo object to sort stations in Z - bool operator<(const L1BaseStationInfo& right) const - { - return (GetZdouble() < right.GetZdouble()); - } + bool operator<(const L1BaseStationInfo& right) const { return (GetZref() < right.GetZref()); } /// Gets detector ID L1DetectorID GetDetectorID() const { return fDetectorID; } @@ -124,15 +111,6 @@ public: /// Gets a reference to L1Material map const L1Material& GetMaterialMap() const; - /// Gets station thickness - fvec GetZthickness() const { return fL1Station.fZthick; } - - /// Gets min transverse size of the station [cm] - fvec GetRmin() const { return fL1Station.Rmin; } - - /// Gets max transverse size of the station [cm] - fvec GetRmax() const { return fL1Station.Rmax; } - /// Gets station ID int GetStationID() const { return fStationID; } @@ -149,7 +127,13 @@ public: double GetYmax() const { return fYmax; } /// Gets double precised z position of the station [cm] - double GetZdouble() const { return fZPos; } + double GetZref() const { return fZref; } + + /// Gets min z of the station [cm] + double GetZmin() const { return fZmin; } + + /// Gets max z of the station [cm] + double GetZmax() const { return fZmax; } /// Gets SIMD vectorized z position of the station [cm] fvec GetZsimdVec() const { return fL1Station.fZ; } @@ -174,10 +158,6 @@ public: /// of magnetic field components in position void SetFieldFunction(const std::function<void(const double (&xyz)[3], double (&B)[3])>& getFieldValue); - /// Sets station thickness and radiation length - /// \param thickness Thickness of station [arb. units] - void SetZthickness(double thickness); - /// Sets station thickness in units of radiation length mapped vs. position in XY plane (copy semantics) /// \param thicknessMap Map of station thickness in units of radiation length void SetMaterialMap(const L1Material& thicknessMap); @@ -186,12 +166,6 @@ public: /// \param thicknessMap Map of station thickness in units of radiation length void SetMaterialMap(L1Material&& thicknessMap) noexcept; - /// Sets max transverse size of the station [] - void SetRmax(double inRmax); - - /// Sets min transverse size of the station [] - void SetRmin(double inRmin); - /// Sets station ID [[deprecated("Please, use constructor to set station ID")]] void SetStationID(int inID); @@ -211,8 +185,14 @@ public: /// Sets maximum distance between station center and its edge in y direction void SetYmax(double aSize); - /// Sets nominal z position of the station - void SetZ(double inZ); + /// Sets reference z position of the station + void SetZref(double inZ); + + /// Sets min z of the station + void SetZmin(double inZ); + + /// Sets max z of the station + void SetZmax(double inZ); /// Swap method for easy implementation of move constructor and copy and move assignment operator void Swap(L1BaseStationInfo& other) noexcept; @@ -230,12 +210,14 @@ private: L1DetectorID fDetectorID {static_cast<L1DetectorID>(0)}; ///< Detector ID int fStationID {-1}; ///< Local ID of a station bool fTrackingStatus {false}; ///< Tracking status: true - station is used for tracking - double fXmax {0}; ///< Maximum distance between station center and its edge in x direction - double fYmax {0}; ///< Maximum distance between station center and its edge in y direction - double fZPos {0}; ///< z position of the station in double precision, used in field approximation - L1Station fL1Station {}; ///< L1Station structure, describes a station in L1Algo - L1Material fThicknessMap {}; ///< Map of station thickness in units of radiation length - InitController_t fInitController {}; ///< Class fileds initialization flags + double fXmax {0}; ///< Maximum distance between station center and its edge in x direction + double fYmax {0}; ///< Maximum distance between station center and its edge in y direction + double fZref {0}; ///< reference z + double fZmin {0}; ///< min z + double fZmax {0}; ///< max z + L1Station fL1Station {}; ///< L1Station structure, describes a station in L1Algo + L1Material fThicknessMap {}; ///< Map of station thickness in units of radiation length + InitController_t fInitController {}; ///< Class fileds initialization flags ManagementFlags_t fManagementFlags {}; ///< bitset flags to manage internal behaviour of the class }; diff --git a/reco/L1/L1Algo/L1Station.cxx b/reco/L1/L1Algo/L1Station.cxx index 2a8594642feae07453ca8632191a75301ec5bfc5..c464689766c64d973128f680bbef5b50d10ab231 100644 --- a/reco/L1/L1Algo/L1Station.cxx +++ b/reco/L1/L1Algo/L1Station.cxx @@ -42,19 +42,18 @@ void L1Station::CheckConsistency() const */ L1Utils::CheckSimdVectorEquality(fZ, "L1Station::fZ"); - L1Utils::CheckSimdVectorEquality(Rmin, "L1Station::Rmin"); - L1Utils::CheckSimdVectorEquality(Rmax, "L1Station::Rmax"); + L1Utils::CheckSimdVectorEquality(Xmax, "L1Station::Xmax"); + L1Utils::CheckSimdVectorEquality(Ymax, "L1Station::Ymax"); /* * Inner and outer radia checks: - * (i) both Rmin and Rmax must be >= 0 - * (ii) Rmax cannot be smaller or equal to Rmin + * (i) both Xmax and Ymax must be > 0 */ - if (Rmin[0] < 0 || L1Utils::CmpFloats(Rmin[0], Rmax[0]) || Rmax[0] < Rmin[0]) { + if (Xmax[0] < 0. || Ymax[0] < 0.) { std::stringstream msg; - msg << "L1Station: " << this->ToString() << " has incorrect radia values: " - << "Rmin = " << Rmin[0] << " [cm], Rmax = " << Rmax[0] << " [cm] (0 <= Rmin < Rmax expected)"; + msg << "L1Station: " << this->ToString() << " has incorrect sizes: " + << "Xmax = " << Xmax[0] << " [cm], Ymax = " << Ymax[0] << " [cm] (0 < Xmax && 0 < Ymax expected)"; throw std::logic_error(msg.str()); } @@ -85,9 +84,8 @@ std::string L1Station::ToString(int verbosityLevel, int indentLevel) const else { aStream << '\n'; aStream << indent << "z pos [cm]: " << std::setw(12) << std::setfill(' ') << fZ[0] << '\n'; - aStream << indent << "z thick [cm]: " << std::setw(12) << std::setfill(' ') << fZthick[0] << '\n'; - aStream << indent << "R_min [cm]: " << std::setw(12) << std::setfill(' ') << Rmin[0] << '\n'; - aStream << indent << "R_max [cm]: " << std::setw(12) << std::setfill(' ') << Rmax[0] << '\n'; + aStream << indent << "X_max [cm]: " << std::setw(12) << std::setfill(' ') << Xmax[0] << '\n'; + aStream << indent << "Y_max [cm]: " << std::setw(12) << std::setfill(' ') << Ymax[0] << '\n'; aStream << indent << "Station type: " << std::setw(12) << std::setfill(' ') << type << '\n'; aStream << indent << "Is time used: " << std::setw(12) << std::setfill(' ') << timeInfo << '\n'; aStream << indent << "Is in field: " << std::setw(12) << std::setfill(' ') << fieldStatus << '\n'; diff --git a/reco/L1/L1Algo/L1Station.h b/reco/L1/L1Algo/L1Station.h index 110394c535fbc8f4317734331c97a3f4edf7691b..77f1cb1aa633a535ecef4117ff1ab8f74722a5e0 100644 --- a/reco/L1/L1Algo/L1Station.h +++ b/reco/L1/L1Algo/L1Station.h @@ -28,9 +28,8 @@ public: int timeInfo = undef::kI32; ///< flag: if time information can be used int fieldStatus = undef::kI32; ///< flag: 1 - station is INSIDE the field, 0 - station is OUTSIDE the field fvec fZ = undef::kFvc; ///< z position of station [cm] - fvec fZthick = undef::kFvc; ///< z thickness of the station [cm] - fvec Rmin = undef::kFvc; ///< min radius of the station [cm] - fvec Rmax = undef::kFvc; ///< max radius of the station [cm] + fvec Xmax = undef::kFvc; ///< min radius of the station [cm] + fvec Ymax = undef::kFvc; ///< max radius of the station [cm] L1FieldSlice fieldSlice {}; @@ -44,9 +43,8 @@ public: ar& fieldStatus; ar& fZ; - ar& fZthick; - ar& Rmin; - ar& Rmax; + ar& Xmax; + ar& Ymax; ar& fieldSlice; } diff --git a/reco/L1/L1Algo/utils/CaUvConverter.cxx b/reco/L1/L1Algo/utils/CaUvConverter.cxx index 4eac026d647c7c0b4ff98eaf216898da46590b5f..6767a2b2556bd0e79fae25d3f6be0028d4bf2c28 100644 --- a/reco/L1/L1Algo/utils/CaUvConverter.cxx +++ b/reco/L1/L1Algo/utils/CaUvConverter.cxx @@ -1,6 +1,6 @@ -/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt +/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt SPDX-License-Identifier: GPL-3.0-only - Authors: Sergey Gorbunov, Sergei Zharko [committer] */ + Authors: Sergey Gorbunov [committer] */ #include "CaUvConverter.h" diff --git a/reco/L1/L1Algo/utils/CaUvConverter.h b/reco/L1/L1Algo/utils/CaUvConverter.h index 442a60b98734f4f017dcb2c0598172ce58a53313..9b6e519435a3eb915eabef4988740be6689f367e 100644 --- a/reco/L1/L1Algo/utils/CaUvConverter.h +++ b/reco/L1/L1Algo/utils/CaUvConverter.h @@ -1,6 +1,6 @@ -/* Copyright (C) 2007-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt +/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt SPDX-License-Identifier: GPL-3.0-only - Authors: Sergey Gorbunov [committer], Igor Kulakov, Sergei Zharko */ + Authors: Sergey Gorbunov [committer] */ #ifndef CaUvConverter_h #define CaUvConverter_h 1 diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx index f24ec91ca557f931b72fb0bc684aae120e29d3c3..400df85bacb4805c3de73fce8b246266033f5f62 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx @@ -593,7 +593,7 @@ void L1AlgoDraw::DrawInputHits() TLine* line = new TLine(); line->SetLineColor(StaColor); - line->DrawLine(st.fZ[0], -st.Rmax[0], st.fZ[0], st.Rmax[0]); + line->DrawLine(st.fZ[0], -st.Ymax[0], st.fZ[0], st.Ymax[0]); TPolyMarker* pmyz = new TPolyMarker(n_poly, z_poly, y_poly); pmyz->SetMarkerColor(mcolor[ista]); @@ -609,7 +609,7 @@ void L1AlgoDraw::DrawInputHits() XZ->cd(); - line->DrawLine(st.fZ[0], -st.Rmax[0], st.fZ[0], st.Rmax[0]); + line->DrawLine(st.fZ[0], -st.Xmax[0], st.fZ[0], st.Xmax[0]); TPolyMarker* pmxz = new TPolyMarker(n_poly, z_poly, x_poly); pmxz->SetMarkerColor(mcolor[ista]); @@ -625,7 +625,7 @@ void L1AlgoDraw::DrawInputHits() YX->cd(); - TEllipse* ellipse = new TEllipse(0.0, 0.0, st.Rmax[0]); + TEllipse* ellipse = new TEllipse(0.0, 0.0, st.Xmax[0]); ellipse->SetLineColor(StaColor); ellipse->SetFillStyle(0); ellipse->Draw(); @@ -714,7 +714,7 @@ void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* TLine* line = new TLine(); line->SetLineColor(StaColor); - line->DrawLine(st.fZ[0], -st.Rmax[0], st.fZ[0], st.Rmax[0]); + line->DrawLine(st.fZ[0], -st.Ymax[0], st.fZ[0], st.Ymax[0]); TPolyMarker* pmyz = new TPolyMarker(n_poly, z_poly, y_poly); pmyz->SetMarkerColor(mcolor[ista]); @@ -730,7 +730,7 @@ void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* XZ->cd(); - line->DrawLine(st.fZ[0], -st.Rmax[0], st.fZ[0], st.Rmax[0]); + line->DrawLine(st.fZ[0], -st.Xmax[0], st.fZ[0], st.Xmax[0]); TPolyMarker* pmxz = new TPolyMarker(n_poly, z_poly, x_poly); pmxz->SetMarkerColor(mcolor[ista]); @@ -746,7 +746,7 @@ void L1AlgoDraw::DrawRestHits(L1HitIndex_t* StsRestHitsStartIndex, L1HitIndex_t* YX->cd(); - TEllipse* ellipse = new TEllipse(0.0, 0.0, st.Rmax[0]); + TEllipse* ellipse = new TEllipse(0.0, 0.0, st.Xmax[0]); ellipse->SetLineColor(StaColor); ellipse->SetFillStyle(0); ellipse->Draw(); diff --git a/reco/L1/qa/CbmCaInputQaMuch.cxx b/reco/L1/qa/CbmCaInputQaMuch.cxx index 4cc613df15e3d47125746511c654a6ff1fb90983..1d92dff15f6f45cfe4b1d982d6f6cfae60b4d08f 100644 --- a/reco/L1/qa/CbmCaInputQaMuch.cxx +++ b/reco/L1/qa/CbmCaInputQaMuch.cxx @@ -67,7 +67,7 @@ bool CbmCaInputQaMuch::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; })) { @@ -319,7 +319,7 @@ void CbmCaInputQaMuch::FillHistograms() fvph_hit_xpos_vs_zpos[iSt]->Fill(zHit, xHit); fvph_hit_ypos_vs_zpos[iSt]->Fill(zHit, yHit); - fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZ(iSt)); + fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZref(iSt)); fvph_hit_dx[iSt]->Fill(dxHit); fvph_hit_dy[iSt]->Fill(dyHit); @@ -583,22 +583,6 @@ InitStatus CbmCaInputQaMuch::InitCanvases() pc_hit_ypos_vs_xpos->cd(iSt + 1); fvph_hit_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); @@ -636,10 +620,10 @@ InitStatus CbmCaInputQaMuch::InitCanvases() fvph_hit_xpos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetXmax(iSt); + double stHmax = +fpDetInterface->GetXmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -654,10 +638,10 @@ InitStatus CbmCaInputQaMuch::InitCanvases() fvph_hit_ypos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetYmax(iSt); + double stHmax = +fpDetInterface->GetYmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -682,21 +666,6 @@ InitStatus CbmCaInputQaMuch::InitCanvases() pc_point_ypos_vs_xpos->cd(iSt + 1); fvph_point_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); @@ -717,10 +686,10 @@ InitStatus CbmCaInputQaMuch::InitCanvases() fvph_point_xpos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetXmax(iSt); + double stHmax = +fpDetInterface->GetXmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -736,10 +705,10 @@ InitStatus CbmCaInputQaMuch::InitCanvases() fvph_point_ypos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetYmax(iSt); + double stHmax = +fpDetInterface->GetYmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); diff --git a/reco/L1/qa/CbmCaInputQaTof.cxx b/reco/L1/qa/CbmCaInputQaTof.cxx index b2af2292187afa1fc01c16d3e6f03bb71b69e21d..4feb827090073de8ea62d87657ba92c3352d98fa 100644 --- a/reco/L1/qa/CbmCaInputQaTof.cxx +++ b/reco/L1/qa/CbmCaInputQaTof.cxx @@ -71,7 +71,7 @@ bool CbmCaInputQaTof::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; })) { @@ -329,7 +329,7 @@ void CbmCaInputQaTof::FillHistograms() fvph_hit_xpos_vs_zpos[iSt]->Fill(zHit, xHit); fvph_hit_ypos_vs_zpos[iSt]->Fill(zHit, yHit); - fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZ(iSt)); + fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZref(iSt)); fvph_hit_dx[iSt]->Fill(dxHit); fvph_hit_dy[iSt]->Fill(dyHit); @@ -593,8 +593,8 @@ int CbmCaInputQaTof::GetStationID(const CbmTofPoint* pPoint) const int iStSelect = -1; // We select the station, which center is closest to the MC point for (int iSt = 0; iSt < fpDetInterface->GetNtrackingStations(); ++iSt) { - if (std::fabs(pPoint->GetZ() - fpDetInterface->GetZ(iSt)) < dist) { - dist = std::fabs(pPoint->GetZ() - fpDetInterface->GetZ(iSt)); + if (std::fabs(pPoint->GetZ() - fpDetInterface->GetZref(iSt)) < dist) { + dist = std::fabs(pPoint->GetZ() - fpDetInterface->GetZref(iSt)); iStSelect = iSt; } } @@ -676,22 +676,6 @@ InitStatus CbmCaInputQaTof::InitCanvases() pc_hit_ypos_vs_xpos->cd(iSt + 1); fvph_hit_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); @@ -729,10 +713,10 @@ InitStatus CbmCaInputQaTof::InitCanvases() fvph_hit_xpos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetXmax(iSt); + double stHmax = +fpDetInterface->GetXmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -747,10 +731,10 @@ InitStatus CbmCaInputQaTof::InitCanvases() fvph_hit_ypos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetYmax(iSt); + double stHmax = +fpDetInterface->GetYmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -775,21 +759,6 @@ InitStatus CbmCaInputQaTof::InitCanvases() pc_point_ypos_vs_xpos->cd(iSt + 1); fvph_point_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); @@ -810,10 +779,10 @@ InitStatus CbmCaInputQaTof::InitCanvases() fvph_point_xpos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetXmax(iSt); + double stHmax = +fpDetInterface->GetXmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); @@ -829,10 +798,10 @@ InitStatus CbmCaInputQaTof::InitCanvases() fvph_point_ypos_vs_zpos[nSt]->DrawCopy("colz", ""); for (int iSt = 0; iSt < nSt; ++iSt) { // Station positions in detector IFS - double stZmin = fpDetInterface->GetZ(iSt) - 0.5 * fpDetInterface->GetThickness(iSt); - double stZmax = fpDetInterface->GetZ(iSt) + 0.5 * fpDetInterface->GetThickness(iSt); - double stHmin = -fpDetInterface->GetRmax(iSt); - double stHmax = +fpDetInterface->GetRmax(iSt); + double stZmin = fpDetInterface->GetZmin(iSt); + double stZmax = fpDetInterface->GetZmax(iSt); + double stHmin = -fpDetInterface->GetYmax(iSt); + double stHmax = +fpDetInterface->GetYmax(iSt); auto* pBox = new TBox(stZmin, stHmin, stZmax, stHmax); pBox->SetLineWidth(contWidth); diff --git a/reco/L1/qa/CbmCaInputQaTrd.cxx b/reco/L1/qa/CbmCaInputQaTrd.cxx index 1a77f6d96a51c94e1eefd080081d4859dc01ffac..c9efb402e48a18f30ad82015f2b7326d22054471 100644 --- a/reco/L1/qa/CbmCaInputQaTrd.cxx +++ b/reco/L1/qa/CbmCaInputQaTrd.cxx @@ -67,7 +67,7 @@ bool CbmCaInputQaTrd::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; })) { @@ -320,7 +320,7 @@ void CbmCaInputQaTrd::FillHistograms() fvph_hit_xpos_vs_zpos[iSt]->Fill(zHit, xHit); fvph_hit_ypos_vs_zpos[iSt]->Fill(zHit, yHit); - fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZ(iSt)); + fvph_hit_station_delta_z[iSt]->Fill(zHit - fpDetInterface->GetZref(iSt)); fvph_hit_dx[iSt]->Fill(dxHit); fvph_hit_dy[iSt]->Fill(dyHit); @@ -553,21 +553,6 @@ InitStatus CbmCaInputQaTrd::InitCanvases() fvph_hit_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); @@ -614,21 +599,6 @@ InitStatus CbmCaInputQaTrd::InitCanvases() pc_point_ypos_vs_xpos->cd(iSt + 1); fvph_point_ypos_vs_xpos[iSt]->DrawCopy("colz", ""); - // Reference size of the station saved to the detector interface - auto* pInnerCircle = new TEllipse(0., 0., fpDetInterface->GetRmin(iSt)); - pInnerCircle->SetLineWidth(contWidth); - pInnerCircle->SetLineStyle(contStyle); - pInnerCircle->SetLineColor(contColor); - pInnerCircle->SetFillStyle(contFill); - pInnerCircle->Draw("SAME"); - - auto* pOuterCircle = new TEllipse(0., 0., fpDetInterface->GetRmax(iSt)); - pOuterCircle->SetLineWidth(contWidth); - pOuterCircle->SetLineStyle(contStyle); - pOuterCircle->SetLineColor(contColor); - pOuterCircle->SetFillStyle(contFill); - pOuterCircle->Draw("SAME"); - // Square boarders of station, which are used for the field approximation double stXmin = +fpDetInterface->GetXmax(iSt); double stXmax = -fpDetInterface->GetXmax(iSt); diff --git a/reco/L1/qa/CbmTrackerInputQaTof.cxx b/reco/L1/qa/CbmTrackerInputQaTof.cxx index 5f374d598320bd84558f1902e48d0da08f17b2a7..62a99819c8b0a928a504058e5a26198f80567b19 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; } } @@ -400,7 +400,7 @@ InitStatus CbmTrackerInputQaTof::GeometryQa() // 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))) { diff --git a/reco/L1/utils/CbmCaIdealHitProducerDet.h b/reco/L1/utils/CbmCaIdealHitProducerDet.h index 51e467223562a356eac42f6d8acdd4d56662a2dc..e7c5475ae3f8e6598a4f1af87eb13857c4fdc498 100644 --- a/reco/L1/utils/CbmCaIdealHitProducerDet.h +++ b/reco/L1/utils/CbmCaIdealHitProducerDet.h @@ -53,7 +53,7 @@ #include <yaml-cpp/yaml.h> #include "CaAlgoRandom.h" -#include "L1Algo/utils/CaUvConverter.h" +#include "CaUvConverter.h" #include "L1Constants.h" #include "L1Def.h" #include "L1Undef.h"