Skip to content

Commit 084a237

Browse files
authored
[ALICE3] TRK: allow ACTS clustering (#15174)
* [ALICE3] TRK: allow ACTS clustering * Add ACTS clusterer
1 parent 38ccad5 commit 084a237

File tree

7 files changed

+514
-23
lines changed

7 files changed

+514
-23
lines changed

Detectors/Upgrades/ALICE3/TRK/reconstruction/CMakeLists.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
if(Acts_FOUND)
13+
set(actsTarget Acts::Core)
14+
endif()
15+
1216
o2_add_library(TRKReconstruction
1317
TARGETVARNAME targetName
1418
SOURCES src/TimeFrame.cxx
1519
src/Clusterer.cxx
20+
$<$<BOOL:${Acts_FOUND}>:src/ClustererACTS.cxx>
21+
$<$<BOOL:${Acts_FOUND}>:src/TrackerACTS.cxx>
1622
PUBLIC_LINK_LIBRARIES
1723
O2::ITStracking
1824
O2::GPUCommon
@@ -27,11 +33,23 @@ o2_add_library(TRKReconstruction
2733
O2::DataFormatsITS
2834
O2::TRKSimulation
2935
nlohmann_json::nlohmann_json
36+
${actsTarget}
3037
PRIVATE_LINK_LIBRARIES
3138
O2::Steer
3239
TBB::tbb)
3340

41+
if(Acts_FOUND)
42+
target_compile_definitions(${targetName} PUBLIC O2_WITH_ACTS)
43+
endif()
44+
45+
set(dictHeaders include/TRKReconstruction/TimeFrame.h
46+
include/TRKReconstruction/Clusterer.h)
47+
48+
if(Acts_FOUND)
49+
list(APPEND dictHeaders include/TRKReconstruction/ClustererACTS.h
50+
include/TRKReconstruction/TrackerACTS.h)
51+
endif()
52+
3453
o2_target_root_dictionary(TRKReconstruction
35-
HEADERS include/TRKReconstruction/TimeFrame.h
36-
include/TRKReconstruction/Clusterer.h
54+
HEADERS ${dictHeaders}
3755
LINKDEF src/TRKReconstructionLinkDef.h)

Detectors/Upgrades/ALICE3/TRK/reconstruction/include/TRKReconstruction/Clusterer.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,17 @@ class Clusterer
161161
};
162162
//----------------------------------------------
163163

164-
void process(gsl::span<const Digit> digits,
165-
gsl::span<const DigROFRecord> digitROFs,
166-
std::vector<o2::trk::Cluster>& clusters,
167-
std::vector<unsigned char>& patterns,
168-
std::vector<o2::trk::ROFRecord>& clusterROFs,
169-
const ConstDigitTruth* digitLabels = nullptr,
170-
ClusterTruth* clusterLabels = nullptr,
171-
gsl::span<const DigMC2ROFRecord> digMC2ROFs = {},
172-
std::vector<o2::trk::MC2ROFRecord>* clusterMC2ROFs = nullptr);
173-
174-
private:
164+
virtual void process(gsl::span<const Digit> digits,
165+
gsl::span<const DigROFRecord> digitROFs,
166+
std::vector<o2::trk::Cluster>& clusters,
167+
std::vector<unsigned char>& patterns,
168+
std::vector<o2::trk::ROFRecord>& clusterROFs,
169+
const ConstDigitTruth* digitLabels = nullptr,
170+
ClusterTruth* clusterLabels = nullptr,
171+
gsl::span<const DigMC2ROFRecord> digMC2ROFs = {},
172+
std::vector<o2::trk::MC2ROFRecord>* clusterMC2ROFs = nullptr);
173+
174+
protected:
175175
int mNHugeClus = 0;
176176
std::unique_ptr<ClustererThread> mThread;
177177
std::vector<int> mSortIdx; ///< reusable per-ROF sort buffer
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file ClustererACTS.h
13+
/// \brief Definition of the TRK cluster finder
14+
15+
#ifndef ALICEO2_TRK_CLUSTERERACTS_H
16+
#define ALICEO2_TRK_CLUSTERERACTS_H
17+
18+
#include "TRKReconstruction/Clusterer.h"
19+
20+
namespace o2::trk
21+
{
22+
23+
class GeometryTGeo;
24+
25+
class ClustererACTS : public Clusterer
26+
{
27+
public:
28+
void process(gsl::span<const Digit> digits,
29+
gsl::span<const DigROFRecord> digitROFs,
30+
std::vector<o2::trk::Cluster>& clusters,
31+
std::vector<unsigned char>& patterns,
32+
std::vector<o2::trk::ROFRecord>& clusterROFs,
33+
const ConstDigitTruth* digitLabels = nullptr,
34+
ClusterTruth* clusterLabels = nullptr,
35+
gsl::span<const DigMC2ROFRecord> digMC2ROFs = {},
36+
std::vector<o2::trk::MC2ROFRecord>* clusterMC2ROFs = nullptr) override;
37+
38+
private:
39+
};
40+
41+
} // namespace o2::trk
42+
43+
#endif

0 commit comments

Comments
 (0)