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
23namespace o2
24{
25namespace gpu
26{
27struct GPUSettingsRec;
28
30{
31 public:
32 GPUTRDRecoParam() = default;
34 ~GPUTRDRecoParam() = default;
35
37 void init(float bz, const GPUSettingsRec* rec = nullptr);
38
39#if !defined(GPUCA_GPUCODE_DEVICE)
41 GPUd() void recalcTrkltCov(const float tilt, const float snp, const float rowSize, std::array<float, 3>& cov) const
42 {
43 recalcTrkltCov(tilt, snp, rowSize, cov.data());
44 }
45#endif
46 GPUd() void recalcTrkltCov(const float tilt, const float snp, const float rowSize, float* cov) const;
47
54 GPUd() float getRPhiRes(float snp) const { return (mRPhiA2 + mRPhiC2 * (snp - mRPhiB) * (snp - mRPhiB)); }
55 GPUd() float getDyRes(float snp) const { return mDyA2 + mDyC2 * (snp - mDyB) * (snp - mDyB); } // // a^2 + c^2 * (snp - b)^2
56 GPUd() float convertAngleToDy(float snp) const { return mAngleToDyA + mAngleToDyB * snp + mAngleToDyC * snp * snp; } // a + b*snp + c*snp^2 is more accurate than sin(phi) = (dy / xDrift) / sqrt(1+(dy/xDrift)^2)
57
59 GPUd() float getZCorrCoeffNRC() const { return mZCorrCoefNRC; }
60
61 private:
62 // tracklet error parameterization depends on the magnetic field
63 // rphi
64 float mRPhiA2{1.f};
65 float mRPhiB{0.f};
66 float mRPhiC2{0.f};
67 // angle
68 float mDyA2{1.225e-3f};
69 float mDyB{0.f};
70 float mDyC2{0.f};
71 // angle to Dy
72 float mAngleToDyA; // parameterization for conversion track angle -> tracklet deflection
73 float mAngleToDyB; // parameterization for conversion track angle -> tracklet deflection
74 float mAngleToDyC; // parameterization for conversion track angle -> tracklet deflection
75
76 float mZCorrCoefNRC{1.4f};
77
78 ClassDefNV(GPUTRDRecoParam, 2);
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 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