25 std::vector<std::vector<CbmTofDigi*>>& digisExp = input.first;
26 std::vector<std::vector<int32_t>>& digisInd = input.second;
30 std::vector<Cluster> clustersOut;
33 Cell* trafoCell =
nullptr;
34 int32_t iTrafoCell = -1;
37 int32_t lastChan = -1;
38 double lastPosY = 0.0;
39 double lastTime = 0.0;
44 for (int32_t chan = 0; chan < (int32_t)
fParams.
fChanPar.size(); chan++) {
46 std::vector<CbmTofDigi*>& storDigiExp = digisExp[chan];
47 std::vector<int32_t>& storDigiInd = digisInd[chan];
50 auto digiExpIt = storDigiExp.begin();
51 auto digiIndIt = storDigiInd.begin();
53 while (1 < std::distance(digiExpIt, storDigiExp.end())) {
54 while ((*digiExpIt)->GetSide() == (*std::next(digiExpIt, 1))->GetSide()) {
59 if (2 > std::distance(digiExpIt, storDigiExp.end()))
break;
61 if (2 > std::distance(digiExpIt, storDigiExp.end()))
break;
71 const double totSum = xDigiA->
GetTot() + xDigiB->
GetTot();
73 if (
nullptr == trafoCell) {
74 trafoCell = channelInfo;
80 ROOT::Math::XYZVector
pos(((
double) (-iTrafoCell + chan)) * trafoCell->
sizeX, 0., 0.);
91 if (channelInfo->
sizeY / 2.0 <
pos.Y() || -1 * channelInfo->
sizeY / 2.0 >
pos.Y()) {
113 clustersOut.push_back(cluster);
117 cluster.
add(
pos, time, totSum, totSum, *digiIndIt, *std::next(digiIndIt, 1));
131 clustersOut.push_back(cluster);
137 const std::vector<int32_t>& digiIndexIn)
140 std::vector<std::vector<CbmTofDigi*>>& digisExp = result.first;
141 std::vector<std::vector<int32_t>>& digisInd = result.second;
150 for (
size_t iDigi = 0; iDigi < digisIn.size(); iDigi++) {
156 const double side = pDigi->
GetSide();
160 digisExp[chan].push_back(pDigi);
161 digisInd[chan].push_back(digiIndexIn[iDigi]);
167 int32_t iWx = (int32_t)((charge -
TOTMin / 2.) / totBinSize);
168 if (0 > iWx) iWx = 0;
172 double dWT = cpWalk[iWx];
173 const double dDTot = (charge -
TOTMin / 2.) / totBinSize - (
double) iWx - 0.5;
177 dWT += dDTot * (cpWalk[iWx + 1] - cpWalk[iWx]);
182 dWT -= dDTot * (cpWalk[iWx - 1] - cpWalk[iWx]);