Skip to content

Commit 7bb02fa

Browse files
authored
Merge branch 'AliceO2Group:dev' into new_geometry
2 parents 6c80154 + 4a43295 commit 7bb02fa

144 files changed

Lines changed: 5940 additions & 633 deletions

File tree

Some content is hidden

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

‎.github/workflows/clean-test.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ name: Clean PR checks
2727
description: build/O2/fullCI_slc9
2828
type: boolean
2929
default: true
30+
# Off by default, unlike every other check here: the gpu pool is a single
31+
# worker and a gpu-test round is hours, so resetting this is a much bigger
32+
# ask than requeueing one of the twenty-odd slc9/slc10 builders. Tick it
33+
# when the GPU check is what you actually want re-run.
34+
'check_build/O2/gpu-test-slc10-x86':
35+
description: build/O2/gpu-test-slc10-x86
36+
type: boolean
37+
default: false
3038
'check_build/O2/o2-dataflow-slc9':
3139
description: build/O2/o2-dataflow-slc9
3240
type: boolean

‎Common/DCAFitter/GPU/cuda/DCAFitterN.cu‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#endif
1717

1818
#include <numeric>
19+
#include <iostream>
1920

2021
#include "GPUCommonDef.h"
2122
#include "DCAFitter/DCAFitterN.h"

‎Common/MathUtils/include/MathUtils/detail/StatAccumulator.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct StatAccumulator {
4242
wsum += w;
4343
n++;
4444
}
45-
double getMean() const { return wsum > 0. ? sum / wsum : 0.; }
45+
double getMean() const { return wsum > 0. ? sum / wsum : double{0}; }
4646

4747
#ifndef GPUCA_GPUCODE_DEVICE
4848
template <typename T = float>

‎Common/MathUtils/include/MathUtils/detail/trigonometric.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ GPUhdi() T to02Pi(T phi)
4848
template <typename T>
4949
GPUhdi() void bringTo02Pi(T& phi)
5050
{
51-
phi = to02Pi<T>(phi);
51+
phi = to02Pi(phi);
5252
}
5353

5454
template <typename T>
@@ -68,7 +68,7 @@ inline T to02PiGen(T phi)
6868
template <typename T>
6969
inline void bringTo02PiGen(T& phi)
7070
{
71-
phi = to02PiGen<T>(phi);
71+
phi = to02PiGen(phi);
7272
}
7373

7474
template <typename T>
@@ -87,7 +87,7 @@ GPUhdi() T toPMPi(T phi)
8787
template <typename T>
8888
GPUhdi() void bringToPMPi(T& phi)
8989
{
90-
phi = toPMPi<T>(phi);
90+
phi = toPMPi(phi);
9191
}
9292

9393
template <typename T>
@@ -107,10 +107,10 @@ inline T toPMPiGen(T phi)
107107
template <typename T>
108108
inline void bringToPMPiGen(T& phi)
109109
{
110-
phi = toPMPiGen<T>(phi);
110+
phi = toPMPiGen(phi);
111111
}
112112

