Skip to content

Commit 90846e4

Browse files
committed
Fix outlier rejection for B=0 data
- optionally allow skipping outlier rejection completely
1 parent 3fdafc2 commit 90846e4

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ void TPCInterpolationDPL::run(ProcessingContext& pc)
179179
}
180180
};
181181
recoData.createTracksVariadic(creator); // create track sample considered for interpolation
182-
LOG(info) << "Created " << seeds.size() << " seeds.";
182+
LOGP(info, "Created {} seeds. {} ITS-TPC-TRD-TOF, {} ITS-TPC-TRD, {} ITS-TPC-TOF, {} ITS-TPC",
183+
seeds.size(), trkCounters.at(GTrackID::Source::ITSTPCTRDTOF), trkCounters.at(GTrackID::Source::ITSTPCTRD),
184+
trkCounters.at(GTrackID::Source::ITSTPCTOF), trkCounters.at(GTrackID::Source::ITSTPC));
183185

184186
if (mUseMC) {
185187
// possibly MC labels will be used to check filtering procedure performance before interpolation

Detectors/TPC/calibration/SpacePoints/include/SpacePoints/SpacePointsCalibConfParam.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ struct SpacePointsCalibConfParam : public o2::conf::ConfigurableParamHelper<Spac
5454
float maxDCA = 10.f; ///< DCA cut value in cm
5555

5656
// parameters for outlier rejection
57+
bool skipOutlierFiltering{false}; ///< if set, the outlier filtering will not be applied at all
5758
bool writeUnfiltered{false}; ///< if set, all residuals and track parameters will be aggregated and dumped additionally without outlier rejection
5859
int nMALong{15}; ///< number of points to be used for moving average (long range)
5960
int nMAShort{3}; ///< number of points to be used for estimation of distance from local line (short range)

Detectors/TPC/calibration/SpacePoints/src/TrackInterpolation.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void TrackInterpolation::interpolateTrack(int iSeed)
321321
trackData.clAvailTOF = gidTable[GTrackID::TOF].isIndexSet() ? 1 : 0;
322322

323323
TrackParams params; // for refitted track parameters and flagging rejected clusters
324-
if (validateTrack(trackData, params, clusterResiduals)) {
324+
if (mParams->skipOutlierFiltering || validateTrack(trackData, params, clusterResiduals)) {
325325
// track is good
326326
int nClValidated = 0;
327327
int iRow = 0;
@@ -396,7 +396,7 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
396396
trackData.clIdx.setEntries(nMeasurements);
397397

398398
TrackParams params; // for refitted track parameters and flagging rejected clusters
399-
if (validateTrack(trackData, params, clusterResiduals)) {
399+
if (mParams->skipOutlierFiltering || validateTrack(trackData, params, clusterResiduals)) {
400400
// track is good
401401
int nClValidated = 0;
402402
int iRow = 0;
@@ -437,7 +437,7 @@ bool TrackInterpolation::validateTrack(const TrackData& trk, TrackParams& params
437437
LOG(debug) << "Skipping track too far from helix approximation";
438438
return false;
439439
}
440-
if (fabsf(params.qpt) > mParams->maxQ2Pt) {
440+
if (fabsf(mBz) > 0.01 && fabsf(params.qpt) > mParams->maxQ2Pt) {
441441
LOG(debug) << "Skipping track with too high q/pT: " << params.qpt;
442442
return false;
443443
}
@@ -500,6 +500,10 @@ bool TrackInterpolation::compareToHelix(const TrackData& trk, TrackParams& param
500500
sPath[iP] = sPath[iP - 1] + ds;
501501
}
502502
}
503+
if (fabsf(mBz) < 0.01) {
504+
// for B=0 we don't need to try a circular fit...
505+
return true;
506+
}
503507
float xcSec = 0.f;
504508
float ycSec = 0.f;
505509
float r = 0.f;

0 commit comments

Comments
 (0)