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 @@ -63,6 +63,7 @@ struct TrackingParameters {
int CellMinimumLevel();
int CellsPerRoad() const { return NLayers - 2; }
int TrackletsPerRoad() const { return NLayers - 1; }
std::string asString() const;

int NLayers = 7;
int DeltaROF = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerPa

struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerParamConfig> {
// Use TGeo for mat. budget
static const int MaxIter = 4;
static const int MinTrackLenght = 4;
static const int MaxTrackLenght = 7;
bool useMatCorrTGeo = false; // use full geometry to corect for material budget accounting in the fits. Default is to use the material budget LUT.
bool useFastMaterial = false; // use faster material approximation for material budget accounting in the fits.
int deltaRof = 0; // configure the width of the window in ROFs to be considered for the tracking.
int minTrackLgtIter[MaxIter] = {}; // minimum track length at each iteration, used only if >0, otherwise use code defaults
float minPtIterLgt[MaxIter * (MaxTrackLenght - MinTrackLenght + 1)] = {}; // min.pT for given track length at this iteration, used only if >0, otherwise use code defaults
float sysErrY2[7] = {0}; // systematic error^2 in Y per layer
float sysErrZ2[7] = {0}; // systematic error^2 in Z per layer
float maxChi2ClusterAttachment = -1.f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class ITSTrackingInterface
mMode = mode;
}

auto getTracker() const { return mTracker.get(); }
auto getVertexer() const { return mVertexer.get(); }

TimeFrame* mTimeFrame = nullptr;

protected:
Expand Down
24 changes: 23 additions & 1 deletion Detectors/ITSMFT/ITS/tracking/src/Configuration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,31 @@ std::string asString(TrackingMode mode)
return "unknown";
}

std::string TrackingParameters::asString() const
{
std::string str = fmt::format("NZb:{} NPhB:{} NROFIt:{} PerVtx:{} DropFail:{} ClSh:{} TtklMinPt:{:.2f} MinCl:{}",
ZBins, PhiBins, nROFsPerIterations, PerPrimaryVertexProcessing, DropTFUponFailure, ClusterSharing, TrackletMinPt, MinTrackLength);
bool first = true;
for (int il = NLayers; il >= MinTrackLength; il--) {
int slot = NLayers - il;
if (slot < (int)MinPt.size() && MinPt[slot] > 0) {
if (first) {
first = false;
str += " MinPt: ";
}
str += fmt::format("L{}:{:.2f} ", il, MinPt[slot]);
}
}
str += " SystErrY/Z:";
for (size_t i = 0; i < SystErrorY2.size(); i++) {
str += fmt::format("{:.2e}/{:.2e} ", SystErrorY2[i], SystErrorZ2[i]);
}
return str;
}

