@@ -35,7 +35,6 @@ class Segmentation
3535 static std::unique_ptr<o2::iotof::Segmentation> sInstance ;
3636
3737 public:
38- ChipSpecifics mIOTOFSpecsConfig ;
3938 static Segmentation* Instance ();
4039
4140 ~Segmentation () = default ;
@@ -74,7 +73,7 @@ class Segmentation
7473 row = col = -1 ;
7574 return ;
7675 }
77- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
76+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
7877 xRow = getFirstRowCoordinate (subDetectorID) - row * specsConfig.PitchRow ;
7978 zCol = col * specsConfig.PitchCol + getFirstColCoordinate (subDetectorID);
8079 }
@@ -85,7 +84,7 @@ class Segmentation
8584 row = col = -1 ;
8685 return ;
8786 }
88- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
87+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
8988 loc.SetCoordinates (getFirstRowCoordinate (subDetectorID) - row * specsConfig.PitchRow , T (0 .), col * specsConfig.PitchCol + getFirstColCoordinate (subDetectorID));
9089 }
9190 template <typename T = float , typename L = float >
@@ -95,7 +94,7 @@ class Segmentation
9594 row = col = -1 ;
9695 return ;
9796 }
98- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
97+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
9998 loc[0 ] = getFirstRowCoordinate (subDetectorID) - row * specsConfig.PitchRow ;
10099 loc[1 ] = T (0 );
101100 loc[2 ] = col * specsConfig.PitchCol + getFirstColCoordinate (subDetectorID);
@@ -110,7 +109,7 @@ class Segmentation
110109 row = col = -1 ;
111110 return false ;
112111 }
113- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
112+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
114113 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols ) {
115114 return false ;
116115 }
@@ -125,7 +124,7 @@ class Segmentation
125124 row = col = -1 ;
126125 return false ;
127126 }
128- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
127+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
129128 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols ) {
130129 return false ;
131130 }
@@ -139,7 +138,7 @@ class Segmentation
139138 row = col = -1 ;
140139 return false ;
141140 }
142- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
141+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
143142 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols ) {
144143 return false ;
145144 }
@@ -149,17 +148,15 @@ class Segmentation
149148
150149 float getFirstRowCoordinate (const int subDetectorID)
151150 {
152- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
151+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
153152 return 0.5 * ((specsConfig.ActiveMatrixSizeRows () - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut ) - specsConfig.PitchRow );
154153 }
155154 float getFirstColCoordinate (const int subDetectorID)
156155 {
157- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
156+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
158157 return 0.5 * (specsConfig.PitchCol - specsConfig.ActiveMatrixSizeCols ());
159158 }
160159
161- void print ();
162-
163160 ClassDefNV (Segmentation, 1 ); // Segmentation class upgrade pixels
164161};
165162
@@ -171,7 +168,7 @@ inline void Segmentation::localToDetectorUnchecked(float xRow, float zCol, int&
171168 iRow = iCol = -1 ;
172169 return ;
173170 }
174- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
171+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
175172 xRow = 0.5 * (specsConfig.ActiveMatrixSizeRows () - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut ) - xRow; // coordinate wrt top edge of Active matrix
176173 zCol += 0.5 * specsConfig.ActiveMatrixSizeCols (); // coordinate wrt left edge of Active matrix
177174 iRow = int (xRow / specsConfig.PitchRow );
@@ -197,7 +194,7 @@ inline bool Segmentation::localToDetector(float xRow, float zCol, int& iRow, int
197194 iRow = iCol = -1 ;
198195 return false ;
199196 }
200- const ChipSpecifics & specsConfig = mIOTOFSpecsConfig ;
197+ const auto & specsConfig = ChipSpecificsParam::Instance () ;
201198 xRow = 0.5 * (specsConfig.ActiveMatrixSizeRows () - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut ) - xRow; // coordinate wrt top edge of Active matrix
202199 zCol += 0.5 * specsConfig.ActiveMatrixSizeCols (); // coordinate wrt left edge of Active matrix
203200 if (xRow < 0 || xRow >= specsConfig.ActiveMatrixSizeRows () || zCol < 0 || zCol >= specsConfig.ActiveMatrixSizeCols ()) {
0 commit comments