15#ifndef GPUTPCGMPROPAGATOR_H
16#define GPUTPCGMPROPAGATOR_H
31class GPUTPCGMTrackParam;
33namespace gputpcgmmergertypes
35struct InterpolationErrorHit;
72 float radLenInv,
DLMax, EP2, sigmadE2, k22, k33, k43, k44;
81 GPUd()
void SetMaterialTPC() { SetMaterial(28811.7f, 1.025e-3f); }
90 GPUd()
void SetFitInProjections(
bool Flag) { mFitInProjections = Flag; }
91 GPUd()
void SetPropagateBzOnly(
bool Flag) { mPropagateBzOnly = Flag; }
92 GPUd()
void SetSeedingErrors(
bool Flag) { mSeedingErrors = Flag; }
95 GPUd()
void SetMaxSinPhi(
float maxSinPhi) { mMaxSinPhi = maxSinPhi; }
106 GPUd() int32_t RotateToAlpha(
float newAlpha);
112 GPUd() int32_t Update(
float posY,
float posZ, int32_t
iRow,
const GPUParam&
param, int16_t
clusterState, int8_t
rejectChi2, gputpcgmmergertypes::InterpolationErrorHit*
inter,
bool refit, int8_t
sideC,
float time,
float avgInvCharge,
float invCharge
GPUCA_DEBUG_STREAMER_CHECK(,
DebugStreamerVals* debugVals =
nullptr));
119 if (chiY > 9.f ||
chiZ > 9.f) {
142 GPUd() static
void GetErr2(
float&
err2Y,
float&
err2Z,
const GPUParam&
param,
float snp,
float tgl,
float posZ,
float trackX,
float trackY, int32_t
iRow, int16_t
clusterState, int8_t
sector,
float time,
float avgCharge,
float charge,
bool seedingErrors);
144 GPUd()
float GetAlpha()
const {
return mAlpha; }
146 GPUd() float GetQPt0()
const {
return mT0.GetQPt(); }
147 GPUd() float GetSinPhi0()
const {
return mT0.GetSinPhi(); }
148 GPUd() float GetCosPhi0()
const {
return mT0.GetCosPhi(); }
155 GPUd()
bool GetFitInProjections()
const {
return mFitInProjections; }
164 GPUd() static
float ApproximateBetheBloch(
float beta2);
168 GPUd()
float GetBzBase(
float cosAlpha,
float sinAlpha,
float X,
float Y,
float Z)
const;
170 GPUd()
void GetBxByBzBase(
float cosAlpha,
float sinAlpha,
float X,
float Y,
float Z,
float B[3])
const;
172 GPUd()
float getGlobalX(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const;
174 GPUd()
float getGlobalY(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const;
181 const o2::base::MatLayerCylSet* mMatLUT =
nullptr;
184 float mCosAlpha = 1.
f;
185 float mSinAlpha = 0.
f;
190 bool mSeedingErrors = 0;
191 bool mFitInProjections = 1;
192 bool mPropagateBzOnly = 0;
198 CAMath::SinCos(
Alpha, s,
c);
199 GetBxByBzBase(
c, s,
X,
Y,
Z,
B);
205 CAMath::SinCos(
Alpha, s,
c);
206 return GetBzBase(
c, s,
X,
Y,
Z);
209GPUdi()
void GPUTPCGMPropagator::GetBxByBz(
float X,
float Y,
float Z,
float B[3])
const
211 GetBxByBzBase(mCosAlpha, mSinAlpha,
X,
Y,
Z,
B);
214GPUdi() float GPUTPCGMPropagator::GetBz(
float X,
float Y,
float Z)
const
216 return GetBzBase(mCosAlpha, mSinAlpha,
X,
Y,
Z);
219GPUdi()
void GPUTPCGMPropagator::SetMaterial(
float radLen,
float rho)
222 mMaterial.
radLen = radLen;
223 mMaterial.
radLenInv = (radLen > 1.e-4f) ? 1.f / radLen : 0.f;
224 CalculateMaterialCorrection();
235 CAMath::SinCos(mAlpha, mSinAlpha, mCosAlpha);
236 CalculateMaterialCorrection();
239GPUdi() float GPUTPCGMPropagator::GetMirroredYModel()
const
241 float Bz = GetBz(mT0.GetX(), mT0.GetY(), mT0.GetZ());
242 return mT0.GetMirroredY(Bz);
245GPUdi() float GPUTPCGMPropagator::GetMirroredYTrack()
const
250 float Bz = GetBz(mT->GetX(), mT->GetY(), mT->GetZ());
251 return mT->GetMirroredY(Bz);
254GPUdi() float GPUTPCGMPropagator::getGlobalX(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const
256 return X * cosAlpha -
Y * sinAlpha;
259GPUdi() float GPUTPCGMPropagator::getGlobalY(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const
261 return X * sinAlpha +
Y * cosAlpha;
264GPUdi() float GPUTPCGMPropagator::getGlobalX(
float X,
float Y)
const
266 return getGlobalX(mCosAlpha, mSinAlpha,
X,
Y);
269GPUdi() float GPUTPCGMPropagator::getGlobalY(
float X,
float Y)
const
271 return getGlobalY(mCosAlpha, mSinAlpha,
X,
Y);
#define GPUCA_DEBUG_STREAMER_CHECK(...)
#define GPUCA_MAX_SIN_PHI
constexpr int p1()
constexpr to accelerate the coordinates changing
GPUd() float GetSinPhi0() const
GPUdDefault() GPUTPCGMPropagator()=default
float int32_t const GPUParam int16_t int8_t gputpcgmmergertypes::InterpolationErrorHit bool int8_t sideC
float int32_t const GPUParam int16_t clusterState
GPUd() void UpdateMaterial(const GPUTPCGMPhysicalTrackModel &GPUrestrict() t0e)
GPUd() void SetAlpha(float v)
float const GPUParam float float tgl
float int32_t const GPUParam int16_t int8_t rejectChi2
float const GPUParam float snp
float const GPUParam float float float float float trackY
GPUd() GPUTPCGMPhysicalTrackModel &Model()
GPUd() void SelectFieldRegion(FieldRegion region)
float const GPUParam float float float float trackX
float int16_t bool float float err2Z
GPUd() void SetPropagateBzOnly(bool Flag)
GPUd() float GetCosPhi0() const
FieldRegion
Enumeration of field regions.
@ TRD
outer TPC -> outer TRD
float int32_t const GPUParam int16_t int8_t gputpcgmmergertypes::InterpolationErrorHit bool int8_t float float avgInvCharge
float int32_t const GPUParam int16_t int8_t float float avgCharge
float const GPUParam float int32_t int16_t int8_t sector
float int32_t const GPUParam int16_t int8_t gputpcgmmergertypes::InterpolationErrorHit bool refit
GPUd() void SetMaterial(float radLen
GPUd() void Mirror(bool inFlyDirection)
float bool inFlyDirection
float int32_t const GPUParam int16_t int8_t gputpcgmmergertypes::InterpolationErrorHit * inter
GPUd() void SetSeedingErrors(bool Flag)
GPUd() int32_t RotateToAlpha(float new Alpha)
float const GPUParam float float float float float int32_t int16_t int8_t float float float bool seedingErrors
GPUd() float GetQPt0() const
float const GPUParam float float float float float int32_t int16_t int8_t float float float charge
GPUd() void SetMatLUT(const o2
@ updateErrorClusterRejectedDistance
@ updateErrorClusterRejectedInUpdate
@ updateErrorClusterRejectedInInterpolation
@ updateErrorClusterRejected
@ updateErrorClusterRejectedEdge
float int16_t bool float err2Y
float int32_t const GPUParam int16_t int8_t float float float charge const
GPUd() void SetFitInProjections(bool Flag)
GPUd() void CalculateMaterialCorrection()
GPUd() void SetMaxSinPhi(float maxSinPhi)
float int32_t const GPUParam int16_t int8_t gputpcgmmergertypes::InterpolationErrorHit bool int8_t float time
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
GPUhd() MaterialCorrection()