Skip to content

Commit a38641e

Browse files
authored
Merge branch 'AliceO2Group:dev' into new-detector4
2 parents fe0e9e3 + d26f229 commit a38641e

File tree

97 files changed

+1142
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1142
-569
lines changed

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class TrackParametrization
160160
GPUd() value_t getZ() const;
161161
GPUd() value_t getSnp() const;
162162
GPUd() value_t getTgl() const;
163-
GPUd() value_t getQ2Pt() const;
163+
GPUhd() value_t getQ2Pt() const;
164164
GPUd() value_t getCharge2Pt() const;
165165
GPUd() int getAbsCharge() const;
166166
GPUd() PID getPID() const;
@@ -357,7 +357,7 @@ GPUdi() auto TrackParametrization<value_T>::getTgl() const -> value_t
357357

358358
//____________________________________________________________
359359
template <typename value_T>
360-
GPUdi() auto TrackParametrization<value_T>::getQ2Pt() const -> value_t
360+
GPUhdi() auto TrackParametrization<value_T>::getQ2Pt() const -> value_t
361361
{
362362
return mP[kQ2Pt];
363363
}

Detectors/Base/src/GRPGeomHelper.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void GRPGeomHelper::checkUpdates(ProcessingContext& pc)
235235
for (auto id = DetID::First; id <= DetID::Last; id++) {
236236
std::string binding = fmt::format("align{}", DetID::getName(id));
237237
if (pc.inputs().getPos(binding.c_str()) < 0) {
238-
return;
238+
continue;
239239
} else {
240240
pc.inputs().get<std::vector<o2::detectors::AlignParam>*>(binding);
241241
}

Detectors/CTF/workflow/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
#add_compile_options(-O0 -g -fPIC)
13+
1214
o2_add_library(CTFWorkflow
1315
SOURCES src/CTFWriterSpec.cxx
1416
src/CTFReaderSpec.cxx

Detectors/CTF/workflow/src/CTFReaderSpec.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class CTFReaderSpec : public o2::framework::Task
102102
std::unique_ptr<TTree> mCTFTree;
103103
bool mRunning = false;
104104
bool mUseLocalTFCounter = false;
105+
bool mIFRamesOut = false;
105106
int mConvRunTimeRangesToOrbits = -1; // not defined yet
106107
int mCTFCounter = 0;
107108
int mCTFCounterAcc = 0;
@@ -172,9 +173,11 @@ void CTFReaderSpec::init(InitContext& ic)
172173
const auto& hbfu = o2::raw::HBFUtils::Instance();
173174
mTFLength = hbfu.nHBFPerTF;
174175
LOGP(info, "IRFrames will be selected from {}, assumed TF length: {} HBF", mInput.fileIRFrames, mTFLength);
176+
mIFRamesOut = true;
175177
}
176178
if (!mInput.fileRunTimeSpans.empty()) {
177179
loadRunTimeSpans(mInput.fileRunTimeSpans);
180+
mIFRamesOut = true;
178181
}
179182
}
180183

