From 1b36647ba17adc0eb2a853d891eaa9770c61e702 Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 2 Mar 2007 16:36:43 +0000 Subject: [PATCH] Using Min and Max from TMath --- MUON/AliMUONClusterFinderCOG.cxx | 8 ++++---- MUON/AliMillepede.cxx | 2 +- MUON/mapping/AliMpPCB.cxx | 8 ++++---- MUON/mapping/AliMpPCBPadIterator.cxx | 8 ++++---- MUON/mapping/AliMpSlat.cxx | 2 +- MUON/mapping/AliMpSlatPadIterator.cxx | 8 ++++---- MUON/mapping/AliMpTrigger.cxx | 6 +++--- TPC/AliTPCtrackerMI.cxx | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/MUON/AliMUONClusterFinderCOG.cxx b/MUON/AliMUONClusterFinderCOG.cxx index 33f079c840e..f7087ce6b26 100644 --- a/MUON/AliMUONClusterFinderCOG.cxx +++ b/MUON/AliMUONClusterFinderCOG.cxx @@ -134,10 +134,10 @@ AliMUONClusterFinderCOG::ComputePosition(AliMUONCluster& cluster) AliMUONPad* pad = cluster.Pad(i); TVector2 padPosition = pad->Position(); AliMpArea area(pad->Position(),pad->Dimensions()); - xmin = std::min(area.LeftBorder(),xmin); - xmax = std::max(area.RightBorder(),xmax); - ymin = std::min(area.DownBorder(),ymin); - ymax = std::max(area.UpBorder(),ymax); + xmin = TMath::Min(area.LeftBorder(),xmin); + xmax = TMath::Max(area.RightBorder(),xmax); + ymin = TMath::Min(area.DownBorder(),ymin); + ymax = TMath::Max(area.UpBorder(),ymax); if ( cathode == pad->Cathode() ) { x[cathode] += padPosition.X()*pad->Charge(); diff --git a/MUON/AliMillepede.cxx b/MUON/AliMillepede.cxx index 38710544111..ebc85b9aeef 100644 --- a/MUON/AliMillepede.cxx +++ b/MUON/AliMillepede.cxx @@ -1132,7 +1132,7 @@ int AliMillepede::SpmInv(double matV[][fgkMaxGloPC], double vecB[], int nGlo) iPivot = -1; for (Int_t j=0; jstd::max(TMath::Abs(vPivot),eps*diagV[j]))) { + if (bUnUsed[j] && (TMath::Abs(matV[j][j])>TMath::Max(TMath::Abs(vPivot),eps*diagV[j]))) { vPivot = matV[j][j]; iPivot = j; } diff --git a/MUON/mapping/AliMpPCB.cxx b/MUON/mapping/AliMpPCB.cxx index 787c3f46523..a374d3ca908 100644 --- a/MUON/mapping/AliMpPCB.cxx +++ b/MUON/mapping/AliMpPCB.cxx @@ -313,10 +313,10 @@ AliMpPCB::Add(AliMpMotifType* mt, Int_t ix, Int_t iy) fMotifPositions.push_back(mp); #endif - fIxmin = std::min(fIxmin,ixmin); - fIxmax = std::max(fIxmax,ixmax); - fIymin = std::min(fIymin,iymin); - fIymax = std::max(fIymax,iymax); + fIxmin = TMath::Min(fIxmin,ixmin); + fIxmax = TMath::Max(fIxmax,ixmax); + fIymin = TMath::Min(fIymin,iymin); + fIymax = TMath::Max(fIymax,iymax); fActiveXmin = fIxmin*PadSizeX(); fActiveXmax = (fIxmax+1)*PadSizeX(); diff --git a/MUON/mapping/AliMpPCBPadIterator.cxx b/MUON/mapping/AliMpPCBPadIterator.cxx index 3044d895b67..20599b7531d 100644 --- a/MUON/mapping/AliMpPCBPadIterator.cxx +++ b/MUON/mapping/AliMpPCBPadIterator.cxx @@ -108,10 +108,10 @@ AliMpPCBPadIterator::CropArea(const AliMpArea& area) AliDebug(3,Form("xleft,xright=%e,%e",xleft,xright)); - Double_t xmin = std::max(area.LeftBorder(),xleft); - Double_t xmax = std::min(area.RightBorder(),xright); - Double_t ymin = std::max(area.DownBorder(),0.0); - Double_t ymax = std::min(area.UpBorder(),first->DY()*2.0-kEpsilon); + Double_t xmin = TMath::Max(area.LeftBorder(),xleft); + Double_t xmax = TMath::Min(area.RightBorder(),xright); + Double_t ymin = TMath::Max(area.DownBorder(),0.0); + Double_t ymax = TMath::Min(area.UpBorder(),first->DY()*2.0-kEpsilon); AliDebug(3,Form("Cropped area (%e,%e)->(%e,%e)", xmin,ymin,xmax,ymax)); diff --git a/MUON/mapping/AliMpSlat.cxx b/MUON/mapping/AliMpSlat.cxx index e42793d1ff9..a23df5599b9 100644 --- a/MUON/mapping/AliMpSlat.cxx +++ b/MUON/mapping/AliMpSlat.cxx @@ -136,7 +136,7 @@ AliMpSlat::Add(const AliMpPCB& pcbType, const TArrayI& manuList) fDY = TMath::Max(pcb->DY(),fDY); fDX += pcb->DX(); fNofPadsX += pcb->GetNofPadsX(); - fMaxNofPadsY = std::max(fMaxNofPadsY,pcb->GetNofPadsY()); + fMaxNofPadsY = TMath::Max(fMaxNofPadsY,pcb->GetNofPadsY()); for ( AliMpPCB::Size_t i = 0; i < pcb->GetSize(); ++i ) { AliMpMotifPosition* mp = pcb->GetMotifPosition(i); diff --git a/MUON/mapping/AliMpSlatPadIterator.cxx b/MUON/mapping/AliMpSlatPadIterator.cxx index bebf5d9edac..787e490338d 100644 --- a/MUON/mapping/AliMpSlatPadIterator.cxx +++ b/MUON/mapping/AliMpSlatPadIterator.cxx @@ -98,10 +98,10 @@ AliMpSlatPadIterator::Intersect(const AliMpArea& a, const AliMpArea& b) const a.LeftBorder(),a.DownBorder(),a.RightBorder(),a.UpBorder(), b.LeftBorder(),b.DownBorder(),b.RightBorder(),b.UpBorder())); - Double_t xmin = std::max(a.LeftBorder(),b.LeftBorder()); - Double_t xmax = std::min(a.RightBorder(),b.RightBorder()); - Double_t ymin = std::max(a.DownBorder(),b.DownBorder()); - Double_t ymax = std::min(a.UpBorder(),b.UpBorder()); + Double_t xmin = TMath::Max(a.LeftBorder(),b.LeftBorder()); + Double_t xmax = TMath::Min(a.RightBorder(),b.RightBorder()); + Double_t ymin = TMath::Max(a.DownBorder(),b.DownBorder()); + Double_t ymax = TMath::Min(a.UpBorder(),b.UpBorder()); AliMpArea c( TVector2( (xmin+xmax)/2.0, (ymin+ymax)/2.0 ), TVector2( (xmax-xmin)/2.0, (ymax-ymin)/2.0 ) ); diff --git a/MUON/mapping/AliMpTrigger.cxx b/MUON/mapping/AliMpTrigger.cxx index 40473a990d2..f6ba6bdab0f 100644 --- a/MUON/mapping/AliMpTrigger.cxx +++ b/MUON/mapping/AliMpTrigger.cxx @@ -137,9 +137,9 @@ AliMpTrigger::AdoptLayer(AliMpSlat* slat) // the slat segmentation will be the owner of the slat, and will delete // it when it'll be deleted itself fSlatSegmentations.Add(new AliMpSlatSegmentation(slat,owner)); - fMaxNofPadsY = std::max(slat->GetMaxNofPadsY(),fMaxNofPadsY); - fDX = std::max(fDX,slat->DX()); - fDY = std::max(fDY,slat->DY()); + fMaxNofPadsY = TMath::Max(slat->GetMaxNofPadsY(),fMaxNofPadsY); + fDX = TMath::Max(fDX,slat->DX()); + fDY = TMath::Max(fDY,slat->DY()); return kTRUE; } diff --git a/TPC/AliTPCtrackerMI.cxx b/TPC/AliTPCtrackerMI.cxx index ebf8cf73c53..609512100c1 100644 --- a/TPC/AliTPCtrackerMI.cxx +++ b/TPC/AliTPCtrackerMI.cxx @@ -4162,7 +4162,7 @@ void AliTPCtrackerMI::FindKinks(TObjArray * array, AliESD *esd) if (TMath::Abs(1./track1->GetC())>200) continue; if (track1->Get1Pt()*track0->Get1Pt()>0) continue; if (track1->GetTgl()*track0->GetTgl()>0) continue; - if (max(TMath::Abs(1./track0->GetC()),TMath::Abs(1./track1->GetC()))>190) continue; + if (TMath::Max(TMath::Abs(1./track0->GetC()),TMath::Abs(1./track1->GetC()))>190) continue; if (track0->GetBConstrain()&&TMath::Abs(track1->Get1Pt())Get1Pt())) continue; //returning - lower momenta if (track1->GetBConstrain()&&TMath::Abs(track0->Get1Pt())Get1Pt())) continue; //returning - lower momenta // -- 2.43.0