]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFv6T0.cxx
Fix coding rule violations
[u/mrichter/AliRoot.git] / TOF / AliTOFv6T0.cxx
index 82f49bca8498e637c829266252da93f1af4abd0d..8f5361bbb22cba0a16e9e8d42f47fd8c7e582aa6 100644 (file)
@@ -894,6 +894,8 @@ void AliTOFv6T0::MakeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const
   // are filled with volumes: FTOB and FTOC (MRPC containers),
   //
 
+  const Int_t kSize=16;
+
   Int_t idrotm[1];
 
   //AliMatrix(idrotm[0], 90.,  0., 0., 0., 90.,-90.);
@@ -905,8 +907,9 @@ void AliTOFv6T0::MakeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const
   // Positioning of fibre glass modules (FTOA, FTOB and FTOC)
   for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++){
     if(fTOFSectors[isec]==-1)continue;
-    char name[16];
-    sprintf(name, "BTOF%d",isec);
+
+    char name[kSize];
+    snprintf(name, kSize, "BTOF%d",isec);
     if (fTOFHoles && (isec==13 || isec==14 || isec==15)) {
       //xcoor = 0.;
       ycoor = (zlenA*0.5 + fgkInterCentrModBorder1)*0.5;
@@ -935,6 +938,8 @@ void AliTOFv6T0::MakeCoversInBTOFvolumes() const
   // (to separate MRPC strips from FEA cards)
   //
 
+  const Int_t kSize=16;
+
   Int_t idrotm[1];
 
   //AliMatrix(idrotm[0], 90.,  0., 0., 0., 90.,-90.);
@@ -945,12 +950,12 @@ void AliTOFv6T0::MakeCoversInBTOFvolumes() const
   ycoor = 0.;
   zcoor = fgkModuleCoverThickness*0.5;
 
-  char name[16];
+  char name[kSize];
 
   // Positioning of module covers (FPEA, FPEB)
   for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
     if(fTOFSectors[isec]==-1)continue;
-    sprintf(name, "BTOF%d",isec);
+    snprintf(name, kSize, "BTOF%d",isec);
     if (fTOFHoles && (isec==13 || isec==14 || isec==15))
       gMC->Gspos("FPEB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
     else
@@ -969,6 +974,8 @@ void AliTOFv6T0::MakeBackInBTOFvolumes(Float_t ytof) const
   // filled with volumes FAIB (FEA cards and services container).
   //
 
+  const Int_t kSize=16;
+
   Int_t idrotm[1];
 
   //AliMatrix(idrotm[0], 90.,  0., 0., 0., 90.,-90.);
@@ -979,12 +986,12 @@ void AliTOFv6T0::MakeBackInBTOFvolumes(Float_t ytof) const
   ycoor = 0.;
   zcoor = fgkModuleCoverThickness + (ytof*0.5 - fgkModuleCoverThickness)*0.5;
 
-  char name[16];
+  char name[kSize];
 
   // Positioning of FEA cards and services containers (FAIA, FAIC and FAIB)
   for(Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
     if(fTOFSectors[isec]==-1)continue;
-    sprintf(name, "BTOF%d",isec);
+    snprintf(name, kSize, "BTOF%d",isec);
     if (fgkFEAwithMasks[isec])
       gMC->Gspos("FAIA", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
     else {
@@ -1917,260 +1924,6 @@ void AliTOFv6T0::MakeReadoutCrates(Float_t ytof) const
 
 }
 
-//_____________________________________________________________________________
-void AliTOFv6T0::DrawModule() const
-{
-  //
-  // Draw a shaded view of the Time Of Flight version 5
-  //
-
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-
-  //
-  //Set volumes visible
-  // 
-
-  //Set ALIC mother transparent
-  gMC->Gsatt("ALIC","SEEN", 0);
-
-//=====> Level 1
-  // Level 1 for TOF volumes
-  gMC->Gsatt("B077","seen", 0);
-
-//=====> Level 2
-  // Level 2 for TOF volumes
-  gMC->Gsatt("B071","seen", 0);
-  gMC->Gsatt("B074","seen", 0);
-  gMC->Gsatt("B075","seen", 0);
-  gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
-  gMC->Gsatt("B080","seen", 0);  // B080 does not has sub-level                
-
-  // Level 2 of B071
-  gMC->Gsatt("B056","seen", 0);  // B056 does not has sub-levels  -
-  gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped   -
-  gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped   -
-  gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped   -
-  gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped   -
-
-  char name[16];
-  for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
-    sprintf(name, "BREF%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BREF%d sub-levels skipped   -
-    sprintf(name, "BTRD%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BTRD%d sub-levels skipped   -
-    sprintf(name, "BTOF%d",isec);
-    gMC->Gsatt(name,"seen",-2);  // all BTOF%d sub-levels skipped   -
-  }
-
-  gMC->Gdopt("hide", "on");
-  gMC->Gdopt("shad", "on");
-  gMC->Gsatt("*", "fill", 7);
-  gMC->SetClipBox(".");
-  gMC->SetClipBox("*", 100, 1000, 100, 1000, 100, 1000);
-  gMC->DefaultRange();
-  gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
-  gMC->Gdhead(1111, "Time Of Flight");
-  gMC->Gdman(18, 3, "MAN");
-  gMC->Gdopt("hide","off");
-}
-//_____________________________________________________________________________
-void AliTOFv6T0::DrawDetectorModules() const
-{
-  //
-  // Draw a shaded view of the TOF detector SuperModules version 5
-  //
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-
-  //
-  //Set volumes visible
-  // 
-
-  //Set ALIC mother transparent
-  gMC->Gsatt("ALIC","SEEN", 0);
-
-//=====> Level 1
-  // Level 1 for TOF volumes
-  gMC->Gsatt("B077","seen", 0);
-
-//=====> Level 2
-  // Level 2 for TOF volumes
-  gMC->Gsatt("B071","seen", 0);
-  gMC->Gsatt("B074","seen", 0);
-  gMC->Gsatt("B075","seen", 0);
-  gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
-  gMC->Gsatt("B080","seen", 0);  // B080 does not has sub-level                
-
-  // Level 2 of B071
-  gMC->Gsatt("B056","seen", 0);  // B056 does not has sub-levels  -
-  gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped   -
-  gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped   -
-  gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped   -
-  gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped   -
-
-  char name[16];
-  for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
-    sprintf(name, "BREF%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BREF%d sub-levels skipped   -
-    sprintf(name, "BTRD%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BTRD%d sub-levels skipped   -
-    sprintf(name, "BTOF%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BTOF%d sub-levels skipped   -
-  }
-
-  // Level 3 of B071, B075 and B074
-  gMC->Gsatt("FTOA","seen",-2);  // all FTOA sub-levels skipped   -
-  if (fTOFHoles) gMC->Gsatt("FTOB","seen",-2);  // all FTOB sub-levels skipped   -
-  if (fTOFHoles) gMC->Gsatt("FTOC","seen",-2);  // all FTOC sub-levels skipped   -
-
-  // Level 3 of B071, B075 and B074
-  gMC->Gsatt("FAIA","seen",-1);  // all FAIA sub-levels skipped   -
-  gMC->Gsatt("FAIC","seen",-1);  // all FAIC sub-levels skipped   -
-  if (fTOFHoles) gMC->Gsatt("FAIB","seen",-1);  // all FAIB sub-levels skipped   -
-
-  // Level 3 of B071, B075 and B074
-  gMC->Gsatt("FPEA","seen",-2/*1*/);  // all FPEA sub-levels skipped   -
-  if (fTOFHoles) gMC->Gsatt("FPEB","seen",-2/*1*/);  // all FPEB sub-levels skipped   -
-
-  gMC->Gdopt("hide","on");
-  gMC->Gdopt("shad","on");
-  gMC->Gsatt("*", "fill", 5);
-  gMC->SetClipBox(".");
-  gMC->SetClipBox("*", 100, 1000, 100, 1000, 0, 1000);
-  gMC->DefaultRange();
-  gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
-  gMC->Gdhead(1111,"TOF detector");
-  gMC->Gdman(18, 3, "MAN");
-  gMC->Gdopt("hide","off");
-}                                 
-
-//_____________________________________________________________________________
-void AliTOFv6T0::DrawDetectorStrips() const
-{
-  //
-  // Draw a shaded view of the TOF strips for version 5
-  //
-
-  // Set everything unseen
-  gMC->Gsatt("*", "seen", -1);
-
-  //
-  //Set volumes visible
-  // 
-  
-  //Set ALIC mother transparent
-  gMC->Gsatt("ALIC","SEEN", 0);
-  
-//=====> Level 1
-  // Level 1 for TOF volumes
-  gMC->Gsatt("B077","seen", 0);
-
-//=====> Level 2
-  // Level 2 for TOF volumes
-  gMC->Gsatt("B071","seen", 0);
-  gMC->Gsatt("B074","seen", 0);
-  gMC->Gsatt("B075","seen", 0);
-  gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped -
-  gMC->Gsatt("B080","seen", 0);  // B080 does not has sub-level                
-
-  // Level 2 of B071
-  gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped   -
-  gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped   -
-  gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped   -
-  gMC->Gsatt("B056","seen", 0);  // B056 does not has sub-levels  -
-  gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped   -
-
-  char name[16];
-  for (Int_t isec=0; isec<fTOFGeometry->NSectors(); isec++) {
-    sprintf(name, "BREF%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BREF%d sub-levels skipped   -
-    sprintf(name, "BTRD%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BTRD%d sub-levels skipped   -
-    sprintf(name, "BTOF%d",isec);
-    gMC->Gsatt(name,"seen", 0);  // all BTOF%d sub-levels skipped   -
-  }
-
-  // Level 3 of B071, B074 and B075
-  gMC->Gsatt("FTOA","SEEN", 0);
-  if (fTOFHoles) gMC->Gsatt("FTOB","SEEN", 0);
-  if (fTOFHoles) gMC->Gsatt("FTOC","SEEN", 0);
-
-  // Level 4 of B071, B074 and B075
-  gMC->Gsatt("FLTA","SEEN", 0);
-  if (fTOFHoles) gMC->Gsatt("FLTB","SEEN", 0);
-  if (fTOFHoles) gMC->Gsatt("FLTC","SEEN", 0);
-
-  // Level 5 of B071, B074 and B075
-  gMC->Gsatt("FAIA","SEEN", 0);
-  gMC->Gsatt("FAIC","seen",-1);  // all FAIC sub-levels skipped   -
-  if (fTOFHoles) gMC->Gsatt("FAIB","SEEN", 0);
-
-  gMC->Gsatt("FPEA","SEEN", -2/*1*/);
-  if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", -2/*1*/);
-
-  gMC->Gsatt("FSTR","SEEN",-2);  // all FSTR sub-levels skipped   -
-
-  gMC->Gsatt("FWZ1","SEEN", 1);
-  gMC->Gsatt("FWZ2","SEEN", 1);
-  gMC->Gsatt("FWZ3","SEEN", 1);
-  gMC->Gsatt("FWZ4","SEEN", 1);
-  if (fTOFHoles) {
-    gMC->Gsatt("FWZA","SEEN", 1);
-    gMC->Gsatt("FWZB","SEEN", 1);
-    gMC->Gsatt("FWZC","SEEN", 1);
-  }
-
-  // Level 2 of FAIA
-  // Level 2 of FAIB
-  // Level 2 of FAIC
-  gMC->Gsatt("FCA1","SEEN", 0);
-  gMC->Gsatt("FCA2","SEEN", 0);
-  gMC->Gsatt("FCAB","SEEN", 0);
-  gMC->Gsatt("FCAL","SEEN", 0);
-  gMC->Gsatt("FTUB","SEEN",-1);  // all FTUB sub-levels skipped   -
-  gMC->Gsatt("FTLN","SEEN", 0);
-  gMC->Gsatt("FLO1","SEEN", 0);
-  gMC->Gsatt("FLO2","SEEN", 0);
-  gMC->Gsatt("FLO3","SEEN", 0);
-  gMC->Gsatt("FCBL","SEEN", 0);
-  if (fTOFHoles) gMC->Gsatt("FCBB","SEEN", 0);
-  gMC->Gsatt("FSAW","SEEN", 0);
-  gMC->Gsatt("FCOV","SEEN", 0);
-  if (fTOFHoles) {
-    gMC->Gsatt("FCOB","SEEN", 0);
-    gMC->Gsatt("FCOP","SEEN", 0);
-  }
-
-  // Level 2 of FTUB
-  gMC->Gsatt("FITU","SEEN", 0);
-
-  // Level 2 of FSTR
-  gMC->Gsatt("FHON","SEEN", 1);
-  gMC->Gsatt("FPC1","SEEN", 1);
-  gMC->Gsatt("FPC2","SEEN", 1);
-  gMC->Gsatt("FPCB","SEEN", 1);
-  gMC->Gsatt("FRGL","SEEN", 1);
-  gMC->Gsatt("FGLF","SEEN", 1);
-
-  // Level 2 of FPCB => Level 3 of FSTR
-  gMC->Gsatt("FSEN","SEEN", 0);
-  gMC->Gsatt("FSEZ","SEEN", 0);
-  gMC->Gsatt("FPAD","SEEN", 1);
-
-  gMC->Gdopt("hide","on");
-  gMC->Gdopt("shad","on");
-  gMC->Gsatt("*", "fill", 5);
-  gMC->SetClipBox(".");
-  gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000);
-  gMC->DefaultRange();
-  gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018);
-  gMC->Gdhead(1111,"TOF Strips");
-  gMC->Gdman(18, 3, "MAN");
-  gMC->Gdopt("hide","off");
-}
-
 //_____________________________________________________________________________
 void AliTOFv6T0::CreateMaterials()
 {