From ecb83b7f76559ef75f86a09b6e7a1855938c6c52 Mon Sep 17 00:00:00 2001
From: christos <christos@cern.ch>
Date: Tue, 28 Dec 2021 22:14:39 +0100
Subject: [PATCH] BFieldMesh expand comments

---
 .../MagFieldElements/BFieldMesh.h             | 44 ++++++++++---------
 .../MagFieldElements/BFieldZone.h             | 27 +++++++-----
 2 files changed, 41 insertions(+), 30 deletions(-)

diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
index f5b91b55ea56..5cf9f3d53d1b 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldMesh.h
@@ -7,7 +7,7 @@
  * @class BFieldMesh
  *
  * A 3-d mesh (axes z,r,phi) representing a simple field map.
- * 
+ *
  * The mesh is made up from 'cells'
  * We hold numz, numr , numphi positions defining
  * the corners of the cells.
@@ -15,12 +15,15 @@
  * Then we have
  * numz X numr X numphi field values at these corners
  *
- * The field type is templated - it may be short (for the toroid)
- * or double (for the solenoid)
+ * The field type is templated - it is short for both solenoid and toroid
+ * for the nominal case.
+ * There is a special case for BFieldSolenoid (not used in the nominal case)
+ * which allows a tilt  between the nominal and 'tilted' solenoid fields
+ * and uses double.
  *
- * Masahiro Morii, Harvard University
+ * @author Masahiro Morii, Harvard University
  *
- * AthenaMT : RD Schaffer , Christos Anastopoulos
+ * @author RD Schaffer , Christos Anastopoulos (Athena MT)
  */
 //
 #ifndef BFIELDMESH_H
@@ -82,37 +85,38 @@ public:
                 double phi,
                 BFieldCache& cache,
                 double scaleFactor = 1.0) const;
-  /* @brief get the bfield given a point in xyz*/
+  /** @brief get the bfield given a point in xyz*/
   void getB(const double* ATH_RESTRICT xyz,
             double* ATH_RESTRICT B,
             double* ATH_RESTRICT deriv = nullptr) const;
-  /* @brief minimum in axis*/
+  /** @brief minimum for a particular axis = 0 (z), 1 (r), 2 (phi)*/
   double min(size_t axis) const;
-  /* @brief maximum in axis*/
+  /** @brief maximum or a particular axis = 0 (z), 1 (r), 2 (phi)*/
   double max(size_t axis) const;
-  /* @brief minimum in z*/
+  /** @brief minimum in z*/
   double zmin() const;
-  /* @brief maximum in z*/
+  /** @brief maximum in z*/
   double zmax() const;
-  /* @brief minimun in r*/
+  /** @brief minimun in r*/
   double rmin() const;
-  /* @brief maximum in r*/
+  /** @brief maximum in r*/
   double rmax() const;
-  /* @brief minimun in phi*/
+  /** @brief minimun in phi*/
   double phimin() const;
-  /* @brief maximum in phi*/
+  /** @brief maximum in phi*/
   double phimax() const;
-  /* @brief number of corner cell coordinates for axis*/
+  /** @brief number of cells along each axis = 0 (z), 1 (r), 2 (phi)*/
   unsigned nmesh(size_t axis) const;
-  /* @brief coordinate at axis of cell corner */
+  /** @brief coordinate along axis (0 (z), 1 (r), 2 (phi)) of the cell at index
+   * (0 to nmesh-1)*/
   double mesh(size_t axis, size_t index) const;
-  /* @brief field entries in mesh*/
+  /** @brief field entries in mesh*/
   unsigned nfield() const;
-  /* @brief field vector at cell corner at index*/
+  /** @brief field vector at cell corner at index*/
   const BFieldVector<T>& field(size_t index) const;
-  /* @brief scale*/
+  /** @brief scale*/
   double bscale() const;
-  /* @brief memory size*/
+  /** @brief memory size*/
   int memSize() const;
 
 protected:
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldZone.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldZone.h
index f9e44f142560..20e7d28ec00e 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldZone.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldZone.h
@@ -2,14 +2,21 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//
-// BFieldZone.h
-//
-// A "zone" inside the toroid field map
-//
-// Masahiro Morii, Harvard University
-//
-//
+/**
+ *
+ * @class BFieldZone.h
+ *
+ * @brief
+ * A "zone" inside the field map
+ * Expands BFieldMesh<short>
+ * adding an id
+ * and a vector of current conductors.
+ *
+ * @author Masahiro Morii, Harvard University
+ *
+ * @author RD Schaffer , Christos Anastopoulos (Athena MT)
+ */
+
 #ifndef BFIELDZONE_H
 #define BFIELDZONE_H
 
@@ -30,9 +37,9 @@ public:
              double phimin,
              double phimax,
              double scale);
-  // add elements to vectors
+  /** @brief add elements to the current conductors vector*/
   void appendCond(const BFieldCond& cond);
-  // compute Biot-Savart magnetic field and add to B[3]
+  /** @brief compute Biot-Savart magnetic field and add to B[3]*/
   void addBiotSavart(const double* ATH_RESTRICT xyz,
                      double* ATH_RESTRICT B,
                      double* ATH_RESTRICT deriv = nullptr) const;
-- 
GitLab