Skip to content

Commit fc54091

Browse files
authored
[ALICE3] Add configuration indices to OnTheFly (#13856)
1 parent e9f1aee commit fc54091

File tree

6 files changed

+285
-147
lines changed

6 files changed

+285
-147
lines changed

ALICE3/Core/FastTracker.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,7 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
442442
inputTrack.getXYZGlo(posIni);
443443
const float initialRadius = std::hypot(posIni[0], posIni[1]);
444444
const float kTrackingMargin = 0.1;
445-
const int kMaxNumberOfDetectors = 20;
446-
if (kMaxNumberOfDetectors < layers.size()) {
447-
LOG(fatal) << "Too many layers in FastTracker, increase kMaxNumberOfDetectors";
448-
return -1; // too many layers
449-
}
445+
450446
int firstActiveLayer = -1; // first layer that is not inert
451447
for (size_t i = 0; i < layers.size(); ++i) {
452448
if (!layers[i].isInert()) {
@@ -461,8 +457,12 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
461457
const int xrhosteps = 100;
462458
const bool applyAngularCorrection = true;
463459

460+
// Delphes sets this to 20 instead of the number of layers,
461+
// but does not count all points in the tpc as layers which we do here
462+
// Loop over all the added layers to prevent crash when adding the tpc
463+
// Should not affect efficiency calculation
464464
goodHitProbability.clear();
465-
for (int i = 0; i < kMaxNumberOfDetectors; ++i) {
465+
for (size_t i = 0; i < layers.size(); ++i) {
466466
goodHitProbability.push_back(-1.);
467467
}
468468
goodHitProbability[0] = 1.; // we use layer zero to accumulate
@@ -650,7 +650,7 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
650650

651651
// generate efficiency
652652
float eff = 1.;
653-
for (int i = 0; i < kMaxNumberOfDetectors; i++) {
653+
for (size_t i = 0; i < layers.size(); i++) {
654654
float iGoodHit = goodHitProbability[i];
655655
if (iGoodHit <= 0)
656656
continue;

ALICE3/DataModel/OTFMulticharm.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(XiCCPion, xiCCPion, int, Tracks, "_PiXiCC");
3636

3737
DECLARE_SOA_COLUMN(XicMass, xicMass, float);
3838
DECLARE_SOA_COLUMN(XiccMass, xiccMass, float);
39+
DECLARE_SOA_COLUMN(LUTConfigId, lutConfigId, int); //! Index for LUT configuration
3940

4041
// kine vars
4142
DECLARE_SOA_COLUMN(XiccPt, xiccPt, float);
@@ -155,7 +156,8 @@ DECLARE_SOA_TABLE(MCharmCores, "AOD", "MCharmCores",
155156
otfmulticharm::XiccProperLength,
156157
otfmulticharm::Pi1cPt,
157158
otfmulticharm::Pi2cPt,
158-
otfmulticharm::PiccPt);
159+
otfmulticharm::PiccPt,
160+
otfmulticharm::LUTConfigId);
159161

160162
DECLARE_SOA_TABLE(MCharmPID, "AOD", "MCharmPID",
161163
otfmulticharm::Pi1cTofDeltaInner,

ALICE3/DataModel/OTFTracks.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
12+
///
13+
/// \file OTFTracks.h
14+
/// \author Jesper Karlsson Gumprecht
15+
/// \since 11/11/2025
16+
/// \brief Table to map track to LUT configuration
17+
///
18+
19+
#ifndef ALICE3_DATAMODEL_OTFTRACKS_H_
20+
#define ALICE3_DATAMODEL_OTFTRACKS_H_
21+
22+
// O2 includes
23+
#include "Framework/AnalysisDataModel.h"
24+
25+
namespace o2::aod
26+
{
27+
namespace otftracks
28+
{
29+
DECLARE_SOA_COLUMN(LUTConfigId, lutConfigId, int); //! Index for LUT configuration
30+
} // namespace otftracks
31+
32+
DECLARE_SOA_TABLE(OTFLUTConfigId, "AOD", "OTFLUTConfigId", otftracks::LUTConfigId);
33+
} // namespace o2::aod
34+
35+
#endif // ALICE3_DATAMODEL_OTFTRACKS_H_

0 commit comments

Comments
 (0)