coverity fixes
authorshahoian <ruben.shahoyan@cern.ch>
Tue, 17 Jun 2014 15:38:43 +0000 (17:38 +0200)
committershahoian <ruben.shahoyan@cern.ch>
Tue, 17 Jun 2014 15:38:56 +0000 (17:38 +0200)
ITS/UPGRADE/AliITSUGeomTGeo.cxx
ITS/UPGRADE/AliITSUTrackerGlo.cxx
ITS/UPGRADE/AliITSUv1Layer.cxx
STEER/ESD/AliKFParticleBase.cxx

index 2fada33..2610ad2 100644 (file)
@@ -688,9 +688,8 @@ TGeoPNEntry* AliITSUGeomTGeo::GetPNEntry(Int_t index) const
 void AliITSUGeomTGeo::BuildITS(Bool_t loadSegm)
 {
   // exract upg ITS parameters from TGeo
-  if (fVersion!=kITSVNA) {AliWarning("Already built"); return; // already initialized}
-    if (!gGeoManager) AliFatal("Geometry is not loaded");
-  }
+  if (fVersion!=kITSVNA) {AliWarning("Already built"); return;} // already initialized
+  if (!gGeoManager) AliFatal("Geometry is not loaded");
   fNLayers    = ExtractNumberOfLayers();
   if (!fNLayers) return;
   //
index 8a5f5bf..3b89ae1 100644 (file)
@@ -1665,7 +1665,7 @@ Bool_t AliITSUTrackerGlo::AddSeedBranch(AliITSUSeed* seed)
     AliITSUSeed** tmpArr = fLayerCandidates;
     fLayerCandidates = new AliITSUSeed*[fLayerMaxCandidates];
     memcpy(fLayerCandidates,tmpArr,(fNCandidatesAdded+fNBranchesAdded)*sizeof(AliITSUSeed*));
-    delete tmpArr; // delete only array, not objects
+    delete[] tmpArr; // delete only array, not objects
   }
   AliITSUSeed** branches = &fLayerCandidates[fNCandidatesAdded]; // note: fNCandidatesAdded is incremented after adding all branches of current seed
   int slot=fNBranchesAdded++;
index 077b528..bcbee16 100644 (file)
@@ -571,7 +571,7 @@ TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod,
 //
 
   Double_t zchip;
-  Double_t zpos, zlen;
+  Double_t zpos;
   char volname[30];
 
   // First create the single chip
@@ -586,7 +586,7 @@ TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod,
   snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber);
   TGeoVolume *modVol = new TGeoVolume(volname, module, medAir);
 
-  zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
+  //  zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ();
   for (Int_t j=0; j<fgkIBChipsPerRow; j++) {
     zpos = -zmod + j*2*zchip + zchip;
     modVol->AddNode(chipVol, j, new TGeoTranslation(0, 0, zpos));
index 02c4c34..b163463 100644 (file)
@@ -813,7 +813,7 @@ void AliKFParticleBase::AddDaughterWithEnergyCalc( const AliKFParticleBase &Daug
 
     //Double_t Dvv[3][3]; do not need this
     Double_t mDvp[3][3];
-    Double_t mDpv[3][3];
+    //    Double_t mDpv[3][3];
     Double_t mDpp[3][3];
     Double_t mDe[7];
 
@@ -822,7 +822,7 @@ void AliKFParticleBase::AddDaughterWithEnergyCalc( const AliKFParticleBase &Daug
       for(int j=0; j<3; j++)
       {
         mDvp[i][j] = km0[i+3]*mCCHt0[j] + km1[i+3]*mCCHt1[j] + km2[i+3]*mCCHt2[j];
-        mDpv[i][j] = km0[i]*mCCHt0[j+3] + km1[i]*mCCHt1[j+3] + km2[i]*mCCHt2[j+3];
+       //        mDpv[i][j] = km0[i]*mCCHt0[j+3] + km1[i]*mCCHt1[j+3] + km2[i]*mCCHt2[j+3];
         mDpp[i][j] = km0[i+3]*mCCHt0[j+3] + km1[i+3]*mCCHt1[j+3] + km2[i+3]*mCCHt2[j+3];
       }
     }
@@ -2817,10 +2817,10 @@ void AliKFParticleBase::GetArmenterosPodolanski(AliKFParticleBase& positive, Ali
   Double_t spz = positive.GetPz() + negative.GetPz();
   Double_t sp  = sqrt(spx*spx + spy*spy + spz*spz);
   if( sp == 0.0) return;
-  Double_t pn, pp, pln, plp;
+  Double_t pn, pln, plp; // ,pp;
 
   pn = TMath::Sqrt(negative.GetPx()*negative.GetPx() + negative.GetPy()*negative.GetPy() + negative.GetPz()*negative.GetPz());
-  pp = TMath::Sqrt(positive.GetPx()*positive.GetPx() + positive.GetPy()*positive.GetPy() + positive.GetPz()*positive.GetPz());
+  //  pp = TMath::Sqrt(positive.GetPx()*positive.GetPx() + positive.GetPy()*positive.GetPy() + positive.GetPz()*positive.GetPz());
   pln  = (negative.GetPx()*spx+negative.GetPy()*spy+negative.GetPz()*spz)/sp;
   plp  = (positive.GetPx()*spx+positive.GetPy()*spy+positive.GetPz()*spz)/sp;