Skip to content

Commit 416bf7e

Browse files
committed
ITS: add common vertex definition and neighbours per road
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent a1c484d commit 416bf7e

File tree

10 files changed

+17
-22
lines changed

10 files changed

+17
-22
lines changed

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Configuration.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace o2::its
3131

3232
struct TrackingParameters {
3333
int CellMinimumLevel() const noexcept { return MinTrackLength - constants::ClustersPerCell + 1; }
34+
int NeighboursPerRoad() const noexcept { return NLayers - 3; }
3435
int CellsPerRoad() const noexcept { return NLayers - 2; }
3536
int TrackletsPerRoad() const noexcept { return NLayers - 1; }
3637
std::string asString() const;

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Definitions.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#ifndef TRACKINGITS_DEFINITIONS_H_
1616
#define TRACKINGITS_DEFINITIONS_H_
1717

18-
#ifndef GPUCA_GPUCODE_DEVICE
19-
#include <array>
20-
#endif
18+
#include "ReconstructionDataFormats/Vertex.h"
2119

2220
#ifdef CA_DEBUG
2321
#define CA_DEBUGGER(x) x
@@ -26,4 +24,12 @@
2624
do { \
2725
} while (0)
2826
#endif
27+
28+
namespace o2::its
29+
{
30+
31+
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
32+
33+
}
34+
2935
#endif

Detectors/ITSMFT/ITS/tracking/include/ITStracking/TimeFrame.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ namespace gpu
6262
template <int>
6363
class TimeFrameGPU;
6464
}
65-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
6665

6766
template <int nLayers = 7>
6867
struct TimeFrame {

Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackerTraits.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
#ifndef TRACKINGITSU_INCLUDE_TRACKERTRAITS_H_
1717
#define TRACKINGITSU_INCLUDE_TRACKERTRAITS_H_
1818

19-
#include <cmath>
19+
#include <oneapi/tbb.h>
2020

2121
#include "DetectorsBase/Propagator.h"
2222
#include "ITStracking/Configuration.h"
2323
#include "ITStracking/MathUtils.h"
2424
#include "ITStracking/TimeFrame.h"
2525
#include "ITStracking/BoundedAllocator.h"
2626

27-
#include <oneapi/tbb.h>
28-
#include <oneapi/tbb/partitioner.h>
29-
3027
// #define OPTIMISATION_OUTPUT
3128

3229
namespace o2

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Vertexer.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@
2626
#include <oneapi/tbb/task_arena.h>
2727

2828
#include "ITStracking/Constants.h"
29+
#include "ITStracking/Definitions.h"
2930
#include "ITStracking/Configuration.h"
3031
#include "ITStracking/TimeFrame.h"
3132
#include "ITStracking/VertexerTraits.h"
3233
#include "ITStracking/BoundedAllocator.h"
33-
#include "ReconstructionDataFormats/Vertex.h"
3434

3535
namespace o2::its
3636
{
3737

38-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
39-
4038
class Vertexer
4139
{
4240
static constexpr int NLayers{7};

Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ void TrackerTraits<nLayers>::findCellsNeighbours(const int iteration)
481481
};
482482

483483
mTaskArena->execute([&] {
484-
for (int iLayer{0}; iLayer < mTrkParams[iteration].CellsPerRoad() - 1; ++iLayer) {
484+
for (int iLayer{0}; iLayer < mTrkParams[iteration].NeighboursPerRoad(); ++iLayer) {
485485
deepVectorClear(mTimeFrame->getCellsNeighbours()[iLayer]);
486486
deepVectorClear(mTimeFrame->getCellsNeighboursLUT()[iLayer]);
487487
if (mTimeFrame->getCells()[iLayer + 1].empty() ||

Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/TrackReaderSpec.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include "Framework/DataProcessorSpec.h"
2121
#include "Framework/Task.h"
2222
#include "Headers/DataHeader.h"
23+
#include "ITStracking/Definitions.h"
2324
#include "DataFormatsITS/TrackITS.h"
2425
#include "SimulationDataFormat/MCCompLabel.h"
2526
#include "SimulationDataFormat/MCTruthContainer.h"
2627
#include "DataFormatsITSMFT/ROFRecord.h"
27-
#include "ReconstructionDataFormats/Vertex.h"
2828

2929
namespace o2
3030
{
@@ -33,8 +33,6 @@ namespace its
3333

3434
class TrackReader : public o2::framework::Task
3535
{
36-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
37-
3836
public:
3937
TrackReader(bool useMC = true);
4038
~TrackReader() override = default;

Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/VertexReaderSpec.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "Framework/DataProcessorSpec.h"
2121
#include "Framework/Task.h"
22-
#include "ReconstructionDataFormats/Vertex.h"
22+
#include "ITStracking/Definitions.h"
2323
#include "DataFormatsITSMFT/ROFRecord.h"
2424

2525
namespace o2
@@ -30,8 +30,6 @@ namespace its
3030

3131
class VertexReader : public o2::framework::Task
3232
{
33-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
34-
3533
public:
3634
VertexReader() = default;
3735
~VertexReader() override = default;

Detectors/ITSMFT/ITS/workflow/src/TrackWriterSpec.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "DataFormatsITSMFT/ROFRecord.h"
2020
#include "SimulationDataFormat/MCCompLabel.h"
2121
#include "SimulationDataFormat/MCTruthContainer.h"
22-
#include "ReconstructionDataFormats/Vertex.h"
22+
#include "ITStracking/Definitions.h"
2323
#include "ITStracking/TrackingConfigParam.h"
2424

2525
using namespace o2::framework;
@@ -28,7 +28,6 @@ namespace o2
2828
{
2929
namespace its
3030
{
31-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
3231

3332
template <typename T>
3433
using BranchDefinition = MakeRootTreeWriterSpec::BranchDefinition<T>;

Detectors/ITSMFT/ITS/workflow/src/TrackerSpec.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
#include "Framework/ConfigParamRegistry.h"
1616
#include "Framework/CCDBParamSpec.h"
1717
#include "ITSWorkflow/TrackerSpec.h"
18+
#include "ITStracking/Definitions.h"
1819
#include "ITStracking/TrackingConfigParam.h"
1920

2021
namespace o2
2122
{
2223
using namespace framework;
2324
namespace its
2425
{
25-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
26-
2726
TrackerDPL::TrackerDPL(std::shared_ptr<o2::base::GRPGeomRequest> gr,
2827
bool isMC,
2928
int trgType,

0 commit comments

Comments
 (0)