Skip to content

Commit 605bf80

Browse files
authored
Merge branch 'AliceO2Group:dev' into new-detector4
2 parents 9c4883c + 44df33b commit 605bf80

File tree

62 files changed

+1143
-825
lines changed

Some content is hidden

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

62 files changed

+1143
-825
lines changed

Common/DCAFitter/include/DCAFitter/DCAFitterN.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ GPUd() void DCAFitterN<N, Args...>::calcTrackResiduals()
753753

754754
//___________________________________________________________________
755755
template <int N, typename... Args>
756-
GPUd() inline void DCAFitterN<N, Args...>::calcTrackDerivatives()
756+
GPUdi() void DCAFitterN<N, Args...>::calcTrackDerivatives()
757757
{
758758
// calculate track derivatives over X param
759759
for (int i = N; i--;) {
@@ -763,7 +763,7 @@ GPUd() inline void DCAFitterN<N, Args...>::calcTrackDerivatives()
763763

764764
//___________________________________________________________________
765765
template <int N, typename... Args>
766-
GPUd() inline double DCAFitterN<N, Args...>::calcChi2() const
766+
GPUdi() double DCAFitterN<N, Args...>::calcChi2() const
767767
{
768768
// calculate current chi2
769769
double chi2 = 0;
@@ -777,7 +777,7 @@ GPUd() inline double DCAFitterN<N, Args...>::calcChi2() const
777777

778778
//___________________________________________________________________
779779
template <int N, typename... Args>
780-
GPUd() inline double DCAFitterN<N, Args...>::calcChi2NoErr() const
780+
GPUdi() double DCAFitterN<N, Args...>::calcChi2NoErr() const
781781
{
782782
// calculate current chi2 of abs. distance minimization
783783
double chi2 = 0;
@@ -842,7 +842,7 @@ GPUd() bool DCAFitterN<N, Args...>::propagateTracksToVertex(int icand)
842842

843843
//___________________________________________________________________
844844
template <int N, typename... Args>
845-
GPUd() inline o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int i, int icand)
845+
GPUdi() o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int i, int icand)
846846
{
847847
// propagate tracks param only to current vertex (if not already done)
848848
int ord = mOrder[icand];
@@ -858,7 +858,7 @@ GPUd() inline o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int
858858

859859
//___________________________________________________________________
860860
template <int N, typename... Args>
861-
GPUd() inline double DCAFitterN<N, Args...>::getAbsMax(const VecND& v)
861+
GPUdi() double DCAFitterN<N, Args...>::getAbsMax(const VecND& v)
862862
{
863863
double mx = -1;
864864
for (int i = N; i--;) {
@@ -1075,7 +1075,7 @@ GPUd() o2::track::TrackPar DCAFitterN<N, Args...>::createParentTrackPar(int cand
10751075

10761076
//___________________________________________________________________
10771077
template <int N, typename... Args>
1078-
GPUd() inline bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar& t, float x)
1078+
GPUdi() bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar& t, float x)
10791079
{
10801080
bool res = true;
10811081
if (mUsePropagator || mMatCorr != o2::base::Propagator::MatCorrType::USEMatCorrNONE) {
@@ -1091,7 +1091,7 @@ GPUd() inline bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar
10911091

10921092
//___________________________________________________________________
10931093
template <int N, typename... Args>
1094-
GPUd() inline bool DCAFitterN<N, Args...>::propagateToX(o2::track::TrackParCov& t, float x)
1094+
GPUdi() bool DCAFitterN<N, Args...>::propagateToX(o2::track::TrackParCov& t, float x)
10951095
{
10961096
bool res = true;
10971097
if (mUsePropagator || mMatCorr != o2::base::Propagator::MatCorrType::USEMatCorrNONE) {

DataFormats/Detectors/TPC/include/DataFormatsTPC/TrackTPC.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class TrackTPC : public o2::track::TrackParCov
7979
GPUd() void setClusterRef(uint32_t entry, uint16_t ncl) { mClustersReference.set(entry, ncl); }
8080

8181
template <class T>
82-
GPUd() static inline void getClusterReference(T& clinfo, int nCluster,
83-
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex, const ClusRef& ref)
82+
GPUdi() static void getClusterReference(T& clinfo, int nCluster,
83+
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex, const ClusRef& ref)
8484
{
8585
// data for given tracks starts at clinfo[ ref.getFirstEntry() ],
8686
// 1st ref.getEntries() cluster indices are stored as uint32_t
@@ -95,31 +95,31 @@ class TrackTPC : public o2::track::TrackParCov
9595
}
9696

9797
template <class T>
98-
GPUd() inline void getClusterReference(T& clinfo, int nCluster,
99-
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex) const
98+
GPUdi() void getClusterReference(T& clinfo, int nCluster,
99+
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex) const
100100
{
101101
getClusterReference<T>(clinfo, nCluster, sectorIndex, rowIndex, clusterIndex, mClustersReference);
102102
}
103103

104104
template <class T>
105-
GPUd() static inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
106-
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex, const ClusRef& ref)
105+
GPUdi() static const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
106+
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex, const ClusRef& ref)
107107
{
108108
uint32_t clusterIndex;
109109
getClusterReference<T>(clinfo, nCluster, sectorIndex, rowIndex, clusterIndex, ref);
110110
return (clusters.clusters[sectorIndex][rowIndex][clusterIndex]);
111111
}
112112

113113
template <class T>
114-
GPUd() inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
115-
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex) const
114+
GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
115+
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex) const
116116
{
117117
return getCluster<T>(clinfo, nCluster, clusters, sectorIndex, rowIndex, mClustersReference);
118118
}
119119

120120
template <class T>
121-
GPUd() inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
122-
const o2::tpc::ClusterNativeAccess& clusters) const
121+
GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
122+
const o2::tpc::ClusterNativeAccess& clusters) const
123123
{
124124
uint8_t sectorIndex, rowIndex;
125125
return (getCluster<T>(clinfo, nCluster, clusters, sectorIndex, rowIndex));

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ class TrackParametrization
199199
GPUd() value_t getPt() const;
200200
GPUd() value_t getE2() const;
201201
GPUd() value_t getE() const;
202-
GPUd() static inline value_t getdEdxBB(value_t betagamma) { return BetheBlochSolid(betagamma); }
203-
GPUd() static inline value_t getdEdxBBOpt(value_t betagamma) { return BetheBlochSolidOpt(betagamma); }
204-
GPUd() static inline value_t getBetheBlochSolidDerivativeApprox(value_T dedx, value_T bg) { return BetheBlochSolidDerivative(dedx, bg); }
202+
GPUdi() static value_t getdEdxBB(value_t betagamma) { return BetheBlochSolid(betagamma); }
203+
GPUdi() static value_t getdEdxBBOpt(value_t betagamma) { return BetheBlochSolidOpt(betagamma); }
204+
GPUdi() static value_t getBetheBlochSolidDerivativeApprox(value_T dedx, value_T bg) { return BetheBlochSolidDerivative(dedx, bg); }
205205

206206
GPUd() value_t getTheta() const;
207207
GPUd() value_t getEta() const;

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ GPUd() value_T BetheBlochSolidOpt(value_T bg)
190190

191191
//____________________________________________________
192192
template <typename value_T>
193-
GPUd() value_T inline BetheBlochSolidDerivative(value_T dedx, value_T bg)
193+
GPUdi() value_T BetheBlochSolidDerivative(value_T dedx, value_T bg)
194194
{
195195
//
196196
// This is approximate derivative of the BB over betagamm, NO check for the consistency of the provided dedx and bg is done

DataFormats/simulation/include/SimulationDataFormat/MCTrack.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ class MCTrackT
139139
}
140140
}
141141

142+
Double_t GetTgl() const
143+
{
144+
auto pT = GetPt();
145+
return pT > 1e-6 ? mStartVertexMomentumZ / pT : (GetStartVertexMomentumZ() > 0 ? 999. : -999.);
146+
}
147+
142148
Double_t GetTheta() const
143149
{
144150
double mz(mStartVertexMomentumZ);

Detectors/Base/include/DetectorsBase/MatLayerCyl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ class MatLayerCyl : public o2::gpu::FlatObject
5454
Within = 0,
5555
Above = 1 };
5656

57+
#ifndef GPUCA_GPUCODE
5758
MatLayerCyl();
5859
MatLayerCyl(const MatLayerCyl& src) CON_DELETE;
5960
~MatLayerCyl() CON_DEFAULT;
61+
#endif
6062

6163
#ifndef GPUCA_ALIGPUCODE // this part is unvisible on GPU version
6264
MatLayerCyl(float rMin, float rMax, float zHalfSpan, float dzMin, float drphiMin);

Detectors/Base/include/DetectorsBase/MatLayerCylSet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ class MatLayerCylSet : public o2::gpu::FlatObject
5151
{
5252

5353
public:
54+
#ifndef GPUCA_GPUCODE
5455
MatLayerCylSet() CON_DEFAULT;
5556
~MatLayerCylSet() CON_DEFAULT;
5657
MatLayerCylSet(const MatLayerCylSet& src) CON_DELETE;
58+
#endif
5759

5860
GPUd() const MatLayerCylSetLayout* get() const { return reinterpret_cast<const MatLayerCylSetLayout*>(mFlatBufferPtr); }
5961
GPUd() MatLayerCylSetLayout* get() { return reinterpret_cast<MatLayerCylSetLayout*>(mFlatBufferPtr); }

Detectors/Base/src/MatLayerCyl.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
using namespace o2::base;
2424
using flatObject = o2::gpu::FlatObject;
2525

26+
#ifndef GPUCA_GPUCODE
2627
//________________________________________________________________________________
2728
MatLayerCyl::MatLayerCyl() : mNZBins(0), mNPhiBins(0), mNPhiSlices(0), mZHalf(0.f), mRMin2(0.f), mRMax2(0.f), mDZ(0.f), mDZInv(0.f), mDPhi(0.f), mDPhiInv(0.f), mPhiBin2Slice(nullptr), mSliceCos(nullptr), mSliceSin(nullptr), mCells(nullptr)
2829
{
2930
}
31+
#endif
3032

3133
#ifndef GPUCA_ALIGPUCODE // this part is unvisible on GPU version
3234
//________________________________________________________________________________

Detectors/Base/src/Propagator.cxx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -788,16 +788,12 @@ namespace o2::base
788788
{
789789
#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
790790
template class PropagatorImpl<float>;
791+
template bool GPUdni() PropagatorImpl<float>::propagateToAlphaX<PropagatorImpl<float>::TrackPar_t>(PropagatorImpl<float>::TrackPar_t&, float, float, bool, float, float, int, PropagatorImpl<float>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
792+
template bool GPUdni() PropagatorImpl<float>::propagateToAlphaX<PropagatorImpl<float>::TrackParCov_t>(PropagatorImpl<float>::TrackParCov_t&, float, float, bool, float, float, int, PropagatorImpl<float>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
791793
#endif
792794
#ifndef GPUCA_GPUCODE
793795
template class PropagatorImpl<double>;
794-
#endif
795-
#ifndef __HIPCC__ // TODO: Fixme: must prevent HIP from compiling this, should file bug report
796-
template bool GPUd() PropagatorImpl<float>::propagateToAlphaX<PropagatorImpl<float>::TrackPar_t>(PropagatorImpl<float>::TrackPar_t&, float, float, bool, float, float, int, PropagatorImpl<float>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
797-
template bool GPUd() PropagatorImpl<float>::propagateToAlphaX<PropagatorImpl<float>::TrackParCov_t>(PropagatorImpl<float>::TrackParCov_t&, float, float, bool, float, float, int, PropagatorImpl<float>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
798-
#ifndef GPUCA_GPUCODE_DEVICE
799796
template bool PropagatorImpl<double>::propagateToAlphaX<PropagatorImpl<double>::TrackPar_t>(PropagatorImpl<double>::TrackPar_t&, double, double, bool, double, double, int, PropagatorImpl<double>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
800797
template bool PropagatorImpl<double>::propagateToAlphaX<PropagatorImpl<double>::TrackParCov_t>(PropagatorImpl<double>::TrackParCov_t&, double, double, bool, double, double, int, PropagatorImpl<double>::MatCorrType matCorr, track::TrackLTIntegral*, int) const;
801798
#endif
802-
#endif
803799
} // namespace o2::base

Detectors/FIT/macros/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ o2_add_test_root_macro(readFITDCSdata.C
4040
O2::CCDB
4141
LABELS fit)
4242

43-
o2_data_file(COPY readFITDCSdata.C DESTINATION Detectors/FIT/macros/readFITDCSdata.C)
44-
o2_data_file(COPY readFITDeadChannelMap.C DESTINATION Detectors/FIT/macros/readFITDeadChannelMap.C)
43+
o2_data_file(COPY readFITDCSdata.C DESTINATION Detectors/FIT/macros/)
44+
o2_data_file(COPY readFITDeadChannelMap.C DESTINATION Detectors/FIT/macros/)

0 commit comments

Comments
 (0)