Coverity fixes. (Mario Sitta)
authoramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2011 19:23:45 +0000 (19:23 +0000)
committeramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2011 19:23:45 +0000 (19:23 +0000)
ITS/UPGRADE/AliITSInitGeometryUpg.cxx
ITS/UPGRADE/AliITSvUpgrade.cxx

index b86ab8e..411c48f 100644 (file)
@@ -365,7 +365,7 @@ Bool_t AliITSInitGeometryUpg::InitAliITSgeomVUpgrade(AliITSgeom *geom){
   TArrayD shapePar;
   TString path, shapeName;
   TGeoHMatrix matrix;
-  Bool_t initSeg=kFALSE ;
+//  Bool_t initSeg[3]={kFALSE, kFALSE, kFALSE};
   TStopwatch *time = 0x0;
   if(fTiming) time = new TStopwatch();
 
@@ -387,7 +387,6 @@ Bool_t AliITSInitGeometryUpg::InitAliITSgeomVUpgrade(AliITSgeom *geom){
     TransposeTGeoHMatrix(&matrix); //Transpose TGeo's rotation matrixes
     geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
 //    if(initSeg[kIdet[lay-1]]) continue;
-    if(initSeg) continue;
     GetShape(path,shapeName,shapePar);
     if(shapeName.CompareTo("BOX")){
       Error("InitITSgeom","Geometry changed without proper code update"
@@ -858,7 +857,7 @@ void AliITSInitGeometryUpg::DecodeDetectorv11(Int_t &mod,Int_t layer,
 
 //______________________________________________________________________
 void AliITSInitGeometryUpg::DecodeDetectorvUpgrade(Int_t &mod,Int_t layer,
-                                 Int_t cpn0,Int_t cpn1,Int_t cpn2) const {
+                                 Int_t cpn0,Int_t cpn1,Int_t /*cpn2*/) const {
     // decode geometry into detector module number
     // Inputs:
     //    Int_t layer    The ITS layer
index 652b8b2..2315e6e 100644 (file)
@@ -922,160 +922,6 @@ void AliITSvUpgrade::CreateMaterials(){
     AliMixture(85,"inox/alum$",aInAl,zInAl,dInAl,5,wInAl);
     AliMedium(85,"inox/alum$",85,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
-    // special media to take into account services in the SDD and SSD 
-    // cones for the FMD
-    //Begin_Html
-    /*
-      <A HREF="http://www.Physics.ohio-state.edu/~nilsen/ITS/ITS_MatBudget_4B.xls">
-      </pre>
-      <br clear=left>
-      <font size=+2 color=blue>
-      <p> The Exel spread sheet from which these density number come from.
-      </font></A>
-    */
-    //End_Html
-
-    Bool_t fByThick = kTRUE;
-    //  AliMaterial(86,"AIRFMDSDD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-    Float_t aA[13],zZ[13],wW[13],den;
-    // From Pierluigi Barberis calculations of 2SPD+1SDD October 2 2002.
-    zZ[0] = 1.0; aA[0] = 1.00794; // Hydrogen
-    zZ[1] = 6.0; aA[1] = 12.011; // Carbon
-    zZ[2] = 7.0; aA[2] = 14.00674; // Nitrogen
-    zZ[3] = 8.0; aA[3] = 15.9994; // Oxigen
-    zZ[4] = 14.0; aA[4] = 28.0855; // Silicon
-    zZ[5] = 24.0; aA[5] = 51.9961; //Cromium
-    zZ[6] = 25.0; aA[6] = 54.938049; // Manganese
-    zZ[7] = 26.0; aA[7] = 55.845; // Iron
-    zZ[8] = 28.0; aA[8] = 58.6934; // Nickle
-    zZ[9] = 29.0; aA[9] = 63.546; // Copper
-    zZ[10] = 13.0; aA[10] = 26.981539; // Alulminum
-    zZ[11] = 47.0; aA[11] = 107.8682; // Silver
-    zZ[12] = 27.0; aA[12] = 58.9332; // Cobolt
-    wW[0] = 0.019965;
-    wW[1] = 0.340961;
-    wW[2] = 0.041225;
-    wW[3] = 0.200352;
-    wW[4] = 0.000386;
-    wW[5] = 0.001467;
-    wW[6] = 0.000155;
-    wW[7] = 0.005113;
-    wW[8] = 0.000993;
-    wW[9] = 0.381262;
-    wW[10] = 0.008121;
-    wW[11] = 0.000000;
-    wW[12] = 0.000000;
-    if(fByThick){// New values seeITS_MatBudget_4B.xls
-       den = 1.5253276; // g/cm^3  Cell O370
-    }else{
-       den = 2.58423412; // g/cm^3 Cell L370
-    } // end if fByThick
-    //den = 6161.7/(3671.58978);//g/cm^3 Volume does not exclude holes
-    AliMixture(86,"AIRFMDSDD$",aA,zZ,den,+11,wW);
-    AliMedium(86,"AIRFMDSDD$",86,0,ifield,fieldm,tmaxfdAir,stemaxAir,
-             deemaxAir,epsilAir,stminAir);
-
-    //AliMaterial(87,"AIRFMDSSD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
-    // From Pierluigi Barberis calculations of SSD October 2 2002.
-    wW[0] = 0.019777;
-    wW[1] = 0.325901;
-    wW[2] = 0.031848;
-    wW[3] = 0.147668;
-    wW[4] = 0.030609;
-    wW[5] = 0.013993;
-    wW[6] = 0.001479;
-    wW[7] = 0.048792;
-    wW[8] = 0.009477;
-    wW[9] = 0.350697;
-    wW[10] = 0.014546;
-    wW[11] = 0.005213;
-    wW[12] = 0.000000;
-    if(fByThick){// New values seeITS_MatBudget_4B.xls
-       den = 1.2464275; // g/cm^3   Cell O403
-    }else{
-       den = 1.28134409; // g/cm^3  Cell L403
-    } // end if fByThick
-    //den = 7666.3/(9753.553259); // volume does not exclude holes
-    AliMixture(87,"AIRFMDSSD$",aA,zZ,den,+12,wW); 
-    AliMedium(87,"AIRFMDSSD$",87,0,ifield,fieldm,tmaxfdAir,stemaxAir,
-             deemaxAir,epsilAir,stminAir);
-
-    //AliMaterial(88,"ITS SANDW CFMDSDD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
-    // From Pierluigi Barberis calculations of 1SDD+Carbon fiber October 2 2002
-    wW[0] = 0.016302;
-    wW[1] = 0.461870;
-    wW[2] = 0.033662;
-    wW[3] = 0.163595;
-    wW[4] = 0.000315;
-    wW[5] = 0.001197;
-    wW[6] = 0.000127;
-    wW[7] = 0.004175;
-    wW[8] = 0.000811;
-    wW[9] = 0.311315;
-    wW[10] = 0.006631;
-    wW[11] = 0.000000;
-    wW[12] = 0.000000;
-    if(fByThick){// New values seeITS_MatBudget_4B.xls
-       den = 1.9353276; // g/cm^3  Cell N370
-    }else{
-       den = 3.2788626; // g/cm^3 Cell F370
-    } // end if fByThick
-    //den = 7667.1/(3671.58978); // Volume does not excludeholes
-    AliMixture(88,"ITS SANDW CFMDSDD$",aA,zZ,den,+11,wW); 
-    AliMedium(88,"ITS SANDW CFMDSDD$",88,0,ifield,fieldm,tmaxfd,stemax,
-             deemax,epsil,stmin);
-
-    //AliMaterial(89,"ITS SANDW CFMDSSD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
-    // From Pierluigi Barberis calculations of SSD+Carbon fiber October 2 2002.
-    wW[0] = 0.014065;
-    wW[1] = 0.520598;
-    wW[2] = 0.022650;
-    wW[3] = 0.105018;
-    wW[4] = 0.021768;
-    wW[5] = 0.009952;
-    wW[6] = 0.001051;
-    wW[7] = 0.034700;
-    wW[8] = 0.006740;
-    wW[9] = 0.249406;
-    wW[10] = 0.010345;
-    wW[11] = 0.0003707;
-    wW[12] = 0.000000;
-    if(fByThick){// New values seeITS_MatBudget_4B.xls
-       den = 1.6564275; // g/cm^3  Cell N304
-    }else{
-       den = 1.7028296; // g/cm^3  Cell F304
-    } // end if fByThick
-    //den = 1166.5/(3671.58978); // Volume does not exclude holes
-    AliMixture(89,"ITS SANDW CFMDSSD$",aA,zZ,den,+12,wW); 
-    AliMedium(89,"ITS SANDW CFMDSSD$",89,0,ifield,fieldm,tmaxfd,stemax,
-             deemax,epsil,stmin);
-
-    //AliMaterial(97,"SPD SERVICES$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
-    // From Pierluigi Barberis calculations of 1SPD October 2 2002.
-    wW[0] = 0.005970;
-    wW[1] = 0.304704;
-    wW[2] = 0.042510;
-    wW[3] = 0.121715;
-    wW[4] = 0.001118;
-    wW[5] = 0.030948;
-    wW[6] = 0.003270;
-    wW[7] = 0.107910;
-    wW[8] = 0.020960;
-    wW[9] = 0.360895;
-    wW[10] = 0.000000;
-    wW[11] = 0.000000;
-    wW[12] = 0.000000;
-    if(fByThick){// New values seeITS_MatBudget_4B.xls
-       den = 80.31136576; // g/cm^3 Cell H329
-    }else{
-       den = 87.13062; // g/cm^3  Cell G329
-    } // end if fByThick
-    //den = 1251.3/(0.05*2.0*TMath::Pi()*(7.75*7.75 - 3.7*3.7)); // g/cm^3
-    AliMixture(97,"SPD SERVICES$",aA,zZ,den,+10,wW); 
-    AliMedium(97,"SPD SERVICES$",97,0,ifield,fieldm,tmaxfd,stemax,
-             deemax,epsil,stmin);
-
-
     // Special media
 
     AliMaterial(90,"SPD shield$", 12.011, 6., 1.93 , 22.36, 999);
@@ -1112,6 +958,7 @@ void AliITSvUpgrade::CreateMaterials(){
     AliMixture(95,"SSD FEP$",aFEP,zFEP,dFEP,-2,wFEP);
     AliMedium(95,"SSD FEP$",95,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
 
+    Float_t aA[13],zZ[13],wW[13],den;
     // Mean material for low-voltage cables on SPD trays Side A
     // (Copper + PolyEthylene (C2-H4)) (D.Elia for cable number and
     // cross-section area, M.Sitta for elemental computation) - 26 Feb 10