113-
#ifdef __OPENCL__ // TODO: get rid of that stupid workaround for OpenCL template address spaces
113+
#if defined(__OPENCL__) || defined(__METAL__) // TODO: get rid of that stupid workaround for OpenCL template address spaces
114114
template <typename T, typename S, typename U>
115115
GPUhdi() void sincos(T ang, S& s, U& c)
116116
{

‎DataFormats/Detectors/FIT/FDD/CMakeLists.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ o2_add_library(DataFormatsFDD
1414
src/RecPoint.cxx
1515
src/CTF.cxx
1616
src/LookUpTable.cxx
17+
src/FDDRecoConfig.cxx
1718
PUBLIC_LINK_LIBRARIES O2::FDDBase
1819
O2::DataFormatsFIT
1920
O2::SimulationDataFormat
@@ -29,5 +30,6 @@ o2_target_root_dictionary(DataFormatsFDD
2930
include/DataFormatsFDD/RecPoint.h
3031
include/DataFormatsFDD/RawEventData.h
3132
include/DataFormatsFDD/LookUpTable.h
32-
include/DataFormatsFDD/CTF.h)
33+
include/DataFormatsFDD/CTF.h
34+
include/DataFormatsFDD/FDDRecoConfig.h)
3335

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
#ifndef ALICEO2_FDD_RECO_PARAM
13+
#define ALICEO2_FDD_RECO_PARAM
14+
15+
#include "CommonUtils/ConfigurableParamHelper.h"
16+
17+
namespace o2::fdd
18+
{
19+
struct FDDRecoConfig : o2::conf::ConfigurableParamHelper<FDDRecoConfig> {
20+
float AmplitudeCutOnCollisionTimeWeights = 3;
21+
O2ParamDef(FDDRecoConfig, "FDDRecoConfig");
22+
ClassDefNV(FDDRecoConfig, 1);
23+
};
24+
} // namespace o2::fdd
25+
#endif

‎DataFormats/Detectors/FIT/FDD/src/DataFormatsFDDLinkDef.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@
3737
#pragma link C++ class o2::fdd::CTF + ;
3838
#pragma link C++ class o2::ctf::EncodedBlocks < o2::fdd::CTFHeader, 8, uint32_t> + ;
3939

40+
#pragma link C++ struct o2::fdd::FDDRecoConfig + ;
41+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::fdd::FDDRecoConfig> + ;
4042
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
#include <DataFormatsFDD/FDDRecoConfig.h>
13+
14+
using namespace o2::fdd;
15+
O2ParamImpl(FDDRecoConfig);

‎DataFormats/Detectors/GlobalTracking/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ o2_target_root_dictionary(
4545
DataFormatsGlobalTracking
4646
HEADERS include/DataFormatsGlobalTracking/FilteredRecoTF.h
4747
include/DataFormatsGlobalTracking/TrackTuneParams.h
48+
include/DataFormatsGlobalTracking/TrackCosmicsExtended.h
4849
)
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
// Copyright 2019-2026 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+
/// \file TrackCosmicsExtended.h
13+
/// \brief Matched cosmic track with the raw clusters of its legs and of the road around them, for offline refits
14+
15+
#ifndef ALICEO2_TRACK_COSMICS_EXTENDED_H
16+
#define ALICEO2_TRACK_COSMICS_EXTENDED_H
17+
18+
#include <vector>
19+
#include <cstdint>
20+
#include <Rtypes.h>
21+
#include "ReconstructionDataFormats/TrackCosmics.h"
22+
#include "DataFormatsTPC/TrackTPC.h"
23+
#include "DataFormatsTPC/ClusterNative.h"
24+
#include "SimulationDataFormat/MCCompLabel.h"
25+
26+
namespace o2::dataformats
27+
{
28+
29+
/// raw TPC cluster with its address; transformed coordinates are not stored (re-transform offline with the calibration of the TF)
30+
struct CosmicTPCCluster {
31+
enum Flags : uint8_t {
32+
Attached = 0x1, ///< attached to the TPC track of this leg
33+
Corridor = 0x2, ///< found in the road around the leg
34+
Used = 0x4, ///< attached to some TPC track (for corridor clusters: another track, e.g. a split piece of the leg)
35+
AbsTime = 0x8 ///< found on the other TPC side with the absolute time of the cosmic instead of the time0 of the leg: TrackCosmicsExtended::timeTOFMUS
36+
///< if >= 0, else the time of TrackCosmicsExtended::cosmic
37+
};
38+
o2::tpc::ClusterNative cl{}; ///< raw cluster: time, pad, widths, charges, flags
39+
uint8_t sector = 0;
40+
uint8_t row = 0;
41+
uint8_t flags = 0;
42+
bool isAttached() const { return flags & Attached; }
43+
bool isCorridor() const { return flags & Corridor; }
44+
bool isUsed() const { return flags & Used; }
45+
bool isAbsTime() const { return flags & AbsTime; }
46+
ClassDefNV(CosmicTPCCluster, 1);
47+
};
48+
49+
/// origin of the ITS / TOF / TRD hits of a cosmic
50+
enum CosmicHitFlags : uint8_t {
51+
HitMatched = 0x1, ///< part of the leg's matched global track
52+
HitRoad = 0x2, ///< found by the road search around the cosmic
53+
HitTOFFlight = 0x4 ///< TOF road hit of the top/bottom pair whose time difference matches the muon's flight (fixes the cosmic's time)
54+
};
55+
56+
/// ITS cluster of a leg: the raw compact cluster (chip, anchor pixel, pattern ID) and its ROF; no coordinates (the dictionary and the
57+
/// geometry are applied offline)
58+
struct CosmicITSCluster {
59+
uint16_t chipID = 0;
60+
uint16_t row = 0;
61+
uint16_t col = 0;
62+
uint16_t pattID = 0;
63+
int32_t pattEntry = -1; ///< start of the pattern bytes in TrackCosmicsExtended::itsPatterns (pattern not in the dictionary or group pattern), -1: none
64+
int32_t rofBC = 0; ///< start of the cluster's ROF in BCs since the start of the TF
65+
uint8_t leg = 0; ///< 0 bottom, 1 top
66+
uint8_t flags = 0; ///< CosmicHitFlags
67+
ClassDefNV(CosmicITSCluster, 1);
68+
};
69+
70+
/// TOF cluster of a leg: matched to its track or found on the road
71+
struct CosmicTOFCluster {
72+
double timeRaw = 0.; ///< raw TOF time [ps] (the calibration is applied offline)
73+
float tot = 0.f; ///< time over threshold
74+
int32_t channel = -1;
75+
uint8_t leg = 0;
76+
uint8_t flags = 0; ///< CosmicHitFlags
77+
ClassDefNV(CosmicTOFCluster, 1);
78+
};
79+
80+
/// TRD tracklet of a leg: attached to its track or found on the road
81+
struct CosmicTRDTracklet {
82+
uint64_t word = 0; ///< raw Tracklet64 word
83+
int32_t trigBC = 0; ///< BC of its trigger since the start of the TF
84+
uint8_t layer = 0;
85+
uint8_t leg = 0;
86+
uint8_t flags = 0; ///< CosmicHitFlags
87+
ClassDefNV(CosmicTRDTracklet, 1);
88+
};
89+
90+
/// matched cosmic with everything needed for an offline refit
91+
struct TrackCosmicsExtended {
92+
o2::dataformats::TrackCosmics cosmic{}; ///< matcher output (time in mus; the leg references are only valid within the TF)
93+
o2::tpc::TrackTPC tpcBottom{}; ///< TPC part of the bottom leg (default if none); z refers to its time0; its cluster
94+
///< references are only valid within the TF: the clusters are in clTPCBottom
95+
o2::tpc::TrackTPC tpcTop{}; ///< TPC part of the top leg
96+
std::vector<CosmicTPCCluster> clTPCBottom; ///< attached + corridor TPC clusters of the bottom leg
97+
std::vector<CosmicTPCCluster> clTPCTop; ///< same for the top leg
98+
std::vector<CosmicITSCluster> clITS; ///< ITS clusters of the legs' matched tracks and on the road (per half and layer the closest, in the inner barrel up to 5, best first)
99+
std::vector<uint8_t> itsPatterns; ///< pattern bytes (row span, column span, bitmap) of the ITS clusters that need them
100+
std::vector<CosmicTOFCluster> clTOF; ///< TOF clusters of the legs' matched tracks and on the road
101+
std::vector<CosmicTRDTracklet> trdTracklets; ///< TRD tracklets of the legs' matched tracks and on the road
102+
float timeTOFMUS = -1.f; ///< time of the cosmic [mus since the TF start, negative before it] from its HitTOFFlight pair (valid if hasTOFTime())
103+
float scoreTOFPair = -1.f; ///< score of the HitTOFFlight pair: road and flight-time residuals squared in units of the cuts (< 0: none)
104+
float scoreTOFReversed = -1.f; ///< same for the best pair in the impossible order (bottom hit first) = an accidental coincidence:
105+
///< QA of the flag's background; comparable to scoreTOFPair = ambiguous TOF time (< 0: none)
106+
int duplicateOf = -1; ///< entry (in the TF) of the cosmic this one duplicates: the same muon matched twice (e.g. a leg split
107+
///< into two TPC tracks): >= 30 % of the smaller one's TPC clusters shared with a better one (TOF time,
108+
///< more attached clusters) (-1: none)
109+
o2::track::TrackParCov polished{}; ///< refit at the TOF time (TPC-only legs, muon mass, energy loss along the flight), at the closest
110+
///< approach to the beam line; valid if chi2MatchPolished >= 0
111+
float chi2MatchPolished = -1.f; ///< chi2 of the polished bottom and top halves at the closest approach (< 0: not polished)
112+
o2::MCCompLabel label{}; ///< MC label of the cosmic (MC only)
113+
114+
bool hasTOFTime() const { return scoreTOFPair >= 0.f; } ///< a HitTOFFlight pair gave the cosmic its time timeTOFMUS
115+
ClassDefNV(TrackCosmicsExtended, 1);
116+
};
117+
118+
/// per-TF quantities of the TPC transformation used in the reconstruction
119+
struct CosmicsTFInfo {
120+
float vDrift = 0.f; ///< drift velocity of the transformation [cm/time bin]
121+
float t0 = 0.f; ///< time offset of the transformation [time bins]
122+
ClassDefNV(CosmicsTFInfo, 1);
123+
};
124+
125+
} // namespace o2::dataformats
126+
127+
#endif

0 commit comments

Comments
 (0)