From 9d08f7a4acc3eb1b2629b33d788b64a085d54ad8 Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Tue, 10 Sep 2024 02:53:08 +0200
Subject: [PATCH] Tracking detector interfaces: cosmetics

---
 core/detectors/much/CbmMuchTrackingInterface.cxx |  9 ++++-----
 core/detectors/much/CbmMuchTrackingInterface.h   |  8 ++++----
 core/detectors/mvd/CbmMvdTrackingInterface.cxx   |  9 ++++-----
 core/detectors/mvd/CbmMvdTrackingInterface.h     |  8 ++++----
 core/detectors/sts/CbmStsTrackingInterface.cxx   |  9 ++++-----
 core/detectors/sts/CbmStsTrackingInterface.h     | 10 +++++-----
 core/detectors/tof/CbmTofTrackingInterface.cxx   |  9 ++++-----
 core/detectors/tof/CbmTofTrackingInterface.h     |  8 ++++----
 core/detectors/trd/CbmTrdTrackingInterface.cxx   |  9 ++++-----
 core/detectors/trd/CbmTrdTrackingInterface.h     |  4 ++--
 10 files changed, 39 insertions(+), 44 deletions(-)

diff --git a/core/detectors/much/CbmMuchTrackingInterface.cxx b/core/detectors/much/CbmMuchTrackingInterface.cxx
index 60a9f61984..0857f5f7b3 100644
--- a/core/detectors/much/CbmMuchTrackingInterface.cxx
+++ b/core/detectors/much/CbmMuchTrackingInterface.cxx
@@ -17,11 +17,10 @@
 
 ClassImp(CbmMuchTrackingInterface)
 
-  CbmMuchTrackingInterface* CbmMuchTrackingInterface::fpInstance = nullptr;
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-CbmMuchTrackingInterface::CbmMuchTrackingInterface() : FairTask("CbmMuchTrackingInterface")
+  // ---------------------------------------------------------------------------------------------------------------------
+  //
+  CbmMuchTrackingInterface::CbmMuchTrackingInterface()
+  : FairTask("CbmMuchTrackingInterface")
 {
   if (!fpInstance) { fpInstance = this; }
 }
diff --git a/core/detectors/much/CbmMuchTrackingInterface.h b/core/detectors/much/CbmMuchTrackingInterface.h
index a9d6163ae0..ae1d5a1d2d 100644
--- a/core/detectors/much/CbmMuchTrackingInterface.h
+++ b/core/detectors/much/CbmMuchTrackingInterface.h
@@ -65,7 +65,7 @@ public:
   static CbmMuchTrackingInterface* Instance() { return fpInstance; }
 
   /// @brief Gets name of this subsystem
-  std::string GetDetectorName() const { return "MuCh"; }
+  std::string GetDetectorName() const override { return "MuCh"; }
 
   /// @brief  Gets a tracking station of a CbmHit
   /// @param  hit  A pointer to CbmHit
@@ -100,7 +100,7 @@ public:
   /// @return [phiU, phiV] - Stereo angles [rad]
   std::tuple<double, double> GetStereoAnglesSensor(int /*address*/) const override
   {
-    return std::tuple(0., TMath::Pi() / 2.);
+    return std::tuple(0., TMath::Pi() * 0.5);
   }
 
   /// @brief FairTask: sets parameter containers up
@@ -120,13 +120,13 @@ public:
   /// @param stationId  Index of the tracking station
   std::pair<int, int> ConvTrackingStationId2MuchId(int traStationId) const;
 
-  static CbmMuchTrackingInterface* fpInstance;  ///< Instance of the class
+  inline static CbmMuchTrackingInterface* fpInstance{nullptr};  ///< Instance of the class
 
   CbmMuchGeoScheme* fGeoScheme {nullptr};  ///< MuCh geometry scheme instance
 
   std::vector<int> fFirstTrackingStation {};
 
-  ClassDef(CbmMuchTrackingInterface, 0);
+  ClassDefOverride(CbmMuchTrackingInterface, 0);
 };
 
 
diff --git a/core/detectors/mvd/CbmMvdTrackingInterface.cxx b/core/detectors/mvd/CbmMvdTrackingInterface.cxx
index 85898f50bd..94687e635a 100644
--- a/core/detectors/mvd/CbmMvdTrackingInterface.cxx
+++ b/core/detectors/mvd/CbmMvdTrackingInterface.cxx
@@ -19,11 +19,10 @@
 
 ClassImp(CbmMvdTrackingInterface)
 
-  CbmMvdTrackingInterface* CbmMvdTrackingInterface::fpInstance = nullptr;
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-CbmMvdTrackingInterface::CbmMvdTrackingInterface() : FairTask("CbmMvdTrackingInterface")
+  // ---------------------------------------------------------------------------------------------------------------------
+  //
+  CbmMvdTrackingInterface::CbmMvdTrackingInterface()
+  : FairTask("CbmMvdTrackingInterface")
 {
   if (!fpInstance) { fpInstance = this; }
 }