@@ -418,11 +421,11 @@ bool CTFReaderSpec::processTF(ProcessingContext& pc)
418421
runTimeRangesToIRFrameSelector(timingInfo);
419422
}
420423
mRunNumberPrev = timingInfo.runNumber;
421-
424+
gsl::span<const o2::dataformats::IRFrame> irSpan{};
422425
if (mIRFrameSelector.isSet()) {
423426
o2::InteractionRecord ir0(0, timingInfo.firstTForbit);
424427
o2::InteractionRecord ir1(o2::constants::lhc::LHCMaxBunches - 1, timingInfo.firstTForbit < 0xffffffff - (mTFLength - 1) ? timingInfo.firstTForbit + (mTFLength - 1) : 0xffffffff);
425-
auto irSpan = mIRFrameSelector.getMatchingFrames({ir0, ir1});
428+
irSpan = mIRFrameSelector.getMatchingFrames({ir0, ir1});
426429
bool acc = true;
427430
if (mInput.skipSkimmedOutTF) {
428431
acc = (irSpan.size() > 0) ? !mInput.invertIRFramesSelection : mInput.invertIRFramesSelection;
@@ -435,13 +438,14 @@ bool CTFReaderSpec::processTF(ProcessingContext& pc)
435438
if (mInput.checkTFLimitBeforeReading) {
436439
limiter.check(pc, mInput.tfRateLimit, mInput.minSHM);
437440
}
438-
auto outVec = pc.outputs().make<std::vector<o2::dataformats::IRFrame>>(OutputRef{"selIRFrames"}, irSpan.begin(), irSpan.end());
439441
} else {
440442
if (mInput.checkTFLimitBeforeReading) {
441443
limiter.check(pc, mInput.tfRateLimit, mInput.minSHM);
442444
}
443445
}
444-
446+
if (mIFRamesOut) {
447+
auto outVec = pc.outputs().make<std::vector<o2::dataformats::IRFrame>>(OutputRef{"selIRFrames"}, irSpan.begin(), irSpan.end());
448+
}
445449
// send CTF Header
446450
pc.outputs().snapshot({"header", mInput.subspec}, ctfHeader);
447451

Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/SVStudy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace o2::svstudy
2323
{
2424
/// create a processor spec
25-
o2::framework::DataProcessorSpec getSVStudySpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, bool useMC);
25+
o2::framework::DataProcessorSpec getSVStudySpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcCls, bool useMC);
2626

2727
} // namespace o2::svstudy
2828

Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
#include "DCAFitter/DCAFitterN.h"
4545
#include "MathUtils/fit.h"
4646
#include "GlobalTrackingStudy/V0Ext.h"
47+
#include "GPUO2InterfaceConfiguration.h"
48+
// #include "GPUSettingsO2.h"
49+
#include "GPUParam.h"
50+
#include "GPUParam.inc"
51+
#include "GPUO2InterfaceRefit.h"
52+
#include "GPUO2InterfaceUtils.h"
4753

