Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 /// \file optical/wls/src/WLSPrimaryGeneratorM 28 /// \brief Implementation of the WLSPrimaryGen 29 // 30 // 31 #include "WLSPrimaryGeneratorMessenger.hh" 32 33 #include "WLSPrimaryGeneratorAction.hh" 34 35 #include "G4UIcmdWithABool.hh" 36 #include "G4UIcmdWithADoubleAndUnit.hh" 37 #include "G4UIdirectory.hh" 38 39 //....oooOO0OOooo........oooOO0OOooo........oo 40 41 WLSPrimaryGeneratorMessenger::WLSPrimaryGenera 42 : fAction(gun) 43 { 44 fGunDir = new G4UIdirectory("/WLS/gun/"); 45 fGunDir->SetGuidance("WLSPrimaryGenerator co 46 47 fSetPolarizationCmd = new G4UIcmdWithADouble 48 fSetPolarizationCmd->SetGuidance("Set linear 49 fSetPolarizationCmd->SetGuidance(" angle w. 50 fSetPolarizationCmd->SetParameterName("angle 51 fSetPolarizationCmd->SetUnitCategory("Angle" 52 fSetPolarizationCmd->SetDefaultValue(0.); 53 fSetPolarizationCmd->AvailableForStates(G4St 54 55 fSetDecayTimeConstantCmd = new G4UIcmdWithAD 56 fSetDecayTimeConstantCmd->SetGuidance("Set t 57 fSetDecayTimeConstantCmd->SetGuidance("for t 58 fSetDecayTimeConstantCmd->SetParameterName(" 59 fSetDecayTimeConstantCmd->SetUnitCategory("T 60 fSetDecayTimeConstantCmd->SetRange("time_con 61 fSetDecayTimeConstantCmd->AvailableForStates 62 63 // fSetUseSampledEnergyCmd = new G4UIcmdWith 64 // this); fSetUseSampledEnergyCmd->SetGuidan 65 // energy."); fSetUseSampledEnergyCmd->SetGu 66 // disabled."); fSetUseSampledEnergyCmd->Ava 67 } 68 69 //....oooOO0OOooo........oooOO0OOooo........oo 70 71 WLSPrimaryGeneratorMessenger::~WLSPrimaryGener 72 { 73 delete fGunDir; 74 delete fSetPolarizationCmd; 75 delete fSetDecayTimeConstantCmd; 76 // delete fSetUseSampledEnergyCmd; 77 } 78 79 //....oooOO0OOooo........oooOO0OOooo........oo 80 81 void WLSPrimaryGeneratorMessenger::SetNewValue 82 { 83 if (command == fSetPolarizationCmd) 84 fAction->SetOptPhotonPolar(G4UIcmdWithADou 85 else if (command == fSetDecayTimeConstantCmd 86 fAction->SetDecayTimeConstant(G4UIcmdWithA 87 // else if ( command == fSetUseSampledEnergy 88 // fAction-> 89 // SetUseSampledEnergy(G4UIcmdWithABool: 90 } 91