Skip to content

Commit a596912

Browse files
committed
Update
1 parent 4cfd035 commit a596912

3 files changed

Lines changed: 35 additions & 7 deletions

File tree

‎Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/CMakeLists.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
# or submit itself to any jurisdiction.
1111

1212
if(Acts_FOUND)
13-
set(actsTarget Acts::Core)
13+
set(actsTarget
14+
Acts::Core
15+
O2::ACTSInterface
16+
O2::ALICE3ACTS)
1417
endif()
1518

1619
o2_add_library(ALICE3GlobalReconstruction

‎Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/include/ALICE3GlobalReconstruction/TrackerACTS.h‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#ifndef ALICE3_GLOBALRECONSTRUCTION_INCLUDE_TRACKERACTS_H_
2020
#define ALICE3_GLOBALRECONSTRUCTION_INCLUDE_TRACKERACTS_H_
2121

22-
#include "Acts/Definitions/Units.hpp"
23-
#include "Framework/Logger.h"
24-
25-
#include "ITStracking/TimeFrame.h"
26-
#include "TH2F.h"
22+
#include <Acts/Definitions/Units.hpp>
23+
#include <Framework/Logger.h>
24+
#include <DataFormatsITSMFT/CompCluster.h>
25+
#include <ITStracking/TimeFrame.h>
26+
#include <TH2F.h>
2727

2828
namespace o2::trk
2929
{
@@ -62,6 +62,8 @@ struct SpacePoint {
6262
int layer{-1};
6363
int clusterId{-1};
6464
int rof{-1};
65+
int sensorId{-1};
66+
// const Acts::Surface* surface{nullptr};
6567

6668
// Derived quantities
6769
float r() const { return std::hypot(x, y); }
@@ -99,6 +101,11 @@ class TrackerACTS
99101
/// Adopt a TimeFrame for processing
100102
void adoptTimeFrame(o2::its::TimeFrame<nLayers>& tf);
101103

104+
void adoptClusters(gsl::span<const o2::itsmft::CompClusterExt> clusters)
105+
{
106+
mInputClusters = clusters;
107+
}
108+
102109
/// Main tracking entry point: convert clusters to tracks
103110
void clustersToTracks();
104111

@@ -155,6 +162,7 @@ class TrackerACTS
155162
float mBz{0.5f}; ///< Magnetic field in Tesla
156163
unsigned int mTimeFrameCounter{0};
157164
double mTotalTime{0.};
165+
gsl::span<const o2::itsmft::CompClusterExt> mInputClusters;
158166

159167
// Tracking states for logging
160168
enum State {

‎Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/src/TrackerACTS.cxx‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
#include "ALICE3GlobalReconstruction/TrackerACTS.h"
2020

21+
#include <TRKBase/GeometryTGeo.h>
22+
#include <MathUtils/Utils.h>
23+
#include <Acts/Surfaces/Surface.hpp>
24+
#include "ACTSInterface/TrackingGeometryManager.h"
2125
#include <Acts/EventData/Seed.hpp>
2226
#include <Acts/EventData/SpacePointContainer.hpp>
2327
#include <Acts/Seeding/BinnedGroup.hpp>
@@ -273,7 +277,7 @@ bool TrackerACTS<nLayers>::estimateTrackParams(const SeedACTS& seed, o2::its::Tr
273277
const float x = p[Acts::eFreePos0];
274278
const float y = p[Acts::eFreePos1];
275279
const float z = p[Acts::eFreePos2];
276-
const float px = p[Acts::eFreeDir0] * pMag;
280+
const float px = p[Acts::eFreeDir0] * 1;
277281
const float py = p[Acts::eFreeDir1] * pMag;
278282
const float pz = p[Acts::eFreeDir2] * pMag;
279283
const int charge = (p[Acts::eFreeQOverP] >= 0) ? 1 : -1;
@@ -395,6 +399,19 @@ void TrackerACTS<nLayers>::clustersToTracks()
395399
// StateNames[mCurState]);
396400
// }
397401

402+
auto& actsGeometryManager = o2::acts::TrackingGeometryManager::instance();
403+
404+
const auto& trackingGeometry = actsGeometryManager.get();
405+
const auto& geometryContext = actsGeometryManager.getNominalContext();
406+
407+
auto* trkGeometry = o2::trk::GeometryTGeo::Instance();
408+
409+
trkGeometry->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
410+
411+
const auto& surfaceIndex = actsGeometryManager.getIndex(*trkGeometry, 1.e-3, [trkGeometry](int sensorID) {
412+
return std::string(trkGeometry->getMatrixPath(sensorID).Data());
413+
});
414+
398415
// MC labeling
399416
if (mTimeFrame->hasMCinformation()) {
400417
computeTracksMClabels();

0 commit comments

Comments
 (0)