Project
Loading...
Searching...
No Matches
GPUTRDRecoParam.h
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#ifndef O2_GPU_TRD_RECOPARAM_H
17#define O2_GPU_TRD_RECOPARAM_H
18
19#include "GPUCommonDef.h"
20#include "GPUCommonRtypes.h"
21#include "GPUCommonArray.h"
22#include "GPUCommonMath.h"
23
24namespace o2
25{
26namespace gpu
27{
28struct GPUSettingsRec;
29
31{
32 public:
33 GPUTRDRecoParam() = default;
35 ~GPUTRDRecoParam() = default;
36
38 void init(float bz, const GPUSettingsRec* rec = nullptr);
39
40#if !defined(GPUCA_GPUCODE_DEVICE)
42 GPUd() void recalcTrkltCov(const float tilt, const float snp, const float rowSize, std::array<float, 3>& cov) const
43 {
44 recalcTrkltCov(tilt, snp, rowSize, cov.data());
45 }
46#endif
47 GPUd() void recalcTrkltCov(const float tilt, const float snp, const float rowSize, float* cov) const;
48
55 GPUd() float getRPhiRes(float snp) const { return (mRPhiA2 + mRPhiC2 * (snp - mLorentzAngle) * (snp - mLorentzAngle)); }
56 GPUd() float getDyRes(float snp) const { return mDyA2 + mDyC2 * (snp - mLorentzAngle) * (snp - mLorentzAngle); } // a^2 + c^2 * (snp - b)^2
57 GPUd() float convertAngleToDy(float snp) const { return 3.f * snp / CAMath::Sqrt(1 - snp * snp); } // when calibrated, sin(phi) = (dy / xDrift) / sqrt(1+(dy/xDrift)^2) works well
58 GPUd() float getCorrYDy(float snp) const { return mCorrYDyA + mCorrYDyC * (snp - mLorentzAngle) * (snp - mLorentzAngle); } // a + c * (snp - b)^2
59
61 GPUd() float getZCorrCoeffNRC() const { return mZCorrCoefNRC; }
62
63 private:
64 // tracklet error parameterization depends on the magnetic field
65 float mLorentzAngle{0.f};
66 // rphi
67 float mRPhiA2{1.f};
68 float mRPhiC2{0.f};
69 // angle
70 float mDyA2{1.225e-3f};
71 float mDyC2{0.f};
72 // correlation coefficient between y residual and dy residual
73 float mCorrYDyA{0.f};
74 float mCorrYDyC{0.f};
75
76 float mZCorrCoefNRC{1.4f};
77
78 ClassDefNV(GPUTRDRecoParam, 3);
79};
80
81} // namespace gpu
82} // namespace o2
83
84#endif // O2_GPU_TRD_RECOPARAM_H
void init(float bz, const GPUSettingsRec *rec=nullptr)
Load parameterization for given magnetic field.
GPUd() float getCorrYDy(float snp) const
GPUd() float getDyRes(float snp) const
const float const float rowSize
GPUd() void recalcTrkltCov(const float tilt
Recalculate tracklet covariance based on phi angle of related track.
GPUTRDRecoParam(const GPUTRDRecoParam &)=default
GPUd() float convertAngleToDy(float snp) const
const float const float std::array< float, 3 > &cov const
GPUd() float getZCorrCoeffNRC() const
Get tracklet z correction coefficient for track-eta based corraction.
GLenum array
Definition glcorearb.h:4274
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
GPUReconstruction * rec