193 std::vector<HDigiFP420> cluster_digis;
196 cluster_digis.reserve(25);
199 std::vector<ClusterFP420> rhits;
200 rhits.reserve((
end -
begin) / 3 + 1);
217 int vnoisesize = vnoise.size();
218 if (vnoisesize <= itest->channel()) {
228 while (ibeg !=
end && (ihigh = find_if(ibeg,
end, predicate)) !=
end) {
238 float channelNoise = vnoise[itest->channel()].getNoise();
239 bool IsBadChannel = vnoise[itest->channel()].getDisable();
243 std::cout <<
"=========================================================================== " << std::endl;
244 std::cout <<
"Right side: itest->adc()= " << itest->adc()
253 if (itest !=
end && (
difNarr(xytype, itest, iend) == 1) && (
difWide(xytype, itest, iend) < 1) &&
254 vnoise[itest->channel()].getDisable()) {
256 std::cout <<
"Inserted bad electrode at the end edge iend->channel()= " << iend->channel()
257 <<
" itest->channel() = " << itest->channel() << std::endl;
262 std::cout <<
"Result of going to right side iend->channel()= " << iend->channel()
263 <<
" itest->channel() = " << itest->channel() << std::endl;
271 float channelNoise = vnoise[itest->channel()].getNoise();
272 bool IsBadChannel = vnoise[itest->channel()].getDisable();
276 std::cout <<
"Left side: itest->adc()= " << itest->adc()
285 if (itest >=
begin && (
difNarr(xytype, ibeg, itest) == 1) && (
difWide(xytype, ibeg, itest) < 1) &&
286 vnoise[itest->channel()].getDisable()) {
288 std::cout <<
"Inserted bad electrode at the begin edge ibeg->channel()= " << ibeg->channel()
289 <<
" itest->channel() = " << itest->channel() << std::endl;
294 std::cout <<
"Result of going to left side ibeg->channel()= " << ibeg->channel()
295 <<
" itest->channel() = " << itest->channel() << std::endl;
301 float sigmaNoise2 = 0;
302 cluster_digis.clear();
305 std::cout <<
"check for consecutive digis ibeg->channel()= " << ibeg->channel()
306 <<
" iend->channel() = " << iend->channel() << std::endl;
308 for (
i = ibeg;
i <= iend; ++
i) {
309 float channelNoise = vnoise[
i->channel()].getNoise();
310 bool IsBadChannel = vnoise[
i->channel()].getDisable();
312 std::cout <<
"Looking at cluster digis: detid " << detid <<
" digis " <<
i->channel() <<
" adc " <<
i->adc()
313 <<
" channelNoise " << channelNoise <<
" IsBadChannel " << IsBadChannel << std::endl;
327 for (
int j = (
i - 1)->channel() + 1;
j <
i->channel(); ++
j) {
329 std::cout <<
"not consecutive digis: set HDigiFP420.adc_=0 : j = " <<
j << std::endl;
337 sigmaNoise2 += channelNoise * channelNoise;
338 cluster_digis.push_back(*
i);
340 std::cout <<
"put into cluster_digis good i info: i->channel() = " <<
i->channel() << std::endl;
343 cluster_digis.push_back(
346 std::cout <<
"else if electrode bad or under threshold set HDigiFP420.adc_=0: i->channel() = " <<
i->channel()
353 float sigmaNoise =
sqrt(sigmaNoise2);
360 std::cout <<
"Looking at cog and err : cog " << cog <<
" err " <<
err << std::endl;
361 std::cout <<
"=========================================================================== " << std::endl;