Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MagneticFieldAdapter::MagneticFieldAdapter(o2::field::MagneticField* field) : mF
"GRPGeomRequest of the workflow, or initialise the field explicitly with "
"o2::base::Propagator::initFieldFromGRP().");
}
LOG(info) << "ACTS magnetic field adapter bound to O2 field '" << mField->GetName() << "'";
LOG(debug) << "ACTS magnetic field adapter bound to O2 field '" << mField->GetName() << "'";
}

Acts::MagneticFieldProvider::Cache MagneticFieldAdapter::makeCache(const Acts::MagneticFieldContext& /*mctx*/) const
Expand All @@ -59,14 +59,10 @@ Acts::MagneticFieldProvider::Cache MagneticFieldAdapter::makeCache(const Acts::M
Acts::Result<Acts::Vector3> MagneticFieldAdapter::getField(const Acts::Vector3& position,
Cache& /*cache*/) const
{
const double xyz[3] = {position[0] / Acts::UnitConstants::cm,
position[1] / Acts::UnitConstants::cm,
position[2] / Acts::UnitConstants::cm};
const double xyz[3] = {position[0] / Acts::UnitConstants::cm, position[1] / Acts::UnitConstants::cm, position[2] / Acts::UnitConstants::cm};
double bxyz[3] = {0., 0., 0.};
mField->Field(xyz, bxyz);

return Acts::Result<Acts::Vector3>::success(
Acts::Vector3{bxyz[0] * kGaussToActs, bxyz[1] * kGaussToActs, bxyz[2] * kGaussToActs});
return Acts::Result<Acts::Vector3>::success(Acts::Vector3{bxyz[0] * kGaussToActs, bxyz[1] * kGaussToActs, bxyz[2] * kGaussToActs});
}

} // namespace o2::acts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
# or submit itself to any jurisdiction.

if(Acts_FOUND)
set(actsTarget Acts::Core)
set(actsSources src/TrackerACTS.cxx)
set(actsTarget
Acts::Core
O2::ACTSInterface
O2::ALICE3ACTS
ROOT::Tree
ROOT::RIO)
endif()

o2_add_library(ALICE3GlobalReconstruction
TARGETVARNAME targetName
SOURCES src/TimeFrame.cxx
SOURCES src/TimeFrame.cxx ${actsSources}
PUBLIC_LINK_LIBRARIES
O2::ITStracking
O2::GPUCommon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ class TimeFrameMixin : public Base
void deriveAndInitTiming(const std::array<gsl::span<const o2::trkft3::ROFRecord>, nLayers>& layerROFs);

const o2::InteractionRecord& getTFAnchorIR() const noexcept { return mTFAnchorIR; }
const auto& getClusterSensorIDs() const noexcept { return mClusterSensorIDs; }

protected:
void initTimingTables(const std::array<o2::its::LayerTiming, nLayers>& timings);
void updateHostROFVertexLookupTable();

std::array<std::vector<int>, nLayers> mClusterSensorIDs;
bool mTimingTablesInitialised{false};
o2::InteractionRecord mTFAnchorIR{0, 0};
};
Expand Down Expand Up @@ -205,6 +206,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
this->mUnsortedClusters[iLayer].clear();
this->mTrackingFrameInfo[iLayer].clear();
this->mClusterExternalIndices[iLayer].clear();
mClusterSensorIDs[iLayer].clear();
this->mClusterSize[iLayer].clear();
}

Expand All @@ -228,6 +230,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
this->mUnsortedClusters[iLayer].reserve(clusterCountPerLayer[iLayer]);
this->mTrackingFrameInfo[iLayer].reserve(clusterCountPerLayer[iLayer]);
this->mClusterExternalIndices[iLayer].reserve(clusterCountPerLayer[iLayer]);
mClusterSensorIDs[iLayer].reserve(clusterCountPerLayer[iLayer]);
this->mClusterSize[iLayer].reserve(clusterCountPerLayer[iLayer]);
}

Expand Down Expand Up @@ -294,6 +297,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
std::array<float, 3>{resolution[layer] * resolution[layer], 0., resolution[layer] * resolution[layer]});
this->addClusterToLayer(layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), this->mUnsortedClusters[layer].size());
mClusterSensorIDs[layer].push_back(hit.GetDetectorID());
const int layerHitCounter = hitCounterPerLayer[layer]++;
this->addClusterExternalIndexToLayer(layer, layerHitCounter);
this->mClusterSize[layer].push_back(1);
Expand Down Expand Up @@ -344,10 +348,12 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
this->mUnsortedClusters[iLayer].clear();
this->mTrackingFrameInfo[iLayer].clear();
this->mClusterExternalIndices[iLayer].clear();
mClusterSensorIDs[iLayer].clear();
this->mClusterSize[iLayer].clear();
this->mUnsortedClusters[iLayer].reserve(layerClusters[iLayer].size());
this->mTrackingFrameInfo[iLayer].reserve(layerClusters[iLayer].size());
this->mClusterExternalIndices[iLayer].reserve(layerClusters[iLayer].size());
mClusterSensorIDs[iLayer].reserve(layerClusters[iLayer].size());
this->mClusterSize[iLayer].reserve(layerClusters[iLayer].size());
}

Expand Down Expand Up @@ -436,6 +442,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
std::array<float, 3>{sigmaY2, 0.f, sigmaZ2});
this->addClusterToLayer(iLayer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), this->mUnsortedClusters[iLayer].size());
mClusterSensorIDs[iLayer].push_back(c.chipID);
this->addClusterExternalIndexToLayer(iLayer, clusterId);
this->mClusterSize[iLayer].push_back(std::clamp(static_cast<unsigned int>(c.size), 0u, 255u));
}
Expand Down
Loading
Loading