From: gvolpe Date: Mon, 23 Jun 2014 15:09:24 +0000 (+0200) Subject: Coverity fix X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=25692ca47893e31d09c0213f6515bb7aeef59f8e Coverity fix --- diff --git a/HMPID/AliHMPIDCalib.cxx b/HMPID/AliHMPIDCalib.cxx index 1ccf672c308..2887939e7f6 100644 --- a/HMPID/AliHMPIDCalib.cxx +++ b/HMPID/AliHMPIDCalib.cxx @@ -329,7 +329,7 @@ void AliHMPIDCalib::FillPedestal(Int_t abspad,Int_t q) fpedQ0[nDDL][row][dil][adr]++; //Count how many times a pad charge is zero } - Int_t histocnt=0; histocnt=(nDDL)*11520+(row-1)*480+(dil-1)*48+adr; //Histo counter for a single DDL + // Int_t histocnt=0; histocnt=(nDDL)*11520+(row-1)*480+(dil-1)*48+adr; //Histo counter for a single DDL }//FillPedestal() //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/HMPID/AliHMPIDReconHTA.cxx b/HMPID/AliHMPIDReconHTA.cxx index 804ae722231..e1987eaf8d0 100644 --- a/HMPID/AliHMPIDReconHTA.cxx +++ b/HMPID/AliHMPIDReconHTA.cxx @@ -592,7 +592,7 @@ void AliHMPIDReconHTA::InitDatabase() Double_t xmip = xrad + sizeCh*TMath::Tan(thTrk)*TMath::Cos(phTrk); Double_t ymip = yrad + sizeCh*TMath::Tan(thTrk)*TMath::Sin(phTrk); - Double_t dist1,dist2; + Double_t dist2; // //first point at phi=0 // @@ -600,12 +600,15 @@ void AliHMPIDReconHTA::InitDatabase() TVector2 pos; pos=rec.TracePhot(thetaC,0); - if(pos.X()==-999) { + /*if(pos.X()==-999) { dist1 = 0; //open ring...only the distance btw mip and point at 180 will be considered } else { x[0] = pos.X(); y[0] = pos.Y(); dist1 = TMath::Sqrt((x[0]-xmip)*(x[0]-xmip)+(y[0]-ymip)*(y[0]-ymip)); - } + }*/ + + if(pos.X()!=-999) {x[0] = pos.X(); y[0] = pos.Y();} + // //second point at phi=180 // diff --git a/HMPID/AliHMPIDTracker.cxx b/HMPID/AliHMPIDTracker.cxx index 1405f1bbc54..2d5e3fd8639 100644 --- a/HMPID/AliHMPIDTracker.cxx +++ b/HMPID/AliHMPIDTracker.cxx @@ -155,7 +155,7 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea Int_t nMipClusTot=0; Double_t qthre = 0; Double_t nmean=0; Int_t hvsec=0; - Int_t nClusCh[AliHMPIDParam::kMaxCh+1]; +// Int_t nClusCh[AliHMPIDParam::kMaxCh+1]; Bool_t tsRight = kTRUE; @@ -171,7 +171,8 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea for(Int_t iTrk=0;iTrkGetNumberOfTracks();iTrk++){ //loop on the ESD tracks in the event // Double_t bestChi2=99999;chi2=99999; //init. track matching params - Double_t dmin=999999,bz=0,distCut=1,distParams[5]={1}; +// Double_t dmin=999999,bz=0,distCut=1,distParams[5]={1}; + Double_t dmin=999999,distCut=1,distParams[5]={1}; Bool_t isOkDcut=kFALSE; Bool_t isOkQcut=kFALSE; @@ -190,7 +191,7 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea AliHMPIDtrack *hmpTrkConstrained = 0; //create a hmpid track to be used for propagation and matching hmpTrk->Set(ftrack->GetTPCOut()->GetX(), ftrack->GetTPCOut()->GetAlpha(),ftrack->GetTPCOut()->GetParameter(), ftrack->GetTPCOut()->GetCovariance()); // - bz=AliTracker::GetBz(); + //bz=AliTracker::GetBz(); //initial flags for HMPID ESD infos pTrk->SetHMPIDtrk(0,0,0,0); //no intersection found @@ -208,7 +209,7 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea TClonesArray *pMipCluLst=(TClonesArray *)pClus->At(ipCh); //get the list of clusters nMipClusTot = pMipCluLst->GetEntries(); //total number of clusters in the given chamber - nClusCh[ipCh] = nMipClusTot; + // nClusCh[ipCh] = nMipClusTot; if(nMipClusTot==0) {delete hmpTrk;hmpTrk=0x0;continue;}