Coverity fix
authorgvolpe <giacomo.volpe@cern.ch>
Mon, 23 Jun 2014 15:09:24 +0000 (17:09 +0200)
committergvolpe <giacomo.volpe@cern.ch>
Mon, 23 Jun 2014 15:09:24 +0000 (17:09 +0200)
HMPID/AliHMPIDCalib.cxx
HMPID/AliHMPIDReconHTA.cxx
HMPID/AliHMPIDTracker.cxx

index 1ccf672..2887939 100644 (file)
@@ -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()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index 804ae72..e1987ea 100644 (file)
@@ -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
       //
index 1405f1b..2d5e3fd 100644 (file)
@@ -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;iTrk<pEsd->GetNumberOfTracks();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;}