Skip to content

Commit d27cf26

Browse files
authored
Allow specifying different track source for TPC map extraction (AliceO2Group#12992)
* Allow specifying different track source for TPC map extraction Track type(s) A can be used to extract residuals for vDrift calibration and track type(s) B can be use to extract residuals for the creation of the map. E.g. use ITS-TPC-TRD-TOF tracks for vDrift and ITS-TPC for the map creation. * Make sure mAddTracksForMapPerTF are taken from best possible seeds
1 parent 15e83e4 commit d27cf26

File tree

6 files changed

+71
-29
lines changed

6 files changed

+71
-29
lines changed

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace tpc
3838
class TPCInterpolationDPL : public Task
3939
{
4040
public:
41-
TPCInterpolationDPL(std::shared_ptr<o2::globaltracking::DataRequest> dr, o2::dataformats::GlobalTrackID::mask_t src, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput) : mDataRequest(dr), mSources(src), mGGCCDBRequest(gr), mUseMC(useMC), mProcessITSTPConly(processITSTPConly), mSendTrackData(sendTrackData), mDebugOutput(debugOutput) {}
41+
TPCInterpolationDPL(std::shared_ptr<o2::globaltracking::DataRequest> dr, o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput) : mDataRequest(dr), mSources(src), mSourcesMap(srcMap), mGGCCDBRequest(gr), mUseMC(useMC), mProcessITSTPConly(processITSTPConly), mSendTrackData(sendTrackData), mDebugOutput(debugOutput) {}
4242
~TPCInterpolationDPL() override = default;
4343
void init(InitContext& ic) final;
4444
void run(ProcessingContext& pc) final;
@@ -53,6 +53,7 @@ class TPCInterpolationDPL : public Task
5353
o2::tpc::VDriftHelper mTPCVDriftHelper{};
5454
const o2::itsmft::TopologyDictionary* mITSDict = nullptr; ///< cluster patterns dictionary
5555
o2::dataformats::GlobalTrackID::mask_t mSources{}; ///< which input sources are configured
56+
o2::dataformats::GlobalTrackID::mask_t mSourcesMap{}; ///< possible subset of mSources specifically for map creation
5657
bool mUseMC{false}; ///< MC flag
5758
bool mProcessITSTPConly{false}; ///< should also tracks without outer point (ITS-TPC only) be processed?
5859
bool mProcessSeeds{false}; ///< process not only most complete track, but also its shorter parts
@@ -64,7 +65,7 @@ class TPCInterpolationDPL : public Task
6465
};
6566

6667
/// create a processor spec
67-
framework::DataProcessorSpec getTPCInterpolationSpec(o2::dataformats::GlobalTrackID::mask_t srcCls, o2::dataformats::GlobalTrackID::mask_t srcVtx, o2::dataformats::GlobalTrackID::mask_t srcTrk, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput);
68+
framework::DataProcessorSpec getTPCInterpolationSpec(o2::dataformats::GlobalTrackID::mask_t srcCls, o2::dataformats::GlobalTrackID::mask_t srcVtx, o2::dataformats::GlobalTrackID::mask_t srcTrk, o2::dataformats::GlobalTrackID::mask_t srcTrkMap, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput);
6869

6970
} // namespace tpc
7071
} // namespace o2

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ void TPCInterpolationDPL::init(InitContext& ic)
5252
mSlotLength = ic.options().get<uint32_t>("sec-per-slot");
5353
mProcessSeeds = ic.options().get<bool>("process-seeds");
5454
mMatCorr = ic.options().get<int>("matCorrType");
55+
if (mProcessSeeds && mSources != mSourcesMap) {
56+
LOG(fatal) << "process-seeds option is not compatible with using different track sources for vDrift and map extraction";
57+
}
5558
}
5659

