81 auto calibContainer = calib.dEdxCalibContainer;
84 const int32_t
roc = geo.GetROC(padRow);
86 if (mCount >= MAX_NCL) {
89 float snp2 = trackSnp * trackSnp;
90 if (snp2 > constants::MAX_SIN_PHI_LOW) {
91 snp2 = constants::MAX_SIN_PHI_LOW;
95 const float snp = CAMath::Abs(trackSnp);
98 const float sec2 = 1.f / (1.f - snp2);
99 const float tgl2 = trackTgl * trackTgl;
100 const float tanTheta = CAMath::Sqrt(tgl2 * sec2);
103 const uint32_t padPos = CAMath::Min<uint32_t>(GPUTPCGeometry::NPads(padRow) - 1, CAMath::Float2UIntRn(pad));
104 const float absRelPad = CAMath::Abs(pad - padPos);
105 const int32_t region = geo.GetRegion(padRow);
107 const float threshold = calibContainer->getZeroSupressionThreshold(sector, padRow, padPos);
108 const bool useFullGainMap = calibContainer->isUsageOfFullGainMap();
110 const float fullGainMapGain = calibContainer->getGain(sector, padRow, padPos);
111 if (useFullGainMap) {
112 qmax /= fullGainMapGain;
113 qtot /= fullGainMapGain;
115 qTotIn *= fullGainMapGain;
118 const float qMaxTopologyCorr = calibContainer->getTopologyCorrection(region,
o2::tpc::ChargeType::Max, tanTheta, snp,
z, absRelPad, relTime, threshold, qTotIn);
119 const float qTotTopologyCorr = calibContainer->getTopologyCorrection(region,
o2::tpc::ChargeType::Tot, tanTheta, snp,
z, absRelPad, relTime, threshold, qTotIn);
120 qmax /= qMaxTopologyCorr;
121 qtot /= qTotTopologyCorr;
129 qmax /= qMaxResidualCorr;
130 qtot /= qTotResidualCorr;
132 const float residualGainMapGain = calibContainer->getResidualGain(sector, padRow, padPos);
133 qmax /= residualGainMapGain;
134 qtot /= residualGainMapGain;
139 if (qtot < mSubThreshMinTot) {
140 mSubThreshMinTot = qtot;
142 if (qmax < mSubThreshMinMax) {
143 mSubThreshMinMax = qmax;
147 float padlx = geo.Row2X(padRow);
148 float padly = geo.LinearPad2Y(sector, padRow, padPos);
149 o2::utils::DebugStreamer::instance()->getStreamer(
"debug_dedx",
"UPDATE") << o2::utils::DebugStreamer::instance()->getUniqueTreeName(
"tree_dedx").data()
150 <<
"qTot=" << mChargeTot[mCount - 1]
151 <<
"qMax=" << mChargeMax[mCount - 1]
152 <<
"region=" << region
153 <<
"padRow=" << padRow
154 <<
"sector=" << sector
157 <<
"tanTheta=" << tanTheta
158 <<
"trackTgl=" << trackTgl
159 <<
"sinPhi=" << trackSnp
161 <<
"absRelPad=" << absRelPad
162 <<
"relTime=" << relTime
163 <<
"threshold=" << threshold
164 <<
"qTotIn=" << qTotIn
165 <<
"qMaxTopologyCorr=" << qMaxTopologyCorr
166 <<
"qTotTopologyCorr=" << qTotTopologyCorr
167 <<
"qMaxResidualCorr=" << qMaxResidualCorr
168 <<
"qTotResidualCorr=" << qTotResidualCorr
169 <<
"residualGainMapGain=" << residualGainMapGain
170 <<
"fullGainMapGain=" << fullGainMapGain