@@ -382,10 +382,10 @@ void Clusterer::unfoldOneCluster(Cluster& iniClu, char nMax, std::vector<Cluster
382382 // insuficientAccuracy|=fabs(meMax[iclu]-eOld)> meMax[iclu]*o2::phos::PHOSSimParams::Instance().mUnfogingEAccuracy ;
383383 }
384384 } else {
385- LOG (warning) << " Failed to decompose matrix of size " << int (nMax);
385+ // LOG(warning) << "Failed to decompose matrix of size " << int(nMax) << " Clusters mult=" << lastCE-firstCE ;
386386 }
387387 } else {
388- LOG (warning) << " Failed to decompose matrix of size " << int (nMax);
388+ // LOG(warning) << "Failed to decompose matrix of size " << int(nMax);
389389 }
390390 insuficientAccuracy &= (chi2 > o2::phos::PHOSSimParams::Instance ().mUnfogingChi2Accuracy * nMax);
391391 nIterations++;
@@ -549,7 +549,7 @@ void Clusterer::evalAll(Cluster& clu, std::vector<CluElement>& cluel) const
549549 if (ce.energy < eMin) {
550550 continue ;
551551 }
552- float w = std::max (float ( 0 .) , o2::phos::PHOSSimParams::Instance ().mLogWeight + std::log (ce.energy * invE));
552+ float w = std::max (0 . f , o2::phos::PHOSSimParams::Instance ().mLogWeight + std::log (ce.energy * invE));
553553 localPosX += ce.localX * w;
554554 localPosZ += ce.localZ * w;
555555 wtot += w;
@@ -577,7 +577,7 @@ void Clusterer::evalAll(Cluster& clu, std::vector<CluElement>& cluel) const
577577 float z = ce.localZ - localPosZ;
578578 float distance = x * x + z * z;
579579
580- float w = std::max (float ( 0 .) , o2::phos::PHOSSimParams::Instance ().mLogWeight + std::log (ei * invE));
580+ float w = std::max (0 . f , o2::phos::PHOSSimParams::Instance ().mLogWeight + std::log (ei * invE));
581581 dispersion += w * distance;
582582 dxx += w * x * x;
583583 dzz += w * z * z;
@@ -587,27 +587,25 @@ void Clusterer::evalAll(Cluster& clu, std::vector<CluElement>& cluel) const
587587 }
588588 }
589589 clu.setCoreEnergy (coreE);
590- // dispersion
591- if (wtot > 0 ) {
592- wtot = 1 . / wtot;
593- dispersion *= wtot;
590+ // dispersion NB! wtot here already inverse
591+ dispersion *= wtot;
594592
595- dxx *= wtot;
596- dzz *= wtot;
597- dxz *= wtot;
593+ dxx *= wtot;
594+ dzz *= wtot;
595+ dxz *= wtot;
598596
599- lambdaLong = 0.5 * (dxx + dzz) + std::sqrt (0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz);
600- if (lambdaLong > 0 ) {
601- lambdaLong = std::sqrt (lambdaLong);
602- }
597+ lambdaLong = 0.5 * (dxx + dzz) + std::sqrt (0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz);
598+ if (lambdaLong > 0 ) {
599+ lambdaLong = std::sqrt (lambdaLong);
600+ }
603601
604- lambdaShort = 0.5 * (dxx + dzz) - std::sqrt (0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz);
605- if (lambdaShort > 0 ) { // To avoid exception if numerical errors lead to negative lambda.
606- lambdaShort = std::sqrt (lambdaShort);
607- } else {
608- lambdaShort = 0 .;
609- }
602+ lambdaShort = 0.5 * (dxx + dzz) - std::sqrt (0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz);
603+ if (lambdaShort > 0 ) { // To avoid exception if numerical errors lead to negative lambda.
604+ lambdaShort = std::sqrt (lambdaShort);
605+ } else {
606+ lambdaShort = 0 .;
610607 }
608+
611609 if (dispersion >= 0 ) {
612610 clu.setDispersion (std::sqrt (dispersion));
613611 } else {
@@ -652,12 +650,10 @@ char Clusterer::getNumberOfLocalMax(Cluster& clu, std::vector<CluElement>& cluel
652650 mIsLocalMax .reserve (clu.getMultiplicity ());
653651
654652 uint32_t iFirst = clu.getFirstCluEl (), iLast = clu.getLastCluEl ();
655- LOG (debug) << " getNumberOfLocalMax: iFirst=" << iFirst << " iLast=" << iLast << " elements=" << cluel.size ();
656653 for (uint32_t i = iFirst; i < iLast; i++) {
657654 mIsLocalMax .push_back (cluel[i].energy > cluSeed);
658655 }
659656
660- LOG (debug) << " mIsLocalMax size=" << mIsLocalMax .size ();
661657 for (uint32_t i = iFirst; i < iLast - 1 ; i++) {
662658 for (uint32_t j = i + 1 ; j < iLast; j++) {
663659
@@ -679,7 +675,6 @@ char Clusterer::getNumberOfLocalMax(Cluster& clu, std::vector<CluElement>& cluel
679675 } // digit j
680676 } // digit i
681677
682- LOG (debug) << " Filled mIsLocalMax" ;
683678 int iDigitN = 0 ;
684679 for (std::size_t i = 0 ; i < mIsLocalMax .size (); i++) {
685680 if (mIsLocalMax [i]) {
0 commit comments