79 auto calibContainer = calib.dEdxCalibContainer;
82 const int32_t
roc = geo.GetROC(padRow);
84 if (mCount >= MAX_NCL) {
87 float snp2 = trackSnp * trackSnp;
88 if (snp2 > constants::MAX_SIN_PHI_LOW) {
89 snp2 = constants::MAX_SIN_PHI_LOW;
93 const float snp = CAMath::Abs(trackSnp);
96 const float sec2 = 1.f / (1.f - snp2);
97 const float tgl2 = trackTgl * trackTgl;
98 const float tanTheta = CAMath::Sqrt(tgl2 * sec2);
101 const uint32_t padPos = CAMath::Min<uint32_t>(GPUTPCGeometry::NPads(padRow) - 1, CAMath::Float2UIntRn(pad));
102 const float absRelPad = CAMath::Abs(pad - padPos);
103 const int32_t region = geo.GetRegion(padRow);
105 const float threshold = calibContainer->getZeroSupressionThreshold(sector, padRow, padPos);
106 const bool useFullGainMap = calibContainer->isUsageOfFullGainMap();
108 const float fullGainMapGain = calibContainer->getGain(sector, padRow, padPos);
109 if (useFullGainMap) {
110 qmax /= fullGainMapGain;
111 qtot /= fullGainMapGain;
113 qTotIn *= fullGainMapGain;
116 const float qMaxTopologyCorr = calibContainer->getTopologyCorrection(region,
o2::tpc::ChargeType::Max, tanTheta, snp,
z, absRelPad, relTime, threshold, qTotIn);
117 const float qTotTopologyCorr = calibContainer->getTopologyCorrection(region,
o2::tpc::ChargeType::Tot, tanTheta, snp,
z, absRelPad, relTime, threshold, qTotIn);
118 qmax /= qMaxTopologyCorr;
119 qtot /= qTotTopologyCorr;
127 qmax /= qMaxResidualCorr;
128 qtot /= qTotResidualCorr;
130 const float residualGainMapGain = calibContainer->getResidualGain(sector, padRow, padPos);
131 qmax /= residualGainMapGain;
132 qtot /= residualGainMapGain;
137 if (qtot < mSubThreshMinTot) {
138 mSubThreshMinTot = qtot;
140 if (qmax < mSubThreshMinMax) {
141 mSubThreshMinMax = qmax;
145 float padlx = geo.Row2X(padRow);
146 float padly = geo.LinearPad2Y(sector, padRow, padPos);
147 o2::utils::DebugStreamer::instance()->getStreamer(
"debug_dedx",
"UPDATE") << o2::utils::DebugStreamer::instance()->getUniqueTreeName(
"tree_dedx").data()
148 <<
"qTot=" << mChargeTot[mCount - 1]
149 <<
"qMax=" << mChargeMax[mCount - 1]
150 <<
"region=" << region
151 <<
"padRow=" << padRow
152 <<
"sector=" << sector
155 <<
"tanTheta=" << tanTheta
156 <<
"trackTgl=" << trackTgl
157 <<
"sinPhi=" << trackSnp
159 <<
"absRelPad=" << absRelPad
160 <<
"relTime=" << relTime
161 <<
"threshold=" << threshold
162 <<
"qTotIn=" << qTotIn
163 <<
"qMaxTopologyCorr=" << qMaxTopologyCorr
164 <<
"qTotTopologyCorr=" << qTotTopologyCorr
165 <<
"qMaxResidualCorr=" << qMaxResidualCorr
166 <<
"qTotResidualCorr=" << qTotResidualCorr
167 <<
"residualGainMapGain=" << residualGainMapGain
168 <<
"fullGainMapGain=" << fullGainMapGain