Project
Loading...
Searching...
No Matches
TPCInterpolationSpec.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14#include <vector>
15#include <unordered_map>
16#include <algorithm>
17#include <cmath>
18
24#include "DataFormatsTPC/Defs.h"
41
42using namespace o2::framework;
43using namespace o2::globaltracking;
46
47namespace o2
48{
49namespace tpc
50{
51
53
55{
56 //-------- init geometry and field --------//
57 mTimer.Stop();
58 mTimer.Reset();
60 mSlotLength = ic.options().get<uint32_t>("sec-per-slot");
61 mProcessSeeds = ic.options().get<bool>("process-seeds");
62 mMatCorr = ic.options().get<int>("matCorrType");
63 if (mProcessSeeds && mSources != mSourcesMap) {
64 LOG(fatal) << "process-seeds option is not compatible with using different track sources for vDrift and map extraction";
65 }
66 int lane = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
67 int maxLanes = ic.services().get<const o2::framework::DeviceSpec>().maxInputTimeslices;
68 mInterpolation.setLane(lane, maxLanes);
69 if (mUseMC) {
70 if (!mSendTrackData) {
71 LOG(warning) << "MC truth is stored aligned with the track data, but send-track-data is not set: no MC truth will be sent";
72 }
73 mMCReader = std::make_unique<o2::steer::MCKinematicsReader>();
74 auto mcContext = ic.options().get<std::string>("mc-collision-context");
75 if (!mMCReader->initFromDigitContext(mcContext)) {
76 LOG(fatal) << "Could not initialize the MC kinematics reader from " << mcContext;
77 }
78 }
79}
80
81void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc)
82{
84 mTPCVDriftHelper.extractCCDBInputs(pc);
85 static bool initOnceDone = false;
86 if (!initOnceDone) { // this params need to be queried only once
87 initOnceDone = true;
88 // other init-once stuff
90 mInterpolation.setSqrtS(o2::base::GRPGeomHelper::instance().getGRPLHCIF()->getSqrtS());
92 mInterpolation.init(mSources, mSourcesMap);
93 if (mProcessITSTPConly) {
94 mInterpolation.setProcessITSTPConly();
95 }
96 int nTfs = mSlotLength / (o2::base::GRPGeomHelper::getNHBFPerTF() * o2::constants::lhc::LHCOrbitMUS * 1e-6);
97 bool limitTracks = (param.maxTracksPerCalibSlot < 0) ? false : true;
98 int nTracksPerTfMax = (nTfs > 0 && limitTracks) ? param.maxTracksPerCalibSlot / nTfs : -1;
99 if (nTracksPerTfMax > 0) {
100 LOGP(info, "We will stop processing tracks after validating {} tracks per TF, since we want to accumulate {} tracks for a slot with {} TFs",
101 nTracksPerTfMax, param.maxTracksPerCalibSlot, nTfs);
102 if (param.additionalTracksMap > 0) {
103 int nTracksAdditional = param.additionalTracksMap / nTfs;
104 LOGP(info, "In addition up to {} additional tracks are processed per TF", nTracksAdditional);
105 mInterpolation.setAddTracksForMapPerTF(nTracksAdditional);
106 }
107 } else if (nTracksPerTfMax < 0) {
108 LOG(info) << "The number of processed tracks per TF is not limited";
109 } else {
110 LOG(error) << "No tracks will be processed. maxTracksPerCalibSlot must be greater than slot length in TFs";
111 }
112 mInterpolation.setMaxTracksPerTF(nTracksPerTfMax);
113 mInterpolation.setMatCorr(static_cast<o2::base::Propagator::MatCorrType>(mMatCorr));
114 if (mProcessSeeds) {
115 mInterpolation.setProcessSeeds();
116 }
117 o2::its::GeometryTGeo::Instance()->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2GRot) | o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L));
118 mInterpolation.setExtDetResid(mExtDetResid);
119 mInterpolation.setITSClusterDictionary(mITSDict);
120 if (mDebugOutput) {
121 mInterpolation.setDumpTrackPoints();
122 }
123 }
124 // we may have other params which need to be queried regularly
125 if (mTPCVDriftHelper.isUpdated()) {
126 LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
127 mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
128 mTPCVDriftHelper.getVDriftObject().timeOffsetCorr, mTPCVDriftHelper.getVDriftObject().refTimeOffset,
129 mTPCVDriftHelper.getSourceName());
130 mInterpolation.setTPCVDrift(mTPCVDriftHelper.getVDriftObject());
131 mTPCVDriftHelper.acknowledgeUpdate();
132 }
133}
134
136{
138 return;
139 }
140 if (mTPCVDriftHelper.accountCCDBInputs(matcher, obj)) {
141 return;
142 }
143 if (matcher == ConcreteDataMatcher("ITS", "CLUSDICT", 0)) {
144 LOG(info) << "cluster dictionary updated";
145 mITSDict = (const o2::itsmft::TopologyDictionary*)obj;
146 return;
147 }
148}
149
151{
152 mTimer.Start(false);
153 RecoContainer recoData;
154 recoData.collectData(pc, *mDataRequest.get());
155 updateTimeDependentParams(pc);
156 mInterpolation.prepareInputTrackSample(recoData);
157 mInterpolation.process();
158 mTimer.Stop();
159 LOGF(info, "TPC interpolation timing: Cpu: %.3e Real: %.3e s", mTimer.CpuTime(), mTimer.RealTime());
160 pc.outputs().snapshot(Output{"GLO", "UNBINNEDRES", 0}, mInterpolation.getClusterResiduals());
161 pc.outputs().snapshot(Output{"GLO", "DETINFORES", 0}, mInterpolation.getClusterResidualsDetInfo());
162 pc.outputs().snapshot(Output{"GLO", "TRKREFS", 0}, mInterpolation.getTrackDataCompact());
163 if (mSendTrackData) {
164 pc.outputs().snapshot(Output{"GLO", "TRKDATA", 0}, mInterpolation.getReferenceTracks());
165 }
166 if (mDebugOutput) {
167 pc.outputs().snapshot(Output{"GLO", "TRKDATAEXT", 0}, mInterpolation.getTrackDataExtended());
168 }
169 if (mUseMC && mSendTrackData) {
170 fillMCTruth(recoData);
171 pc.outputs().snapshot(Output{"GLO", "TRKDATAMC", 0}, mTrackDataMC);
172 }
173 mInterpolation.reset();
174}
175
176void TPCInterpolationDPL::fillMCTruth(const RecoContainer& recoData)
177{
178 // MC truth for every stored TrackData: labels of the ITS-TPC part of the seed and of its ITS and TPC parts, the truth at
179 // the ITS outer parameters (the ITS track reference nearest to TrackData::par, propagated to its x with the material
180 // correction of the workflow and the mass of the true particle), the truth at the TPC entrance (the first TPC track
181 // reference in time, in the sector frame), for tracks with TRD residuals the truth at the TRD entrance and the true
182 // positions at the x of the TRD tracklets of the track (ideal tracklets), and the origin of the particle of the ITS-TPC
183 // part (mother, production vertex and process, other stored tracks with the same mother)
184 const auto& trkData = mInterpolation.getReferenceTracks();
185 mTrackDataMC.clear();
186 mTrackDataMC.resize(trkData.size());
187 struct Lookup {
188 o2::MCCompLabel lbl{};
189 uint32_t idx{0};
190 uint8_t kind{0}; // 0: ITS outer, 1: TPC entrance, 2: TRD, 3: origin
191 };
192 std::vector<Lookup> lookups;
193 lookups.reserve(2 * trkData.size());
194 for (size_t i = 0; i < trkData.size(); ++i) {
195 auto& mc = mTrackDataMC[i];
196 auto gidSet = recoData.getSingleDetectorRefs(trkData[i].gid);
197 auto gidITS = gidSet[GTrackID::ITS].isIndexSet() ? gidSet[GTrackID::ITS] : gidSet[GTrackID::ITSAB];
198 if (gidSet[GTrackID::ITSTPC].isIndexSet()) {
199 mc.label = recoData.getTrackMCLabel(gidSet[GTrackID::ITSTPC]);
200 }
201 if (gidITS.isIndexSet()) {
202 mc.labelITS = recoData.getTrackMCLabel(gidITS);
203 }
204 if (gidSet[GTrackID::TPC].isIndexSet()) {
205 mc.labelTPC = recoData.getTrackMCLabel(gidSet[GTrackID::TPC]);
206 }
207 if (mc.labelITS.isValid() && mc.labelTPC.isValid() && mc.labelITS.getTrackEventSourceID() != mc.labelTPC.getTrackEventSourceID()) {
208 mc.flags |= TrackDataMC::FakeITSTPC;
209 }
210 const auto& lblITS = mc.labelITS.isValid() ? mc.labelITS : mc.label;
211 const auto& lblTPC = mc.labelTPC.isValid() ? mc.labelTPC : mc.label;
212 if (lblITS.isValid()) {
213 lookups.push_back({lblITS, uint32_t(i), 0});
214 }
215 if (lblTPC.isValid()) {
216 lookups.push_back({lblTPC, uint32_t(i), 1});
217 }
218 if (mInterpolation.getTRDGIDsSuccess()[i].isIndexSet() && lblTPC.isValid()) { // track with TRD residuals: the true particle of the ITS-TPC part at the TRD
219 lookups.push_back({mc.label.isValid() ? mc.label : lblTPC, uint32_t(i), 2});
220 }
221 if (lblTPC.isValid()) { // origin of the true particle of the ITS-TPC part
222 lookups.push_back({mc.label.isValid() ? mc.label : lblTPC, uint32_t(i), 3});
223 }
224 }
225 // the reader loads the kinematics of a whole event (can be >100 MB): process event by event and release it right after
226 std::sort(lookups.begin(), lookups.end(), [](const Lookup& a, const Lookup& b) {
227 return a.lbl.getSourceID() != b.lbl.getSourceID() ? a.lbl.getSourceID() < b.lbl.getSourceID() : a.lbl.getEventID() < b.lbl.getEventID();
228 });
229 auto pdgToPID = [](int pdg) {
230 switch (std::abs(pdg)) {
231 case 11:
232 return o2::track::PID(o2::track::PID::Electron);
233 case 13:
234 return o2::track::PID(o2::track::PID::Muon);
235 case 321:
236 return o2::track::PID(o2::track::PID::Kaon);
237 case 2212:
238 return o2::track::PID(o2::track::PID::Proton);
239 case 1000010020:
240 return o2::track::PID(o2::track::PID::Deuteron);
241 case 1000010030:
242 return o2::track::PID(o2::track::PID::Triton);
243 case 1000020030:
244 return o2::track::PID(o2::track::PID::Helium3);
245 case 1000020040:
246 return o2::track::PID(o2::track::PID::Alpha);
247 default:
248 return o2::track::PID(o2::track::PID::Pion);
249 }
250 };
251 auto refToPar = [&pdgToPID](const o2::TrackReference& ref, int charge, int pdg, bool sectorAlpha) {
252 std::array<float, 3> xyz{ref.X(), ref.Y(), ref.Z()};
253 std::array<float, 3> pxyz{ref.Px(), ref.Py(), ref.Pz()};
254 return o2::track::TrackPar(xyz, pxyz, charge, sectorAlpha, pdgToPID(pdg));
255 };
256 const auto matCorr = static_cast<o2::base::Propagator::MatCorrType>(mMatCorr);
257 auto prop = o2::base::Propagator::Instance();
258 int curSrc = -1;
259 int curEv = -1;
260 for (const auto& lk : lookups) {
261 const auto& lbl = lk.lbl;
262 if (lbl.getSourceID() != curSrc || lbl.getEventID() != curEv) {
263 if (curSrc >= 0) {
264 mMCReader->releaseTracksForSourceAndEvent(curSrc, curEv);
265 }
266 curSrc = lbl.getSourceID();
267 curEv = lbl.getEventID();
268 }
269 const auto& trk = trkData[lk.idx];
270 auto& mc = mTrackDataMC[lk.idx];
271 const auto* mcTrk = mMCReader->getTrack(lbl);
272 int pdg = mcTrk ? mcTrk->GetPdgCode() : 0;
273 const auto* pPDG = mcTrk ? O2DatabasePDG::Instance()->GetParticle(pdg) : nullptr;
274 int charge = pPDG ? int(std::lround(pPDG->Charge() / 3.)) : 0; // TParticlePDG charge is in units of |e|/3
275 auto refs = mMCReader->getTrackRefs(lbl.getSourceID(), lbl.getEventID(), lbl.getTrackID());
276 if (lk.kind == 0) { // ITS outer: track reference of the ITS part nearest to TrackData::par
277 const o2::TrackReference* best = nullptr;
278 float bestD2 = 1e30f;
279 auto xyzReco = trk.par.getXYZGlo();
280 for (const auto& ref : refs) {
281 if (ref.getDetectorId() != DetID::ITS) {
282 continue;
283 }
284 float dx = ref.X() - xyzReco.X();
285 float dy = ref.Y() - xyzReco.Y();
286 float dz = ref.Z() - xyzReco.Z();
287 float d2 = dx * dx + dy * dy + dz * dz;
288 if (d2 < bestD2) {
289 bestD2 = d2;
290 best = &ref;
291 }
292 }
293 if (best && charge) {
294 auto par = refToPar(*best, charge, pdg, false);
295 if (par.rotateParam(trk.par.getAlpha()) && prop->PropagateToXBxByBz(par, trk.par.getX(), 0.999f, o2::base::Propagator::MAX_STEP, matCorr)) {
296 mc.parITSOut = par;
297 mc.distITSRef = std::sqrt(bestD2);
298 mc.flags |= TrackDataMC::HasITSOut;
299 }
300 }
301 } else if (lk.kind == 1) { // TPC entrance: first TPC track reference in time of the TPC part
302 const o2::TrackReference* first = nullptr;
303 for (const auto& ref : refs) {
304 if (ref.getDetectorId() == DetID::TPC && (!first || ref.getTime() < first->getTime())) {
305 first = &ref;
306 }
307 }
308 if (first && charge) {
309 mc.parTPCIn = refToPar(*first, charge, pdg, true);
310 mc.flags |= TrackDataMC::HasTPCIn;
311 // association check (loopers, wrong leg, fake): truth at the innermost TPC cluster of the track vs that cluster
312 const auto& clRes = mInterpolation.getClusterResiduals();
313 const UnbinnedResid* inner = nullptr;
314 for (int ic = trk.clIdx.getFirstEntry(); ic < trk.clIdx.getFirstEntry() + trk.clIdx.getEntries(); ++ic) {
315 if (clRes[ic].row < constants::MAXGLOBALPADROW && (!inner || clRes[ic].row < inner->row)) {
316 inner = &clRes[ic];
317 }
318 }
319 if (inner) {
320 auto par = mc.parTPCIn;
321 float yCl = inner->y * param::MaxY / 0x7fff + inner->dy * param::MaxResid / 0x7fff;
322 float zCl = inner->z * param::MaxZ / 0x7fff + inner->dz * param::MaxResid / 0x7fff;
323 if (par.rotateParam(o2::math_utils::sector2Angle(inner->sec)) && prop->PropagateToXBxByBz(par, param::RowX[inner->row], 0.999f, o2::base::Propagator::MAX_STEP, matCorr)) {
324 mc.distTPCRef = std::hypot(par.getY() - yCl, par.getZ() - zCl);
325 }
326 }
327 }
328 } else if (lk.kind == 3) { // origin: mother, production vertex and process
329 if (!mcTrk) {
330 continue;
331 }
332 mc.pdg = pdg;
333 if (mcTrk->isPrimary()) {
334 mc.flags |= TrackDataMC::IsPrimary;
335 }
336 mc.process = mcTrk->getProcess();
337 mc.prodX = mcTrk->GetStartVertexCoordinatesX();
338 mc.prodY = mcTrk->GetStartVertexCoordinatesY();
339 mc.prodZ = mcTrk->GetStartVertexCoordinatesZ();
340 mc.prodPx = mcTrk->GetStartVertexMomentumX();
341 mc.prodPy = mcTrk->GetStartVertexMomentumY();
342 mc.prodPz = mcTrk->GetStartVertexMomentumZ();
343 int motherId = mcTrk->getMotherTrackId();
344 if (motherId >= 0) {
345 mc.motherLabel = o2::MCCompLabel(motherId, lbl.getEventID(), lbl.getSourceID());
346 const auto* mother = mMCReader->getTrack(lbl.getSourceID(), lbl.getEventID(), motherId);
347 mc.motherPdg = mother ? mother->GetPdgCode() : 0;
348 }
349 } else if (charge) { // TRD: entrance (first TRD track reference in time) and the true positions at the tracklet x of each layer
350 const o2::TrackReference* first = nullptr;
351 for (const auto& ref : refs) {
352 if (ref.getDetectorId() == DetID::TRD && (!first || ref.getTime() < first->getTime())) {
353 first = &ref;
354 }
355 }
356 if (!first) {
357 continue;
358 }
359 mc.parTRDIn = refToPar(*first, charge, pdg, true);
360 mc.flags |= TrackDataMC::HasTRDIn;
361 const auto& trkTRD = recoData.getITSTPCTRDTrack<o2::trd::TrackTRD>(mInterpolation.getTRDGIDsSuccess()[lk.idx]); // the TRD track of the stored TRD residuals
362 const auto trkltsCalib = recoData.getTRDCalibratedTracklets();
363 const auto tracklets = recoData.getTRDTracklets();
364 for (int iLayer = 0; iLayer < o2::trd::constants::NLAYER; iLayer++) {
365 int trkltIdx = trkTRD.getTrackletIndex(iLayer);
366 if (trkltIdx < 0) {
367 continue;
368 }
369 const auto& sp = trkltsCalib[trkltIdx]; // tracklet x, y, z in its sector frame, as used for the TRD residual
370 int sec = tracklets[trkltIdx].getDetector() / (o2::trd::constants::NLAYER * o2::trd::constants::NSTACK);
372 float cs = std::cos(alpha);
373 float sn = std::sin(alpha);
374 float gx = sp.getX() * cs - sp.getY() * sn;
375 float gy = sp.getX() * sn + sp.getY() * cs;
376 float gz = sp.getZ();
377 const o2::TrackReference* best = nullptr;
378 float bestD2 = 1e30f;
379 for (const auto& ref : refs) {
380 if (ref.getDetectorId() != DetID::TRD) {
381 continue;
382 }
383 float dx = ref.X() - gx;
384 float dy = ref.Y() - gy;
385 float dz = ref.Z() - gz;
386 float d2 = dx * dx + dy * dy + dz * dz;
387 if (d2 < bestD2) {
388 bestD2 = d2;
389 best = &ref;
390 }
391 }
392 auto par = refToPar(*best, charge, pdg, false);
393 if (par.rotateParam(alpha) && prop->PropagateToXBxByBz(par, sp.getX(), 0.999f, o2::base::Propagator::MAX_STEP, matCorr)) {
394 mc.yTRD[iLayer] = par.getY();
395 mc.zTRD[iLayer] = par.getZ();
396 mc.trdLayerMask |= uint8_t(1) << iLayer;
397 }
398 }
399 }
400 }
401 if (curSrc >= 0) {
402 mMCReader->releaseTracksForSourceAndEvent(curSrc, curEv);
403 }
404 // stored tracks with the same mother (e.g. both daughters of a K0s): each points to the next one, cyclically
405 std::unordered_map<uint64_t, std::vector<uint32_t>> daughters;
406 for (uint32_t i = 0; i < mTrackDataMC.size(); ++i) {
407 if (mTrackDataMC[i].motherLabel.isSet()) {
408 daughters[mTrackDataMC[i].motherLabel.getTrackEventSourceID()].push_back(i);
409 }
410 }
411 for (const auto& [mother, idx] : daughters) {
412 for (size_t k = 0; idx.size() > 1 && k < idx.size(); ++k) {
413 mTrackDataMC[idx[k]].sisterIdx = idx[(k + 1) % idx.size()];
414 }
415 }
416}
417
419{
420 mInterpolation.finalize();
421 LOGF(info, "TPC residuals extraction total timing: Cpu: %.3e Real: %.3e s in %d slots",
422 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
423}
424
425DataProcessorSpec 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, bool extDetResid, bool itsStag)
426{
427 auto dataRequest = std::make_shared<DataRequest>();
428 dataRequest->setITSPerLayer(itsStag);
429 std::vector<OutputSpec> outputs;
430
431 dataRequest->requestTracks(srcVtx, false);
432 dataRequest->requestClusters(srcCls, false);
433 dataRequest->requestPrimaryVertices(false);
434 if (useMC) { // the MC truth needs only the labels of the ITS-TPC tracks and of their ITS and TPC parts
435 dataRequest->requestTracks(GTrackID::getSourcesMask("ITS,TPC,ITS-TPC"), true);
436 }
437
438 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime
439 true, // GRPECS=true
440 true, // GRPLHCIF
441 true, // GRPMagField
442 true, // askMatLUT
444 dataRequest->inputs,
445 true);
446 o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
447 outputs.emplace_back("GLO", "UNBINNEDRES", 0, Lifetime::Timeframe);
448 outputs.emplace_back("GLO", "DETINFORES", 0, Lifetime::Timeframe);
449 outputs.emplace_back("GLO", "TRKREFS", 0, Lifetime::Timeframe);
450 if (sendTrackData) {
451 outputs.emplace_back("GLO", "TRKDATA", 0, Lifetime::Timeframe);
452 }
453 if (debugOutput) {
454 outputs.emplace_back("GLO", "TRKDATAEXT", 0, Lifetime::Timeframe);
455 }
456 if (useMC && sendTrackData) {
457 outputs.emplace_back("GLO", "TRKDATAMC", 0, Lifetime::Timeframe);
458 }
459
460 return DataProcessorSpec{
461 "tpc-track-interpolation",
462 dataRequest->inputs,
463 outputs,
464 AlgorithmSpec{adaptFromTask<TPCInterpolationDPL>(dataRequest, srcTrk, srcTrkMap, ggRequest, useMC, processITSTPConly, sendTrackData, debugOutput, extDetResid)},
465 Options{
466 {"matCorrType", VariantType::Int, 2, {"material correction type (definition in Propagator.h)"}},
467 {"sec-per-slot", VariantType::UInt32, 300u, {"number of seconds per calibration time slot (put 0 for infinite slot length)"}},
468 {"process-seeds", VariantType::Bool, false, {"do not remove duplicates, e.g. for ITS-TPC-TRD track also process its seeding ITS-TPC part"}},
469 {"mc-collision-context", VariantType::String, "collisioncontext.root", {"collision context used to access the MC kinematics and track references (MC only)"}}}};
470}
471
472} // namespace tpc
473} // namespace o2
Class of a TPC cluster in TPC-native coordinates (row, time)
Wrapper container for different reconstructed object types.
Definition of the GeometryManager class.
int16_t charge
Definition RawEventData.h:5
int32_t i
Definition of the GeometryTGeo class.
Wrapper container for different reconstructed object types.
Parameters used for TPC space point calibration.
Definition of the ITS track.
Result of refitting TPC-ITS matched track.
Helper class to obtain TPC clusters / digits / labels from DPL.
bool isValid() const
Definition MCCompLabel.h:82
static TDatabasePDG * Instance()
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
GPUd() value_type estimateLTFast(o2 static GPUd() float estimateLTIncrement(const o2 PropagatorImpl * Instance(bool uninitialized=false)
Definition Propagator.h:180
static mask_t getSourcesMask(const std::string_view srcList)
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:60
void snapshot(const Output &spec, T const &object)
ServiceRegistryRef services()
Definition InitContext.h:34
ConfigParamRegistry const & options()
Definition InitContext.h:33
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
void endOfStream(EndOfStreamContext &ec) final
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj) final
void init(InitContext &ic) final
void run(ProcessingContext &pc) final
void prepareInputTrackSample(const o2::globaltracking::RecoContainer &inp)
Prepare input track sample (not relying on CreateTracksVariadic functionality)
std::vector< TrackData > & getReferenceTracks()
std::vector< TrackDataExtended > & getTrackDataExtended()
const std::vector< o2::dataformats::GlobalTrackID > & getTRDGIDsSuccess() const
ITS-TPC-TRD track whose tracklets gave the TRD residuals of each stored track (not set if none),...
void setMatCorr(MatCorrType matCorr)
Sets the flag if material correction should be applied when extrapolating the tracks.
void setProcessSeeds()
Enable processing of seeds.
void setMaxTracksPerTF(int n)
Sets the maximum number of tracks to be processed (successfully) per TF.
std::vector< TrackDataCompact > & getTrackDataCompact()
void setAddTracksForMapPerTF(int n)
In addition to mMaxTracksPerTF up to the set number of additional tracks can be processed.
void setLane(int lID, int nL)
std::vector< DetInfoResid > & getClusterResidualsDetInfo()
void process()
Main processing function.
void setITSClusterDictionary(const o2::itsmft::TopologyDictionary *dict)
Allow setting the ITS cluster dictionary from outside.
std::vector< UnbinnedResid > & getClusterResiduals()
void setDumpTrackPoints()
Enable full output.
void setTPCVDrift(const o2::tpc::VDriftCorrFact &v)
void setProcessITSTPConly()
Enable ITS-TPC only processing.
void setSqrtS(float s)
Set the centre of mass energy required for pT downsampling Tsalis function.
void reset()
Reset cache and output vectors.
void init(o2::dataformats::GlobalTrackID::mask_t src, o2::dataformats::GlobalTrackID::mask_t srcMap)
Initialize everything, set the requested track sources.
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
const VDriftCorrFact & getVDriftObject() const
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static std::string_view getSourceName(Source s)
bool isUpdated() const
GPUd() bool getPosDirGlo(std value_t value_t & y
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint first
Definition glcorearb.h:399
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLenum GLfloat param
Definition glcorearb.h:271
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLint ref
Definition glcorearb.h:291
uint8_t int statusCode int
uint8_t itsSharedClusterMap uint8_t
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< ConfigParamSpec > Options
const bool const bool const int FollowDirection BestTrial TrackITSInternal< NLayers > & best
o2::track::TrackParametrization< float > par
float sector2Angle(int sect)
Definition Utils.h:193
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, bool extDetResid, bool itsStag)
create a processor spec
value_T d2
Definition TrackUtils.h:135
TrackParF TrackPar
Definition Track.h:29
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
GlobalIDSet getSingleDetectorRefs(GTrackID gidx) const
gsl::span< const o2::trd::CalibratedTracklet > getTRDCalibratedTracklets() const
o2::MCCompLabel getTrackMCLabel(GTrackID id) const
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
auto getITSTPCTRDTrack(GTrackID id) const
gsl::span< const o2::trd::Tracklet64 > getTRDTracklets() const
@ FakeITSTPC
ITS and TPC parts of the track have different MC labels.
@ HasTPCIn
parTPCIn is filled
@ HasITSOut
parITSOut is filled
@ HasTRDIn
parTRDIn is filled
float refTimeOffset
additive time offset reference (\mus)
float refVDrift
reference vdrift for which factor was extracted
float timeOffsetCorr
additive time offset correction (\mus)
float corrFact
drift velocity correction factor (multiplicative)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< int > row
std::vector< Tracklet64 > tracklets