@@ -40,8 +40,6 @@ void BuildTopologyDictionary::accountTopologyImpl(const itsmft::ClusterTopology&
4040 ++tot;
4141 bool useDf = dX < IgnoreVal / 2 ; // we may need to account the frequency but to not update the centroid
4242
43- // std::pair<unordered_map<unsigned long, itsmft::TopoStat>::iterator,bool> ret;
44- // auto ret = mTopologyMap.insert(std::make_pair(cluster.getHash(), std::make_pair(cluster, 1)));
4543 auto & topoStat = tstat[cluster.getHash ()];
4644 topoStat.countsTotal ++;
4745 if (topoStat.countsTotal == 1 ) { // a new topology is inserted
@@ -59,7 +57,7 @@ void BuildTopologyDictionary::accountTopologyImpl(const itsmft::ClusterTopology&
5957 topoStat.countsWithBias = 1 ;
6058 } else { // assign expected sigmas from the pixel X, Z sizes
6159 topInf.mXsigma2 = sigmaX * sigmaX / 12 .f / (float )std::min (10 , topInf.mSizeX );
62- topInf.mZsigma2 = sigmaZ * sigmaZ / (float )std::min (10 , topInf.mSizeZ );
60+ topInf.mZsigma2 = sigmaZ * sigmaZ / 12 . f / (float )std::min (10 , topInf.mSizeZ );
6361 }
6462 tinfo.emplace (cluster.getHash (), topInf);
6563 } else {
@@ -128,7 +126,7 @@ void BuildTopologyDictionary::setThresholdImpl(double thr, TopoFreq& tfreq, Topo
128126{
129127 setNCommonImpl (0 , tfreq, tstat, ncommon, ntot);
130128 freqthres = thr;
131- for (auto & q : tfreq) {
129+ for (const auto & q : tfreq) {
132130 if (((double )q.first ) / ntot > thr) {
133131 ++ncommon;
134132 } else {
@@ -205,7 +203,7 @@ void BuildTopologyDictionary::groupRareTopologiesImpl(TopoFreq& tfreq, TopoInfo&
205203 gr.mHash = tfreq[j].second ;
206204 gr.mFrequency = ((double )(tfreq[j].first )) / ntot;
207205 totFreq += gr.mFrequency ;
208- // rough estimation for the error considering a8 uniform distribution
206+ // rough estimation for the error considering a uniform distribution
209207 const auto & topo = tinfo.find (gr.mHash )->second ;
210208 gr.mErrX = std::sqrt (topo.mXsigma2 );
211209 gr.mErrZ = std::sqrt (topo.mZsigma2 );
0 commit comments