]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
renamed local constants
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jul 2000 07:13:52 +0000 (07:13 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jul 2000 07:13:52 +0000 (07:13 +0000)
TGeant4/TG4VisManager.cxx

index 5dee7a4d4fd3b9a4bfc074ebd8f922fdabe54bc4..666193726331180d0b4a2718022ac7842ae1f0c0 100644 (file)
@@ -354,7 +354,7 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
  else
    newVisAttributes    = new G4VisAttributes(visAttributes);
 
- const G4int absVal = abs(val);        // the functionality is given by the abs value
+ const G4int kAbsVal = abs(val);       // the functionality is given by the abs value
 
  // Default visible attributes
  G4double red(0),green(0),blue(0); // default is black
@@ -410,7 +410,7 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
    }       
    break;
   case kLSTY:
-   switch (absVal)
+   switch (kAbsVal)
    {
     case 1:
      lineStyle = G4VisAttributes::unbroken; break;
@@ -427,7 +427,7 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
    }       
    break;
   case kLWID:
-   lineWidth = absVal;
+   lineWidth = kAbsVal;
    if (lineWidth > 7) lineWidth = 7;
    if (fVerbose > 0) 
        G4cout << "TG4VisManager::Gsatt() Usage for LWID :" << endl
@@ -437,9 +437,9 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
              << endl;
    break;
   case kCOLO:
-   if (absVal < 8)     // G3 base colours
+   if (kAbsVal < 8)    // G3 base colours
    {
-    switch (absVal)
+    switch (kAbsVal)
     {
      case 1:
        red=0; green=0; blue=0;         //black
@@ -464,40 +464,40 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
     }
     luminosity = 0.;
    }
-   if (absVal>=8 && absVal<=16)
+   if (kAbsVal>=8 && kAbsVal<=16)
    {
      red=0; green=0; blue=0;
-     luminosity = (absVal-7)*luminosityBin;
+     luminosity = (kAbsVal-7)*luminosityBin;
    }
-   if (absVal>=17 && absVal<=41)
+   if (kAbsVal>=17 && kAbsVal<=41)
    {
      red=1; green=0; blue=0;
-     luminosity = (absVal-16)*luminosityBin;
+     luminosity = (kAbsVal-16)*luminosityBin;
    }
-   if (absVal>=67 && absVal<=91)
+   if (kAbsVal>=67 && kAbsVal<=91)
    {
      red=0; green=1; blue=0;
-     luminosity = (absVal-66)*luminosityBin;
+     luminosity = (kAbsVal-66)*luminosityBin;
    }
-   if (absVal>=117 && absVal<=141)
+   if (kAbsVal>=117 && kAbsVal<=141)
    {
      red=0; green=0; blue=1;
-     luminosity = (absVal-116)*luminosityBin;
+     luminosity = (kAbsVal-116)*luminosityBin;
    }
-   if (absVal>=42 && absVal<=66)
+   if (kAbsVal>=42 && kAbsVal<=66)
    {
      red=1; green=1; blue=0;
-     luminosity = (absVal-41)*luminosityBin;
+     luminosity = (kAbsVal-41)*luminosityBin;
    }
-   if (absVal>=142 && absVal<=166)
+   if (kAbsVal>=142 && kAbsVal<=166)
    {
      red=1; green=0; blue=1;
-     luminosity = (absVal-141)*luminosityBin;
+     luminosity = (kAbsVal-141)*luminosityBin;
    }
-   if (absVal>=92 && absVal<=116)
+   if (kAbsVal>=92 && kAbsVal<=116)
    {
      red=0; green=1; blue=1;
-     luminosity = (absVal-91)*luminosityBin;
+     luminosity = (kAbsVal-91)*luminosityBin;
    }
    if (red < luminosityBin)    red += luminosity;
    if (green < luminosityBin) green += luminosity;
@@ -505,7 +505,7 @@ void TG4VisManager::SetG4Attribute(G4LogicalVolume* const lv,
    break;
   case kFILL:
    isForceDrawingStyle = true;
-   switch (absVal)
+   switch (kAbsVal)
    {
     case 0:
      drawingStyle = G4VisAttributes::wireframe;
@@ -570,16 +570,16 @@ void TG4VisManager::SetColors()
     pLV = pLVStore->at(i);
 //    G4cout << "VOLUME : " << pLV->GetName() << endl;
     const G4Material* pMaterial = pLV->GetMaterial();
-    const G4State state = pMaterial->GetState();
+    const G4State kState = pMaterial->GetState();
     G4double density = (pMaterial->GetDensity())*cm3/g;
     G4String nState = "Undefined";
     G4int colour = 1;                  //black by default
     G4double luminosity = 0.;
-    if (state == kStateUndefined) 
+    if (kState == kStateUndefined) 
     {
       nState = "Undefined";
     }
-    if (state == kStateSolid) 
+    if (kState == kStateSolid) 
     {
       nState = "Solid";
       if (density < 2)
@@ -608,13 +608,13 @@ void TG4VisManager::SetColors()
        luminosity = 9 - 9*(density-15)/5;
       }
     }
-    if (state == kStateLiquid) 
+    if (kState == kStateLiquid) 
     {
       nState = "Liquid";
       colour = 142;    //violet
       luminosity = 25 - 25*density/2;
     }
-    if (state == kStateGas) 
+    if (kState == kStateGas) 
     {
       nState = "Gas";
       if (density < 0.001)  {colour = 42;}     //yellow
@@ -778,7 +778,7 @@ void TG4VisManager::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t p
     SetColourFlag(false);
   }
   
-  const G4double rad = M_PI/180.;
+  const G4double kRad = M_PI/180.;
   G4RWTPtrOrderedVector<G4VPhysicalVolume> pvList;
   G4String sname(name);
   G4bool  successful           = false;
@@ -817,12 +817,12 @@ void TG4VisManager::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t p
     }  
   }
   // get the standard target point of the scene
-  const G4Point3D targetPoint = fpScene->GetStandardTargetPoint();
+  const G4Point3D kTargetPoint = fpScene->GetStandardTargetPoint();
 
   // set the viewpoint and the rotation on the screen
-  G4Vector3D viewpointDirection(sin(theta*rad)*cos(phi*rad), 
-                                sin(theta*rad)*sin(phi*rad), cos(theta*rad)); 
-  G4Vector3D upVector(sin(psi*rad), cos(psi*rad),0);                          
+  G4Vector3D viewpointDirection(sin(theta*kRad)*cos(phi*kRad), 
+                                sin(theta*kRad)*sin(phi*kRad), cos(theta*kRad)); 
+  G4Vector3D upVector(sin(psi*kRad), cos(psi*kRad),0);                        
 
   // set and register view parameters to the viewer
   
@@ -831,7 +831,7 @@ void TG4VisManager::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t p
   fVP.UnsetViewHits();
   fVP.UnsetViewDigis();
   fVP.SetNoOfSides(48);
-  fVP.SetCurrentTargetPoint(targetPoint);
+  fVP.SetCurrentTargetPoint(kTargetPoint);
   fVP.SetViewpointDirection(viewpointDirection);
   fVP.SetUpVector(upVector);
   fVP.SetDensityCulling(true);