16#ifndef O2_GPU_TRD_RECOPARAM_H
17#define O2_GPU_TRD_RECOPARAM_H
40#if !defined(GPUCA_GPUCODE_DEVICE)
51 GPUd() float convertAngleToDy(
float snp)
const {
return 3.f *
snp / CAMath::Sqrt(1 -
snp *
snp); }
52 GPUd() float getCorrYDy()
const {
return mCorrYDy; }
53 GPUd() float getPileUpProbTracklet(
int nBC,
bool withChargeInfo,
bool Q0 = true,
bool Q1 = true)
const;
57 GPUd()
float getZCorrCoeffNRC()
const {
return mZCorrCoefNRC; }
60 GPUd()
int getPileUpRangeBefore()
const {
return mPileUpRangeBefore; }
61 GPUd()
int getPileUpRangeAfter()
const {
return mPileUpRangeAfter; }
65 float mLorentzAngle{0.f};
71 float mDyA2{1.225e-3f};
74 float mCorrYDy{0.13f};
76 float mPullA{6.8e-3f};
81 float mOccDyA{2.5e-4f};
83 float mZCorrCoefNRC{1.4f};
87 int mPileUpRangeBefore{-130};
88 int mPileUpMaxProb{0};
89 int mPileUpRangeAfter{70};
91 int mPileUpRangeBefore11{-130};
92 int mPileUpMaxProb11{0};
93 int mPileUpRangeAfter11{30};
95 int mPileUpRangeBefore01{-80};
96 int mPileUpMaxProb01{30};
97 int mPileUpRangeAfter01{70};
99 int mPileUpRangeBefore10{-130};
100 int mPileUpMaxProb10{-60};
101 int mPileUpRangeAfter10{30};
103 int mPileUpRangeBefore00{-10};
104 int mPileUpMaxProb00{22};
105 int mPileUpRangeAfter00{40};
117GPUdi() float GPUTRDRecoParam::getRPhiRes(
float snp,
float pull,
int occupancy)
const
120 float tgp = (CAMath::Abs(snp) < 0.99999f) ? CAMath::Abs(snp) / CAMath::Sqrt(1 - snp * snp) : 1e6;
121 float resIdeal = mRPhiA + mRPhiATgp * tgp;
126 float resPull = mPullA * pull * pull + mPullB * pull;
127 float resOccupancy = mOccA * occupancy;
128 return (resIdeal * resIdeal + mRPhiC2 * (snp - mLorentzAngle) * (snp - mLorentzAngle) + resPull * resPull + resOccupancy);
131GPUdi() float GPUTRDRecoParam::getPileUpProbTracklet(
int nBC,
bool withChargeInfo,
bool Q0,
bool Q1)
const
138 int maxBC = mPileUpRangeAfter;
139 int minBC = mPileUpRangeBefore;
140 int maxProbBC = mPileUpMaxProb;
141 if (nBC <= mPileUpRangeBefore || nBC >= mPileUpRangeAfter) {
145 if (withChargeInfo) {
147 maxBC = mPileUpRangeAfter11;
148 minBC = mPileUpRangeBefore11;
149 maxProbBC = mPileUpMaxProb11;
152 maxBC = mPileUpRangeAfter01;
153 minBC = mPileUpRangeBefore01;
154 maxProbBC = mPileUpMaxProb01;
157 maxBC = mPileUpRangeAfter10;
158 minBC = mPileUpRangeBefore10;
159 maxProbBC = mPileUpMaxProb10;
163 if (nBC > maxProbBC && nBC <= 0) {
164 prob += 2. / (maxBC - minBC) / (0 - maxProbBC) * (nBC - maxProbBC);
166 if (nBC > 0 && nBC < maxBC) {
167 prob += 2. / (maxBC - minBC) / (0 - maxBC) * (nBC - maxBC);
171 maxBC = mPileUpRangeAfter00;
172 minBC = mPileUpRangeBefore00;
173 maxProbBC = mPileUpMaxProb00;
178 if (nBC <= minBC || nBC >= maxBC) {
181 float maxProb = 2. / (maxBC - minBC);
182 if (nBC > minBC && nBC <= maxProbBC) {
183 prob += maxProb / (maxProbBC - minBC) * (nBC - minBC);
185 prob += maxProb / (maxProbBC - maxBC) * (nBC - maxBC);
190GPUdi() float GPUTRDRecoParam::getPileUpProbTrack(
int nBC,
std::
array<
int, 6> Q0,
std::
array<
int, 6> Q1)
const
202 float probNoInfo = GPUTRDRecoParam::getPileUpProbTracklet(nBC,
false);
204 float probTrack = probNoInfo;
205 if (probNoInfo < 1e-6f)
209 for (
int i = 0;
i < 6;
i++) {
211 if (Q0[
i] < 0 || Q1[
i] < 0)
213 float probTracklet = GPUTRDRecoParam::getPileUpProbTracklet(nBC,
true, (Q0[
i] != 0), (Q1[
i] != 0));
214 probTrack *= probTracklet / probNoInfo;
void init(float bz, const GPUSettingsRec *rec=nullptr)
Load parameterization for given magnetic field.
GPUTRDRecoParam()=default
const float const float std::array< float, 3 > & cov
GPUd() int getPileUpRangeAfter() const
const float const float rowSize
~GPUTRDRecoParam()=default
GPUd() void recalcTrkltCov(const float tilt
Recalculate tracklet covariance based on phi angle of related track.
std::array< int, 6 > std::array< int, 6 > Q1 const
GPUTRDRecoParam(const GPUTRDRecoParam &)=default
const float const float std::array< float, 3 > const float pull
const float const float std::array< float, 3 > const float const int occupancy
GPUd() int getPileUpRangeBefore() const
Get BC intervals for pile-up.
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...