// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: Em3PhysicsListMessenger.cc,v 1.1.4.1 2001/06/28 19:06:59 gunter Exp $ // GEANT4 tag $Name: $ // // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... #include "Em3PhysicsListMessenger.hh" #include "Em3PhysicsList.hh" #include "G4UIcmdWithADoubleAndUnit.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... Em3PhysicsListMessenger::Em3PhysicsListMessenger(Em3PhysicsList* pPhys) :pPhysicsList(pPhys) { gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setGCut",this); gammaCutCmd->SetGuidance("Set gamma cut."); gammaCutCmd->SetParameterName("Gcut",false); gammaCutCmd->SetUnitCategory("Length"); gammaCutCmd->SetRange("Gcut>0.0"); gammaCutCmd->AvailableForStates(PreInit,Idle); electCutCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setECut",this); electCutCmd->SetGuidance("Set electron cut."); electCutCmd->SetParameterName("Ecut",false); electCutCmd->SetUnitCategory("Length"); electCutCmd->SetRange("Ecut>0.0"); electCutCmd->AvailableForStates(PreInit,Idle); protoCutCmd = new G4UIcmdWithADoubleAndUnit("/run/particle/setPCut",this); protoCutCmd->SetGuidance("Set proton cut."); protoCutCmd->SetParameterName("Pcut",false); protoCutCmd->SetUnitCategory("Length"); protoCutCmd->SetRange("Pcut>0.0"); protoCutCmd->AvailableForStates(PreInit,Idle); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... Em3PhysicsListMessenger::~Em3PhysicsListMessenger() { delete gammaCutCmd; delete electCutCmd; delete protoCutCmd; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... void Em3PhysicsListMessenger::SetNewValue(G4UIcommand* command,G4String newValue) { if( command == gammaCutCmd ) { pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));} if( command == electCutCmd ) { pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));} if( command == protoCutCmd ) { pPhysicsList->SetCutForProton(protoCutCmd->GetNewDoubleValue(newValue));} } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....