]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFGeometry.cxx
coverity fix + NUA
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.cxx
index ab9986797ba8c7181bbdb714697077d931c63e36..76c007c30fac968fc40a6c3879bc7d42dcb49dba 100644 (file)
@@ -330,7 +330,7 @@ void AliTOFGeometry::DetToStripRF(Int_t nPadX, Int_t nPadZ, Float_t &x,  Float_t
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::DistanceToPadPar(Int_t *det, const Float_t * const pos, Float_t *dist3d) const
+Float_t AliTOFGeometry::DistanceToPadPar(Int_t *det, const Float_t * pos, Float_t *dist3d)
 {
 //
 // Returns distance of  space point with coor pos (x,y,z) (cm) wrt 
@@ -393,7 +393,7 @@ Float_t AliTOFGeometry::DistanceToPadPar(Int_t *det, const Float_t * const pos,
 
 }
 //_____________________________________________________________________________
-Bool_t AliTOFGeometry::IsInsideThePadPar(Int_t *det, const Float_t * const pos) const
+Bool_t AliTOFGeometry::IsInsideThePadPar(Int_t *det, const Float_t * pos)
 {
 //
 // Returns true if space point with coor pos (x,y,z) (cm) falls 
@@ -464,7 +464,7 @@ Bool_t AliTOFGeometry::IsInsideThePadPar(Int_t *det, const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix *mat, const Float_t * const pos, Float_t *dist3d) const
+Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix *mat, const Float_t * pos, Float_t *dist3d)
 {
   //
   // Returns true if space point with coor pos (x,y,z) [cm] falls inside
@@ -522,7 +522,7 @@ Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix *mat, const Float_t * const po
 
 }
 //_____________________________________________________________________________
-void AliTOFGeometry::GetVolumePath(const Int_t * const ind, Char_t *path ) {
+void AliTOFGeometry::GetVolumePath(const Int_t * ind, Char_t *path ) {
   //--------------------------------------------------------------------
   // This function returns the colume path of a given pad 
   //--------------------------------------------------------------------
@@ -629,7 +629,7 @@ void AliTOFGeometry::GetPos(Int_t *det, Float_t *pos)
   pos[2]=tr[2];
 }
 //_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPlate(const Float_t * const pos)
+Int_t AliTOFGeometry::GetPlate(const Float_t * pos)
 {
   //
   // Returns the Plate index 
@@ -665,7 +665,7 @@ Int_t AliTOFGeometry::GetPlate(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA = FLTA reference frame
@@ -725,7 +725,7 @@ Int_t AliTOFGeometry::GetPlate(const Float_t * const pos)
 }
 
 //_____________________________________________________________________________
-Int_t AliTOFGeometry::GetSector(const Float_t * const pos)
+Int_t AliTOFGeometry::GetSector(const Float_t * pos)
 {
   //
   // Returns the Sector index 
@@ -753,7 +753,7 @@ Int_t AliTOFGeometry::GetSector(const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Int_t AliTOFGeometry::GetStrip(const Float_t * const pos)
+Int_t AliTOFGeometry::GetStrip(const Float_t * pos)
 {
   //
   // Returns the Strip index 
@@ -809,7 +809,7 @@ Int_t AliTOFGeometry::GetStrip(const Float_t * const pos)
   //  AliDebug(1,Form("  posLocal[0] = %f, posLocal[1] = %f, posLocal[2] = %f ",
   //             posLocal[0],posLocal[1],posLocal[2]));
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
   //  AliDebug(1,Form("  posLocal[0] = %f, posLocal[1] = %f, posLocal[2] = %f ",
   //             posLocal[0],posLocal[1],posLocal[2]));
@@ -887,7 +887,7 @@ Int_t AliTOFGeometry::GetStrip(const Float_t * const pos)
   
 }
 //_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPadZ(const Float_t * const pos)
+Int_t AliTOFGeometry::GetPadZ(const Float_t * pos)
 {
   //
   // Returns the Pad index along Z 
@@ -922,7 +922,7 @@ Int_t AliTOFGeometry::GetPadZ(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA = FLTA reference frame
@@ -980,7 +980,7 @@ Int_t AliTOFGeometry::GetPadZ(const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Int_t AliTOFGeometry::GetPadX(const Float_t * const pos)
+Int_t AliTOFGeometry::GetPadX(const Float_t * pos)
 {
   //
   // Returns the Pad index along X 
@@ -1015,7 +1015,7 @@ Int_t AliTOFGeometry::GetPadX(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame
@@ -1073,7 +1073,7 @@ Int_t AliTOFGeometry::GetPadX(const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetX(const Int_t * const det)
+Float_t AliTOFGeometry::GetX(const Int_t * det)
 {
   //
   // Returns X coordinate (cm)
@@ -1107,7 +1107,7 @@ Float_t AliTOFGeometry::GetX(const Int_t * const det)
 
   // Pad reference frame -> FSTR reference frame
   Float_t posLocal[3] = {0., 0., 0.};
-  Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad};
+  Float_t step[3] = {static_cast<Float_t>(-(ipadx+0.5)*fgkXPad), 0., static_cast<Float_t>(-(ipadz+0.5)*fgkZPad)};
   Translation(posLocal,step);
 
   step[0] = kNpadX*0.5*fgkXPad;
@@ -1184,7 +1184,7 @@ Float_t AliTOFGeometry::GetX(const Int_t * const det)
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetY(const Int_t * const det)
+Float_t AliTOFGeometry::GetY(const Int_t * det)
 {
   //
   // Returns Y coordinate (cm)
@@ -1218,7 +1218,7 @@ Float_t AliTOFGeometry::GetY(const Int_t * const det)
 
   // Pad reference frame -> FSTR reference frame
   Float_t posLocal[3] = {0., 0., 0.};
-  Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad};
+  Float_t step[3] = {static_cast<Float_t>(-(ipadx+0.5)*fgkXPad), 0., static_cast<Float_t>(-(ipadz+0.5)*fgkZPad)};
   Translation(posLocal,step);
 
   step[0] = kNpadX*0.5*fgkXPad;
@@ -1297,7 +1297,7 @@ Float_t AliTOFGeometry::GetY(const Int_t * const det)
 }
 
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetZ(const Int_t * const det)
+Float_t AliTOFGeometry::GetZ(const Int_t * det)
 {
   //
   // Returns Z coordinate (cm)
@@ -1316,7 +1316,7 @@ Float_t AliTOFGeometry::GetZ(const Int_t * const det)
 
   // Pad reference frame -> FSTR reference frame
   Float_t posLocal[3] = {0., 0., 0.};
-  Float_t step[3] = {-(ipadx+0.5)*fgkXPad, 0., -(ipadz+0.5)*fgkZPad};
+  Float_t step[3] = {static_cast<Float_t>(-(ipadx+0.5)*fgkXPad), 0., static_cast<Float_t>(-(ipadz+0.5)*fgkZPad)};
   Translation(posLocal,step);
 
   step[0] = kNpadX*0.5*fgkXPad;
@@ -1459,7 +1459,7 @@ void AliTOFGeometry::DetToSectorRF(Int_t vol[5], Double_t coord[4][3])
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDx(const Float_t * const pos)
+Float_t AliTOFGeometry::GetPadDx(const Float_t * pos)
 {
   //
   // Returns the x coordinate in the Pad reference frame
@@ -1499,7 +1499,7 @@ Float_t AliTOFGeometry::GetPadDx(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame
@@ -1560,7 +1560,7 @@ Float_t AliTOFGeometry::GetPadDx(const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDy(const Float_t * const pos)
+Float_t AliTOFGeometry::GetPadDy(const Float_t * pos)
 {
   //
   // Returns the y coordinate in the Pad reference frame
@@ -1600,7 +1600,7 @@ Float_t AliTOFGeometry::GetPadDy(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame
@@ -1661,7 +1661,7 @@ Float_t AliTOFGeometry::GetPadDy(const Float_t * const pos)
 
 }
 //_____________________________________________________________________________
-Float_t AliTOFGeometry::GetPadDz(const Float_t * const pos)
+Float_t AliTOFGeometry::GetPadDz(const Float_t * pos)
 {
   //
   // Returns the z coordinate in the Pad reference frame
@@ -1701,7 +1701,7 @@ Float_t AliTOFGeometry::GetPadDz(const Float_t * const pos)
     };
   Rotation(posLocal,angles);
 
-  Float_t step[3] = {0., 0., (fgkRmax+fgkRmin)*0.5};
+  Float_t step[3] = {0., 0., static_cast<Float_t>((fgkRmax+fgkRmin)*0.5)};
   Translation(posLocal,step);
 
   // B071/B074/B075 = BTO1/2/3 reference frame -> FTOA/B/C = FLTA/B/C reference frame
@@ -1843,7 +1843,7 @@ void AliTOFGeometry::InverseRotation(Float_t *xyz, Double_t rotationAngles[6])
 }
 //_____________________________________________________________________________
 
-Int_t AliTOFGeometry::GetIndex(const Int_t * const detId)
+Int_t AliTOFGeometry::GetIndex(const Int_t * detId)
 {
   //Retrieve calibration channel index 
   Int_t isector = detId[0];
@@ -2200,7 +2200,7 @@ void AliTOFGeometry::PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT)
 }
 //-------------------------------------------------------------------------
 
-Int_t AliTOFGeometry::GetTOFsupermodule(const Int_t index)
+Int_t AliTOFGeometry::GetTOFsupermodule(Int_t index)
 {
   // Return the TOF supermodule where TOF channel index is located