4854
namespace o2::svstudy
4955
{
@@ -64,8 +70,8 @@ using timeEst = o2::dataformats::TimeStampWithError<float, float>;
6470
class SVStudySpec : public Task
6571
{
6672
public:
67-
SVStudySpec(std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> gr, GTrackID::mask_t src, bool useMC)
68-
: mDataRequest(dr), mGGCCDBRequest(gr), mTracksSrc(src), mUseMC(useMC) {}
73+
SVStudySpec(std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> gr, GTrackID::mask_t src, bool useTPCCl, bool useMC)
74+
: mDataRequest(dr), mGGCCDBRequest(gr), mTracksSrc(src), mUseTPCCl(useTPCCl), mUseMC(useMC) {}
6975
~SVStudySpec() final = default;
7076
void init(InitContext& ic) final;
7177
void run(ProcessingContext& pc) final;
@@ -83,11 +89,18 @@ class SVStudySpec : public Task
8389
std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
8490
float mSelK0 = -1;
8591
bool mRefit = false;
92+
bool mUseTPCCl = false;
8693
float mMaxEta = 0.8;
8794
float mBz = 0;
95+
int mNHBPerTF = 0;
96+
int mNTPCOccBinLength = 0; ///< TPC occ. histo bin length in TBs
97+
float mNTPCOccBinLengthInv;
98+
float mTPCTBinMUSInv = 0.f;
8899
GTrackID::mask_t mTracksSrc{};
89100
o2::vertexing::DCAFitterN<2> mFitterV0;
101+
std::vector<float> mTBinClOccAft, mTBinClOccBef;
90102
std::unique_ptr<o2::steer::MCKinematicsReader> mcReader; // reader of MC information
103+
std::shared_ptr<o2::gpu::GPUParam> mParam = nullptr;
91104
};
92105

93106
void SVStudySpec::init(InitContext& ic)
@@ -107,6 +120,48 @@ void SVStudySpec::run(ProcessingContext& pc)
107120
o2::globaltracking::RecoContainer recoData;
108121
recoData.collectData(pc, *mDataRequest.get()); // select tracks of needed type, with minimal cuts, the real selected will be done in the vertexer
109122
updateTimeDependentParams(pc); // Make sure this is called after recoData.collectData, which may load some conditions
123+
124+
size_t occupancyMapSizeBytes = o2::gpu::GPUO2InterfaceRefit::fillOccupancyMapGetSize(mNHBPerTF, mParam.get());
125+
gsl::span<const unsigned int> TPCRefitterOccMap = recoData.occupancyMapTPC;
126+
o2::gpu::GPUO2InterfaceUtils::paramUseExternalOccupancyMap(mParam.get(), mNHBPerTF, TPCRefitterOccMap.data(), occupancyMapSizeBytes);
127+
128+
mTBinClOccBef.resize(1);
129+
mTBinClOccAft.resize(1);
130+
if (recoData.inputsTPCclusters && mUseTPCCl) {
131+
mNTPCOccBinLength = mParam->rec.tpc.occupancyMapTimeBins;
132+
mTBinClOccBef.clear();
133+
mTBinClOccAft.clear();
134+
// prepare TPC occupancy data
135+
if (mNTPCOccBinLength > 1 && recoData.occupancyMapTPC.size()) {
136+
mNTPCOccBinLengthInv = 1. / mNTPCOccBinLength;
137+
int nTPCBins = mNHBPerTF * o2::constants::lhc::LHCMaxBunches / 8, ninteg = 0;
138+
int nTPCOccBins = nTPCBins * mNTPCOccBinLengthInv, sumBins = std::max(1, int(o2::constants::lhc::LHCMaxBunches / 8 * mNTPCOccBinLengthInv));
139+
mTBinClOccAft.resize(nTPCOccBins);
140+
mTBinClOccBef.resize(nTPCOccBins);
141+
float sm = 0., tb = 0.5 * mNTPCOccBinLength;
142+
std::vector<float> mltHistTB(nTPCOccBins);
143+
for (int i = 0; i < nTPCOccBins; i++) {
144+
mltHistTB[i] = mParam->GetUnscaledMult(tb);
145+
tb += mNTPCOccBinLength;
146+
}
147+
for (int i = nTPCOccBins; i--;) {
148+
sm += mltHistTB[i];
149+
if (i + sumBins < nTPCOccBins) {
150+
sm -= mltHistTB[i + sumBins];
151+
}
152+
mTBinClOccAft[i] = sm;
153+
}
154+
sm = 0;
155+
for (int i = 0; i < nTPCOccBins; i++) {
156+
sm += mltHistTB[i];
157+
if (i - sumBins > 0) {
158+
sm -= mltHistTB[i - sumBins];
159+
}
160+
mTBinClOccBef[i] = sm;
161+
}
162+
}
163+
}
164+
110165
process(recoData);
111166
}
112167

@@ -133,6 +188,12 @@ void SVStudySpec::updateTimeDependentParams(ProcessingContext& pc)
133188
mFitterV0.setMaxStep(svparam.maxStep);
134189
mFitterV0.setMaxSnp(svparam.maxSnp);
135190
mFitterV0.setMinXSeed(svparam.minXSeed);
191+
192+
mNHBPerTF = o2::base::GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF();
193+
if (!mParam) {
194+
// for occupancy estimator
195+
mParam = o2::gpu::GPUO2InterfaceUtils::getFullParamShared(0.f, mNHBPerTF);
196+
}
136197
}
137198
mBz = o2::base::Propagator::Instance()->getNominalBz();
138199
mFitterV0.setBz(mBz);
@@ -268,8 +329,13 @@ void SVStudySpec::process(o2::globaltracking::RecoContainer& recoData)
268329
}
269330
if (v0extVec.size()) {
270331
const auto& pv = recoData.getPrimaryVertex(pvID);
332+
float tpcOccBef = 0., tpcOccAft = 0.;
333+
int tb = pv.getTimeStamp().getTimeStamp() * mTPCTBinMUSInv * mNTPCOccBinLengthInv;
334+
tpcOccBef = tb < 0 ? mTBinClOccBef[0] : (tb >= mTBinClOccBef.size() ? mTBinClOccBef.back() : mTBinClOccBef[tb]);
335+
tpcOccAft = tb < 0 ? mTBinClOccAft[0] : (tb >= mTBinClOccAft.size() ? mTBinClOccAft.back() : mTBinClOccAft[tb]);
336+
271337
(*mDBGOut) << "v0"
272-
<< "orbit=" << recoData.startIR.orbit << "tfID=" << tfID
338+
<< "orbit=" << recoData.startIR.orbit << "tfID=" << tfID << "tpcOccBef=" << tpcOccBef << "tpcOccAft=" << tpcOccAft
273339
<< "v0Ext=" << v0extVec
274340
<< "pv=" << pv
275341
<< "\n";
@@ -334,29 +400,30 @@ void SVStudySpec::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
334400
}
335401
}
336402

