195 std::vector<HDigiFP420> cluster_digis;
198 cluster_digis.reserve(25);
201 std::vector<ClusterFP420> rhits; rhits.reserve( (
end -
begin)/3 + 1);
218 int vnoisesize = vnoise.size();
219 if (vnoisesize<=itest->channel())
230 while ( ibeg !=
end && (ihigh = find_if( ibeg,
end, predicate)) !=
end) {
242 float channelNoise = vnoise[itest->channel()].getNoise();
243 bool IsBadChannel = vnoise[itest->channel()].getDisable();
247 std::cout <<
"=========================================================================== " << std::endl;
255 if ( itest !=
end && (
difNarr(xytype,itest,iend) == 1) && (
difWide(xytype,itest,iend)< 1) && vnoise[itest->channel()].getDisable() ) {
257 std::cout <<
"Inserted bad electrode at the end edge iend->channel()= " << iend->channel() <<
" itest->channel() = " << itest->channel() << std::endl;
262 std::cout <<
"Result of going to right side iend->channel()= " << iend->channel() <<
" itest->channel() = " << itest->channel() << std::endl;
270 float channelNoise = vnoise[itest->channel()].getNoise();
271 bool IsBadChannel = vnoise[itest->channel()].getDisable();
282 if ( itest >=
begin && (
difNarr(xytype,ibeg,itest) == 1) && (
difWide(xytype,ibeg,itest) < 1) && vnoise[itest->channel()].getDisable() ) {
284 std::cout <<
"Inserted bad electrode at the begin edge ibeg->channel()= " << ibeg->channel() <<
" itest->channel() = " << itest->channel() << std::endl;
289 std::cout <<
"Result of going to left side ibeg->channel()= " << ibeg->channel() <<
" itest->channel() = " << itest->channel() << std::endl;
300 cluster_digis.clear();
303 std::cout <<
"check for consecutive digis ibeg->channel()= " << ibeg->channel() <<
" iend->channel() = " << iend->channel() << std::endl;
305 for (i=ibeg; i<=iend; ++
i) {
306 float channelNoise = vnoise[i->channel()].getNoise();
307 bool IsBadChannel = vnoise[i->channel()].getDisable();
309 std::cout <<
"Looking at cluster digis: detid " <<
detid <<
" digis " << i->channel()
310 <<
" adc " << i->adc() <<
" channelNoise " << channelNoise <<
" IsBadChannel " << IsBadChannel << std::endl;
317 std::cout <<
"difNarr(xytype,i,i-1) = " <<
difNarr(xytype,i,i-1) << std::endl;
318 std::cout <<
"difWide(xytype,i,i-1) = " <<
difWide(xytype,i,i-1) << std::endl;
322 if (i!=ibeg && (
difNarr(xytype,i,i-1) > 1 &&
difWide(xytype,i,i-1) > 1) ){
324 for (
int j=(i-1)->channel()+1;
j<i->channel();++
j){
326 std::cout <<
"not consecutive digis: set HDigiFP420.adc_=0 : j = " <<
j << std::endl;
335 sigmaNoise2 += channelNoise*channelNoise;
336 cluster_digis.push_back(*i);
338 std::cout <<
"put into cluster_digis good i info: i->channel() = " << i->channel() << std::endl;
341 cluster_digis.push_back(
HDigiFP420(i->channel(),0));
343 std::cout <<
"else if electrode bad or under threshold set HDigiFP420.adc_=0: i->channel() = " << i->channel() << std::endl;
352 float sigmaNoise =
sqrt(sigmaNoise2);
357 cluster_digis.end()),
360 std::cout <<
"Looking at cog and err : cog " << cog <<
" err " << err << std::endl;
361 std::cout <<
"=========================================================================== " << std::endl;
float channelThresholdInNoiseSigma() const
std::pair< HDigiFP420Iter, HDigiFP420Iter > HDigiFP420Range
std::vector< HDigiFP420 >::const_iterator HDigiFP420Iter
int difNarr(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)
float clusterThresholdInNoiseSigma() const
float seedThresholdInNoiseSigma() const
int difWide(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)