Project
Loading...
Searching...
No Matches
RecoContainer.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
15
16#include <fmt/format.h>
17#include <chrono>
38// FIXME: ideally, the data formats definition should be independent of the framework
39// collectData is using the input of ProcessingContext to extract the first valid
40// header and the TF orbit from it
44
45#ifdef ENABLE_UPGRADES
47#endif
48
49using namespace o2::globaltracking;
50using namespace o2::framework;
51namespace o2d = o2::dataformats;
52
55
58
60{
61 if (std::find(inputs.begin(), inputs.end(), isp) == inputs.end()) {
62 inputs.emplace_back(isp);
63 }
64}
65
67{
68 addInput({"IRFramesITS", "ITS", "IRFRAMES", 0, Lifetime::Timeframe});
69 requestMap["IRFramesITS"] = false;
70}
71
73{
74 addInput({"trackITS", "ITS", "TRACKS", 0, Lifetime::Timeframe});
75 addInput({"trackITSROF", "ITS", "ITSTrackROF", 0, Lifetime::Timeframe});
76 addInput({"trackITSClIdx", "ITS", "TRACKCLSID", 0, Lifetime::Timeframe});
77 addInput({"alpparITS", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam")});
78 if (mc) {
79 addInput({"trackITSMCTR", "ITS", "TRACKSMCTR", 0, Lifetime::Timeframe});
80 }
81 requestMap["trackITS"] = mc;
82}
83
85{
86 addInput({"trackMFT", "MFT", "TRACKS", 0, Lifetime::Timeframe});
87 addInput({"trackMFTROF", "MFT", "MFTTrackROF", 0, Lifetime::Timeframe});
88 addInput({"trackMFTClIdx", "MFT", "TRACKCLSID", 0, Lifetime::Timeframe});
89 addInput({"alpparMFT", "MFT", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("MFT/Config/AlpideParam")});
90 if (mc) {
91 addInput({"trackMFTMCTR", "MFT", "TRACKSMCTR", 0, Lifetime::Timeframe});
92 }
93 requestMap["trackMFT"] = mc;
94}
95
97{
98 addInput({"trackMCH", "MCH", "TRACKS", 0, Lifetime::Timeframe});
99 addInput({"trackMCHROF", "MCH", "TRACKROFS", 0, Lifetime::Timeframe});
100 addInput({"trackMCHTRACKCLUSTERS", "MCH", "TRACKCLUSTERS", 0, Lifetime::Timeframe});
101 if (mc) {
102 addInput({"trackMCHMCTR", "MCH", "TRACKLABELS", 0, Lifetime::Timeframe});
103 }
104 requestMap["trackMCH"] = mc;
105}
106
108{
109 addInput({"trackMIDROF", "MID", "TRACKROFS", 0, Lifetime::Timeframe});
110 addInput({"trackClMIDROF", "MID", "TRCLUSROFS", 0, Lifetime::Timeframe});
111 addInput({"trackMID", "MID", "TRACKS", 0, Lifetime::Timeframe});
112 addInput({"trackMIDTRACKCLUSTERS", "MID", "TRACKCLUSTERS", 0, Lifetime::Timeframe});
113 if (mc) {
114 addInput({"trackMIDMCTR", "MID", "TRACKLABELS", 0, Lifetime::Timeframe});
115 addInput({"trackMIDMCTRCL", "MID", "TRCLUSLABELS", 0, Lifetime::Timeframe});
116 }
117 requestMap["trackMID"] = mc;
118}
119
121{
122 addInput({"trackTPC", "TPC", "TRACKS", 0, Lifetime::Timeframe});
123 addInput({"trackTPCClRefs", "TPC", "CLUSREFS", 0, Lifetime::Timeframe});
124 if (requestMap.find("clusTPC") != requestMap.end()) {
125 addInput({"clusTPCshmap", "TPC", "CLSHAREDMAP", 0, Lifetime::Timeframe});
126 addInput({"clusTPCoccmap", "TPC", "TPCOCCUPANCYMAP", 0, Lifetime::Timeframe});
127 }
128 if (mc) {
129 addInput({"trackTPCMCTR", "TPC", "TRACKSMCLBL", 0, Lifetime::Timeframe});
130 }
131 requestMap["trackTPC"] = mc;
132}
133
135{
136 addInput({"trackITSTPC", "GLO", "TPCITS", 0, Lifetime::Timeframe});
137 addInput({"trackITSTPCABREFS", "GLO", "TPCITSAB_REFS", 0, Lifetime::Timeframe});
138 addInput({"trackITSTPCABCLID", "GLO", "TPCITSAB_CLID", 0, Lifetime::Timeframe});
139 if (mc) {
140 addInput({"trackITSTPCMCTR", "GLO", "TPCITS_MC", 0, Lifetime::Timeframe});
141 addInput({"trackITSTPCABMCTR", "GLO", "TPCITSAB_MC", 0, Lifetime::Timeframe});
142 }
143 requestMap["trackITSTPC"] = mc;
144}
145
147{
148 addInput({"fwdtracks", "GLO", "GLFWD", 0, Lifetime::Timeframe});
149 if (mc) {
150 addInput({"MCTruth", "GLO", "GLFWD_MC", 0, Lifetime::Timeframe});
151 }
152 requestMap["fwdtracks"] = mc;
153}
154
156{
157 addInput({"matchMFTMCH", "GLO", "MTC_MFTMCH", 0, Lifetime::Timeframe});
158 requestMap["matchMFTMCH"] = mc;
159}
160
162{
163 addInput({"matchMCHMID", "GLO", "MTC_MCHMID", 0, Lifetime::Timeframe});
164 if (mc) {
165 addInput({"matchMCHMID_MCTR", "GLO", "MCMTC_MCHMID", 0, Lifetime::Timeframe});
166 }
167 requestMap["matchMCHMID"] = mc;
168}
169
171{
172 auto ss = getMatchingInputSubSpec();
173 addInput({"matchTPCTOF", "TOF", "MTC_TPC", ss, Lifetime::Timeframe});
174 addInput({"trackTPCTOF", "TOF", "TOFTRACKS_TPC", ss, Lifetime::Timeframe});
175 if (mc) {
176 addInput({"clsTOF_TPC_MCTR", "TOF", "MCMTC_TPC", ss, Lifetime::Timeframe});
177 }
178 requestMap["trackTPCTOF"] = mc;
179}
180
182{
183 addInput({"trackITSTPCTRD", "TRD", "MATCH_ITSTPC", 0, Lifetime::Timeframe});
184 addInput({"trigITSTPCTRD", "TRD", "TRGREC_ITSTPC", 0, Lifetime::Timeframe});
185 if (mc) {
186 addInput({"trackITSTPCTRDMCTR", "TRD", "MCLB_ITSTPC", 0, Lifetime::Timeframe});
187 addInput({"trackITSTPCTRDSAMCTR", "TRD", "MCLB_ITSTPC_TRD", 0, Lifetime::Timeframe});
188 }
189 requestMap["trackITSTPCTRD"] = mc;
190}
191
193{
194 auto ss = getMatchingInputSubSpec();
195 addInput({"trackTPCTRD", "TRD", "MATCH_TPC", ss, Lifetime::Timeframe});
196 addInput({"trigTPCTRD", "TRD", "TRGREC_TPC", ss, Lifetime::Timeframe});
197 if (mc) {
198 addInput({"trackTPCTRDMCTR", "TRD", "MCLB_TPC", ss, Lifetime::Timeframe});
199 addInput({"trackTPCTRDSAMCTR", "TRD", "MCLB_TPC_TRD", ss, Lifetime::Timeframe});
200 }
201 requestMap["trackTPCTRD"] = mc;
202}
203
205{
207 addInput({"matchITSTPCTOF", "TOF", "MTC_ITSTPC", 0, Lifetime::Timeframe});
208 if (mc) {
209 addInput({"clsTOF_GLO_MCTR", "TOF", "MCMTC_ITSTPC", 0, Lifetime::Timeframe});
210 }
211 requestMap["matchTOF_ITSTPC"] = mc;
212 }
214 addInput({"matchTPCTRDTOF", "TOF", "MTC_TPCTRD", 0, Lifetime::Timeframe});
215 if (mc) {
216 addInput({"clsTOF_GLO2_MCTR", "TOF", "MCMTC_TPCTRD", 0, Lifetime::Timeframe});
217 }
218 requestMap["matchTOF_TPCTRD"] = mc;
219 }
221 addInput({"matchITSTPCTRDTOF", "TOF", "MTC_ITSTPCTRD", 0, Lifetime::Timeframe});
222 if (mc) {
223 addInput({"clsTOF_GLO3_MCTR", "TOF", "MCMTC_ITSTPCTRD", 0, Lifetime::Timeframe});
224 }
225 requestMap["matchTOF_ITSTPCTRD"] = mc;
226 }
227}
228
230{
231 addInput({"clusITS", "ITS", "COMPCLUSTERS", 0, Lifetime::Timeframe});
232 addInput({"clusITSPatt", "ITS", "PATTERNS", 0, Lifetime::Timeframe});
233 addInput({"clusITSROF", "ITS", "CLUSTERSROF", 0, Lifetime::Timeframe});
234 addInput({"alpparITS", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam")});
235 if (mc) {
236 addInput({"clusITSMC", "ITS", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
237 }
238 addInput({"cldictITS", "ITS", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/ClusterDictionary")});
239 requestMap["clusITS"] = mc;
240}
241
242#ifdef ENABLE_UPGRADES
243void DataRequest::requestIT3Clusters(bool mc)
244{
245 addInput({"clusITS", "ITS", "COMPCLUSTERS", 0, Lifetime::Timeframe});
246 addInput({"clusITSPatt", "ITS", "PATTERNS", 0, Lifetime::Timeframe});
247 addInput({"clusITSROF", "ITS", "CLUSTERSROF", 0, Lifetime::Timeframe});
248 addInput({"alpparITS", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam")});
249 if (mc) {
250 addInput({"clusITSMC", "ITS", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
251 }
252 addInput({"cldictIT3", "IT3", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("IT3/Calib/ClusterDictionary")});
253 requestMap["clusIT3"] = mc;
254}
255#endif
256
258{
259 addInput({"clusMFT", "MFT", "COMPCLUSTERS", 0, Lifetime::Timeframe});
260 addInput({"clusMFTPatt", "MFT", "PATTERNS", 0, Lifetime::Timeframe});
261 addInput({"clusMFTROF", "MFT", "CLUSTERSROF", 0, Lifetime::Timeframe});
262 addInput({"cldictMFT", "MFT", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("MFT/Calib/ClusterDictionary")});
263 addInput({"alpparMFT", "MFT", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("MFT/Config/AlpideParam")});
264 if (mc) {
265 addInput({"clusMFTMC", "MFT", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
266 }
267 requestMap["clusMFT"] = mc;
268}
269
271{
272 addInput({"clusTPC", ConcreteDataTypeMatcher{"TPC", "CLUSTERNATIVE"}, Lifetime::Timeframe});
273 if (!getenv("DPL_DISABLE_TPC_TRIGGER_READER") || atoi(getenv("DPL_DISABLE_TPC_TRIGGER_READER")) != 1) {
275 }
276 if (requestMap.find("trackTPC") != requestMap.end()) {
277 addInput({"clusTPCshmap", "TPC", "CLSHAREDMAP", 0, Lifetime::Timeframe});
278 addInput({"clusTPCoccmap", "TPC", "TPCOCCUPANCYMAP", 0, Lifetime::Timeframe});
279 }
280 if (mc) {
281 addInput({"clusTPCMC", ConcreteDataTypeMatcher{"TPC", "CLNATIVEMCLBL"}, Lifetime::Timeframe});
282 }
283 requestMap["clusTPC"] = mc;
284}
285
287{
288 addInput({"trigTPC", "TPC", "TRIGGERWORDS", 0, Lifetime::Timeframe});
289 requestMap["trigTPC"] = false;
290}
291
293{
294 addInput({"tofcluster", "TOF", "CLUSTERS", 0, Lifetime::Timeframe});
295 if (mc) {
296 addInput({"tofclusterlabel", "TOF", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
297 }
298 requestMap["clusTOF"] = mc;
299}
300
302{
303 if (mc) {
304 LOG(warn) << "MCH global clusters do not support MC lables, disabling";
305 mc = false;
306 }
307 addInput({"clusMCH", "MCH", "GLOBALCLUSTERS", 0, Lifetime::Timeframe});
308 addInput({"clusMCHROF", "MCH", "CLUSTERROFS", 0, Lifetime::Timeframe});
309 if (mc) {
310 addInput({"clusMCHMC", "MCH", "CLUSTERLABELS", 0, Lifetime::Timeframe});
311 }
312 requestMap["clusMCH"] = mc;
313}
314
316{
317 if (mc) { // RS: remove this once labels will be available
318 LOG(warn) << "HMP clusters do not support MC lables, disabling";
319 mc = false;
320 }
321 addInput({"hmpidcluster", "HMP", "CLUSTERS", 0, Lifetime::Timeframe});
322 addInput({"hmpidtriggers", "HMP", "INTRECORDS1", 0, Lifetime::Timeframe});
323 if (mc) {
324 addInput({"hmpidclusterlabel", "HMP", "CLUSTERSMCTR", 0, Lifetime::Timeframe});
325 }
326 requestMap["clusHMP"] = mc;
327}
328
330{
331 addInput({"clusMID", "MID", "CLUSTERS", 0, Lifetime::Timeframe});
332 addInput({"clusMIDROF", "MID", "CLUSTERSROF", 0, Lifetime::Timeframe});
333 if (mc) {
334 addInput({"clusMIDMC", "MID", "CLUSTERSLABELS", 0, Lifetime::Timeframe});
335 }
336 requestMap["clusMID"] = mc;
337}
338
340{
341 addInput({"trdtracklets", o2::header::gDataOriginTRD, "TRACKLETS", 0, Lifetime::Timeframe});
342 addInput({"trdctracklets", o2::header::gDataOriginTRD, "CTRACKLETS", 0, Lifetime::Timeframe});
343 addInput({"trdtrigrecmask", o2::header::gDataOriginTRD, "TRIGRECMASK", 0, Lifetime::Timeframe});
344 addInput({"trdtriggerrec", o2::header::gDataOriginTRD, "TRKTRGRD", 0, Lifetime::Timeframe});
345 if (mc) {
346 addInput({"trdtrackletlabels", o2::header::gDataOriginTRD, "TRKLABELS", 0, Lifetime::Timeframe});
347 }
348 requestMap["trackletTRD"] = mc;
349}
350
352{
353 addInput({"ft0recpoints", "FT0", "RECPOINTS", 0, Lifetime::Timeframe});
354 addInput({"ft0channels", "FT0", "RECCHDATA", 0, Lifetime::Timeframe});
355 if (mc) {
356 LOG(error) << "FT0 RecPoint does not support MC truth";
357 }
358 requestMap["FT0"] = false;
359}
360
362{
363 addInput({"fv0recpoints", "FV0", "RECPOINTS", 0, Lifetime::Timeframe});
364 addInput({"fv0channels", "FV0", "RECCHDATA", 0, Lifetime::Timeframe});
365 if (mc) {
366 LOG(error) << "FV0 RecPoint does not support MC truth";
367 }
368 requestMap["FV0"] = false;
369}
370
372{
373 addInput({"fddrecpoints", "FDD", "RECPOINTS", 0, Lifetime::Timeframe});
374 addInput({"fddchannels", "FDD", "RECCHDATA", 0, Lifetime::Timeframe});
375 if (mc) {
376 LOG(error) << "FDD RecPoint does not support MC truth";
377 }
378 requestMap["FDD"] = false;
379}
380
382{
383 addInput({"zdcbcrec", "ZDC", "BCREC", 0, Lifetime::Timeframe});
384 addInput({"zdcenergy", "ZDC", "ENERGY", 0, Lifetime::Timeframe});
385 addInput({"zdctdcdata", "ZDC", "TDCDATA", 0, Lifetime::Timeframe});
386 addInput({"zdcinfo", "ZDC", "INFO", 0, Lifetime::Timeframe});
387 if (mc) {
388 LOG(error) << "ZDC RecEvent does not support MC truth";
389 }
390 requestMap["ZDC"] = false;
391}
392
394{
395 addInput({"cosmics", "GLO", "COSMICTRC", 0, Lifetime::Timeframe});
396 if (mc) {
397 addInput({"cosmicsMC", "GLO", "COSMICTRC_MC", 0, Lifetime::Timeframe});
398 }
399 requestMap["Cosmics"] = mc;
400}
401
403{
404 addInput({"pvtx", "GLO", "PVTX", 0, Lifetime::Timeframe});
405 addInput({"pvtx_trmtc", "GLO", "PVTX_TRMTC", 0, Lifetime::Timeframe}); // global ids of associated tracks
406 addInput({"pvtx_tref", "GLO", "PVTX_TRMTCREFS", 0, Lifetime::Timeframe}); // vertex - trackID refs
407 if (mc) {
408 addInput({"pvtx_mc", "GLO", "PVTX_MCTR", 0, Lifetime::Timeframe});
409 }
410 requestMap["PVertex"] = mc;
411}
412
413void DataRequest::requestPrimaryVerticesTMP(bool mc) // primary vertices before global vertex-track matching
414{
415 addInput({"pvtx", "GLO", "PVTX", 0, Lifetime::Timeframe});
416 addInput({"pvtx_cont", "GLO", "PVTX_CONTID", 0, Lifetime::Timeframe}); // global ids of contributors
417 addInput({"pvtx_contref", "GLO", "PVTX_CONTIDREFS", 0, Lifetime::Timeframe}); // vertex - trackID refs of contributors
418 if (mc) {
419 addInput({"pvtx_mc", "GLO", "PVTX_MCTR", 0, Lifetime::Timeframe});
420 }
421 requestMap["PVertexTMP"] = mc;
422}
423
425{
426 addInput({"v0sIdx", "GLO", "V0S_IDX", 0, Lifetime::Timeframe});
427 addInput({"v0s", "GLO", "V0S", 0, Lifetime::Timeframe});
428 addInput({"p2v0s", "GLO", "PVTX_V0REFS", 0, Lifetime::Timeframe});
429 addInput({"cascsIdx", "GLO", "CASCS_IDX", 0, Lifetime::Timeframe});
430 addInput({"cascs", "GLO", "CASCS", 0, Lifetime::Timeframe});
431 addInput({"p2cascs", "GLO", "PVTX_CASCREFS", 0, Lifetime::Timeframe});
432 addInput({"decay3bodyIdx", "GLO", "DECAYS3BODY_IDX", 0, Lifetime::Timeframe});
433 addInput({"decay3body", "GLO", "DECAYS3BODY", 0, Lifetime::Timeframe});
434 addInput({"p2decay3body", "GLO", "PVTX_3BODYREFS", 0, Lifetime::Timeframe});
435 requestMap["SVertex"] = false; // no MC provided for secondary vertices
436}
437
439{
440 addInput({"strangetracks", "GLO", "STRANGETRACKS", 0, Lifetime::Timeframe});
441 if (mc) {
442 addInput({"strack_mc", "GLO", "STRANGETRACKS_MC", 0, Lifetime::Timeframe});
443 }
444 requestMap["STracker"] = mc; // no MC for the time being
445}
446
448{
449 addInput({"CTPDigits", "CTP", "DIGITS", 0, Lifetime::Timeframe});
450 addInput({"CTPLumi", "CTP", "LUMI", 0, Lifetime::Timeframe});
451 if (mc) {
452 LOG(warning) << "MC truth not implemented for CTP";
453 // addInput({"CTPDigitsMC", "CTP", "DIGITSMCTR", 0, Lifetime::Timeframe});
454 }
455 requestMap["CTPDigits"] = false;
456}
457
459{
460 addInput({"CPVClusters", "CPV", "CLUSTERS", 0, Lifetime::Timeframe});
461 addInput({"CPVTriggers", "CPV", "CLUSTERTRIGRECS", 0, Lifetime::Timeframe});
462 if (mc) {
463 addInput({"CPVClustersMC", "CPV", "CLUSTERTRUEMC", 0, Lifetime::Timeframe});
464 }
465 requestMap["CPVClusters"] = mc;
466}
467
469{
470 addInput({"PHSCells", "PHS", "CELLS", 0, Lifetime::Timeframe});
471 addInput({"PHSTriggers", "PHS", "CELLTRIGREC", 0, Lifetime::Timeframe});
472 if (mc) {
473 addInput({"PHSCellsMC", "PHS", "CELLSMCTR", 0, Lifetime::Timeframe});
474 }
475 requestMap["PHSCells"] = mc;
476}
477
479{
480 addInput({"EMCCells", "EMC", "CELLS", 0, Lifetime::Timeframe});
481 addInput({"EMCTriggers", "EMC", "CELLSTRGR", 0, Lifetime::Timeframe});
482 if (mc) {
483 addInput({"EMCCellsMC", "EMC", "CELLSMCTR", 0, Lifetime::Timeframe});
484 }
485 requestMap["EMCCells"] = mc;
486}
487
489{
490 addInput({"matchHMP", "HMP", "MATCHES", 0, Lifetime::Timeframe});
491 if (mc) {
492 addInput({"clsHMP_GLO_MCTR", "HMP", "MCLABELS", 0, Lifetime::Timeframe});
493 }
494 requestMap["matchHMP"] = mc;
495}
496
498{
499 // request tracks for sources probided by the mask
500 if (src[GTrackID::ITS]) {
501 requestITSTracks(useMC);
502 }
503 if (src[GTrackID::MFT]) {
504 requestMFTTracks(useMC);
505 }
507 requestMCHTracks(useMC);
508 }
509 if (src[GTrackID::MID]) {
510 requestMIDTracks(useMC);
511 }
512 if (src[GTrackID::TPC]) {
513 requestTPCTracks(useMC);
514 }
516 requestITSTPCTracks(useMC);
517 }
518 if (src[GTrackID::MFTMCH]) {
520 }
521 if (src[GTrackID::MCHMID]) {
523 }
524 if (src[GTrackID::TPCTOF]) {
525 requestTPCTOFTracks(useMC);
526 }
528 requestTPCTRDTracks(useMC);
529 }
532 }
534 requestTOFMatches(src, useMC);
535 requestTOFClusters(false);
536 }
537 if (src[GTrackID::FT0]) {
538 requestFT0RecPoints(false); // RS FIXME: at the moment does not support MC
539 }
540 if (src[GTrackID::FV0]) {
541 requestFV0RecPoints(false); // RS FIXME: at the moment does not support MC
542 }
543 if (src[GTrackID::FDD]) {
544 requestFDDRecPoints(false); // RS FIXME: at the moment does not support MC
545 }
546 if (src[GTrackID::ZDC]) {
547 requestZDCRecEvents(false); // RS FIXME: at the moment does not support MC
548 }
549 if (GTrackID::includesDet(DetID::CTP, src)) {
550 requestCTPDigits(false); // RS FIXME: at the moment does not support MC
551 }
552 if (GTrackID::includesDet(DetID::CPV, src)) {
553 requestCPVClusters(useMC);
554 }
555 if (GTrackID::includesDet(DetID::PHS, src)) {
556 requestPHOSCells(useMC);
557 }
558 if (GTrackID::includesDet(DetID::EMC, src)) {
559 requestEMCALCells(useMC);
560 }
561 if (GTrackID::includesDet(DetID::HMP, src)) {
562 requestHMPClusters(useMC);
563 }
564 if (src[GTrackID::HMP]) {
565 requestHMPMatches(useMC);
566 }
567}
568
570{
571 // request clusters for detectors of the sources probided by the mask
572 // clusters needed for refits
573 if (GTrackID::includesDet(DetID::ITS, src) && !skipDetClusters[DetID::ITS]) {
574 requestITSClusters(useMC);
575 }
576 if (GTrackID::includesDet(DetID::MFT, src) && !skipDetClusters[DetID::MFT]) {
577 requestMFTClusters(useMC);
578 }
579 if (GTrackID::includesDet(DetID::TPC, src) && !skipDetClusters[DetID::TPC]) {
580 requestTPCClusters(useMC);
581 }
582 if (GTrackID::includesDet(DetID::TOF, src) && !skipDetClusters[DetID::TOF]) {
583 requestTOFClusters(useMC);
584 }
585 if (GTrackID::includesDet(DetID::TRD, src) && !skipDetClusters[DetID::TRD]) {
586 requestTRDTracklets(useMC);
587 }
588 if (GTrackID::includesDet(DetID::CTP, src) && !skipDetClusters[DetID::CTP]) {
589 requestCTPDigits(false); // RS FIXME: at the moment does not support MC
590 }
591 if (GTrackID::includesDet(DetID::CPV, src) && !skipDetClusters[DetID::CPV]) {
592 requestCPVClusters(useMC);
593 }
594 if (GTrackID::includesDet(DetID::PHS, src) && !skipDetClusters[DetID::PHS]) {
595 requestPHOSCells(useMC);
596 }
597 if (GTrackID::includesDet(DetID::EMC, src) && !skipDetClusters[DetID::EMC]) {
598 requestEMCALCells(useMC);
599 }
600 if (GTrackID::includesDet(DetID::MCH, src) && !skipDetClusters[DetID::MCH]) {
601 requestMCHClusters(useMC);
602 }
603 if (GTrackID::includesDet(DetID::HMP, src) && !skipDetClusters[DetID::HMP]) {
604 requestHMPClusters(useMC);
605 }
606}
607
608//__________________________________________________________________
610{
611 auto& reqMap = requests.requestMap;
612
613 startIR = {0, pc.services().get<o2::framework::TimingInfo>().firstTForbit};
614
615 auto req = reqMap.find("trackITS");
616 if (req != reqMap.end()) {
617 addITSTracks(pc, req->second);
618 }
619
620 req = reqMap.find("trackMFT");
621 if (req != reqMap.end()) {
622 addMFTTracks(pc, req->second);
623 }
624
625 req = reqMap.find("trackMCH");
626 if (req != reqMap.end()) {
627 addMCHTracks(pc, req->second);
628 }
629
630 req = reqMap.find("trackMID");
631 if (req != reqMap.end()) {
632 addMIDTracks(pc, req->second);
633 }
634
635 req = reqMap.find("trackTPC");
636 if (req != reqMap.end()) {
637 addTPCTracks(pc, req->second);
638 }
639
640 req = reqMap.find("trackITSTPC");
641 if (req != reqMap.end()) {
642 addITSTPCTracks(pc, req->second);
643 }
644
645 req = reqMap.find("fwdtracks");
646 if (req != reqMap.end()) {
647 addGlobalFwdTracks(pc, req->second);
648 }
649
650 req = reqMap.find("matchMFTMCH");
651 if (req != reqMap.end()) {
652 addMFTMCHMatches(pc, req->second);
653 }
654
655 req = reqMap.find("matchMCHMID");
656 if (req != reqMap.end()) {
657 addMCHMIDMatches(pc, req->second);
658 }
659
660 req = reqMap.find("trackITSTPCTRD");
661 if (req != reqMap.end()) {
662 addITSTPCTRDTracks(pc, req->second);
663 }
664
665 req = reqMap.find("trackTPCTRD");
666 if (req != reqMap.end()) {
667 addTPCTRDTracks(pc, req->second);
668 }
669
670 req = reqMap.find("trackTPCTOF");
671 if (req != reqMap.end()) {
672 addTPCTOFTracks(pc, req->second);
673 }
674
675 req = reqMap.find("matchTOF_ITSTPC");
676 if (req != reqMap.end()) {
677 addTOFMatchesITSTPC(pc, req->second);
678 }
679
680 req = reqMap.find("matchTOF_TPCTRD");
681 if (req != reqMap.end()) {
682 addTOFMatchesTPCTRD(pc, req->second);
683 }
684
685 req = reqMap.find("matchTOF_ITSTPCTRD");
686 if (req != reqMap.end()) {
687 addTOFMatchesITSTPCTRD(pc, req->second);
688 }
689
690 req = reqMap.find("clusITS");
691 if (req != reqMap.end()) {
692 addITSClusters(pc, req->second);
693 }
694
695#ifdef ENABLE_UPGRADES
696 req = reqMap.find("clusIT3");
697 if (req != reqMap.end()) {
698 addIT3Clusters(pc, req->second);
699 }
700#endif
701
702 req = reqMap.find("clusMFT");
703 if (req != reqMap.end()) {
704 addMFTClusters(pc, req->second);
705 }
706
707 req = reqMap.find("clusTPC");
708 if (req != reqMap.end()) {
709 auto tracksON = reqMap.find("trackTPC") != reqMap.end();
710 addTPCClusters(pc, req->second, tracksON, tracksON);
711 }
712
713 req = reqMap.find("trigTPC");
714 if (req != reqMap.end()) {
715 addTPCTriggers(pc);
716 }
717
718 req = reqMap.find("clusTOF");
719 if (req != reqMap.end()) {
720 addTOFClusters(pc, req->second);
721 }
722
723 req = reqMap.find("clusHMP");
724 if (req != reqMap.end()) {
725 addHMPClusters(pc, req->second);
726 }
727
728 req = reqMap.find("CTPDigits");
729 if (req != reqMap.end()) {
730 addCTPDigits(pc, req->second);
731 }
732
733 req = reqMap.find("CPVClusters");
734 if (req != reqMap.end()) {
735 addCPVClusters(pc, req->second);
736 }
737
738 req = reqMap.find("PHSCells");
739 if (req != reqMap.end()) {
740 addPHOSCells(pc, req->second);
741 }
742
743 req = reqMap.find("EMCCells");
744 if (req != reqMap.end()) {
745 addEMCALCells(pc, req->second);
746 }
747
748 req = reqMap.find("clusMCH");
749 if (req != reqMap.end()) {
750 addMCHClusters(pc, req->second);
751 }
752
753 req = reqMap.find("clusMID");
754 if (req != reqMap.end()) {
755 addMIDClusters(pc, req->second);
756 }
757
758 req = reqMap.find("FT0");
759 if (req != reqMap.end()) {
760 addFT0RecPoints(pc, req->second);
761 }
762
763 req = reqMap.find("FV0");
764 if (req != reqMap.end()) {
765 addFV0RecPoints(pc, req->second);
766 }
767
768 req = reqMap.find("FDD");
769 if (req != reqMap.end()) {
770 addFDDRecPoints(pc, req->second);
771 }
772
773 req = reqMap.find("ZDC");
774 if (req != reqMap.end()) {
775 addZDCRecEvents(pc, req->second);
776 }
777
778 req = reqMap.find("trackletTRD");
779 if (req != reqMap.end()) {
780 addTRDTracklets(pc, req->second);
781 }
782
783 req = reqMap.find("Cosmics");
784 if (req != reqMap.end()) {
785 addCosmicTracks(pc, req->second);
786 }
787
788 req = reqMap.find("PVertex");
789 if (req != reqMap.end()) {
790 addPVertices(pc, req->second);
791 }
792
793 req = reqMap.find("PVertexTMP");
794 if (req != reqMap.end()) {
795 addPVerticesTMP(pc, req->second);
796 }
797
798 req = reqMap.find("SVertex");
799 if (req != reqMap.end()) {
800 addSVertices(pc, req->second);
801 }
802
803 req = reqMap.find("STracker");
804 if (req != reqMap.end()) {
805 addStrangeTracks(pc, req->second);
806 }
807
808 req = reqMap.find("IRFramesITS");
809 if (req != reqMap.end()) {
810 addIRFramesITS(pc);
811 }
812 req = reqMap.find("matchHMP");
813 if (req != reqMap.end()) {
814 addHMPMatches(pc, req->second);
815 }
816}
817
818//____________________________________________________________
820{
821 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::V0Index>>("v0sIdx"), V0SIDX);
822 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::V0>>("v0s"), V0S);
824 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::CascadeIndex>>("cascsIdx"), CASCSIDX);
825 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::Cascade>>("cascs"), CASCS);
827 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::Decay3BodyIndex>>("decay3bodyIdx"), DECAY3BODYIDX);
828 svtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::Decay3Body>>("decay3body"), DECAY3BODY);
830 // no mc
831}
832
833//____________________________________________________________
835{
836 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
837 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackIndex>>("pvtx_trmtc"), PVTX_TRMTC);
838 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackRef>>("pvtx_tref"), PVTX_TRMTCREFS);
839
840 if (mc) { // in case was loaded via addPVerticesTMP
841 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::MCEventLabel>>("pvtx_mc"), PVTX_MCTR);
842 }
843}
844
845//____________________________________________________________
847{
848 strkPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::StrangeTrack>>("strangetracks"), STRACK);
849 if (mc) {
850 strkPool.registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("strack_mc"), STRACK_MC);
851 }
852}
853
854//____________________________________________________________
856{
857 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
858 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackIndex>>("pvtx_cont"), PVTX_CONTID);
859 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackRef>>("pvtx_contref"), PVTX_CONTIDREFS);
860
861 if (mc) { // in case was loaded via addPVertices
862 pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::MCEventLabel>>("pvtx_mc"), PVTX_MCTR);
863 }
864}
865
866//____________________________________________________________
868{
869 cosmPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::TrackCosmics>>("cosmics"), COSM_TRACKS);
870 if (mc) {
871 cosmPool.registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("cosmicsMC"), COSM_TRACKS_MC);
872 }
873}
874
875//____________________________________________________________
877{
878 if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) { // this params need to be queried only once
879 pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>*>("alpparITS"); // note: configurable param does not need finaliseCCDB
880 }
881 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::its::TrackITS>>("trackITS"), TRACKS);
882 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<int>>("trackITSClIdx"), INDICES);
883 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("trackITSROF"), TRACKREFS);
884 if (mc) {
885 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackITSMCTR"), MCLABELS);
886 }
887}
888
889//____________________________________________________________
891{
892 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::dataformats::IRFrame>>("IRFramesITS"), VARIA);
893}
894
895//____________________________________________________________
897{
898 if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) { // this params need to be queried only once
899 pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::MFT>*>("alpparMFT"); // note: configurable param does not need finaliseCCDB
900 }
901 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<o2::mft::TrackMFT>>("trackMFT"), TRACKS);
902 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<int>>("trackMFTClIdx"), INDICES);
903 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("trackMFTROF"), TRACKREFS);
904 if (mc) {
905 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackMFTMCTR"), MCLABELS);
906 }
907}
908
909//____________________________________________________________
911{
912 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::mch::TrackMCH>>("trackMCH"), TRACKS);
913 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::mch::ROFRecord>>("trackMCHROF"), TRACKREFS);
914 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::mch::Cluster>>("trackMCHTRACKCLUSTERS"), INDICES);
915 if (mc) {
916 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackMCHMCTR"), MCLABELS);
917 }
918}
919
920//____________________________________________________________
922{
923 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::Track>>("trackMID"), TRACKS);
924 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::ROFRecord>>("trackMIDROF"), TRACKREFS);
925 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::Cluster>>("trackMIDTRACKCLUSTERS"), INDICES);
926 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::ROFRecord>>("trackClMIDROF"), MATCHES);
927 if (mc) {
928 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackMIDMCTR"), MCLABELS);
930 }
931}
932
933//________________________________________________________
938
939//________________________________________________________
944
945//____________________________________________________________
947{
948 commonPool[GTrackID::TPC].registerContainer(pc.inputs().get<gsl::span<o2::tpc::TrackTPC>>("trackTPC"), TRACKS);
949 commonPool[GTrackID::TPC].registerContainer(pc.inputs().get<gsl::span<o2::tpc::TPCClRefElem>>("trackTPCClRefs"), INDICES);
950 if (mc) {
951 commonPool[GTrackID::TPC].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackTPCMCTR"), MCLABELS);
952 }
953}
954
955//__________________________________________________________
957{
958 commonPool[GTrackID::ITSTPC].registerContainer(pc.inputs().get<gsl::span<o2d::TrackTPCITS>>("trackITSTPC"), TRACKS);
959 commonPool[GTrackID::ITSAB].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::TrkClusRef>>("trackITSTPCABREFS"), TRACKREFS);
960 commonPool[GTrackID::ITSAB].registerContainer(pc.inputs().get<gsl::span<int>>("trackITSTPCABCLID"), INDICES);
961 if (mc) {
962 commonPool[GTrackID::ITSTPC].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackITSTPCMCTR"), MCLABELS);
963 commonPool[GTrackID::ITSAB].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackITSTPCABMCTR"), MCLABELS);
964 }
965}
966
967//__________________________________________________________
969{
970 commonPool[GTrackID::MFTMCH].registerContainer(pc.inputs().get<gsl::span<o2d::GlobalFwdTrack>>("fwdtracks"), TRACKS);
971 if (mc) {
972 commonPool[GTrackID::MFTMCH].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("MCTruth"), MCLABELS);
973 }
974}
975
976//__________________________________________________________
978{
979 commonPool[GTrackID::MFTMCH].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoFwd>>("matchMFTMCH"), MATCHES);
980}
981
982//__________________________________________________________
984{
985 commonPool[GTrackID::MCHMID].registerContainer(pc.inputs().get<gsl::span<o2d::TrackMCHMID>>("matchMCHMID"), MATCHES);
986 if (mc) {
987 commonPool[GTrackID::MCHMID].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("matchMCHMID_MCTR"), MCLABELS);
988 }
989}
990
991//__________________________________________________________
993{
994 commonPool[GTrackID::ITSTPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::trd::TrackTRD>>("trackITSTPCTRD"), TRACKS);
995 commonPool[GTrackID::ITSTPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::trd::TrackTriggerRecord>>("trigITSTPCTRD"), TRACKREFS);
996 if (mc) {
997 commonPool[GTrackID::ITSTPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackITSTPCTRDMCTR"), MCLABELS);
998 commonPool[GTrackID::ITSTPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackITSTPCTRDSAMCTR"), MCLABELSEXTRA);
999 }
1000}
1001
1002//__________________________________________________________
1004{
1005 commonPool[GTrackID::TPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::trd::TrackTRD>>("trackTPCTRD"), TRACKS);
1006 commonPool[GTrackID::TPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::trd::TrackTriggerRecord>>("trigTPCTRD"), TRACKREFS);
1007 if (mc) {
1008 commonPool[GTrackID::TPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackTPCTRDMCTR"), MCLABELS);
1009 commonPool[GTrackID::TPCTRD].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("trackTPCTRDSAMCTR"), MCLABELSEXTRA);
1010 }
1011}
1012
1013//__________________________________________________________
1015{
1016 commonPool[GTrackID::TPCTOF].registerContainer(pc.inputs().get<gsl::span<o2d::TrackTPCTOF>>("trackTPCTOF"), TRACKS);
1017 commonPool[GTrackID::TPCTOF].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoTOF>>("matchTPCTOF"), MATCHES);
1018 if (mc) {
1019 commonPool[GTrackID::TPCTOF].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("clsTOF_TPC_MCTR"), MCLABELS);
1020 }
1021}
1022
1023//__________________________________________________________
1025{
1026 commonPool[GTrackID::ITSTPCTOF].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoTOF>>("matchITSTPCTOF"), MATCHES); // only ITS/TPC : TOF match info, no real tracks
1027 if (mc) {
1028 commonPool[GTrackID::ITSTPCTOF].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("clsTOF_GLO_MCTR"), MCLABELS);
1029 }
1030}
1031//__________________________________________________________
1033{
1034 commonPool[GTrackID::TPCTRDTOF].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoTOF>>("matchTPCTRDTOF"), MATCHES); // only ITS/TPC : TOF match info, no real tracks
1035 if (mc) {
1036 commonPool[GTrackID::TPCTRDTOF].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("clsTOF_GLO2_MCTR"), MCLABELS);
1037 }
1038}
1039//__________________________________________________________
1041{
1042 commonPool[GTrackID::ITSTPCTRDTOF].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoTOF>>("matchITSTPCTRDTOF"), MATCHES); // only ITS/TPC : TOF match info, no real tracks
1043 if (mc) {
1044 commonPool[GTrackID::ITSTPCTRDTOF].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("clsTOF_GLO3_MCTR"), MCLABELS);
1045 }
1046}
1047
1048//__________________________________________________________
1050{
1051 commonPool[GTrackID::HMP].registerContainer(pc.inputs().get<gsl::span<o2d::MatchInfoHMP>>("matchHMP"), MATCHES); // HMPID match info, no real tracks
1052 if (mc) {
1053 commonPool[GTrackID::HMP].registerContainer(pc.inputs().get<gsl::span<o2::MCCompLabel>>("clsHMP_GLO_MCTR"), MCLABELS);
1054 }
1055}
1056
1057//__________________________________________________________
1059{
1060 if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) { // this params need to be queried only once
1061 pc.inputs().get<o2::itsmft::TopologyDictionary*>("cldictITS"); // just to trigger the finaliseCCDB
1062 pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>*>("alpparITS"); // note: configurable param does not need finaliseCCDB
1063 }
1064 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("clusITSROF"), CLUSREFS);
1065 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::CompClusterExt>>("clusITS"), CLUSTERS);
1066 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<unsigned char>>("clusITSPatt"), PATTERNS);
1067 if (mc) {
1069 }
1070}
1071
1072#ifdef ENABLE_UPGRADES
1073void RecoContainer::addIT3Clusters(ProcessingContext& pc, bool mc)
1074{
1075 if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) { // this params need to be queried only once
1076 pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>*>("alpparITS"); // note: configurable param does not need finaliseCCDB
1077 pc.inputs().get<o2::its3::TopologyDictionary*>("cldictIT3"); // just to trigger the finaliseCCDB
1078 }
1079 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("clusITSROF"), CLUSREFS);
1080 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::CompClusterExt>>("clusITS"), CLUSTERS);
1081 commonPool[GTrackID::ITS].registerContainer(pc.inputs().get<gsl::span<unsigned char>>("clusITSPatt"), PATTERNS);
1082 if (mc) {
1084 }
1085}
1086#endif
1087
1088//__________________________________________________________
1090{
1091 if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) { // this params need to be queried only once
1092 pc.inputs().get<o2::itsmft::TopologyDictionary*>("cldictMFT"); // just to trigger the finaliseCCDB
1093 pc.inputs().get<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::MFT>*>("alpparMFT"); // note: configurable param does not need finaliseCCDB
1094 }
1095 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::ROFRecord>>("clusMFTROF"), CLUSREFS);
1096 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<o2::itsmft::CompClusterExt>>("clusMFT"), CLUSTERS);
1097 commonPool[GTrackID::MFT].registerContainer(pc.inputs().get<gsl::span<unsigned char>>("clusMFTPatt"), PATTERNS);
1098 if (mc) {
1100 }
1101}
1102
1103//__________________________________________________________
1104void RecoContainer::addTPCClusters(ProcessingContext& pc, bool mc, bool shmap, bool occmap)
1105{
1106 inputsTPCclusters = o2::tpc::getWorkflowTPCInput(pc, 0, mc);
1107 if (shmap) {
1108 clusterShMapTPC = pc.inputs().get<gsl::span<unsigned char>>("clusTPCshmap");
1109 }
1110 if (occmap) {
1111 occupancyMapTPC = pc.inputs().get<gsl::span<unsigned int>>("clusTPCoccmap");
1112 }
1113}
1114
1115//__________________________________________________________
1117{
1118 commonPool[GTrackID::TPC].registerContainer(pc.inputs().get<gsl::span<o2::tpc::TriggerInfoDLBZS>>("trigTPC"), MATCHES);
1119}
1120
1121//__________________________________________________________
1123{
1124 inputsTRD = o2::trd::getRecoInputContainer(pc, nullptr, this, mc);
1125}
1126
1127//__________________________________________________________
1129{
1130 commonPool[GTrackID::TOF].registerContainer(pc.inputs().get<gsl::span<o2::tof::Cluster>>("tofcluster"), CLUSTERS);
1131 if (mc) {
1132 mcTOFClusters = pc.inputs().get<const dataformats::MCTruthContainer<MCCompLabel>*>("tofclusterlabel");
1133 }
1134}
1135
1136//__________________________________________________________
1138{
1139 commonPool[GTrackID::HMP].registerContainer(pc.inputs().get<gsl::span<o2::hmpid::Cluster>>("hmpidcluster"), CLUSTERS);
1140 commonPool[GTrackID::HMP].registerContainer(pc.inputs().get<gsl::span<o2::hmpid::Trigger>>("hmpidtriggers"), CLUSREFS);
1141 if (mc) {
1142 mcHMPClusters = pc.inputs().get<const dataformats::MCTruthContainer<MCCompLabel>*>("hmpidclusterlabel");
1143 }
1144}
1145//__________________________________________________________
1147{
1148 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::mch::ROFRecord>>("clusMCHROF"), CLUSREFS);
1149 commonPool[GTrackID::MCH].registerContainer(pc.inputs().get<gsl::span<o2::mch::Cluster>>("clusMCH"), CLUSTERS);
1150 if (mc) {
1152 }
1153}
1154
1155//__________________________________________________________
1157{
1158 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::ROFRecord>>("clusMIDROF"), CLUSREFS);
1159 commonPool[GTrackID::MID].registerContainer(pc.inputs().get<gsl::span<o2::mid::Cluster>>("clusMID"), CLUSTERS);
1160 if (mc) {
1162 }
1163}
1164
1165//__________________________________________________________
1167{
1168 commonPool[GTrackID::CTP].registerContainer(pc.inputs().get<gsl::span<o2::ctp::CTPDigit>>("CTPDigits"), CLUSTERS);
1169 if (pc.inputs().get<gsl::span<char>>("CTPLumi").size() == sizeof(o2::ctp::LumiInfo)) {
1170 mCTPLumi = pc.inputs().get<o2::ctp::LumiInfo>("CTPLumi");
1171 }
1172 if (mc) {
1173 // pc.inputs().get<const dataformats::MCTruthContainer<MCCompLabel>*>("CTPDigitsMC");
1174 }
1175}
1176
1177//__________________________________________________________
1179{
1180 commonPool[GTrackID::CPV].registerContainer(pc.inputs().get<gsl::span<o2::cpv::Cluster>>("CPVClusters"), CLUSTERS);
1181 commonPool[GTrackID::CPV].registerContainer(pc.inputs().get<gsl::span<o2::cpv::TriggerRecord>>("CPVTriggers"), CLUSREFS);
1182 if (mc) {
1184 }
1185}
1186
1187//__________________________________________________________
1189{
1190 commonPool[GTrackID::PHS].registerContainer(pc.inputs().get<gsl::span<o2::phos::Cell>>("PHSCells"), CLUSTERS);
1191 commonPool[GTrackID::PHS].registerContainer(pc.inputs().get<gsl::span<o2::phos::TriggerRecord>>("PHSTriggers"), CLUSREFS);
1192 if (mc) {
1194 }
1195}
1196
1197//__________________________________________________________
1199{
1200 commonPool[GTrackID::EMC].registerContainer(pc.inputs().get<gsl::span<o2::emcal::Cell>>("EMCCells"), CLUSTERS);
1201 commonPool[GTrackID::EMC].registerContainer(pc.inputs().get<gsl::span<o2::emcal::TriggerRecord>>("EMCTriggers"), CLUSREFS);
1202 if (mc) {
1204 }
1205}
1206
1207//__________________________________________________________
1209{
1210 commonPool[GTrackID::FT0].registerContainer(pc.inputs().get<gsl::span<o2::ft0::RecPoints>>("ft0recpoints"), TRACKS);
1211 commonPool[GTrackID::FT0].registerContainer(pc.inputs().get<gsl::span<o2::ft0::ChannelDataFloat>>("ft0channels"), CLUSTERS);
1212
1213 if (mc) {
1214 LOG(error) << "FT0 RecPoint does not support MC truth";
1215 }
1216}
1217
1218//__________________________________________________________
1220{
1221 commonPool[GTrackID::FV0].registerContainer(pc.inputs().get<gsl::span<o2::fv0::RecPoints>>("fv0recpoints"), TRACKS);
1222 commonPool[GTrackID::FV0].registerContainer(pc.inputs().get<gsl::span<o2::fv0::ChannelDataFloat>>("fv0channels"), CLUSTERS);
1223
1224 if (mc) {
1225 LOG(error) << "FV0 RecPoint does not support MC truth";
1226 }
1227}
1228
1229//__________________________________________________________
1231{
1232 commonPool[GTrackID::FDD].registerContainer(pc.inputs().get<gsl::span<o2::fdd::RecPoint>>("fddrecpoints"), TRACKS);
1233 commonPool[GTrackID::FDD].registerContainer(pc.inputs().get<gsl::span<o2::fdd::ChannelDataFloat>>("fddchannels"), CLUSTERS);
1234
1235 if (mc) {
1236 LOG(error) << "FDD RecPoint does not support MC truth";
1237 }
1238}
1239
1240//__________________________________________________________
1242{
1243 commonPool[GTrackID::ZDC].registerContainer(pc.inputs().get<gsl::span<o2::zdc::BCRecData>>("zdcbcrec"), MATCHES);
1244 commonPool[GTrackID::ZDC].registerContainer(pc.inputs().get<gsl::span<o2::zdc::ZDCEnergy>>("zdcenergy"), TRACKS);
1245 commonPool[GTrackID::ZDC].registerContainer(pc.inputs().get<gsl::span<o2::zdc::ZDCTDCData>>("zdctdcdata"), CLUSTERS);
1246 commonPool[GTrackID::ZDC].registerContainer(pc.inputs().get<gsl::span<uint16_t>>("zdcinfo"), PATTERNS);
1247
1248 if (mc) {
1249 LOG(error) << "ZDC RecEvent does not support MC truth";
1250 }
1251}
1252
1254{
1255 return inputsTPCclusters->clusterIndex;
1256}
1257
1258gsl::span<const o2::trd::Tracklet64> RecoContainer::getTRDTracklets() const
1259{
1260 return inputsTRD->mTracklets;
1261}
1262
1263gsl::span<const o2::trd::CalibratedTracklet> RecoContainer::getTRDCalibratedTracklets() const
1264{
1265 return inputsTRD->mSpacePoints;
1266}
1267
1268gsl::span<const o2::trd::TriggerRecord> RecoContainer::getTRDTriggerRecords() const
1269{
1270 static int countWarnings = 0;
1271 if (inputsTRD == nullptr) {
1272 if (countWarnings < 1) {
1273 LOG(warning) << "No TRD triggers";
1274 countWarnings++;
1275 }
1276 return gsl::span<const o2::trd::TriggerRecord>();
1277 } else {
1278 return inputsTRD->mTriggerRecords;
1279 }
1280}
1281
1286
1291
1292//__________________________________________________________
1294{
1295 // get outer param of track
1296 auto trSrc = gidx.getSource();
1297 if (trSrc == GTrackID::ITSTPC) {
1298 return getTrack<o2d::TrackTPCITS>(gidx).getParamOut();
1299 } else if (trSrc == GTrackID::ITSTPCTOF) { // the physical tracks are in ITS-TPC, need to get reference from match info
1300 return getTrack<o2d::TrackTPCITS>(getTOFMatch(gidx).getTrackRef()).getParamOut();
1301 } else if (trSrc == GTrackID::TPCTOF) {
1302 return getTrack<o2d::TrackTPCTOF>(gidx).getParamOut();
1303 } else if (trSrc == GTrackID::ITSTPCTRDTOF) { // the physical tracks are in ITS-TPC-TRD, need to get reference from match info
1304 return getTrack<o2::trd::TrackTRD>(getTOFMatch(gidx).getTrackRef()).getOuterParam();
1305 }
1306 if (trSrc == GTrackID::TPCTRDTOF) { // the physical tracks are in TPC-TRD, need to get reference from match info
1307 return getTrack<o2::trd::TrackTRD>(getTOFMatch(gidx).getTrackRef()).getOuterParam();
1308 } else if (trSrc == GTrackID::ITSTPCTRD) {
1309 return getTrack<o2::trd::TrackTRD>(gidx).getOuterParam();
1310 }
1311 if (trSrc == GTrackID::TPCTRD) {
1312 return getTrack<o2::trd::TrackTRD>(gidx).getOuterParam();
1313 } else if (trSrc == GTrackID::ITS) {
1314 return getTrack<o2::its::TrackITS>(gidx).getParamOut();
1315 } else if (trSrc == GTrackID::TPC) {
1316 return getTrack<o2::tpc::TrackTPC>(gidx).getParamOut();
1317 } else {
1318 throw std::runtime_error(fmt::format("not defined for tracks of source {:d}", int(trSrc)));
1319 }
1320}
1321
1322//__________________________________________________________
1324{
1325 if (src == GTrackID::ITSTPCTOF) {
1326 if (!isMatchSourceLoaded(src)) { // the physical tracks are in ITS-TPC, need to get reference from match info
1327 return false;
1328 }
1330 }
1331 if (src == GTrackID::TPCTRDTOF) {
1332 if (!isMatchSourceLoaded(src)) { // the physical tracks are in ITS-TPC, need to get reference from match info
1333 return false;
1334 }
1336 }
1337 if (src == GTrackID::ITSTPCTRDTOF) {
1338 if (!isMatchSourceLoaded(src)) { // the physical tracks are in ITS-TPC, need to get reference from match info
1339 return false;
1340 }
1342 }
1343 return commonPool[src].isLoaded(TRACKS);
1344}
1345
1346//__________________________________________________________
1348{
1349 // get base track
1350 auto trSrc = gidx.getSource();
1351 if (trSrc == GTrackID::ITSTPCTOF || trSrc == GTrackID::TPCTRDTOF || trSrc == GTrackID::ITSTPCTRDTOF) { // the physical tracks are in ITS-TPC, need to get reference from match info
1352 gidx = getTOFMatch(gidx).getTrackRef();
1353 }
1354 return getObject<o2::track::TrackParCov>(gidx, TRACKS);
1355}
1356
1357//__________________________________________________________
1359{
1360 // get ITS-TPC track pointed by global TOF match
1361 return getTPCITSTrack(getTOFMatch(gidx).getTrackRef());
1362}
1363
1364//________________________________________________________
1365void RecoContainer::fillTrackMCLabels(const gsl::span<GTrackID> gids, std::vector<o2::MCCompLabel>& mcinfo) const
1366{
1367 // fills the MCLabels corresponding to gids to MC info
1368 mcinfo.clear();
1369 mcinfo.reserve(gids.size());
1370 for (auto gid : gids) {
1371 mcinfo.push_back(getTrackMCLabel(gid));
1372 }
1373}
1374
1375//________________________________________________________
1377{
1378 createTracksVariadic([&creator](const auto& _tr, GTrackID _origID, float t0, float terr) {
1379 if constexpr (std::is_base_of_v<o2::track::TrackParCov, std::decay_t<decltype(_tr)>>) {
1380 return creator(_tr, _origID);
1381 } else {
1382 return false;
1383 }
1384 });
1385}
1386
1387//________________________________________________________
1388// get contributors from single detectors
1390{
1391 GlobalIDSet table;
1392 auto src = gidx.getSource();
1393 table[src] = gidx;
1394 if (src == GTrackID::ITSTPCTRD) {
1395 const auto& parent0 = getITSTPCTRDTrack<o2::trd::TrackTRD>(gidx);
1396 const auto& parent1 = getTPCITSTrack(parent0.getRefGlobalTrackId());
1397 table[GTrackID::ITSTPC] = parent0.getRefGlobalTrackId();
1398 table[parent1.getRefITS().getSource()] = parent1.getRefITS();
1399 table[GTrackID::TPC] = parent1.getRefTPC();
1400 table[GTrackID::TRD] = gidx; // there is no standalone TRD track, so use the index for the ITSTPCTRD track array
1401 } else if (src == GTrackID::TPCTRD) {
1402 const auto& parent0 = getTPCTRDTrack<o2::trd::TrackTRD>(gidx);
1403 table[GTrackID::TPC] = parent0.getRefGlobalTrackId();
1404 table[GTrackID::TRD] = gidx; // there is no standalone TRD track, so use the index for the TPCTRD track array
1405 } else if (src == GTrackID::ITSTPCTOF) {
1406 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC : TOF
1407 const auto& parent1 = getTPCITSTrack(parent0.getTrackRef());
1408 table[GTrackID::ITSTPC] = parent0.getTrackRef();
1409 table[GTrackID::TOF] = {unsigned(parent0.getIdxTOFCl()), GTrackID::TOF};
1410 table[GTrackID::TPC] = parent1.getRefTPC();
1411 table[parent1.getRefITS().getSource()] = parent1.getRefITS(); // ITS source might be an ITS track or ITSAB tracklet
1412 } else if (src == GTrackID::ITSTPCTRDTOF) {
1413 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC : TOF
1414 const auto& parent1 = getITSTPCTRDTrack<o2::trd::TrackTRD>(parent0.getTrackRef());
1415 const auto& parent2 = getTPCITSTrack(parent1.getRefGlobalTrackId());
1416 table[GTrackID::ITSTPCTRD] = parent0.getTrackRef();
1417 table[GTrackID::ITSTPC] = parent1.getRefGlobalTrackId();
1418 table[GTrackID::TOF] = {unsigned(parent0.getIdxTOFCl()), GTrackID::TOF};
1419 table[GTrackID::TPC] = parent2.getRefTPC();
1420 table[parent2.getRefITS().getSource()] = parent2.getRefITS(); // ITS source might be an ITS track or ITSAB tracklet
1421 table[GTrackID::TRD] = parent0.getTrackRef(); // there is no standalone TRD track, so use the index for the ITSTPCTRD track array
1422 } else if (src == GTrackID::TPCTRDTOF) {
1423 const auto& parent0 = getTOFMatch(gidx); // TPCTRD : TOF
1424 const auto& parent1 = getITSTPCTRDTrack<o2::trd::TrackTRD>(parent0.getTrackRef());
1425 const auto& parent2 = getTPCITSTrack(parent1.getRefGlobalTrackId());
1426 table[GTrackID::TPCTRD] = parent0.getTrackRef();
1427 table[GTrackID::TPC] = parent1.getRefGlobalTrackId();
1428 table[GTrackID::TOF] = {unsigned(parent0.getIdxTOFCl()), GTrackID::TOF};
1429 table[GTrackID::TRD] = parent0.getTrackRef(); // there is no standalone TRD track, so use the index for the TPCTRD track array
1430 } else if (src == GTrackID::TPCTOF) {
1431 const auto& parent0 = getTPCTOFMatch(gidx); // TPC : TOF
1432 table[GTrackID::TOF] = {unsigned(parent0.getIdxTOFCl()), GTrackID::TOF};
1433 table[GTrackID::TPC] = parent0.getTrackRef();
1434 } else if (src == GTrackID::ITSTPC) {
1435 const auto& parent0 = getTPCITSTrack(gidx);
1436 table[GTrackID::TPC] = parent0.getRefTPC();
1437 table[parent0.getRefITS().getSource()] = parent0.getRefITS(); // ITS source might be an ITS track or ITSAB tracklet
1438 } else if (src == GTrackID::MFTMCH || src == GTrackID::MFTMCHMID) {
1439 const auto& parent0 = getGlobalFwdTrack(gidx);
1440 table[GTrackID::MFT] = parent0.getMFTTrackID();
1441 table[GTrackID::MCH] = parent0.getMCHTrackID();
1442 if (parent0.getMIDTrackID() != -1) {
1443 table[GTrackID::MID] = parent0.getMIDTrackID();
1444 }
1445 } else if (src == GTrackID::MCHMID) {
1446 const auto& parent0 = getMCHMIDMatch(gidx);
1447 table[GTrackID::MCH] = parent0.getMCHRef();
1448 table[GTrackID::MID] = parent0.getMIDRef();
1449 }
1450 return table;
1451}
1452
1453//________________________________________________________
1454// get contributing TPC GTrackID to the source. If source gidx is not contributed by TPC,
1455// returned GTrackID.isSourceSet()==false
1457{
1458 auto src = gidx.getSource();
1459 if (src == GTrackID::ITSTPCTRD) {
1460 const auto& parent0 = getITSTPCTRDTrack<o2::trd::TrackTRD>(gidx);
1461 const auto& parent1 = getTPCITSTrack(parent0.getRefGlobalTrackId());
1462 return parent1.getRefTPC();
1463 } else if (src == GTrackID::ITSTPCTOF) {
1464 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC : TOF
1465 const auto& parent1 = getTPCITSTrack(parent0.getTrackRef());
1466 return parent1.getRefTPC();
1467 } else if (src == GTrackID::ITSTPCTRDTOF) {
1468 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC/TRD : TOF
1469 const auto& parent1 = getITSTPCTRDTrack<o2::trd::TrackTRD>(parent0.getTrackRef());
1470 const auto& parent2 = getTPCITSTrack(parent1.getRefGlobalTrackId());
1471 return parent2.getRefTPC();
1472 } else if (src == GTrackID::TPCTOF) {
1473 const auto& parent0 = getTPCTOFMatch(gidx); // TPC : TOF
1474 return parent0.getTrackRef();
1475 } else if (src == GTrackID::TPCTRDTOF) {
1476 const auto& parent0 = getTOFMatch(gidx); // TPC/TRD : TOF
1477 const auto& parent1 = getTPCTRDTrack<o2::trd::TrackTRD>(parent0.getTrackRef());
1478 return parent1.getRefGlobalTrackId();
1479 } else if (src == GTrackID::TPCTRD) {
1480 const auto& parent0 = getTPCTRDTrack<o2::trd::TrackTRD>(gidx);
1481 return parent0.getRefGlobalTrackId();
1482 } else if (src == GTrackID::ITSTPC) {
1483 const auto& parent0 = getTPCITSTrack(gidx);
1484 return parent0.getRefTPC();
1485 }
1486 return src == GTrackID::TPC ? gidx : GTrackID{};
1487}
1488
1489//________________________________________________________
1490// get contributing ITS GTrackID to the source. If source gidx is not contributed by TPC,
1491// returned GTrackID.isSourceSet()==false
1493{
1494 auto src = gidx.getSource();
1495 if (src == GTrackID::ITSTPCTRD) {
1496 const auto& parent0 = getITSTPCTRDTrack<o2::trd::TrackTRD>(gidx);
1497 const auto& parent1 = getTPCITSTrack(parent0.getRefGlobalTrackId());
1498 return parent1.getRefITS();
1499 } else if (src == GTrackID::ITSTPCTOF) {
1500 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC : TOF
1501 const auto& parent1 = getTPCITSTrack(parent0.getTrackRef());
1502 return parent1.getRefITS();
1503 } else if (src == GTrackID::ITSTPCTRDTOF) {
1504 const auto& parent0 = getTOFMatch(gidx); // ITS/TPC : TOF
1505 const auto& parent1 = getITSTPCTRDTrack<o2::trd::TrackTRD>(parent0.getTrackRef());
1506 const auto& parent2 = getTPCITSTrack(parent1.getRefGlobalTrackId());
1507 return parent2.getRefITS();
1508 } else if (src == GTrackID::ITSTPC) {
1509 const auto& parent0 = getTPCITSTrack(gidx);
1510 return parent0.getRefITS();
1511 }
1512 return src == GTrackID::ITS ? gidx : GTrackID{};
1513}
1514
1515//________________________________________________________
1520
1521//________________________________________________________
1526
1527//________________________________________________________
1528void RecoContainer::getTrackTimeITSTPCTRDTOF(GTrackID gid, float& t, float& tErr) const
1529{
1530 const auto& match = getITSTPCTRDTOFMatches()[gid];
1531 auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC-TRD track
1532 // const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
1533 t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
1534 tErr = 0.010f;
1535}
1536
1537//________________________________________________________
1538void RecoContainer::getTrackTimeTPCTRDTOF(GTrackID gid, float& t, float& tErr) const
1539{
1540 const auto& match = getTPCTRDTOFMatches()[gid];
1541 auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC-TRD track
1542 // const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
1543 t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
1544 tErr = 0.010f;
1545}
1546
1547//________________________________________________________
1548void RecoContainer::getTrackTimeITSTPCTOF(GTrackID gid, float& t, float& tErr) const
1549{
1550 const auto& match = getITSTPCTOFMatches()[gid];
1551 auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC track
1552 // const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
1553 t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
1554 tErr = 0.010f;
1555}
1556
1557//________________________________________________________
1558void RecoContainer::getTrackTimeITSTPCTRD(GTrackID gid, float& t, float& tErr) const
1559{
1560 const auto trigITSTPCTRD = getITSTPCTRDTriggers();
1561 // very slow: find the trigger this track belongs to
1562 for (const auto& trig : trigITSTPCTRD) {
1563 if (trig.getTrackRefs().getEntriesBound() > gid.getIndex()) {
1564 t = trig.getBCData().differenceInBC(startIR) * o2::constants::lhc::LHCBunchSpacingMUS;
1565 tErr = 5.e-3;
1566 const auto& trc = getITSTPCTRDTracks<o2::trd::TrackTRD>()[gid];
1567 if (trc.hasPileUpInfo()) { // distance to farthest collision within the pileup integration time
1568 tErr += trc.getPileUpTimeErrorMUS();
1569 }
1570 return;
1571 }
1572 }
1573}
1574
1575//________________________________________________________
1576void RecoContainer::getTrackTimeTPCTRD(GTrackID gid, float& t, float& tErr) const
1577{
1578 const auto trigTPCTRD = getITSTPCTRDTriggers();
1579 // very slow: find the trigger this track belongs to
1580 for (const auto& trig : trigTPCTRD) {
1581 if (trig.getTrackRefs().getEntriesBound() > gid.getIndex()) {
1582 t = trig.getBCData().differenceInBC(startIR) * o2::constants::lhc::LHCBunchSpacingMUS;
1583 tErr = 5.e-3;
1584 const auto& trc = getTPCTRDTracks<o2::trd::TrackTRD>()[gid];
1585 if (trc.hasPileUpInfo()) { // distance to farthest collision within the pileup integration time
1586 tErr += trc.getPileUpTimeErrorMUS();
1587 }
1588 return;
1589 }
1590 }
1591}
1592
1593//________________________________________________________
1594void RecoContainer::getTrackTimeITSTPC(GTrackID gid, float& t, float& tErr) const
1595{
1596 const auto& trc = getTPCITSTrack(gid);
1597 t = trc.getTimeMUS().getTimeStamp();
1598 tErr = trc.getTimeMUS().getTimeStampError();
1599}
1600
1601//________________________________________________________
1602void RecoContainer::getTrackTimeTPCTOF(GTrackID gid, float& t, float& tErr) const
1603{
1604 const auto& trc = getTPCTOFTrack(gid);
1605 t = trc.getTimeMUS().getTimeStamp();
1606 tErr = trc.getTimeMUS().getTimeStampError();
1607}
1608
1609//________________________________________________________
1610void RecoContainer::getTrackTimeITS(GTrackID gid, float& t, float& tErr) const
1611{
1612 const auto& rofrs = getITSTracksROFRecords();
1613 for (const auto& rof : rofrs) { // slow
1614 if (gid.getIndex() < rof.getFirstEntry() + rof.getNEntries()) {
1615 t = rof.getBCData().differenceInBC(startIR) * o2::constants::lhc::LHCBunchSpacingMUS;
1616 tErr = 0.5;
1617 return;
1618 }
1619 }
1620}
1621
1622//________________________________________________________
1623void RecoContainer::getTrackTimeTPC(GTrackID gid, float& t, float& tErr) const
1624{
1625 const auto& trc = getTPCTrack(gid);
1626 t = trc.getTime0() + 0.5 * (trc.getDeltaTFwd() - trc.getDeltaTBwd());
1627 tErr = 0.5 * (trc.getDeltaTFwd() + trc.getDeltaTBwd());
1628}
1629
1630//________________________________________________________
1631void RecoContainer::getTrackTime(GTrackID gid, float& t, float& tErr) const
1632{
1633 auto src = gid.getSource();
1634 if (src == GTrackID::ITSTPCTRDTOF) {
1635 return getTrackTimeITSTPCTRDTOF(gid, t, tErr);
1636 }
1637 if (src == GTrackID::TPCTRDTOF) {
1638 return getTrackTimeTPCTRDTOF(gid, t, tErr);
1639 }
1640 if (src == GTrackID::ITSTPCTOF) {
1641 return getTrackTimeITSTPCTOF(gid, t, tErr);
1642 }
1643 if (src == GTrackID::ITSTPCTRD) {
1644 return getTrackTimeITSTPCTRD(gid, t, tErr);
1645 }
1646 if (src == GTrackID::TPCTRD) {
1647 return getTrackTimeTPCTRD(gid, t, tErr);
1648 }
1649 if (src == GTrackID::ITSTPC) {
1650 return getTrackTimeITSTPC(gid, t, tErr);
1651 }
1652 if (src == GTrackID::TPCTOF) {
1653 return getTrackTimeTPCTOF(gid, t, tErr);
1654 }
1655 if (src == GTrackID::ITS) {
1656 return getTrackTimeITS(gid, t, tErr);
1657 }
1658 if (src == GTrackID::TPC) {
1659 return getTrackTimeTPC(gid, t, tErr);
1660 }
1661}
Definition of the ClusterTopology class.
Definition of the BuildTopologyDictionary class for ITS3.
Class to delimit start and end IR of certain time period.
Wrapper container for different reconstructed object types.
Result of top-bottom cosmic tracks leg matching.
Definition of the MUON track.
Reference on ITS/MFT clusters set.
Extention of GlobalTrackID by flags relevant for verter-track association.
Referenc on track indices contributing to the vertex, with possibility chose tracks from specific sou...
void registerContainer(const C &cont, int src)
register container in the accessor
A container to hold and manage MC truth information/labels.
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
static constexpr ID CTP
Definition DetID.h:79
static constexpr ID PHS
Definition DetID.h:67
static constexpr ID ITS
Definition DetID.h:63
static constexpr ID MFT
Definition DetID.h:71
static constexpr ID CPV
Definition DetID.h:68
static constexpr ID TRD
Definition DetID.h:65
static constexpr ID TPC
Definition DetID.h:64
static constexpr ID EMC
Definition DetID.h:69
static constexpr ID MCH
Definition DetID.h:72
static constexpr ID HMP
Definition DetID.h:70
static constexpr ID TOF
Definition DetID.h:66
decltype(auto) get(R binding, int part=0) const
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
static constexpr ID Pion
Definition PID.h:96
bool match(const std::vector< std::string > &queries, const char *pattern)
Definition dcs-ccdb.cxx:229
GLenum src
Definition glcorearb.h:1767
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
Definition glcorearb.h:5034
constexpr o2::header::DataOrigin gDataOriginTRD
Definition DataHeader.h:577
constexpr double LHCBunchSpacingMUS
Definition of a container to keep/associate and arbitrary number of labels associated to an index wit...
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
TrackParCovF TrackParCov
Definition Track.h:33
auto getRecoInputContainer(o2::framework::ProcessingContext &pc, o2::gpu::GPUTrackingInOutPointers *ptrs, const o2::globaltracking::RecoContainer *inputTracks, bool mc=false)
void addInput(const o2::framework::InputSpec &&isp)
void requestTOFMatches(o2::dataformats::GlobalTrackID::mask_t src, bool mc)
std::unordered_map< std::string, bool > requestMap
void requestTracks(o2::dataformats::GlobalTrackID::mask_t src, bool mc)
void requestClusters(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, o2::detectors::DetID::mask_t skipDetClusters={})
std::vector< o2::framework::InputSpec > inputs
uint32_t getMatchingInputSubSpec() const
void addFDDRecPoints(o2::framework::ProcessingContext &pc, bool mc)
void addGlobalFwdTracks(o2::framework::ProcessingContext &pc, bool mc)
void addTOFMatchesITSTPCTRD(o2::framework::ProcessingContext &pc, bool mc)
GTrackID getITSContributorGID(GTrackID source) const
const o2::dataformats::MatchInfoTOF & getTPCTOFMatch(GTrackID id) const
void addITSTracks(o2::framework::ProcessingContext &pc, bool mc)
void addHMPMatches(o2::framework::ProcessingContext &pc, bool mc)
void addTPCTOFTracks(o2::framework::ProcessingContext &pc, bool mc)
GlobalIDSet getSingleDetectorRefs(GTrackID gidx) const
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mcTOFClusters
const o2::dataformats::MCTruthContainer< o2::phos::MCLabel > * getPHOSCellsMCLabels() const
const o2::tpc::TrackTPC & getTPCTrack(GTrackID id) const
std::array< AccSlots, GTrackID::NSources > commonPool
void addFT0RecPoints(o2::framework::ProcessingContext &pc, bool mc)
gsl::span< const o2::trd::CalibratedTracklet > getTRDCalibratedTracklets() const
const o2::dataformats::TrackMCHMID & getMCHMIDMatch(GTrackID gid) const
void addTPCTriggers(o2::framework::ProcessingContext &pc)
void addCosmicTracks(o2::framework::ProcessingContext &pc, bool mc)
void addStrangeTracks(o2::framework::ProcessingContext &pc, bool mc)
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::mid::MCClusterLabel > > mcMIDTrackClusters
bool isMatchSourceLoaded(int src) const
void addMCHClusters(o2::framework::ProcessingContext &pc, bool mc)
void addPVerticesTMP(o2::framework::ProcessingContext &pc, bool mc)
void addITSTPCTracks(o2::framework::ProcessingContext &pc, bool mc)
const o2::tpc::ClusterNativeAccess & getTPCClusters() const
void addMCHTracks(o2::framework::ProcessingContext &pc, bool mc)
void getTrackTimeTPCTRD(GTrackID gid, float &t, float &tErr) const
void addTPCClusters(o2::framework::ProcessingContext &pc, bool mc, bool shmap, bool occmap)
void addEMCALCells(o2::framework::ProcessingContext &pc, bool mc)
void addMIDTracks(o2::framework::ProcessingContext &pc, bool mc)
void addMFTTracks(o2::framework::ProcessingContext &pc, bool mc)
void getTrackTimeITSTPCTRDTOF(GTrackID gid, float &t, float &tErr) const
void getTrackTimeITSTPCTOF(GTrackID gid, float &t, float &tErr) const
void getTrackTimeTPC(GTrackID gid, float &t, float &tErr) const
void addZDCRecEvents(o2::framework::ProcessingContext &pc, bool mc)
void addMCHMIDMatches(o2::framework::ProcessingContext &pc, bool mc)
gsl::span< const o2::trd::TriggerRecord > getTRDTriggerRecords() const
const o2::dataformats::MCTruthContainer< o2::MCCompLabel > * getTRDTrackletsMCLabels() const
void addPVertices(o2::framework::ProcessingContext &pc, bool mc)
void getTrackTimeTPCTRDTOF(GTrackID gid, float &t, float &tErr) const
void getTrackTimeITS(GTrackID gid, float &t, float &tErr) const
void addTOFMatchesITSTPC(o2::framework::ProcessingContext &pc, bool mc)
void addIRFramesITS(o2::framework::ProcessingContext &pc)
const o2::dataformats::TrackTPCITS & getITSTPCTOFTrack(GTrackID id) const
const o2::dataformats::TrackTPCTOF & getTPCTOFTrack(GTrackID gid) const
void addTOFClusters(o2::framework::ProcessingContext &pc, bool mc)
o2::MCCompLabel getTrackMCLabel(GTrackID id) const
GTrackID getTPCContributorGID(GTrackID source) const
std::unique_ptr< o2::trd::RecoInputContainer > inputsTRD
const o2::dataformats::MCTruthContainer< o2::mid::MCClusterLabel > * getMIDClustersMCLabels() const
const o2::track::TrackParCov & getTrackParam(GTrackID gidx) const
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mcITSClusters
void getTrackTimeITSTPCTRD(GTrackID gid, float &t, float &tErr) const
void addMFTClusters(o2::framework::ProcessingContext &pc, bool mc)
void addMIDClusters(o2::framework::ProcessingContext &pc, bool mc)
void addTPCTRDTracks(o2::framework::ProcessingContext &pc, bool mc)
const o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > * getTPCClustersMCLabels() const
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mcMCHClusters
gsl::span< const unsigned char > clusterShMapTPC
externally set TPC clusters sharing map
void addTRDTracklets(o2::framework::ProcessingContext &pc, bool mc)
void getTrackTimeITSTPC(GTrackID gid, float &t, float &tErr) const
const o2::dataformats::TrackTPCITS & getTPCITSTrack(GTrackID gid) const
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
void addPHOSCells(o2::framework::ProcessingContext &pc, bool mc)
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::phos::MCLabel > > mcPHSCells
void addCPVClusters(o2::framework::ProcessingContext &pc, bool mc)
void addITSTPCTRDTracks(o2::framework::ProcessingContext &pc, bool mc)
const o2::track::TrackParCov & getTrackParamOut(GTrackID gidx) const
void fillTrackMCLabels(const gsl::span< GTrackID > gids, std::vector< o2::MCCompLabel > &mcinfo) const
void addMFTMCHMatches(o2::framework::ProcessingContext &pc, bool mc)
void getTrackTimeTPCTOF(GTrackID gid, float &t, float &tErr) const
void addTOFMatchesTPCTRD(o2::framework::ProcessingContext &pc, bool mc)
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::mid::MCClusterLabel > > mcMIDClusters
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > > mcEMCCells
std::unique_ptr< o2::tpc::internal::getWorkflowTPCInput_ret > inputsTPCclusters
void addCTPDigits(o2::framework::ProcessingContext &pc, bool mc)
void addTPCTracks(o2::framework::ProcessingContext &pc, bool mc)
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mcCPVClusters
void addFV0RecPoints(o2::framework::ProcessingContext &pc, bool mc)
void createTracks(std::function< bool(const o2::track::TrackParCov &, GTrackID)> const &creator) const
void getTrackTime(GTrackID gid, float &t, float &tErr) const
void addSVertices(o2::framework::ProcessingContext &pc, bool)
void addITSClusters(o2::framework::ProcessingContext &pc, bool mc)
void addHMPClusters(o2::framework::ProcessingContext &pc, bool mc)
gsl::span< const unsigned int > occupancyMapTPC
externally set TPC clusters occupancy map
std::unique_ptr< const o2::dataformats::MCTruthContainer< o2::MCCompLabel > > mcHMPClusters
std::array< GTrackID, GTrackID::NSources > GlobalIDSet
static constexpr float PS2MUS
gsl::span< const o2::trd::Tracklet64 > getTRDTracklets() const
const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > * getEMCALCellsMCLabels() const
const o2::dataformats::MatchInfoTOF & getTOFMatch(GTrackID id) const
const o2::dataformats::MCTruthContainer< o2::mid::MCClusterLabel > * getMIDTracksClusterMCLabels() const
const o2::dataformats::GlobalFwdTrack & getGlobalFwdTrack(GTrackID gid) const
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"