337-
DataProcessorSpec getSVStudySpec(GTrackID::mask_t srcTracks, bool useMC)
403+
DataProcessorSpec getSVStudySpec(GTrackID::mask_t srcTracks, GTrackID::mask_t srcCls, bool useMC)
338404
{
339405
std::vector<OutputSpec> outputs;
340406
auto dataRequest = std::make_shared<DataRequest>();
341407

342408
dataRequest->requestTracks(srcTracks, useMC);
409+
dataRequest->requestClusters(srcCls, false);
343410
dataRequest->requestPrimaryVertices(useMC);
344411
dataRequest->requestSecondaryVertices(useMC);
345412
dataRequest->inputs.emplace_back("meanvtx", "GLO", "MEANVERTEX", 0, Lifetime::Condition, ccdbParamSpec("GLO/Calib/MeanVertex", {}, 1));
346-
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime
347-
false, // GRPECS=true
413+
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(true, // orbitResetTime
414+
true, // GRPECS=true
348415
false, // GRPLHCIF
349416
true, // GRPMagField
350417
true, // askMatLUT
351418
o2::base::GRPGeomRequest::None, // geometry
352419
dataRequest->inputs,
353420
true);
354-
421+
bool useTPCcl = srcCls[GTrackID::TPC];
355422
return DataProcessorSpec{
356423
"sv-study",
357424
dataRequest->inputs,
358425
outputs,
359-
AlgorithmSpec{adaptFromTask<SVStudySpec>(dataRequest, ggRequest, srcTracks, useMC)},
426+
AlgorithmSpec{adaptFromTask<SVStudySpec>(dataRequest, ggRequest, srcTracks, useTPCcl, useMC)},
360427
Options{
361428
{"refit", VariantType::Bool, false, {"refit SVertices"}},
362429
{"sel-k0", VariantType::Float, -1.f, {"If positive, select K0s with this mass margin"}},

Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "GPUParam.inc"
5050
#include "Steer/MCKinematicsReader.h"
5151
#include "MathUtils/fit.h"
52+
#include <TF1.h>
5253

5354
namespace o2::trackstudy
5455
{
@@ -93,7 +94,8 @@ class TrackingStudySpec : public Task
9394
std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
9495
std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOutVtx;
9596
std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction
96-
std::vector<float> mTBinClOccAft, mTBinClOccBef; ///< TPC occupancy histo: i-th entry is the integrated occupancy for ~1 orbit starting/preceding from the TB = i*mNTPCOccBinLength
97+
std::vector<float> mTBinClOccAft, mTBinClOccBef, mTBinClOccWgh; ///< TPC occupancy histo: i-th entry is the integrated occupancy for ~1 orbit starting/preceding from the TB = i*mNTPCOccBinLength
98+
std::unique_ptr<TF1> mOccWghFun;
9799
float mITSROFrameLengthMUS = 0.f;
98100
float mTPCTBinMUS = 0.f; // TPC bin in microseconds
99101
float mTPCTBinMUSInv = 0.f;
@@ -139,6 +141,10 @@ void TrackingStudySpec::init(InitContext& ic)
139141
mDCAYFormula = ic.options().get<std::string>("dcay-vs-pt");
140142
mDCAZFormula = ic.options().get<std::string>("dcaz-vs-pt");
141143
mDoPairsCorr = ic.options().get<bool>("pair-correlations");
144+
auto str = ic.options().get<std::string>("occ-weight-fun");
145+
if (!str.empty()) {
146+
mOccWghFun = std::make_unique<TF1>("occFun", str.c_str(), -100., 100.);
147+
}
142148
}
143149

144150
void TrackingStudySpec::run(ProcessingContext& pc)
@@ -154,16 +160,37 @@ void TrackingStudySpec::run(ProcessingContext& pc)
154160
mNTPCOccBinLength = mTPCRefitter->getParam()->rec.tpc.occupancyMapTimeBins;
155161
mTBinClOccBef.clear();
156162
mTBinClOccAft.clear();
163+
mTBinClOccWgh.clear();
157164
}
165+
158166
// prepare TPC occupancy data
159167
if (mNTPCOccBinLength > 1 && recoData.occupancyMapTPC.size()) {
160168
mNTPCOccBinLengthInv = 1. / mNTPCOccBinLength;
161169
int nTPCBins = mNHBPerTF * o2::constants::lhc::LHCMaxBunches / 8, ninteg = 0;
162170
int nTPCOccBins = nTPCBins * mNTPCOccBinLengthInv, sumBins = std::max(1, int(o2::constants::lhc::LHCMaxBunches / 8 * mNTPCOccBinLengthInv));
163171
mTBinClOccAft.resize(nTPCOccBins);
164172
mTBinClOccBef.resize(nTPCOccBins);
165-
std::vector<float> mltHistTB(nTPCOccBins);
166173
float sm = 0., tb = 0.5 * mNTPCOccBinLength;
174+
/* // at the moment not used
175+
if (mOccWghFun) {
176+
mTBinClOccWgh.resize(nTPCBins);
177+
float occBin2MUS = 8 * o2::constants::lhc::LHCBunchSpacingMUS;
178+
int covWghTB = TMath::NInt(100./occBin2MUS); // coverage of weighted occ. in TBins
179+
for (int i = 0; i < nTPCBins; i++) {
180+
sm = 0.;
181+
for (int j=-covWghTB;j<covWghTB;j++) {
182+
if (j+i<0 || j+i>=nTPCBins) {
183+
continue;
184+
}
185+
sm += mOccWghFun->Eval(j*occBin2MUS)*mTPCRefitter->getParam()->GetUnscaledMult(j+i);
186+
}
187+
mTBinClOccWgh[i] = sm;
188+
}
189+
} else {
190+
mTBinClOccWgh.resize(1);
191+
}
192+
*/
193+
std::vector<float> mltHistTB(nTPCOccBins);
167194
for (int i = 0; i < nTPCOccBins; i++) {
168195
mltHistTB[i] = mTPCRefitter->getParam()->GetUnscaledMult(tb);
169196
tb += mNTPCOccBinLength;
@@ -719,6 +746,7 @@ DataProcessorSpec getTrackingStudySpec(GTrackID::mask_t srcTracks, GTrackID::mas
719746
{"min-pt", VariantType::Float, 0.1f, {"Cut on track pT"}},
720747
{"with-its-only", VariantType::Bool, false, {"Store tracks with ITS only"}},
721748
{"pair-correlations", VariantType::Bool, false, {"Do pairs correlation"}},
749+
{"occ-weight-fun", VariantType::String, "(x>=-40&&x<-5) ? (1./1225*pow(x+40,2)) : ((x>-5&&x<15) ? 1. : ((x>=15&&x<40) ? (-0.4/25*x+1.24 ) : ( (x>40&&x<100) ? -0.4/60*x+0.6+0.8/3 : 0)))", {"Occupancy weighting f-n vs time in musec"}},
722750
{"min-x-prop", VariantType::Float, 100.f, {"track should be propagated to this X at least"}},
723751
};
724752
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);

Detectors/GlobalTrackingWorkflow/study/src/sv-study-workflow.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
3939
{"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation"}},
4040
{"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of track sources to use"}},
4141
{"disable-root-input", VariantType::Bool, false, {"disable root-files input reader"}},
42+
{"ignore-tpc-occ", VariantType::Bool, false, {"do not fill TPC occupancy (needs TPC clusters)"}},
4243
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
4344
o2::raw::HBFUtilsInitializer::addConfigOption(options);
4445
std::swap(workflowOptions, options);
@@ -61,10 +62,14 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
6162

6263
GID::mask_t srcTrc = allowedSourcesTrc & GID::getSourcesMask(configcontext.options().get<std::string>("track-sources"));
6364
GID::mask_t srcCls{};
65+
bool fillTPCOcc = !configcontext.options().get<bool>("ignore-tpc-occ");
66+
if (fillTPCOcc) {
67+
srcCls = srcCls | GID::getSourcesMask("TPC");
68+
}
6469
o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, srcCls, srcTrc, srcTrc, useMC);
6570
o2::globaltracking::InputHelper::addInputSpecsPVertex(configcontext, specs, useMC); // P-vertex is always needed
6671
o2::globaltracking::InputHelper::addInputSpecsSVertex(configcontext, specs); // S-vertex is always needed
67-
specs.emplace_back(o2::svstudy::getSVStudySpec(srcTrc, useMC));
72+
specs.emplace_back(o2::svstudy::getSVStudySpec(srcTrc, srcCls, useMC));
6873

