Skip to content
Open
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 @@ -219,6 +219,7 @@ void trackSeedHandler(CellSeed<nLayers>* trackSeeds,
const float maxChi2ClusterAttachment,
const float maxChi2NDF,
const int reseedIfShorter,
const bool repeatRefitOut,
const bool shiftRefToCluster,
const o2::base::Propagator* propagator,
const o2::base::PropagatorF::MatCorrType matCorrType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ void TrackerTraitsGPU<nLayers>::findRoads(const int iteration)
startLevel, // const int startLevel,
this->mTrkParams[0].MaxChi2ClusterAttachment, // float maxChi2ClusterAttachment
this->mTrkParams[0].MaxChi2NDF, // float maxChi2NDF
this->mTrkParams[0].RepeatRefitOut,
this->mTrkParams[0].ReseedIfShorter,
this->mTrkParams[0].ShiftRefToCluster,
mTimeFrameGPU->getDevicePropagator(), // const o2::base::Propagator* propagator
Expand Down
32 changes: 32 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ GPUg() void __launch_bounds__(256, 1) fitTrackSeedsKernel(
const float maxChi2ClusterAttachment,
const float maxChi2NDF,
const int reseedIfShorter,
const bool repeatRefitOut,
const bool shifRefToCluster,
const o2::base::Propagator* propagator,
const o2::base::PropagatorF::MatCorrType matCorrType)
Expand Down Expand Up @@ -337,6 +338,34 @@ GPUg() void __launch_bounds__(256, 1) fitTrackSeedsKernel(
if (!fitSuccess || temporaryTrack.getPt() < minPts[nLayers - temporaryTrack.getNClusters()]) {
continue;
}
if (repeatRefitOut) { // repeat outward refit seeding and linearizing with the stable inward fit result
o2::track::TrackParCov saveInw{temporaryTrack};
linRef = saveInw; // use refitted track as lin.reference
float saveChi2 = temporaryTrack.getChi2();
temporaryTrack.resetCovariance();
temporaryTrack.setCov(temporaryTrack.getQ2Pt() * temporaryTrack.getQ2Pt() * temporaryTrack.getCov()[o2::track::CovLabels::kSigQ2Pt2], o2::track::CovLabels::kSigQ2Pt2);
temporaryTrack.setChi2(0);
fitSuccess = fitTrack(temporaryTrack, // TrackITSExt& track,
0, // int lastLayer,
nLayers, // int firstLayer,
1, // int firstCluster,
maxChi2ClusterAttachment, // float maxChi2ClusterAttachment,
maxChi2NDF, // float maxChi2NDF,
o2::constants::math::VeryBig, // float maxQoverPt,
0, // nCl,
bz, // float bz,
foundTrackingFrameInfo, // TrackingFrameInfo** trackingFrameInfo,
propagator, // const o2::base::Propagator* propagator,
matCorrType, // o2::base::PropagatorF::MatCorrType matCorrType
&linRef,
shifRefToCluster);
if (!fitSuccess) {
continue;
}
temporaryTrack.getParamOut() = temporaryTrack.getParamIn();
temporaryTrack.getParamIn() = saveInw;
temporaryTrack.setChi2(saveChi2);
}
tracks[iCurrentTrackSeedIndex] = temporaryTrack;
}
}
Expand Down Expand Up @@ -1174,6 +1203,7 @@ void trackSeedHandler(CellSeed<nLayers>* trackSeeds,
const float maxChi2ClusterAttachment,
const float maxChi2NDF,
const int reseedIfShorter,
const bool repeatRefitOut,
const bool shiftRefToCluster,
const o2::base::Propagator* propagator,
const o2::base::PropagatorF::MatCorrType matCorrType,
Expand All @@ -1195,6 +1225,7 @@ void trackSeedHandler(CellSeed<nLayers>* trackSeeds,
maxChi2ClusterAttachment, // float
maxChi2NDF, // float
reseedIfShorter, // int
repeatRefitOut, // bool
shiftRefToCluster, // bool
propagator, // const o2::base::Propagator*
matCorrType); // o2::base::PropagatorF::MatCorrType
Expand Down Expand Up @@ -1375,6 +1406,7 @@ template void trackSeedHandler(CellSeed<7>* trackSeeds,
const float maxChi2ClusterAttachment,
const float maxChi2NDF,
const int reseedIfShorter,
const bool repeatRefitOut,
const bool shiftRefToCluster,
const o2::base::Propagator* propagator,
const o2::base::PropagatorF::MatCorrType matCorrType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct TrackingParameters {
int ReseedIfShorter = 6; // reseed for the final fit track with the length shorter than this
std::vector<float> MinPt = {0.f, 0.f, 0.f, 0.f};
unsigned char StartLayerMask = 0x7F;
bool RepeatRefitOut = true; // repeat outward refit using inward refit as a seed
bool ShiftRefToCluster = true; // TrackFit: after update shift the linearization reference to cluster
bool FindShortTracks = false;
bool PerPrimaryVertexProcessing = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
int nIterations = MaxIter; // overwrite the number of iterations
int reseedIfShorter = 6; // for the final refit reseed the track with circle if they are shorter than this value
bool shiftRefToCluster{true}; // TrackFit: after update shift the linearization reference to cluster
bool repeatRefitOut{true}; // repeat outward refit using inward refit as a seed
bool createArtefactLabels{false}; // create on-the-fly labels for the artefacts

int nThreads = 1;
Expand Down
1 change: 1 addition & 0 deletions Detectors/ITSMFT/ITS/tracking/src/Configuration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
p.MinPt[lslot] *= bFactor;
}
p.ReseedIfShorter = tc.reseedIfShorter;
p.RepeatRefitOut = tc.repeatRefitOut;
p.ShiftRefToCluster = tc.shiftRefToCluster;
p.createArtefactLabels = tc.createArtefactLabels;

Expand Down
16 changes: 16 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,22 @@ void TrackerTraits<nLayers>::findRoads(const int iteration)
if (!fitSuccess || temporaryTrack.getPt() < mTrkParams[iteration].MinPt[mTrkParams[iteration].NLayers - temporaryTrack.getNClusters()]) {
return 0;
}
if (mTrkParams[0].RepeatRefitOut) { // repeat outward refit seeding and linearizing with the stable inward fit result
o2::track::TrackParCov saveInw{temporaryTrack};
linRef = saveInw; // use refitted track as lin.reference
float saveChi2 = temporaryTrack.getChi2();
temporaryTrack.resetCovariance();
temporaryTrack.setCov(temporaryTrack.getQ2Pt() * temporaryTrack.getQ2Pt() * temporaryTrack.getCov()[o2::track::CovLabels::kSigQ2Pt2], o2::track::CovLabels::kSigQ2Pt2);
temporaryTrack.setChi2(0);
fitSuccess = fitTrack(temporaryTrack, 0, mTrkParams[0].NLayers, 1, mTrkParams[0].MaxChi2ClusterAttachment, mTrkParams[0].MaxChi2NDF, o2::constants::math::VeryBig, 0, &linRef);
if (!fitSuccess) {
return 0;
}
temporaryTrack.getParamOut() = temporaryTrack.getParamIn();
temporaryTrack.getParamIn() = saveInw;
temporaryTrack.setChi2(saveChi2);
}

if constexpr (decltype(Tag)::value == PassMode::OnePass::value) {
tracks.push_back(temporaryTrack);
} else if constexpr (decltype(Tag)::value == PassMode::TwoPassCount::value) {
Expand Down