std::ostream& operator<<(std::ostream& os, TrackingMode v)
{
os << asString(v);
return os;
}
} // namespace o2::its
} // namespace o2::its
1 change: 0 additions & 1 deletion Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ void Tracker::rectifyClusterIndices()
void Tracker::getGlobalConfiguration()
{
auto& tc = o2::its::TrackerParamConfig::Instance();
tc.printKeyValues(true, true);
if (tc.useMatCorrTGeo) {
mTraits->setCorrType(o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrTGeo);
} else if (tc.useFastMaterial) {
Expand Down
57 changes: 52 additions & 5 deletions Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "CommonDataFormat/IRFrame.h"
#include "DetectorsBase/GRPGeomHelper.h"
#include "ITStracking/TrackingConfigParam.h"
#include "Framework/DeviceSpec.h"

namespace o2
{
Expand All @@ -35,31 +36,55 @@ void ITSTrackingInterface::initialise()
mCosmicsProcessing = false;
std::vector<VertexingParameters> vertParams;
std::vector<TrackingParameters> trackParams;
const auto& trackConf = o2::its::TrackerParamConfig::Instance();
float bFactor = std::abs(o2::base::Propagator::Instance()->getNominalBz()) / 5.0066791;
if (mMode == TrackingMode::Unset) {
mMode = (TrackingMode)(o2::its::TrackerParamConfig::Instance().trackingMode);
mMode = (TrackingMode)(trackConf.trackingMode);
LOGP(info, "Tracking mode not set, trying to fetch it from configurable params to: {}", asString(mMode));
}
if (mMode == TrackingMode::Async) {
trackParams.resize(o2::its::TrackerParamConfig::Instance().doUPCIteration ? 4 : 3);
trackParams.resize(trackConf.doUPCIteration ? 4 : 3);
vertParams.resize(2); // The number of actual iterations will be set as a configKeyVal to allow for pp/PbPb choice
trackParams[1].TrackletMinPt = 0.2f;
trackParams[1].CellDeltaTanLambdaSigma *= 2.;
trackParams[2].TrackletMinPt = 0.1f;
trackParams[2].CellDeltaTanLambdaSigma *= 4.;

trackParams[0].MinPt[0] = 1.f / 12; // 7cl

trackParams[1].MinPt[0] = 1.f / 12; // 7cl

trackParams[2].MinTrackLength = 4;
trackParams[2].MinPt[3] = 0.2f;
trackParams[2].MinPt[0] = 1.f / 12; // 7cl
trackParams[2].MinPt[1] = 1.f / 5; // 6cl
trackParams[2].MinPt[2] = 1.f / 1; // 5cl
trackParams[2].MinPt[3] = 1.f / 6; // 4cl

trackParams[2].StartLayerMask = (1 << 6) + (1 << 3);
if (o2::its::TrackerParamConfig::Instance().doUPCIteration) {
trackParams[3].MinTrackLength = 4;
trackParams[3].TrackletMinPt = 0.1f;
trackParams[3].CellDeltaTanLambdaSigma *= 4.;
trackParams[3].MinTrackLength = 4;
trackParams[3].DeltaROF = 0; // UPC specific setting
}
for (auto& param : trackParams) {
for (size_t ip = 0; ip < trackParams.size(); ip++) {
auto& param = trackParams[ip];
param.ZBins = 64;
param.PhiBins = 32;
param.CellsPerClusterLimit = 1.e3f;
param.TrackletsPerClusterLimit = 1.e3f;
// check if something was overridden via configurable params
if (ip < trackConf.MaxIter) {
if (trackConf.minTrackLgtIter[ip] > 0) {
param.MinTrackLength = trackConf.minTrackLgtIter[ip];
}
for (int ilg = trackConf.MaxTrackLenght; ilg >= trackConf.MinTrackLenght; ilg--) {
int lslot0 = (trackConf.MaxTrackLenght - ilg), lslot = lslot0 + ip * (trackConf.MaxTrackLenght - trackConf.MinTrackLenght + 1);
if (trackConf.minPtIterLgt[lslot] > 0.) {
param.MinPt[lslot0] = trackConf.minPtIterLgt[lslot];
}
}
}
}
LOGP(info, "Initializing tracker in async. phase reconstruction with {} passes for tracking and {}/{} for vertexing", trackParams.size(), o2::its::VertexerParamConfig::Instance().nIterations, vertParams.size());
vertParams[1].phiCut = 0.015f;
Expand Down Expand Up @@ -95,6 +120,17 @@ void ITSTrackingInterface::initialise()
for (auto& params : trackParams) {
params.CorrType = o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrLUT;
}

// adjust pT settings to actual mag. field
for (size_t ip = 0; ip < trackParams.size(); ip++) {
auto& param = trackParams[ip];
for (int ilg = trackConf.MaxTrackLenght; ilg >= trackConf.MinTrackLenght; ilg--) {
int lslot = trackConf.MaxTrackLenght - ilg;
param.MinPt[lslot] *= bFactor;
param.TrackletMinPt *= bFactor;
}
}

mTracker->setParameters(trackParams);
mVertexer->setParameters(vertParams);
}
Expand Down Expand Up @@ -345,7 +381,18 @@ void ITSTrackingInterface::updateTimeDependentParams(framework::ProcessingContex
}
GeometryTGeo* geom = GeometryTGeo::Instance();
geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L, o2::math_utils::TransformType::T2GRot, o2::math_utils::TransformType::T2G));
initialise();
getConfiguration(pc);
//
if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // print settings only for the 1st pipeling
o2::its::VertexerParamConfig::Instance().printKeyValues();
o2::its::TrackerParamConfig::Instance().printKeyValues();
const auto& trParams = mTracker->getParameters();
for (size_t it = 0; it < trParams.size(); it++) {
const auto& par = trParams[it];
LOGP(info, "recoIter#{} : {}", it, par.asString());
}
}
}
}

Expand Down
1 change: 0 additions & 1 deletion Detectors/ITSMFT/ITS/tracking/src/Vertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ float Vertexer::clustersToVerticesHybrid(std::function<void(std::string s)> logg
void Vertexer::getGlobalConfiguration()
{
auto& vc = o2::its::VertexerParamConfig::Instance();
vc.printKeyValues(true, true);
auto& grc = o2::its::ITSGpuTrackingParamConfig::Instance();

// This is odd: we override only the parameters for the first iteration.
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/ITS/workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void TrackerDPL::init(InitContext& ic)
mITSTrackingInterface.setTraitsFromProvider(mChainITS->GetITSVertexerTraits(),
mChainITS->GetITSTrackerTraits(),
mChainITS->GetITSTimeframe());
mITSTrackingInterface.initialise();
// mITSTrackingInterface.initialise() will be called from the ITSTrackingInterface::updateTimeDependentParams at 1st initialization since it needs some run conditions
}

void TrackerDPL::stop()
Expand Down