6974
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
7075
o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TimeFrameGPU.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class TimeFrameGPU : public TimeFrame
116116
int* getDeviceNeighboursLUT(const int layer) { return mNeighboursLUTDevice[layer]; }
117117
gsl::span<int*> getDeviceNeighboursLUTs() { return mNeighboursLUTDevice; }
118118
gpuPair<int, int>* getDeviceNeighbourPairs(const int layer) { return mNeighbourPairsDevice[layer]; }
119+
std::array<int*, nLayers - 2>& getDeviceNeighboursAll() { return mNeighboursDevice; }
119120
int* getDeviceNeighbours(const int layer) { return mNeighboursDevice[layer]; }
120121
int** getDeviceNeighboursArray() { return mNeighboursDeviceArray; }
121122
TrackingFrameInfo* getDeviceTrackingFrameInfo(const int);
@@ -142,6 +143,7 @@ class TimeFrameGPU : public TimeFrame
142143
// Host-specific getters
143144
gsl::span<int, nLayers - 1> getNTracklets() { return mNTracklets; }
144145
gsl::span<int, nLayers - 2> getNCells() { return mNCells; }
146+
std::array<int, nLayers - 2>& getArrayNCells() { return mNCells; }
145147

146148
// Host-available device getters
147149
gsl::span<int*> getDeviceTrackletsLUTs() { return mTrackletsLUTDevice; }

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TrackingKernels.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,19 +186,17 @@ void processNeighboursHandler(const int startLayer,
186186
const int startLevel,
187187
CellSeed** allCellSeeds,
188188
CellSeed* currentCellSeeds,
189-
const unsigned int nCurrentCells,
189+
std::array<int, nLayers - 2>& nCells,
190190
const unsigned char** usedClusters,
191-
int* neighbours,
191+
std::array<int*, nLayers - 2>& neighbours,
192192
gsl::span<int*> neighboursDeviceLUTs,
193193
const TrackingFrameInfo** foundTrackingFrameInfo,
194+
std::vector<CellSeed>& seedsHost,
194195
const float bz,
195196
const float MaxChi2ClusterAttachment,
197+
const float maxChi2NDF,
196198
const o2::base::Propagator* propagator,
197199
const o2::base::PropagatorF::MatCorrType matCorrType,
198-
const std::vector<int>& lastCellIdHost, // temporary host vector
199-
const std::vector<CellSeed>& lastCellSeedHost, // temporary host vector
200-
std::vector<int>& updatedCellIdHost, // temporary host vector
201-
std::vector<CellSeed>& updatedCellSeedHost, // temporary host vector
202200
const int nBlocks,
203201
const int nThreads);
204202

0 commit comments

Comments
 (0)