diff --git a/core/detectors/mvd/CbmMvdTrackingInterface.h b/core/detectors/mvd/CbmMvdTrackingInterface.h
index ec899d06a4..aa037c4c16 100644
--- a/core/detectors/mvd/CbmMvdTrackingInterface.h
+++ b/core/detectors/mvd/CbmMvdTrackingInterface.h
@@ -56,7 +56,7 @@ public:
   CbmMvdTrackingInterface& operator=(CbmMvdTrackingInterface&&) = delete;
 
   /// @brief Gets name of this subsystem
-  std::string GetDetectorName() const { return "MVD"; }
+  std::string GetDetectorName() const override { return "MVD"; }
 
   /// --- 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])
@@ -116,7 +116,7 @@ public:
   /// @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
-  bool IsTimeInfoProvided(int /*stationId*/) const { return true; }
+  bool IsTimeInfoProvided(int /*stationId*/) const override { return true; }
 
   /// @brief FairTask: ReInit method
   InitStatus ReInit() override;
@@ -125,11 +125,11 @@ public:
   void SetParContainers() override;
 
  private:
-  static CbmMvdTrackingInterface* fpInstance;  ///< Instance of the class
+  inline static CbmMvdTrackingInterface* fpInstance{nullptr};  ///< Instance of the class
 
   const CbmMvdStationPar* fMvdStationPar {nullptr};  ///< Pointer to the Mvd station parameters
 
-  ClassDef(CbmMvdTrackingInterface, 0);
+  ClassDefOverride(CbmMvdTrackingInterface, 0);
 };
 
 #endif  // CbmMvdTrackingInterface
diff --git a/core/detectors/sts/CbmStsTrackingInterface.cxx b/core/detectors/sts/CbmStsTrackingInterface.cxx
index e3c9533a35..2eb761ccc1 100644
--- a/core/detectors/sts/CbmStsTrackingInterface.cxx
+++ b/core/detectors/sts/CbmStsTrackingInterface.cxx
@@ -19,11 +19,10 @@
 
 ClassImp(CbmStsTrackingInterface)
 
-  CbmStsTrackingInterface* CbmStsTrackingInterface::fpInstance = nullptr;
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-CbmStsTrackingInterface::CbmStsTrackingInterface() : FairTask("CbmStsTrackingInterface")
+  // ---------------------------------------------------------------------------------------------------------------------
+  //
+  CbmStsTrackingInterface::CbmStsTrackingInterface()
+  : FairTask("CbmStsTrackingInterface")
 {
   if (!fpInstance) { fpInstance = this; }
 }
diff --git a/core/detectors/sts/CbmStsTrackingInterface.h b/core/detectors/sts/CbmStsTrackingInterface.h
index c1a4ae8222..ce745604be 100644
--- a/core/detectors/sts/CbmStsTrackingInterface.h
+++ b/core/detectors/sts/CbmStsTrackingInterface.h
@@ -116,13 +116,13 @@ public:
     return CbmStsSetup::Instance()->GetStation(stationId);
   }
 
-  static CbmStsTrackingInterface* fpInstance;
+  inline static CbmStsTrackingInterface* fpInstance{nullptr};
 
-  CbmStsParSetSensor* fStsParSetSensor {nullptr};          ///<
-  CbmStsParSetSensorCond* fStsParSetSensorCond {nullptr};  ///<
-  CbmStsParSetModule* fStsParSetModule {nullptr};          ///<
+  CbmStsParSetSensor* fStsParSetSensor{nullptr};          ///<
+  CbmStsParSetSensorCond* fStsParSetSensorCond{nullptr};  ///<
+  CbmStsParSetModule* fStsParSetModule{nullptr};          ///<
 
-  ClassDef(CbmStsTrackingInterface, 0);
+  ClassDefOverride(CbmStsTrackingInterface, 0);
 };
 
 #endif  // CbmStsTrackingInterface
diff --git a/core/detectors/tof/CbmTofTrackingInterface.cxx b/core/detectors/tof/CbmTofTrackingInterface.cxx
index ecc9928db2..b0d0550973 100644
--- a/core/detectors/tof/CbmTofTrackingInterface.cxx
+++ b/core/detectors/tof/CbmTofTrackingInterface.cxx
@@ -22,11 +22,10 @@
 
 ClassImp(CbmTofTrackingInterface)
 
