1919#include < cassert>
2020#include < iostream>
2121
22- #include < fmt/format.h>
22+ #ifdef OPTIMISATION_OUTPUT
23+ #include < format>
24+ #endif
2325
2426#include " CommonConstants/MathConstants.h"
2527#include " DetectorsBase/Propagator.h"
@@ -38,7 +40,7 @@ using o2::base::PropagatorF;
3840
3941namespace
4042{
41- float Sq (float q)
43+ inline float Sq (float q)
4244{
4345 return q * q;
4446}
@@ -57,7 +59,7 @@ void TrackerTraits::computeLayerTracklets(const int iteration, int iROFslice, in
5759
5860#ifdef OPTIMISATION_OUTPUT
5961 static int iter{0 };
60- std::ofstream off (fmt ::format (" tracklets{}.txt" , iter++));
62+ std::ofstream off (std ::format (" tracklets{}.txt" , iter++));
6163#endif
6264
6365 for (int iLayer = 0 ; iLayer < mTrkParams [iteration].TrackletsPerRoad (); ++iLayer) {
@@ -173,7 +175,7 @@ void TrackerTraits::computeLayerTracklets(const int iteration, int iROFslice, in
173175 break ;
174176 }
175177 }
176- off << fmt ::format (" {}\t {:d}\t {}\t {}\t {}\t {}" , iLayer, label.isValid (), (tanLambda * (nextCluster.radius - currentCluster.radius ) + currentCluster.zCoordinate - nextCluster.zCoordinate ) / sigmaZ, tanLambda, resolution, sigmaZ) << std::endl;
178+ off << std ::format (" {}\t {:d}\t {}\t {}\t {}\t {}" , iLayer, label.isValid (), (tanLambda * (nextCluster.radius - currentCluster.radius ) + currentCluster.zCoordinate - nextCluster.zCoordinate ) / sigmaZ, tanLambda, resolution, sigmaZ) << std::endl;
177179#endif
178180
179181 if (deltaZ / sigmaZ < mTrkParams [iteration].NSigmaCut &&
@@ -270,7 +272,7 @@ void TrackerTraits::computeLayerCells(const int iteration)
270272{
271273#ifdef OPTIMISATION_OUTPUT
272274 static int iter{0 };
273- std::ofstream off (fmt ::format (" cells{}.txt" , iter++));
275+ std::ofstream off (std ::format (" cells{}.txt" , iter++));
274276#endif
275277
276278 for (int iLayer = 0 ; iLayer < mTrkParams [iteration].CellsPerRoad (); ++iLayer) {
@@ -318,7 +320,7 @@ void TrackerTraits::computeLayerCells(const int iteration)
318320#ifdef OPTIMISATION_OUTPUT
319321 bool good{tf->getTrackletsLabel (iLayer)[iTracklet] == tf->getTrackletsLabel (iLayer + 1 )[iNextTracklet]};
320322 float signedDelta{currentTracklet.tanLambda - nextTracklet.tanLambda };
321- off << fmt ::format (" {}\t {:d}\t {}\t {}\t {}\t {}" , iLayer, good, signedDelta, signedDelta / (mTrkParams [iteration].CellDeltaTanLambdaSigma ), tanLambda, resolution) << std::endl;
323+ off << std ::format (" {}\t {:d}\t {}\t {}\t {}\t {}" , iLayer, good, signedDelta, signedDelta / (mTrkParams [iteration].CellDeltaTanLambdaSigma ), tanLambda, resolution) << std::endl;
322324#endif
323325
324326 if (deltaTanLambda / mTrkParams [iteration].CellDeltaTanLambdaSigma < mTrkParams [iteration].NSigmaCut ) {
@@ -402,7 +404,7 @@ void TrackerTraits::computeLayerCells(const int iteration)
402404void TrackerTraits::findCellsNeighbours (const int iteration)
403405{
404406#ifdef OPTIMISATION_OUTPUT
405- std::ofstream off (fmt ::format (" cellneighs{}.txt" , iteration));
407+ std::ofstream off (std ::format (" cellneighs{}.txt" , iteration));
406408#endif
407409 for (int iLayer{0 }; iLayer < mTrkParams [iteration].CellsPerRoad () - 1 ; ++iLayer) {
408410 const int nextLayerCellsNum{static_cast <int >(mTimeFrame ->getCells ()[iLayer + 1 ].size ())};
@@ -439,7 +441,7 @@ void TrackerTraits::findCellsNeighbours(const int iteration)
439441
440442#ifdef OPTIMISATION_OUTPUT
441443 bool good{mTimeFrame ->getCellsLabel (iLayer)[iCell] == mTimeFrame ->getCellsLabel (iLayer + 1 )[iNextCell]};
442- off << fmt ::format (" {}\t {:d}\t {}" , iLayer, good, chi2) << std::endl;
444+ off << std ::format (" {}\t {:d}\t {}" , iLayer, good, chi2) << std::endl;
443445#endif
444446
445447 if (chi2 > mTrkParams [0 ].MaxChi2ClusterAttachment ) {
@@ -469,6 +471,7 @@ void TrackerTraits::findCellsNeighbours(const int iteration)
469471
470472void TrackerTraits::processNeighbours (int iLayer, int iLevel, const std::vector<CellSeed>& currentCellSeed, const std::vector<int >& currentCellId, std::vector<CellSeed>& updatedCellSeeds, std::vector<int >& updatedCellsIds)
471473{
474+ bool print = iLayer == 3 && iLevel == 2 ;
472475 if (iLevel < 2 || iLayer < 1 ) {
473476 std::cout << " Error: layer " << iLayer << " or level " << iLevel << " cannot be processed by processNeighbours" << std::endl;
474477 exit (1 );
0 commit comments