16#ifndef O2_GPU_TRD_RECOPARAM_H
17#define O2_GPU_TRD_RECOPARAM_H
40#if !defined(GPUCA_GPUCODE_DEVICE)
54 GPUd()
float getCorrYDy(
float snp)
const {
return CAMath::Sqrt(mCorrYDyA + mCorrYDyC * (
snp - mLorentzAngle) * (
snp - mLorentzAngle)); }
59 GPUd()
float getZCorrCoeffNRC()
const {
return mZCorrCoefNRC; }
62 GPUd() int getPileUpRangeBefore()
const {
return mPileUpRangeBefore; }
63 GPUd() int getPileUpRangeAfter()
const {
return mPileUpRangeAfter; }
67 float mLorentzAngle{0.f};
76 float mCorrYDyA{9e-4f};
77 float mCorrYDyC{1.5e-2f};
79 float mPullA{2.8e-3f};
84 float mOccDyA{2.5e-4f};
87 float mDyExpC{-1.65f};
88 float mDyExpNormA{1.96e-3f};
89 float mDyExpNormC{0.21f};
91 float mZCorrCoefNRC{1.4f};
95 int mPileUpRangeBefore{-130};
96 int mPileUpMaxProb{0};
97 int mPileUpRangeAfter{70};
99 int mPileUpRangeBefore11{-130};
100 int mPileUpMaxProb11{0};
101 int mPileUpRangeAfter11{30};
103 int mPileUpRangeBefore01{-80};
104 int mPileUpMaxProb01{30};
105 int mPileUpRangeAfter01{70};
107 int mPileUpRangeBefore10{-130};
108 int mPileUpMaxProb10{-60};
109 int mPileUpRangeAfter10{30};
111 int mPileUpRangeBefore00{-10};
112 int mPileUpMaxProb00{22};
113 int mPileUpRangeAfter00{40};
125GPUdi()
float GPUTRDRecoParam::getRPhiRes(
float snp,
float pull,
int occupancy)
const
128 float tgp = (CAMath::Abs(snp) < 0.99999f) ? CAMath::Abs(snp) / CAMath::Sqrt(1 - snp * snp) : 1e6;
129 float resIdeal = mRPhiA + mRPhiATgp * tgp;
134 float resPull = mPullA * pull * pull + mPullB * pull;
135 float resOccupancy = mOccA * occupancy;
136 return (resIdeal * resIdeal + mRPhiC2 * (snp - mLorentzAngle) * (snp - mLorentzAngle) + resPull * resPull + resOccupancy);
139GPUdi() double GPUTRDRecoParam::getDyLikelihood(
float snp,
float slope,
int occupancy)
const
142 double likelihood = CAMath::Exp(-0.5f * (
slope - GPUTRDRecoParam::convertAngleToDy(snp)) * (
slope - GPUTRDRecoParam::convertAngleToDy(snp)) / GPUTRDRecoParam::getDyRes(snp, occupancy));
145 double expNorm = CAMath::Sqrt(mDyExpNormA + mDyExpNormC * (snp - mLorentzAngle) * (snp - mLorentzAngle));
146 if (
slope < convertAngleToDy(snp)) {
148 likelihood += expNorm * CAMath::Exp((mDyExpA + mDyExpC * (snp - mLorentzAngle)) * (
slope - GPUTRDRecoParam::convertAngleToDy(snp)));
151 likelihood += expNorm * CAMath::Exp(-(mDyExpA - mDyExpC * (snp - mLorentzAngle)) * (
slope - GPUTRDRecoParam::convertAngleToDy(snp)));
155 likelihood /= (1.f + expNorm);
159GPUdi() double GPUTRDRecoParam::getZLikelihood(
float deltaZ,
float padLength,
float sigmaZtrk)
const
163 double lmax = 1.f / (1.f + CAMath::Exp(-0.5f * padLength / 0.5513f / sigmaZtrk)) - 1.f / (1.f + CAMath::Exp(0.5f * padLength / 0.5513f / sigmaZtrk));
164 return 1.f / lmax / (1.f + CAMath::Exp((deltaZ - 0.5f * padLength) / 0.5513f / sigmaZtrk)) - 1.f / lmax / (1.f + CAMath::Exp((deltaZ + 0.5f * padLength) / 0.5513f / sigmaZtrk));
167GPUdi()
float GPUTRDRecoParam::getPileUpProbTracklet(
int nBC,
bool withChargeInfo,
bool Q0,
bool Q1)
const
174 int maxBC = mPileUpRangeAfter;
175 int minBC = mPileUpRangeBefore;
176 int maxProbBC = mPileUpMaxProb;
177 if (nBC <= mPileUpRangeBefore || nBC >= mPileUpRangeAfter) {
181 if (withChargeInfo) {
183 maxBC = mPileUpRangeAfter11;
184 minBC = mPileUpRangeBefore11;
185 maxProbBC = mPileUpMaxProb11;
188 maxBC = mPileUpRangeAfter01;
189 minBC = mPileUpRangeBefore01;
190 maxProbBC = mPileUpMaxProb01;
193 maxBC = mPileUpRangeAfter10;
194 minBC = mPileUpRangeBefore10;
195 maxProbBC = mPileUpMaxProb10;
199 if (nBC > maxProbBC && nBC <= 0) {
200 prob += 2. / (maxBC - minBC) / (0 - maxProbBC) * (nBC - maxProbBC);
202 if (nBC > 0 && nBC < maxBC) {
203 prob += 2. / (maxBC - minBC) / (0 - maxBC) * (nBC - maxBC);
207 maxBC = mPileUpRangeAfter00;
208 minBC = mPileUpRangeBefore00;
209 maxProbBC = mPileUpMaxProb00;
214 if (nBC <= minBC || nBC >= maxBC) {
217 float maxProb = 2. / (maxBC - minBC);
218 if (nBC > minBC && nBC <= maxProbBC) {
219 prob += maxProb / (maxProbBC - minBC) * (nBC - minBC);
221 prob += maxProb / (maxProbBC - maxBC) * (nBC - maxBC);
238 float probNoInfo = GPUTRDRecoParam::getPileUpProbTracklet(nBC,
false);
240 float probTrack = probNoInfo;
241 if (probNoInfo < 1e-6f)
245 for (
int i = 0;
i < 6;
i++) {
247 if (Q0[
i] < 0 || Q1[
i] < 0)
249 float probTracklet = GPUTRDRecoParam::getPileUpProbTracklet(nBC,
true, (Q0[
i] != 0), (Q1[
i] != 0));
250 probTrack *= probTracklet / probNoInfo;
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc true
configStandalone Reconstruction rec_tpc float
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
float float sigmaZtrk const
~GPUTRDRecoParam()=default
GPUd() void recalcTrkltCov(const float tilt
Recalculate tracklet covariance based on phi angle of related track.
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.
GPUd() float getPileUpProbTracklet(int nBC
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...