-  CbmTofTrackingInterface* CbmTofTrackingInterface::fpInstance = nullptr;
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-CbmTofTrackingInterface::CbmTofTrackingInterface() : FairTask("CbmTofTrackingInterface")
+  // ---------------------------------------------------------------------------------------------------------------------
+  //
+  CbmTofTrackingInterface::CbmTofTrackingInterface()
+  : FairTask("CbmTofTrackingInterface")
 {
   if (!fpInstance) {
     fpInstance = this;
diff --git a/core/detectors/tof/CbmTofTrackingInterface.h b/core/detectors/tof/CbmTofTrackingInterface.h
index cc970114be..bb2ba3e349 100644
--- a/core/detectors/tof/CbmTofTrackingInterface.h
+++ b/core/detectors/tof/CbmTofTrackingInterface.h
@@ -51,7 +51,7 @@ class CbmTofTrackingInterface : public FairTask, public CbmTrackingDetectorInter
   CbmTofTrackingInterface& operator=(CbmTofTrackingInterface&&) = delete;
 
   /// @brief Gets name of this subsystem
-  std::string GetDetectorName() const { return "TOF"; }
+  std::string GetDetectorName() const override { return "TOF"; }
 
   /// @brief  Gets stereo angles of the two independent measured coordinates
   /// @note   The tracking does not use this method. It is only used by the QA task.
@@ -59,7 +59,7 @@ class CbmTofTrackingInterface : public FairTask, public CbmTrackingDetectorInter
   /// @return [phiU, phiV] - Stereo angles [rad]
   std::tuple<double, double> GetStereoAnglesSensor(int /*address*/) const override
   {
-    return std::tuple(0., TMath::Pi() / 2.);
+    return std::tuple(0., TMath::Pi() * 0.5);
   }
 
   /// @brief  Gets a tracking station of a ToF hit
@@ -113,7 +113,7 @@ class CbmTofTrackingInterface : public FairTask, public CbmTrackingDetectorInter
   void SetParContainers() override;
 
  private:
-  static CbmTofTrackingInterface* fpInstance;  ///< Instance of the class
+  inline static CbmTofTrackingInterface* fpInstance{nullptr};  ///< Instance of the class
 
   CbmTofDigiPar* fDigiPar{nullptr};
   CbmTofDigiBdfPar* fDigiBdfPar{nullptr};
@@ -122,7 +122,7 @@ class CbmTofTrackingInterface : public FairTask, public CbmTrackingDetectorInter
   std::vector<double> fTofStationZMin{};  ///< Lower bounds of TOF stations along z-axis [cm]
   std::vector<double> fTofStationZMax{};  ///< Upper bounds of TOF stations along z-axis [cm]
 
-  ClassDef(CbmTofTrackingInterface, 0);
+  ClassDefOverride(CbmTofTrackingInterface, 0);
 };
 
 #endif  // CbmTofTrackingInterface
diff --git a/core/detectors/trd/CbmTrdTrackingInterface.cxx b/core/detectors/trd/CbmTrdTrackingInterface.cxx
index 8369859c83..59b3652323 100644
--- a/core/detectors/trd/CbmTrdTrackingInterface.cxx
+++ b/core/detectors/trd/CbmTrdTrackingInterface.cxx
@@ -23,11 +23,10 @@
 
 ClassImp(CbmTrdTrackingInterface)
 
-  CbmTrdTrackingInterface* CbmTrdTrackingInterface::fpInstance = nullptr;
-
-// ---------------------------------------------------------------------------------------------------------------------
-//
-CbmTrdTrackingInterface::CbmTrdTrackingInterface() : FairTask("CbmTrdTrackingInterface")
+  // ---------------------------------------------------------------------------------------------------------------------
+  //
+  CbmTrdTrackingInterface::CbmTrdTrackingInterface()
+  : FairTask("CbmTrdTrackingInterface")
 {
   if (!fpInstance) { fpInstance = this; }
 }
diff --git a/core/detectors/trd/CbmTrdTrackingInterface.h b/core/detectors/trd/CbmTrdTrackingInterface.h
index 16ee4d943f..2d0e600c37 100644
--- a/core/detectors/trd/CbmTrdTrackingInterface.h
+++ b/core/detectors/trd/CbmTrdTrackingInterface.h
@@ -107,12 +107,12 @@ class CbmTrdTrackingInterface : public FairTask, public CbmTrackingDetectorInter
     return static_cast<CbmTrdParModDigi*>(fTrdDigiPar->GetModulePar(fTrdDigiPar->GetModuleId(moduleId)));
   }
 
-  static CbmTrdTrackingInterface* fpInstance;  ///< Instance of the class
+  inline static CbmTrdTrackingInterface* fpInstance{nullptr};  ///< Instance of the class
 
   CbmTrdParSetDigi* fTrdDigiPar{nullptr};
   //CbmTrdParModDigi* fTrdModuleInfo {nullptr};
 
-  ClassDef(CbmTrdTrackingInterface, 0);
+  ClassDefOverride(CbmTrdTrackingInterface, 0);
 };
 
 #endif  // CbmTrdTrackingInterface
-- 
GitLab