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
}
break;
case kLSTY:
- switch (absVal)
+ switch (kAbsVal)
{
case 1:
lineStyle = G4VisAttributes::unbroken; break;
}
break;
case kLWID:
- lineWidth = absVal;
+ lineWidth = kAbsVal;
if (lineWidth > 7) lineWidth = 7;
if (fVerbose > 0)
G4cout << "TG4VisManager::Gsatt() Usage for LWID :" << endl
<< 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
}
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;
break;
case kFILL:
isForceDrawingStyle = true;
- switch (absVal)
+ switch (kAbsVal)
{
case 0:
drawingStyle = G4VisAttributes::wireframe;
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)
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
SetColourFlag(false);
}
- const G4double rad = M_PI/180.;
+ const G4double kRad = M_PI/180.;
G4RWTPtrOrderedVector<G4VPhysicalVolume> pvList;
G4String sname(name);
G4bool successful = false;
}
}
// 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
fVP.UnsetViewHits();
fVP.UnsetViewDigis();
fVP.SetNoOfSides(48);
- fVP.SetCurrentTargetPoint(targetPoint);
+ fVP.SetCurrentTargetPoint(kTargetPoint);
fVP.SetViewpointDirection(viewpointDirection);
fVP.SetUpVector(upVector);
fVP.SetDensityCulling(true);