diff --git a/DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h b/DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h index 8c45d369dd7a9..6b167d6173a03 100644 --- a/DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h +++ b/DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h @@ -55,7 +55,7 @@ class TrackITS : public o2::track::TrackParCov // Bool_t getPhiZat(Float_t r,Float_t &phi,Float_t &z) const; void setClusterIndex(Int_t layer, Int_t index); - void setExternalClusterIndex(Int_t layer, Int_t idx); + void setExternalClusterIndex(Int_t layer, Int_t idx, bool newCluster = false); void resetClusters(); void setChi2(float chi2) { mChi2 = chi2; } diff --git a/DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx b/DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx index 03c33b3c8519b..d59a410b4a0f4 100644 --- a/DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx +++ b/DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx @@ -86,11 +86,13 @@ void TrackITS::setClusterIndex(Int_t l, Int_t i) mIndex[mNClusters++] = idx; } -void TrackITS::setExternalClusterIndex(Int_t layer, Int_t idx) +void TrackITS::setExternalClusterIndex(Int_t layer, Int_t idx, bool newCluster) { //-------------------------------------------------------------------- // Set the cluster index within an external cluster array //-------------------------------------------------------------------- + if (newCluster) + mNClusters++; mIndex[layer] = idx; } diff --git a/DataFormats/Reconstruction/src/Track.cxx b/DataFormats/Reconstruction/src/Track.cxx index c789af0033a73..0f8f7d93e7c67 100644 --- a/DataFormats/Reconstruction/src/Track.cxx +++ b/DataFormats/Reconstruction/src/Track.cxx @@ -141,7 +141,7 @@ bool TrackPar::rotateParam(float alpha) // RS: check if rotation does no invalidate track model (cos(local_phi)>=0, i.e. particle // direction in local frame is along the X axis if ((csp * ca + snp * sa) < 0) { - printf("Rotation failed: local cos(phi) would become %.2f\n", csp * ca + snp * sa); + //printf("Rotation failed: local cos(phi) would become %.2f\n", csp * ca + snp * sa); return false; } // @@ -554,7 +554,7 @@ bool TrackParCov::rotate(float alpha) // RS: check if rotation does no invalidate track model (cos(local_phi)>=0, i.e. particle // direction in local frame is along the X axis if ((csp * ca + snp * sa) < 0) { - printf("Rotation failed: local cos(phi) would become %.2f\n", csp * ca + snp * sa); + //printf("Rotation failed: local cos(phi) would become %.2f\n", csp * ca + snp * sa); return false; } // diff --git a/Detectors/ITSMFT/ITS/reconstruction/CMakeLists.txt b/Detectors/ITSMFT/ITS/reconstruction/CMakeLists.txt index fdd3b99dfe907..69a1baba44782 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/CMakeLists.txt +++ b/Detectors/ITSMFT/ITS/reconstruction/CMakeLists.txt @@ -20,7 +20,6 @@ set(NO_DICT_SRCS # sources not for the dictionary src/CA/PrimaryVertexContext.cxx src/CA/Road.cxx src/CA/Tracker.cxx - src/CA/TrackingUtils.cxx src/CA/Tracklet.cxx src/CA/ClusterLines.cxx src/CA/Vertexer.cxx diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Configuration.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Configuration.h new file mode 100644 index 0000000000000..ae719a549e06d --- /dev/null +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Configuration.h @@ -0,0 +1,112 @@ +// Copyright CERN and copyright holders of ALICE O2. This software is +// distributed under the terms of the GNU General Public License v3 (GPL +// Version 3), copied verbatim in the file "COPYING". +// +// See http://alice-o2.web.cern.ch/license for full licensing information. +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +/// +/// \file Configuration.h +/// \brief +/// + +#ifndef TRACKINGITSU_INCLUDE_CONFIGURATION_H_ +#define TRACKINGITSU_INCLUDE_CONFIGURATION_H_ + +#include +#include +#include + +#include "json.h" + +#include "ITSReconstruction/CA/Constants.h" + +namespace o2 +{ +namespace ITS +{ +namespace CA +{ + +template +class Configuration : public Param +{ + public: + static Configuration& getInstance() + { + static Configuration instance; + return instance; + } + + private: + Configuration() = default; + Configuration(const Configuration&) = delete; + const Configuration& operator=(const Configuration&) = delete; +}; + +struct TrackingParameters { + int CellMinimumLevel(int iteration); + int NumberOfIterations(); + + /// General parameters + int ClusterSharing = 0; + std::vector MinTrackLength = { 7 }; + /// Trackleting cuts + std::vector TrackletMaxDeltaPhi = { 0.3f }; + std::vector> TrackletMaxDeltaZ = { { 0.1f, 0.1f, 0.3f, 0.3f, 0.3f, 0.3f } }; + /// Cell finding cuts + std::vector CellMaxDeltaTanLambda = { 0.025f }; + std::vector> CellMaxDCA = { { 0.05f, 0.04f, 0.05f, 0.2f, 0.4f } }; + std::vector CellMaxDeltaPhi = { 0.14f }; + std::vector> CellMaxDeltaZ = { { 0.2f, 0.4f, 0.5f, 0.6f, 3.0f } }; + /// Neighbour finding cuts + std::vector> NeighbourMaxDeltaCurvature = { { 0.008f, 0.0025f, 0.003f, 0.0035f } }; + std::vector> NeighbourMaxDeltaN = { { 0.002f, 0.0090f, 0.002f, 0.005f } }; +}; + +struct MemoryParameters { + /// Memory coefficients + int MemoryOffset = 256; + std::vector> CellsMemoryCoefficients = { { 2.3208e-08f, 2.104e-08f, 1.6432e-08f, 1.2412e-08f, 1.3543e-08f } }; + std::vector> TrackletsMemoryCoefficients = { { 0.0016353f, 0.0013627f, 0.000984f, 0.00078135f, 0.00057934f, 0.00052217f } }; +}; + +struct IndexTableParameters { + IndexTableParameters(); + void ComputeInverseBinSizes(); + int ZBins = 20; + int PhiBins = 20; + float InversePhiBinSize = 20 / Constants::Math::TwoPi; + std::array InverseZBinSize; +}; + +inline int TrackingParameters::NumberOfIterations() +{ + return MinTrackLength.size(); +} + +inline int TrackingParameters::CellMinimumLevel(int iteration) +{ + return MinTrackLength[iteration] - Constants::ITS::ClustersPerCell + 1; +} + +inline IndexTableParameters::IndexTableParameters() +{ + ComputeInverseBinSizes(); +} + +inline void IndexTableParameters::ComputeInverseBinSizes() +{ + InversePhiBinSize = PhiBins / Constants::Math::TwoPi; + for (int iL = 0; iL < Constants::ITS::LayersNumber; ++iL) { + InverseZBinSize[iL] = 0.5f * ZBins / Constants::ITS::LayersZCoordinate()[iL]; + } +} + +} // namespace CA +} // namespace ITS +} // namespace o2 + +#endif /* TRACKINGITSU_INCLUDE_CONFIGURATION_H_ */ diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Constants.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Constants.h index d69a13139d09b..f92e2c9d3a98e 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Constants.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Constants.h @@ -16,6 +16,7 @@ #define TRACKINGITSU_INCLUDE_CONSTANTS_H_ #include +#include #include "ITSReconstruction/CA/Definitions.h" @@ -44,6 +45,7 @@ constexpr int LayersNumber{ 7 }; constexpr int LayersNumberVertexer{ 3 }; constexpr int TrackletsPerRoad{ LayersNumber - 1 }; constexpr int CellsPerRoad{ LayersNumber - 2 }; +constexpr int ClustersPerCell{ 3 }; constexpr int UnusedIndex{ -1 }; constexpr float Resolution{ 0.0005f }; @@ -57,31 +59,6 @@ GPU_HOST_DEVICE constexpr GPUArray LayersRCoordinate() } } // namespace ITS -namespace Thresholds -{ -GPU_DEVICE constexpr GPUArray TrackletMaxDeltaZThreshold() -{ - return GPUArray{ { 0.1f, 0.1f, 0.3f, 0.3f, 0.3f, 0.3f } }; -} -constexpr float CellMaxDeltaTanLambdaThreshold{ 0.025f }; -GPU_DEVICE constexpr GPUArray CellMaxDeltaZThreshold() -{ - return GPUArray{ { 0.2f, 0.4f, 0.5f, 0.6f, 3.0f } }; -} -GPU_DEVICE constexpr GPUArray CellMaxDistanceOfClosestApproachThreshold() -{ - return GPUArray{ { 0.05f, 0.04f, 0.05f, 0.2f, 0.4f } }; -} -constexpr float CellMaxDeltaPhiThreshold{ 0.14f }; -constexpr float ZCoordinateCut{ 0.5f }; -constexpr float PhiCoordinateCut{ 0.3f }; -constexpr GPUArray NeighbourCellMaxNormalVectorsDelta{ { 0.002f, 0.009f, 0.002f, - 0.005f } }; -constexpr GPUArray NeighbourCellMaxCurvaturesDelta{ { 0.008f, 0.0025f, 0.003f, - 0.0035f } }; -constexpr int CellsMinLevel{ 5 }; -} // namespace Thresholds - namespace IndexTable { constexpr int ZBins{ 20 }; @@ -95,16 +72,6 @@ GPU_HOST_DEVICE constexpr GPUArray InverseZBinSize() } } // namespace IndexTable -namespace Memory -{ -constexpr GPUArray TrackletsMemoryCoefficients{ - { 0.0016353f, 0.0013627f, 0.000984f, 0.00078135f, 0.00057934f, 0.00052217f } -}; -constexpr GPUArray CellsMemoryCoefficients{ { 2.3208e-08f, 2.104e-08f, 1.6432e-08f, - 1.2412e-08f, 1.3543e-08f } }; -constexpr int Offset = 256; /// Required for low multiplicity events -} // namespace Memory - namespace PDGCodes { constexpr int PionCode{ 211 }; diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Definitions.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Definitions.h index ca2e8fade0192..d908ce9d529e0 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Definitions.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Definitions.h @@ -17,6 +17,17 @@ #include +#ifdef CA_DEBUG +#define CA_DEBUGGER(x) x +#else +#define CA_DEBUGGER(x) \ + do { \ + } while (0) +#ifndef NDEBUG +#define NDEBUG 1 +#endif +#endif + #if defined(TRACKINGITSU_CUDA_COMPILE) #define TRACKINGITSU_GPU_MODE true #else diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/IOUtils.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/IOUtils.h index 2ec39040eaff7..485f95a2a92eb 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/IOUtils.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/IOUtils.h @@ -20,7 +20,9 @@ #include #include +#include "ITSReconstruction/CA/Configuration.h" #include "ITSReconstruction/CA/Event.h" +#include "ITSReconstruction/CA/json.h" #include "ITSReconstruction/CA/Label.h" #include "ITSReconstruction/CA/Road.h" @@ -45,8 +47,16 @@ namespace ITS namespace CA { +void to_json(nlohmann::json& j, const TrackingParameters& par); +void from_json(const nlohmann::json& j, TrackingParameters& par); +void to_json(nlohmann::json& j, const MemoryParameters& par); +void from_json(const nlohmann::json& j, MemoryParameters& par); +void to_json(nlohmann::json& j, const IndexTableParameters& par); +void from_json(const nlohmann::json& j, IndexTableParameters& par); + namespace IOUtils { +void loadConfigurations(const std::string&); std::vector loadEventData(const std::string&); void loadEventData(Event& events, const std::vector* mClustersArray, const dataformats::MCTruthContainer* mClsLabels = nullptr); diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/MathUtils.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/MathUtils.h index 457c400394cdd..e6657983f3772 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/MathUtils.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/MathUtils.h @@ -33,6 +33,10 @@ float calculatePhiCoordinate(const float, const float); float calculateRCoordinate(const float, const float); GPU_HOST_DEVICE constexpr float getNormalizedPhiCoordinate(const float); GPU_HOST_DEVICE constexpr float3 crossProduct(const float3&, const float3&); +float computeCurvature(float x1, float y1, float x2, float y2, float x3, float y3); +float computeCurvatureCentreX(float x1, float y1, float x2, float y2, float x3, float y3); +float computeTanDipAngle(float x1, float y1, float x2, float y2, float z1, float z2); + } // namespace MathUtils inline float MathUtils::calculatePhiCoordinate(const float xCoordinate, const float yCoordinate) @@ -59,6 +63,29 @@ GPU_HOST_DEVICE constexpr float3 MathUtils::crossProduct(const float3& firstVect (firstVector.z * secondVector.x) - (firstVector.x * secondVector.z), (firstVector.x * secondVector.y) - (firstVector.y * secondVector.x) }; } + +inline float MathUtils::computeCurvature(float x1, float y1, float x2, float y2, float x3, float y3) +{ + const float d = (x2 - x1) * (y3 - y2) - (x3 - x2) * (y2 - y1); + const float a = + 0.5f * ((y3 - y2) * (y2 * y2 - y1 * y1 + x2 * x2 - x1 * x1) - (y2 - y1) * (y3 * y3 - y2 * y2 + x3 * x3 - x2 * x2)); + const float b = + 0.5f * ((x2 - x1) * (y3 * y3 - y2 * y2 + x3 * x3 - x2 * x2) - (x3 - x2) * (y2 * y2 - y1 * y1 + x2 * x2 - x1 * x1)); + + return -1.f * d / std::sqrt((d * x1 - a) * (d * x1 - a) + (d * y1 - b) * (d * y1 - b)); +} + +inline float MathUtils::computeCurvatureCentreX(float x1, float y1, float x2, float y2, float x3, float y3) +{ + const float k1 = (y2 - y1) / (x2 - x1), k2 = (y3 - y2) / (x3 - x2); + return 0.5f * (k1 * k2 * (y1 - y3) + k2 * (x1 + x2) - k1 * (x2 + x3)) / (k2 - k1); +} + +inline float MathUtils::computeTanDipAngle(float x1, float y1, float x2, float y2, float z1, float z2) +{ + return (z1 - z2) / std::sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); +} + } // namespace CA } // namespace ITS } // namespace o2 diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/PrimaryVertexContext.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/PrimaryVertexContext.h index bb39a6b8be4e0..6987fdf7afb46 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/PrimaryVertexContext.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/PrimaryVertexContext.h @@ -24,6 +24,7 @@ #include "SimulationDataFormat/MCCompLabel.h" #include "ITSReconstruction/CA/Cell.h" +#include "ITSReconstruction/CA/Configuration.h" #include "ITSReconstruction/CA/Constants.h" #include "ITSReconstruction/CA/Definitions.h" #include "ITSReconstruction/CA/Event.h" @@ -50,7 +51,7 @@ class PrimaryVertexContext final PrimaryVertexContext(const PrimaryVertexContext&) = delete; PrimaryVertexContext& operator=(const PrimaryVertexContext&) = delete; - void initialise(const Event&, const int); + void initialise(const MemoryParameters& memParam, const Event& event, const int pvIndex, const int iteration); const float3& getPrimaryVertex() const; std::array, Constants::ITS::LayersNumber>& getClusters(); std::array, Constants::ITS::CellsPerRoad>& getCells(); @@ -144,7 +145,10 @@ inline bool PrimaryVertexContext::isClusterUsed(int layer, int clusterId) const inline void PrimaryVertexContext::markUsedCluster(int layer, int clusterId) { mUsedClusters[layer][clusterId] = true; } #if TRACKINGITSU_GPU_MODE -inline GPU::PrimaryVertexContext& PrimaryVertexContext::getDeviceContext() { return *mGPUContextDevicePointer; } +inline GPU::PrimaryVertexContext& PrimaryVertexContext::getDeviceContext() +{ + return *mGPUContextDevicePointer; +} inline GPU::Array, Constants::ITS::LayersNumber>& PrimaryVertexContext::getDeviceClusters() { diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Tracker.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Tracker.h index 1697957ab2b0b..c0f46981b2fc6 100644 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Tracker.h +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/Tracker.h @@ -24,6 +24,7 @@ #include #include +#include "ITSReconstruction/CA/Configuration.h" #include "ITSReconstruction/CA/Definitions.h" #include "ITSReconstruction/CA/Event.h" #include "ITSReconstruction/CA/MathUtils.h" @@ -44,8 +45,11 @@ template class TrackerTraits { public: - void computeLayerTracklets(PrimaryVertexContext&); - void computeLayerCells(PrimaryVertexContext&); + GPU_HOST_DEVICE constexpr int4 getEmptyBinsRect() { return int4{ 0, 0, 0, 0 }; } + GPU_DEVICE const int4 getBinsRect(const Cluster&, const int, const float, float maxdeltaz, float maxdeltaphi); + + void computeLayerTracklets(PrimaryVertexContext&, const TrackingParameters& trkPars, int iteration = 0); + void computeLayerCells(PrimaryVertexContext&, const TrackingParameters& trkPars, int iteration = 0); protected: ~TrackerTraits() = default; @@ -73,16 +77,17 @@ class Tracker : private TrackerTraits void setROFrame(std::uint32_t f) { mROFrame = f; } std::uint32_t getROFrame() const { return mROFrame; } + void setParameters(const MemoryParameters&, const TrackingParameters&); private: track::TrackParCov buildTrackSeed(const Cluster& cluster1, const Cluster& cluster2, const Cluster& cluster3, const TrackingFrameInfo& tf3); template void initialisePrimaryVertexContext(T&&... args); - void computeTracklets(); - void computeCells(); - void findCellsNeighbours(); - void findRoads(); + void computeTracklets(int& iteration); + void computeCells(int& iteration); + void findCellsNeighbours(int& iteration); + void findRoads(int& iteration); void findTracks(const Event& ev); bool fitTrack(const Event& event, TrackITS& track, int start, int end, int step); void traverseCellsTree(const int, const int); @@ -92,6 +97,9 @@ class Tracker : private TrackerTraits template float evaluateTask(void (Tracker::*)(T...), const char*, std::ostream& ostream, T&&... args); + MemoryParameters mMemParams; + TrackingParameters mTrkParams; + float mBz = 5.f; std::uint32_t mROFrame = 0; PrimaryVertexContext mPrimaryVertexContext; @@ -99,6 +107,34 @@ class Tracker : private TrackerTraits dataformats::MCTruthContainer mTrackLabels; }; +template +GPU_DEVICE const int4 TrackerTraits::getBinsRect(const Cluster& currentCluster, const int layerIndex, + const float directionZIntersection, float maxdeltaz, float maxdeltaphi) +{ + const float zRangeMin = directionZIntersection - 2 * maxdeltaz; + const float phiRangeMin = currentCluster.phiCoordinate - maxdeltaphi; + const float zRangeMax = directionZIntersection + 2 * maxdeltaz; + const float phiRangeMax = currentCluster.phiCoordinate + maxdeltaphi; + + if (zRangeMax < -Constants::ITS::LayersZCoordinate()[layerIndex + 1] || + zRangeMin > Constants::ITS::LayersZCoordinate()[layerIndex + 1] || zRangeMin > zRangeMax) { + + return getEmptyBinsRect(); + } + + return int4{ MATH_MAX(0, IndexTableUtils::getZBinIndex(layerIndex + 1, zRangeMin)), + IndexTableUtils::getPhiBinIndex(MathUtils::getNormalizedPhiCoordinate(phiRangeMin)), + MATH_MIN(Constants::IndexTable::ZBins - 1, IndexTableUtils::getZBinIndex(layerIndex + 1, zRangeMax)), + IndexTableUtils::getPhiBinIndex(MathUtils::getNormalizedPhiCoordinate(phiRangeMax)) }; +} + +template +void Tracker::setParameters(const MemoryParameters& memPars, const TrackingParameters& trkPars) +{ + mMemParams = memPars; + mTrkParams = trkPars; +} + template float Tracker::getBz() const { @@ -115,7 +151,7 @@ template template void Tracker::initialisePrimaryVertexContext(T&&... args) { - mPrimaryVertexContext.initialise(std::forward(args)...); + mPrimaryVertexContext.initialise(mMemParams, std::forward(args)...); } template @@ -158,9 +194,9 @@ float Tracker::evaluateTask(void (Tracker::*task)(T...), const cha } template <> -void TrackerTraits::computeLayerTracklets(PrimaryVertexContext&); +void TrackerTraits::computeLayerTracklets(PrimaryVertexContext&, const TrackingParameters& trkPars, int iteration); template <> -void TrackerTraits::computeLayerCells(PrimaryVertexContext&); +void TrackerTraits::computeLayerCells(PrimaryVertexContext&, const TrackingParameters& trkPars, int iteration); } // namespace CA } // namespace ITS } // namespace o2 diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/TrackingUtils.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/TrackingUtils.h deleted file mode 100644 index a05ee13d49112..0000000000000 --- a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/TrackingUtils.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright CERN and copyright holders of ALICE O2. This software is -// distributed under the terms of the GNU General Public License v3 (GPL -// Version 3), copied verbatim in the file "COPYING". -// -// See http://alice-o2.web.cern.ch/license for full licensing information. -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. -/// -/// \file CATrackingUtils.h -/// \brief -/// - -#ifndef TRACKINGITSU_INCLUDE_TRACKINGUTILS_H_ -#define TRACKINGITSU_INCLUDE_TRACKINGUTILS_H_ - -#include "ITSReconstruction/CA/Cluster.h" -#include "ITSReconstruction/CA/Definitions.h" - -namespace o2 -{ -namespace ITS -{ -namespace CA -{ - -namespace TrackingUtils -{ -GPU_HOST_DEVICE constexpr int4 getEmptyBinsRect() { return int4{ 0, 0, 0, 0 }; } -GPU_DEVICE const int4 getBinsRect(const Cluster&, const int, const float); - -float computeCurvature(float x1, float y1, float x2, float y2, float x3, float y3); -float computeCurvatureCentreX(float x1, float y1, float x2, float y2, float x3, float y3); -float computeTanDipAngle(float x1, float y1, float x2, float y2, float z1, float z2); -} // namespace TrackingUtils -} // namespace CA -} // namespace ITS -} // namespace o2 - -#endif /* TRACKINGITSU_INCLUDE_CATRACKINGUTILS_H_ */ diff --git a/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/json.h b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/json.h new file mode 100644 index 0000000000000..28fb5a76a994e --- /dev/null +++ b/Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/CA/json.h @@ -0,0 +1,16302 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.1.2 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +Copyright (c) 2013-2018 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef NLOHMANN_JSON_HPP +#define NLOHMANN_JSON_HPP + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 1 +#define NLOHMANN_JSON_VERSION_PATCH 2 + +#include // all_of, find, for_each +#include // assert +#include // and, not, or +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#include // istream, ostream +#include // iterator_traits, random_access_iterator_tag +#include // accumulate +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap + +// #include +#ifndef NLOHMANN_JSON_FWD_HPP +#define NLOHMANN_JSON_FWD_HPP + +#include // int64_t, uint64_t +#include // map +#include // allocator +#include // string +#include // vector + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template +struct adl_serializer; + +template