15#ifndef GPUTPCGMPROPAGATOR_H
16#define GPUTPCGMPROPAGATOR_H
31class GPUTPCGMTrackParam;
33namespace gputpcgmmergertypes
35struct InterpolationErrorHit;
69 float radLenInv,
DLMax, EP2, sigmadE2, k22, k33, k43, k44;
78 GPUd()
void SetMaterialTPC() { SetMaterial(28811.7f, 1.025e-3f); }
87 GPUd()
void SetFitInProjections(
bool Flag) { mFitInProjections = Flag; }
88 GPUd()
void SetPropagateBzOnly(
bool Flag) { mPropagateBzOnly = Flag; }
89 GPUd()
void SetToyMCEventsFlag(
bool Flag) { mToyMCEvents = Flag; }
90 GPUd()
void SetSeedingErrors(
bool Flag) { mSeedingErrors = Flag; }
93 GPUd()
void SetMaxSinPhi(
float maxSinPhi) { mMaxSinPhi = maxSinPhi; }
104 GPUd() int32_t RotateToAlpha(
float newAlpha);
110 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));
117 if (chiY > 9.f ||
chiZ > 9.f) {
140 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);
142 GPUd()
float GetAlpha()
const {
return mAlpha; }
144 GPUd() float GetQPt0()
const {
return mT0.GetQPt(); }
145 GPUd() float GetSinPhi0()
const {
return mT0.GetSinPhi(); }
146 GPUd() float GetCosPhi0()
const {
return mT0.GetCosPhi(); }
153 GPUd()
bool GetFitInProjections()
const {
return mFitInProjections; }
162 GPUd() static
float ApproximateBetheBloch(
float beta2);
166 GPUd()
float GetBzBase(
float cosAlpha,
float sinAlpha,
float X,
float Y,
float Z)
const;
168 GPUd()
void GetBxByBzBase(
float cosAlpha,
float sinAlpha,
float X,
float Y,
float Z,
float B[3])
const;
170 GPUd()
float getGlobalX(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const;
172 GPUd()
float getGlobalY(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const;
179 const o2::base::MatLayerCylSet* mMatLUT =
nullptr;
182 float mCosAlpha = 1.
f;
183 float mSinAlpha = 0.
f;
188 bool mSeedingErrors = 0;
189 bool mFitInProjections = 1;
190 bool mPropagateBzOnly = 0;
191 bool mToyMCEvents = 0;
197 CAMath::SinCos(
Alpha, s,
c);
198 GetBxByBzBase(
c, s,
X,
Y,
Z,
B);
204 CAMath::SinCos(
Alpha, s,
c);
205 return GetBzBase(
c, s,
X,
Y,
Z);
208GPUdi()
void GPUTPCGMPropagator::GetBxByBz(
float X,
float Y,
float Z,
float B[3])
const
210 GetBxByBzBase(mCosAlpha, mSinAlpha,
X,
Y,
Z,
B);
213GPUdi() float GPUTPCGMPropagator::GetBz(
float X,
float Y,
float Z)
const
215 return GetBzBase(mCosAlpha, mSinAlpha,
X,
Y,
Z);
218GPUdi()
void GPUTPCGMPropagator::SetMaterial(
float radLen,
float rho)
221 mMaterial.
radLen = radLen;
222 mMaterial.
radLenInv = (radLen > 1.e-4f) ? 1.f / radLen : 0.f;
223 CalculateMaterialCorrection();
234 CAMath::SinCos(mAlpha, mSinAlpha, mCosAlpha);
235 CalculateMaterialCorrection();
238GPUdi() float GPUTPCGMPropagator::GetMirroredYModel()
const
240 float Bz = GetBz(mT0.GetX(), mT0.GetY(), mT0.GetZ());
241 return mT0.GetMirroredY(Bz);
244GPUdi() float GPUTPCGMPropagator::GetMirroredYTrack()
const
249 float Bz = GetBz(mT->GetX(), mT->GetY(), mT->GetZ());
250 return mT->GetMirroredY(Bz);
253GPUdi() float GPUTPCGMPropagator::getGlobalX(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const
255 return X * cosAlpha -
Y * sinAlpha;
258GPUdi() float GPUTPCGMPropagator::getGlobalY(
float cosAlpha,
float sinAlpha,
float X,
float Y)
const
260 return X * sinAlpha +
Y * cosAlpha;
263GPUdi() float GPUTPCGMPropagator::getGlobalX(
float X,
float Y)
const
265 return getGlobalX(mCosAlpha, mSinAlpha,
X,
Y);
268GPUdi() float GPUTPCGMPropagator::getGlobalY(
float X,
float Y)
const
270 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 SetToyMCEventsFlag(bool Flag)
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
@ updateErrorClusterRejected
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()