15#ifndef GPUTRDINTERFACES_H
16#define GPUTRDINTERFACES_H
31class propagatorInterface;
40GPUdi() trackInterface<
o2::track::
TrackParCov>::trackInterface(const GPUTPCGMMergedTrack& trk) { set(trk.OuterParam().X, trk.OuterParam().alpha, trk.OuterParam().P, trk.OuterParam().C); }
52 GPUdi()
bool propagateToX(
float x,
float maxSnp,
float maxStep) {
return mProp->PropagateToXBxByBz(*mParam,
x, maxSnp, maxStep); }
53 GPUdi() int32_t getPropagatedYZ(
float x,
float& projY,
float& projZ) {
return static_cast<int32_t
>(mParam->getYZAt(
x, mProp->getNominalBz(), projY, projZ)); }
58 GPUdi() float getAlpha() {
return (mParam) ? mParam->getAlpha() : 99999.f; }
59 GPUdi() bool update(const
float p[2], const
float cov[3])
62 std::array<float, 2> pTmp = {p[0], p[1]};
63 std::array<float, 3> covTmp = {cov[0], cov[1], cov[2]};
64 return mParam->update(pTmp, covTmp);
69 GPUdi() float getPredictedChi2(const
float p[2], const
float cov[3])
72 std::array<float, 2> pTmp = {p[0], p[1]};
73 std::array<float, 3> covTmp = {cov[0], cov[1], cov[2]};
74 return mParam->getPredictedChi2(pTmp, covTmp);
79 GPUdi() bool rotate(
float alpha) {
return (mParam) ? mParam->rotate(
alpha) :
false; }
81 trackInterface<o2::track::TrackParCov>* mParam{
nullptr};
106 for (int32_t
i = 0;
i < 5;
i++) {
109 for (int32_t
i = 0;
i < 15;
i++) {
117 SetX(
param.getParamOut().getX());
118 SetPar(0,
param.getParamOut().getY());
119 SetPar(1,
param.getParamOut().getZ());
120 SetPar(2,
param.getParamOut().getSnp());
121 SetPar(3,
param.getParamOut().getTgl());
122 SetPar(4,
param.getParamOut().getQ2Pt());
123 for (int32_t
i = 0;
i < 15;
i++) {
124 SetCov(
i,
param.getParamOut().getCov()[
i]);
129 SetX(
param.getParamOut().getX());
130 SetPar(0,
param.getParamOut().getY());
131 SetPar(1,
param.getParamOut().getZ());
132 SetPar(2,
param.getParamOut().getSnp());
133 SetPar(3,
param.getParamOut().getTgl());
134 SetPar(4,
param.getParamOut().getQ2Pt());
135 for (int32_t
i = 0;
i < 15;
i++) {
136 SetCov(
i,
param.getParamOut().getCov()[
i]);
144 GPUd() float getAlpha()
const {
return mAlpha; }
145 GPUd() float getY()
const {
return GetY(); }
146 GPUd() float getZ()
const {
return GetZ(); }
147 GPUd() float getSnp()
const {
return GetSinPhi(); }
148 GPUd() float getTgl()
const {
return GetDzDs(); }
149 GPUd() float getQ2Pt()
const {
return GetQPt(); }
150 GPUd() float getEta()
const {
return -CAMath::Log(CAMath::Tan(0.5f * (0.5f * M_PI - CAMath::ATan(getTgl())))); }
151 GPUd() float getPt()
const {
return CAMath::Abs(getQ2Pt()) > 0 ? CAMath::Abs(1.f / getQ2Pt()) : 99999.f; }
152 GPUd() float getSigmaY2()
const {
return GetErr2Y(); }
153 GPUd() float getSigmaZ2()
const {
return GetErr2Z(); }
154 GPUd() float getSigmaZY()
const {
return GetCov(1); }
155 GPUd() float getSigmaSnpY()
const {
return GetCov(3); }
156 GPUd() float getSigmaSnpZ()
const {
return GetCov(4); }
158 GPUd() const
float* getPar()
const {
return GetPar(); }
159 GPUd() const
float* getCov()
const {
return GetCov(); }
160 GPUd()
void resetCovariance(
float s) { ResetCovariance(); }
161 GPUd()
void updateCovZ2(
float addZerror) { SetCov(2, GetErr2Z() + addZerror); }
166 for (int32_t
i = 0;
i < 5;
i++) {
169 for (int32_t
j = 0;
j < 15;
j++) {
190 this->SetMaterialTPC();
191 this->SetPolynomialField(pField);
192 this->SetMaxSinPhi(constants::MAX_SIN_PHI);
193 this->SetFitInProjections(0);
200 SetTrack(trk, trk->getAlpha());
203 GPUd() bool propagateToX(
float x,
float maxSnp,
float maxStep)
206 int32_t
retVal = PropagateToXAlpha(
x, GetAlpha(),
true);
208 ok = mTrack->CheckNumericalQuality();
211 GPUd() int32_t getPropagatedYZ(
float x,
float& projY,
float& projZ) {
return GetPropagatedYZ(
x, projY, projZ); }
212 GPUd()
void setFitInProjections(
bool flag) { SetFitInProjections(flag); }
215 if (RotateToAlpha(
alpha) == 0) {
216 mTrack->setAlpha(
alpha);
217 return mTrack->CheckNumericalQuality();
221 GPUd() bool update(const
float p[2], const
float cov[3])
224 return Update(p[0], p[1], 0,
false, cov[0], cov[2]) == 0 ? true :
false;
226 GPUd() float getAlpha() {
return GetAlpha(); }
228 GPUd() float getPredictedChi2(const
float p[2], const
float cov[3])
const {
return PredictChi2(p[0], p[1], cov[0], cov[2]); }
o2::track::TrackParCov TrackParCov
Result of refitting TPC-ITS matched track.
@ TRD
outer TPC -> outer TRD
GPUd() bool rotate(float alpha)
GPUTPCGMPolynomialField propagatorParam
GPUd() int32_t getPropagatedYZ(float x
propagatorInterface & operator=(const propagatorInterface< GPUTPCGMPropagator > &)=delete
propagatorInterface(const propagatorInterface< GPUTPCGMPropagator > &)=delete
trackInterface< GPUTPCGMTrackParam > * mTrack
GPUd() void setTrack(trackInterface< GPUTPCGMTrackParam > *trk)
GPUd() bool propagateToX(float x
GPUd() void setFitInProjections(bool flag)
GPUd() propagatorInterface(const propagatorParam *pField)
GPUdi() int32_t getPropagatedYZ(float x
o2::base::Propagator propagatorParam
GPUd() propagatorInterface(const propagatorParam *prop)
GPUdi() void setFitInProjections(bool flag)
GPUdi() void setTrack(trackInterface< o2
const o2::base::Propagator * mProp
GPUd() float getY() const
GPUd() float getSigmaSnpY() const
GPUd() float getPt() const
GPUd() float getSigmaZ2() const
GPUd() float getSigmaSnpZ() const
GPUd() float getSigmaZY() const
GPUd() float getSigmaY2() const
GPUd() float getZ() const
GPUdDefault() trackInterface(const trackInterface< GPUTPCGMTrackParam > ¶m)=default
GPUdDefault() trackInterface()=default
GPUd() float getQ2Pt() const
GPUd() const float *getCov() const
GPUd() void updateCovZ2(float addZerror)
GPUd() float getX() const
GPUd() float getAlpha() const
GPUd() trackInterface(const gputpcgmmergertypes
GPUd() trackInterface(const o2
GPUd() float getEta() const
GPUd() void resetCovariance(float s)
GPUd() float getSnp() const
GPUd() void setAlpha(float alpha)
GPUd() float getTgl() const
GPUTPCGMTrackParam baseClass
GPUd() const float *getPar() const
GLfloat GLfloat GLfloat alpha
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GPUd() const expr uint32_t MultivariatePolynomialHelper< Dim
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...