Skip to content

Commit 0980ed5

Browse files
committed
Fix ITS tracking: async/sync settings swapping, not vertexing in cosmics
1 parent 1d4762c commit 0980ed5

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/TrackerSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class TrackerDPL : public framework::Task
4646

4747
private:
4848
bool mIsMC = false;
49+
bool mRunVertexer = true;
4950
std::string mMode = "sync";
5051
o2::itsmft::TopologyDictionary mDict;
5152
std::unique_ptr<o2::gpu::GPUReconstruction> mRecChain = nullptr;

Detectors/ITSMFT/ITS/workflow/src/TrackerSpec.cxx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,29 @@ void TrackerDPL::init(InitContext& ic)
7373
std::vector<TrackingParameters> trackParams;
7474
std::vector<MemoryParameters> memParams;
7575

76-
if (mMode == "sync") {
76+
mRunVertexer = true;
77+
if (mMode == "async") {
78+
7779
trackParams.resize(3);
7880
memParams.resize(3);
7981
trackParams[0].TrackletMaxDeltaPhi = 0.05f;
8082
trackParams[1].TrackletMaxDeltaPhi = 0.1f;
8183
trackParams[2].MinTrackLength = 4;
8284
trackParams[2].TrackletMaxDeltaPhi = 0.3;
8385
LOG(INFO) << "Initializing tracker in async. phase reconstruction with " << trackParams.size() << " passes";
84-
} else if (mMode == "async") {
86+
87+
} else if (mMode == "sync") {
88+
8589
trackParams.resize(1);
8690
memParams.resize(1);
8791
LOG(INFO) << "Initializing tracker in sync. phase reconstruction with " << trackParams.size() << " passes";
92+
8893
} else if (mMode == "cosmics") {
94+
95+
mRunVertexer = false;
8996
trackParams.resize(1);
9097
memParams.resize(1);
91-
trackParams[0].MinTrackLength = 3;
98+
trackParams[0].MinTrackLength = 4;
9299
trackParams[0].TrackletMaxDeltaPhi = o2::its::constants::math::Pi * 0.5f;
93100
for (int iLayer = 0; iLayer < o2::its::constants::its2::TrackletsPerRoad; iLayer++) {
94101
trackParams[0].TrackletMaxDeltaZ[iLayer] = o2::its::constants::its2::LayersZCoordinate()[iLayer + 1];
@@ -101,6 +108,7 @@ void TrackerDPL::init(InitContext& ic)
101108
memParams[0].CellsMemoryCoefficients[iLayer] = 0.001f;
102109
}
103110
LOG(INFO) << "Initializing tracker in reconstruction for cosmics with " << trackParams.size() << " passes";
111+
104112
} else {
105113
throw std::runtime_error(fmt::format("Unsupported ITS tracking mode {:s} ", mMode));
106114
}
@@ -214,10 +222,13 @@ void TrackerDPL::run(ProcessingContext& pc)
214222
}
215223
}
216224

217-
mVertexer->clustersToVertices(event);
218-
auto vtxVecLoc = mVertexer->exportVertices();
225+
std::vector<Vertex> vtxVecLoc;
226+
if (mRunVertexer) {
227+
mVertexer->clustersToVertices(event);
228+
vtxVecLoc = mVertexer->exportVertices();
229+
}
219230

220-
if (multEstConf.cutMultVtxLow > 0 || multEstConf.cutMultVtxHigh > 0) { // cut was requested
231+
if (mRunVertexer && (multEstConf.cutMultVtxLow > 0 || multEstConf.cutMultVtxHigh > 0)) { // cut was requested
221232
std::vector<o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>> vtxVecSel;
222233
vtxVecSel.swap(vtxVecLoc);
223234
for (const auto& vtx : vtxVecSel) {
@@ -235,7 +246,11 @@ void TrackerDPL::run(ProcessingContext& pc)
235246
}
236247
}
237248

238-
event.addPrimaryVertices(vtxVecLoc);
249+
if (mRunVertexer) {
250+
event.addPrimaryVertices(vtxVecLoc);
251+
} else {
252+
event.addPrimaryVertex(0.f, 0.f, 0.f);
253+
}
239254
mTracker->setROFrame(roFrame);
240255
mTracker->clustersToTracks(event);
241256
tracks.swap(mTracker->getTracks());

0 commit comments

Comments
 (0)