5760
void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc)
@@ -63,7 +66,7 @@ void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc)
6366
initOnceDone = true;
6467
// other init-once stuff
6568
const auto& param = SpacePointsCalibConfParam::Instance();
66-
mInterpolation.init(mSources);
69+
mInterpolation.init(mSources, mSourcesMap);
6770
if (mProcessITSTPConly) {
6871
mInterpolation.setProcessITSTPConly();
6972
}
@@ -74,10 +77,10 @@ void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc)
7477
if (nTracksPerTfMax > 0) {
7578
LOGP(info, "We will stop processing tracks after validating {} tracks per TF, since we want to accumulate {} tracks for a slot with {} TFs",
7679
nTracksPerTfMax, param.maxTracksPerCalibSlot, nTfs);
77-
if (param.additionalTracksITSTPC > 0) {
78-
int nITSTPCadd = param.additionalTracksITSTPC / nTfs;
79-
LOGP(info, "In addition up to {} ITS-TPC tracks are processed per TF", nITSTPCadd);
80-
mInterpolation.setAddITSTPCTracksPerTF(nITSTPCadd);
80+
if (param.additionalTracksMap > 0) {
81+
int nTracksAdditional = param.additionalTracksMap / nTfs;
82+
LOGP(info, "In addition up to {} additional tracks are processed per TF", nTracksAdditional);
83+
mInterpolation.setAddTracksForMapPerTF(nTracksAdditional);
8184
}
8285
} else if (nTracksPerTfMax < 0) {
8386
LOG(info) << "The number of processed tracks per TF is not limited";
@@ -155,7 +158,7 @@ void TPCInterpolationDPL::endOfStream(EndOfStreamContext& ec)
155158
mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
156159
}
157160

158-
DataProcessorSpec getTPCInterpolationSpec(GTrackID::mask_t srcCls, GTrackID::mask_t srcVtx, GTrackID::mask_t srcTrk, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput)
161+
DataProcessorSpec getTPCInterpolationSpec(GTrackID::mask_t srcCls, GTrackID::mask_t srcVtx, GTrackID::mask_t srcTrk, GTrackID::mask_t srcTrkMap, bool useMC, bool processITSTPConly, bool sendTrackData, bool debugOutput)
159162
{
160163
auto dataRequest = std::make_shared<DataRequest>();
161164
std::vector<OutputSpec> outputs;
@@ -196,7 +199,7 @@ DataProcessorSpec getTPCInterpolationSpec(GTrackID::mask_t srcCls, GTrackID::mas
196199
"tpc-track-interpolation",
197200
dataRequest->inputs,
198201
outputs,
199-
AlgorithmSpec{adaptFromTask<TPCInterpolationDPL>(dataRequest, srcTrk, ggRequest, useMC, processITSTPConly, sendTrackData, debugOutput)},
202+
AlgorithmSpec{adaptFromTask<TPCInterpolationDPL>(dataRequest, srcTrk, srcTrkMap, ggRequest, useMC, processITSTPConly, sendTrackData, debugOutput)},
200203
Options{
201204
{"matCorrType", VariantType::Int, 2, {"material correction type (definition in Propagator.h)"}},
202205
{"sec-per-slot", VariantType::UInt32, 600u, {"number of seconds per calibration time slot (put 0 for infinite slot length)"}},

Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/tpc-interpolation-workflow.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
3939
{"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}},
4040
{"vtx-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources used for the vertex finding"}},
4141
{"tracking-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use for track inter-/extrapolation"}},
42+
{"tracking-sources-map-extraction", VariantType::String, std::string{GID::ALL}, {"can be subset of \"tracking-sources\""}},
4243
{"send-track-data", VariantType::Bool, false, {"Send also the track information to the aggregator"}},
4344
{"debug-output", VariantType::Bool, false, {"Dump extended tracking information for debugging"}},
4445
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
@@ -69,14 +70,24 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
6970
GID::mask_t allowedSources = GID::getSourcesMask("ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF");
7071
GID::mask_t srcVtx = allowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("vtx-sources"));
7172
GID::mask_t srcTracks = allowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("tracking-sources"));
73+
GID::mask_t srcTracksMap = allowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("tracking-sources-map-extraction"));
7274
if (srcTracks.count() > srcVtx.count()) {
7375
LOGP(error, "More sources configured for inter-/extrapolation: {} than for vertexing: {}. Additional sources will be ignored", GID::getSourcesNames(srcTracks), GID::getSourcesNames(srcVtx));
7476
srcTracks &= srcVtx;
7577
}
78+
srcTracksMap &= srcVtx;
79+
if (((srcTracksMap | srcTracks) ^ srcTracks).any()) {
80+
LOGP(fatal, "tracking-sources-map-extraction ({}) must be a subset of tracking-sources ({}).", GID::getSourcesNames(srcTracksMap), GID::getSourcesNames(srcTracks));
81+
} else if (srcTracksMap != srcTracks) {
82+
LOGP(info, "Will extract residual from different track types. For vDrift from {} and for distortion map from {}", GID::getSourcesNames(srcTracks), GID::getSourcesNames(srcTracksMap));
83+
} else {
84+
LOGP(info, "Only a single track source is defined for residuals extraction: {}", GID::getSourcesNames(srcTracks));
85+
}
7686
LOG(debug) << "Data sources for inter-/extrapolation: " << GID::getSourcesNames(srcTracks);
7787
// check first if ITS-TPC tracks were specifically requested from command line
7888
bool processITSTPConly = srcTracks[GID::ITSTPC];
7989
srcTracks |= GID::getSourcesMask("ITS,TPC,ITS-TPC"); // now add them in any case
90+
srcTracksMap |= GID::getSourcesMask("ITS,TPC,ITS-TPC");
8091
srcVtx |= srcTracks;
8192
GID::mask_t srcClusters = srcTracks;
8293
if (srcTracks[GID::ITSTPCTRD] || srcTracks[GID::ITSTPCTRDTOF]) {
@@ -94,7 +105,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
94105
auto sendTrackData = configcontext.options().get<bool>("send-track-data");
95106
auto debugOutput = configcontext.options().get<bool>("debug-output");
96107

97-
specs.emplace_back(o2::tpc::getTPCInterpolationSpec(srcClusters, srcVtx, srcTracks, useMC, processITSTPConly, sendTrackData, debugOutput));
108+
specs.emplace_back(o2::tpc::getTPCInterpolationSpec(srcClusters, srcVtx, srcTracks, srcTracksMap, useMC, processITSTPConly, sendTrackData, debugOutput));
98109
if (!configcontext.options().get<bool>("disable-root-output")) {
99110
specs.emplace_back(o2::tpc::getTPCResidualWriterSpec(sendTrackData, debugOutput));
100111
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace tpc
2525
// These are configurable params for the TPC space point calibration
2626
struct SpacePointsCalibConfParam : public o2::conf::ConfigurableParamHelper<SpacePointsCalibConfParam> {
2727

28-
int maxTracksPerCalibSlot = 3'500'000; ///< the number of tracks which is required to obtain an average correction map
29-
int additionalTracksITSTPC = 2'000'000; ///< will be added to maxTracksPerCalibSlot for track sample with uniform acceptance (no PHOS hole)
28+
int maxTracksPerCalibSlot = 500'000; ///< the number of tracks which is required to obtain an average correction map
29+
int additionalTracksMap = 3'500'000; ///< will be added to maxTracksPerCalibSlot for track sample with uniform acceptance (no PHOS hole)
3030

3131
// define track cuts for track interpolation
3232
int minTPCNCls = 70; ///< min number of TPC clusters

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ class TrackInterpolation
189189
// -------------------------------------- processing functions --------------------------------------------------
190190

191191
/// Initialize everything, set the requested track sources
192-
void init(o2::dataformats::GlobalTrackID::mask_t src);
192+
void init(o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap);
193193

194194
/// Check if input track passes configured cuts
195195
bool isInputTrackAccepted(const o2::dataformats::GlobalTrackID& gid, const o2::globaltracking::RecoContainer::GlobalIDSet& gidTable, const o2::dataformats::PrimaryVertex& pv) const;
196196

197197
/// For given vertex track source which is not in mSourcesConfigured find the seeding source which is enabled
198-
o2::dataformats::GlobalTrackID::Source findValidSource(o2::dataformats::GlobalTrackID::Source src) const;
198+
o2::dataformats::GlobalTrackID::Source findValidSource(const o2::dataformats::GlobalTrackID::mask_t mask, const o2::dataformats::GlobalTrackID::Source src) const;
199199

200200
/// Prepare input track sample (not relying on CreateTracksVariadic functionality)
201201
void prepareInputTrackSample(const o2::globaltracking::RecoContainer& inp);
@@ -252,8 +252,8 @@ class TrackInterpolation
252252
/// Sets the maximum number of tracks to be processed (successfully) per TF
253253
void setMaxTracksPerTF(int n) { mMaxTracksPerTF = n; }
254254

255-
/// In addition to mMaxTracksPerTF up to the set number of ITS-TPC only tracks can be processed
256-
void setAddITSTPCTracksPerTF(int n) { mAddTracksITSTPC = n; }
255+
/// In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed
256+
void setAddTracksForMapPerTF(int n) { mAddTracksForMapPerTF = n; }
257257

258258
/// Enable full output
259259
void setDumpTrackPoints() { mDumpTrackPoints = true; }
@@ -288,11 +288,13 @@ class TrackInterpolation
288288
float mSqrtS{13600.f}; ///< centre of mass energy set from LHC IF
289289
MatCorrType mMatCorr{MatCorrType::USEMatCorrNONE}; ///< if material correction should be done
290290
int mMaxTracksPerTF{-1}; ///< max number of tracks to be processed per TF (-1 means there is no limit)
291-
int mAddTracksITSTPC{0}; ///< number of ITS-TPC tracks which can be processed in addition to mMaxTracksPerTF
291+
int mAddTracksForMapPerTF{0}; ///< in case residuals from different track types are used for vDrift calibration and map creation this defines the statistics for the latter
292292
bool mDumpTrackPoints{false}; ///< dump also track points in ITS, TRD and TOF
293293
bool mProcessSeeds{false}; ///< in case for global tracks also their shorter parts are processed separately
294294
bool mProcessITSTPConly{false}; ///< flag, whether or not to extrapolate ITS-only through TPC
295-
o2::dataformats::GlobalTrackID::mask_t mSourcesConfigured; ///< keep only the matches here, not the individual detector contributors
295+
o2::dataformats::GlobalTrackID::mask_t mSourcesConfigured; ///< the track sources taken into account for extra-/interpolation
296+
o2::dataformats::GlobalTrackID::mask_t mSourcesConfiguredMap; ///< possible subset of mSourcesConfigured
297+
bool mSingleSourcesConfigured{true}; ///< whether mSourcesConfigured == mSourcesConfiguredMap
296298

297299
// input
298300
const o2::globaltracking::RecoContainer* mRecoCont = nullptr; ///< input reco container

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

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using namespace o2::tpc;
3838
using GTrackID = o2::dataformats::GlobalTrackID;
3939
using DetID = o2::detectors::DetID;
4040

41-
void TrackInterpolation::init(o2::dataformats::GlobalTrackID::mask_t src)
41+
void TrackInterpolation::init(o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap)
4242
{
4343
// perform initialization
4444
LOG(info) << "Start initializing TrackInterpolation";
@@ -58,13 +58,16 @@ void TrackInterpolation::init(o2::dataformats::GlobalTrackID::mask_t src)
5858
mParams = &SpacePointsCalibConfParam::Instance();
5959

6060
mSourcesConfigured = src;
61+
mSourcesConfiguredMap = srcMap;
62+
mSingleSourcesConfigured = (mSourcesConfigured == mSourcesConfiguredMap);
6163
mTrackTypes.insert({GTrackID::ITSTPC, 0});
6264
mTrackTypes.insert({GTrackID::ITSTPCTRD, 1});
6365
mTrackTypes.insert({GTrackID::ITSTPCTOF, 2});
6466
mTrackTypes.insert({GTrackID::ITSTPCTRDTOF, 3});
6567

6668
mInitDone = true;
67-
LOGP(info, "Done initializing TrackInterpolation. Configured track input: {}", GTrackID::getSourcesNames(mSourcesConfigured));
69+
LOGP(info, "Done initializing TrackInterpolation. Configured track input: {}. Track input specifically for map: {}",
70+
GTrackID::getSourcesNames(mSourcesConfigured), mSingleSourcesConfigured ? "identical" : GTrackID::getSourcesNames(mSourcesConfiguredMap));
6871
}
6972

7073
bool TrackInterpolation::isInputTrackAccepted(const GTrackID& gid, const o2::globaltracking::RecoContainer::GlobalIDSet& gidTable, const o2::dataformats::PrimaryVertex& pv) const
@@ -114,19 +117,19 @@ bool TrackInterpolation::isInputTrackAccepted(const GTrackID& gid, const o2::glo
114117
return true;
115118
}
116119

117-
GTrackID::Source TrackInterpolation::findValidSource(GTrackID::Source src) const
120+
GTrackID::Source TrackInterpolation::findValidSource(const GTrackID::mask_t mask, const GTrackID::Source src) const
118121
{
119-
LOGP(debug, "Trying to find valid source for {}", GTrackID::getSourcesNames(src));
122+
LOGP(debug, "Trying to find valid source for {} in {}", GTrackID::getSourceName(src), GTrackID::getSourcesNames(mask));
120123
if (src == GTrackID::ITSTPCTRDTOF) {
121-
if (mSourcesConfigured[GTrackID::ITSTPCTRD]) {
124+
if (mask[GTrackID::ITSTPCTRD]) {
122125
return GTrackID::ITSTPCTRD;
123-
} else if (mSourcesConfigured[GTrackID::ITSTPC]) {
126+
} else if (mask[GTrackID::ITSTPC]) {
124127
return GTrackID::ITSTPC;
125128
} else {
126129
return GTrackID::NSources;
127130
}
128131
} else if (src == GTrackID::ITSTPCTRD || src == GTrackID::ITSTPCTOF) {
129-
if (mSourcesConfigured[GTrackID::ITSTPC]) {
132+
if (mask[GTrackID::ITSTPC]) {
130133
return GTrackID::ITSTPC;
131134
} else {
132135
return GTrackID::NSources;
@@ -169,9 +172,9 @@ void TrackInterpolation::prepareInputTrackSample(const o2::globaltracking::RecoC
169172
}
170173
auto gidTable = mRecoCont->getSingleDetectorRefs(vid);
171174
if (!mSourcesConfigured[is]) {
172-
auto src = findValidSource(static_cast<GTrackID::Source>(vid.getSource()));
175+
auto src = findValidSource(mSourcesConfigured, static_cast<GTrackID::Source>(vid.getSource()));
173176
if (src == GTrackID::ITSTPCTRD || src == GTrackID::ITSTPC) {
174-
LOGP(debug, "Found valid source {}", GTrackID::getSourcesNames(src));
177+
LOGP(debug, "prepareInputTrackSample: Found valid source {}", GTrackID::getSourceName(src));
175178
vid = gidTable[src];
176179
gidTable = mRecoCont->getSingleDetectorRefs(vid);
177180
} else {
@@ -252,19 +255,33 @@ void TrackInterpolation::process()
252255
trackIndices.insert(trackIndices.end(), mTrackIndices[mTrackTypes[GTrackID::ITSTPC]].begin(), mTrackIndices[mTrackTypes[GTrackID::ITSTPC]].end());
253256

254257
int nSeeds = mSeeds.size();
255-
int maxOutputTracks = (mMaxTracksPerTF >= 0) ? mMaxTracksPerTF + mAddTracksITSTPC : nSeeds;
258+
int maxOutputTracks = (mMaxTracksPerTF >= 0) ? mMaxTracksPerTF + mAddTracksForMapPerTF : nSeeds;
256259
mTrackData.reserve(maxOutputTracks);
257260
mClRes.reserve(maxOutputTracks * param::NPadRows);
258261
bool maxTracksReached = false;
259262
for (int iSeed = 0; iSeed < nSeeds; ++iSeed) {
260-
if (mMaxTracksPerTF >= 0 && mTrackDataCompact.size() >= mMaxTracksPerTF + mAddTracksITSTPC) {
263+
if (mMaxTracksPerTF >= 0 && mTrackDataCompact.size() >= mMaxTracksPerTF + mAddTracksForMapPerTF) {
261264
LOG(info) << "Maximum number of tracks per TF reached. Skipping the remaining " << nSeeds - iSeed << " tracks.";
262265
break;
263266
}
264267
int seedIndex = trackIndices[iSeed];
265268
if (mParams->enableTrackDownsampling && !isTrackSelected(mSeeds[seedIndex])) {
266269
continue;
267270
}
271+
if (!mSingleSourcesConfigured && !mSourcesConfiguredMap[mGIDs[seedIndex].getSource()]) {
272+
auto src = findValidSource(mSourcesConfiguredMap, static_cast<GTrackID::Source>(mGIDs[seedIndex].getSource()));
273+
if (src == GTrackID::ITSTPCTRD || src == GTrackID::ITSTPC) {
274+
LOGP(debug, "process: Found valid source {}", GTrackID::getSourceName(src));
275+
mGIDs.push_back(mGIDtables[seedIndex][src]);
276+
mGIDtables.push_back(mRecoCont->getSingleDetectorRefs(mGIDs.back()));
277+
mTrackTimes.push_back(mTrackTimes[seedIndex]);
278+
mSeeds.push_back(mSeeds[seedIndex]);
279+
}
280+
}
281+
if (mMaxTracksPerTF >= 0 && mTrackDataCompact.size() >= mMaxTracksPerTF) {
282+
LOG(debug) << "We already have reached mMaxTracksPerTF, but we continue to create seeds until mAddTracksForMapPerTF is also reached";
283+
continue;
284+
}
268285
if (mGIDs[seedIndex].includesDet(DetID::TRD) || mGIDs[seedIndex].includesDet(DetID::TOF)) {
269286
interpolateTrack(seedIndex);
270287
if (mProcessSeeds) {
@@ -283,8 +300,16 @@ void TrackInterpolation::process()
283300
extrapolateTrack(seedIndex);
284301
}
285302
}
303+
if (mSeeds.size() > nSeeds) {
304+
LOGP(info, "Up to {} tracks out of {} additional seeds will be processed", mAddTracksForMapPerTF, mSeeds.size() - nSeeds);
305+
}
286306
for (int iSeed = nSeeds; iSeed < (int)mSeeds.size(); ++iSeed) {
307+
if (!mProcessSeeds && mAddTracksForMapPerTF > 0 && mTrackDataCompact.size() >= mMaxTracksPerTF + mAddTracksForMapPerTF) {
308+
LOG(info) << "Maximum number of additional tracks per TF reached. Skipping the remaining " << mSeeds.size() - iSeed << " tracks.";
309+
break;
310+
}
287311
// this loop will only be entered in case mProcessSeeds is set
312+
LOGP(debug, "Processing additional track {}", mGIDs[iSeed].asString());
288313
if (mGIDs[iSeed].includesDet(DetID::TRD) || mGIDs[iSeed].includesDet(DetID::TOF)) {
289314
interpolateTrack(iSeed);
290315
} else {

0 commit comments

Comments
 (0)