27 mPadMean += splitCharge * d.x;
28 mTimeMean += splitCharge * d.y;
29 mPadSigma += splitCharge * d.x * d.x;
30 mTimeSigma += splitCharge * d.y * d.y;
40 mSplitInTime += (d.y != 0 &&
split);
41 mSplitInPad += (d.x != 0 &&
split);
51 bool has3x3 =
charge.has3x3Peak();
53 update((has3x3) ? 0.f : q, d);
55 mSplitInTime += (d.y != 0 &&
split && !has3x3);
56 mSplitInPad += (d.x != 0 &&
split && !has3x3);
70 mPadSigma = CAMath::Sqrt(mPadSigma - mPadMean * mPadMean);
71 mTimeSigma = CAMath::Sqrt(mTimeSigma - mTimeMean * mTimeMean);
75 mTimeMean += timeOffset +
pos.time();
83 if (
param.rec.tpc.cfEdgeTwoPads) {
84 isEdgeCluster = pad < 2 || pad >= GPUTPCGeometry::NPads(
pos.row()) - 2;
86 bool leftEdge = (pad < 2);
87 if (leftEdge ? (pad == 1 && chargeMap[
pos.delta({-1, 0})].unpack() < 1) : (pad == (GPUTPCGeometry::NPads(
pos.row()) - 2) && chargeMap[
pos.delta({1, 0})].
unpack() < 1)) {
88 isEdgeCluster =
false;
89 }
else if (leftEdge ? (pad < mPadMean) : (pad > mPadMean)) {
94 isEdgeCluster = pad == 0 || pad == GPUTPCGeometry::NPads(
pos.row()) - 1;
97 cn.qTot = CAMath::Float2UIntRn(mQtot);
98 if (cn.qTot <=
param.rec.tpc.cfQTotCutoff) {
102 if (mTimeMean <
param.rec.tpc.clustersShiftTimebinsClusterizer) {
105 if (q <=
param.rec.tpc.cfQMaxCutoffSingleTime && mTimeSigma == 0) {
108 if (q <=
param.rec.tpc.cfQMaxCutoffSinglePad && mPadSigma == 0) {
112 bool wasSplitInTime = mSplitInTime >=
param.rec.tpc.cfMinSplitNum;
113 bool wasSplitInPad = mSplitInPad >=
param.rec.tpc.cfMinSplitNum;
114 bool isSingleCluster = (mPadSigma == 0) || (mTimeSigma == 0);
117 flags |= (isEdgeCluster) ? tpc::ClusterNative::flagEdge : 0;
118 flags |= (wasSplitInTime) ? tpc::ClusterNative::flagSplitTime : 0;
119 flags |= (wasSplitInPad) ? tpc::ClusterNative::flagSplitPad : 0;
120 flags |= (isSingleCluster) ? tpc::ClusterNative::flagSingle : 0;
122 cn.setTimeFlags(mTimeMean -
param.rec.tpc.clustersShiftTimebinsClusterizer,
flags);
124 cn.setSigmaTime(mTimeSigma);
125 cn.setSigmaPad(mPadSigma);
GPUd() void ClusterAccumulator
Class of a TPC cluster in TPC-native coordinates (row, time)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
uint8_t itsSharedClusterMap uint8_t
T unpack(BitPtr pos, size_t packingWidth)
std::vector< std::string > split(const std::string &str, char delimiter=',')