Commit 983430f0 authored by Chad Lantz's avatar Chad Lantz
Browse files

Set the optical and overlaps flags properly

parent b5179496
......@@ -123,6 +123,8 @@ public:
inline G4int GetnRPDs(){return m_RPDvec.size();}
inline G4bool GetClusterFlag(){return CLUSTER;}
inline void SetClusterFlag( G4bool arg ){CLUSTER = arg;}
inline G4bool GetOverlapsFlag(){return CHECK_OVERLAPS;}
inline void SetOverlapsFlag( G4bool arg ){CHECK_OVERLAPS = arg;}
inline G4bool GetOpticalFlag(){return OPTICAL;}
inline void SetOpticalFlag( G4bool arg ){OPTICAL = arg;}
inline void ForcePosition ( G4bool arg ){ForceDetectorPosition = arg;}
......@@ -195,6 +197,7 @@ private:
G4bool CLUSTER;
G4bool OPTICAL;
G4bool ForceDetectorPosition;
G4bool CHECK_OVERLAPS;
};
......
......@@ -75,6 +75,8 @@ DetectorConstruction::DetectorConstruction()
currentRPD = -1;
currentZDC = -1;
m_materials = Materials::getInstance();
m_materials->UseOpticalMaterials(true);
m_materials->DefineOpticalProperties();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -97,9 +99,6 @@ G4VPhysicalVolume* DetectorConstruction::Construct(){
G4UImanager* UImanager = G4UImanager::GetUIpointer();
UImanager->ApplyCommand("/control/execute geometry.mac");
m_materials->UseOpticalMaterials(OPTICAL);
m_materials->DefineOpticalProperties();
if( ForceDetectorPosition ){
ManualConstruction();
}else{
......@@ -121,7 +120,7 @@ G4VPhysicalVolume* DetectorConstruction::ConstructWorldVolume(G4double x, G4doub
new G4LogicalVolume(m_solidWorld, //its solid
m_materials->Air, //its material
"World"); //its name
m_physWorld =
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
......
......@@ -327,10 +327,10 @@ void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
fDetector->SetClusterFlag( fClusterCmd->GetNewBoolValue(newValue) );
}
if (command == fOpticalCmd) {
fDetector->SetClusterFlag( fOpticalCmd->GetNewBoolValue(newValue) );
fDetector->SetOpticalFlag( fOpticalCmd->GetNewBoolValue(newValue) );
}
if (command == fOverlapsCmd) {
fDetector->SetClusterFlag( fOverlapsCmd->GetNewBoolValue(newValue) );
fDetector->SetOverlapsFlag( fOverlapsCmd->GetNewBoolValue(newValue) );
}
else if(command == fForcePositionCmd){
fDetector->ForcePosition( fForcePositionCmd->GetNewBoolValue(newValue) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment