From 94eb555ed977eb069a8f295869e5a3d8059087f6 Mon Sep 17 00:00:00 2001 From: martinez Date: Wed, 15 Feb 2006 13:08:22 +0000 Subject: [PATCH] Replacing some cout << by AliWarning and AliError to reduce output; small bug fix for some clusters at chamber edges (Laurent, Sacha) --- MUON/AliMUONClusterFinderAZ.cxx | 13 ++++++++----- MUON/AliMUONTrackK.cxx | 19 +++++++------------ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/MUON/AliMUONClusterFinderAZ.cxx b/MUON/AliMUONClusterFinderAZ.cxx index 46497cb0061..0d2699f6fac 100644 --- a/MUON/AliMUONClusterFinderAZ.cxx +++ b/MUON/AliMUONClusterFinderAZ.cxx @@ -233,7 +233,7 @@ next: */ for (Int_t i=0; i 1) FindCluster(localMax, maxPos[i]); - if (!MainLoop(iSimple)) cout << " MainLoop failed " << endl; + if (!MainLoop(iSimple)) AliWarning(Form(" MainLoop failed ")); if (i < nMax-1) { for (Int_t j=0; j 500) { cout << " ***** Too large cluster. Give up. " << npad << endl; return kFALSE; } + if (npad > 500) { + AliWarning(Form(" *** Too large cluster. Give up. %d ", npad)); + return kFALSE; + } // Back up charge value for (Int_t j = 0; j < npad; j++) fXyq[6][j] = fXyq[2][j]; @@ -816,9 +819,8 @@ void AliMUONClusterFinderAZ::AdjustPixel(Float_t wxmin, Float_t wymin) if (fDebug) cout << " Different " << pixPtr->Size(0) << " " << wxy[0] << " " << pixPtr->Size(1) << " " << wxy[1] < 2 || n2[1] > 2) { cout << n2[0] << " " << n2[1] << endl; AliFatal("Too large pixel.");} if (n2[0] > 2 || n2[1] > 2) { - cout << n2[0] << " " << n2[1] << endl; + //cout << n2[0] << " " << n2[1] << endl; if (n2[0] > 2 && n1[0] < 999) n1[0]--; if (n2[1] > 2 && n1[1] < 999) n1[1]--; } @@ -1559,7 +1561,7 @@ TObject* AliMUONClusterFinderAZ::BinToPix(TH2D *mlem, Int_t jc, Int_t ic) if (pixPtr->Charge() < 0.5) continue; if (TMath::Abs(pixPtr->Coord(0)-xc)<1.e-4 && TMath::Abs(pixPtr->Coord(1)-yc)<1.e-4) return (TObject*) pixPtr; } - AliWarning(Form(" Something wrong ??? %f %f %f %f", xc, yc)); + AliError(Form(" Something wrong ??? %f %f ", xc, yc)); return NULL; } @@ -2550,6 +2552,7 @@ void AliMUONClusterFinderAZ::AddVirtualPad() if (maxpad[0][0] < 0) iPad = 1; for (iPad=0; iPad<2; iPad++) { + if (maxpad[cath][iPad] < 0) continue; if (iPad && !iAddX && !iAddY) break; if (iPad && fXyq[2][maxpad[cath][1]] / sigmax[cath] < 0.5) break; diff --git a/MUON/AliMUONTrackK.cxx b/MUON/AliMUONTrackK.cxx index 5de66d95562..88b6b856327 100644 --- a/MUON/AliMUONTrackK.cxx +++ b/MUON/AliMUONTrackK.cxx @@ -695,10 +695,7 @@ void AliMUONTrackK::ParPropagation(Double_t zEnd) distance = zEnd - vGeant3New[2]; step /= 2; nTries ++; - if (nTries > fgkTriesMax) { - cout << " ***** ParPropagation: too many tries " << nTries << endl; - AliFatal("Too many tries."); - } + if (nTries > fgkTriesMax) AliError(Form(" Too many tries: %d", nTries)); } while (distance*iFB < 0); GetFromGeantParam(vGeant3New,iFB); @@ -868,7 +865,7 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int if (TMath::Abs(hit->GetZ()-zEnd) > 0.05) { // adjust position: for multiple hits in the chamber // (mostly (only?) for GEANT hits) - cout << " ******* adjust " << zEnd << " " << hit->GetZ() << endl; + AliWarning(Form(" *** adjust %f %f ", zEnd, hit->GetZ())); zEnd = hit->GetZ(); *fTrackPar = *fTrackParNew; ParPropagation(zEnd); @@ -979,9 +976,7 @@ Bool_t AliMUONTrackK::FindPoint(Int_t ichamb, Double_t zEnd, Int_t currIndx, Int if (TMath::Abs(hit->GetZ()-(*trackK->fSteps)[i]) > 0.1) { //if (TMath::Abs(hit->GetZ()-(trackK->fSteps)[i]) > 0.1) { RemoveMatrices(trackK); - cout << " *** Position adjustment 1 " << hit->GetZ() << " " - << (*trackK->fSteps)[i] << endl; - AliFatal(" Position adjustment 1."); + AliError(Form(" *** Position adjustment 1: %f %f", hit->GetZ(), (*trackK->fSteps)[i])); } else break; } @@ -1202,7 +1197,7 @@ void AliMUONTrackK::SetTrackQuality(Int_t iChi2) // Computes "track quality" from Chi2 (if iChi2==0) or vice versa if (fChi2 > 500) { - cout << " ***** Too high Chi2: " << fChi2 << endl; + AliWarning(Form(" *** Too high Chi2: %f ", fChi2)); fChi2 = 500; } if (iChi2 == 0) fChi2 = fNTrackHits + (500.-fChi2)/501; @@ -1336,7 +1331,7 @@ void AliMUONTrackK::Branson(void) (*fTrackPar)(4,0) = TMath::Cos((*fTrackPar)(3,0))*trackParam.GetInverseBendingMomentum(); fPosition = trackParam.GetZ(); //delete trackParam; - cout << 1/(*fTrackPar)(4,0) << " " << fPosition << " " << (*fTrackPar)(0,0) << endl; + if (fgDebug > 0) cout << 1/(*fTrackPar)(4,0) << " " << fPosition << " " << (*fTrackPar)(0,0) << endl; // Get covariance matrix *fCovariance = *fWeight; @@ -2009,8 +2004,8 @@ L33: if (chi2(0,0) > chi2max) chi2max = chi2(0,0); fChi2 += chi2(0,0); if (chi2(0,0) < 0) { - chi2.Print(); cout << " chi2 < 0 " << i << " " << iLast << endl; - //AliFatal("chi2 < 0."); + //chi2.Print(); + AliError(Form(" *** chi2 < 0: %d %d ", i, iLast)); } // Save smoothed parameters TMatrixD *par = new TMatrixD(parSmooth); -- 2.39.3