62 fOpticalPhysics(opticalPhysics),
64 fSelectOpProcessCmd(0),
65 fSetOpProcessUseCmd(0),
66 fSetOpProcessVerboseCmd(0),
67 fSetCerenkovMaxPhotonsCmd(0),
68 fSetCerenkovMaxBetaChangeCmd(0),
69 fSetScintillationYieldFactorCmd(0),
70 fSetScintillationByParticleTypeCmd(0),
72 fSetWLSTimeProfileCmd(0),
73 fSetTrackSecondariesFirstCmd(0),
74 fSetFiniteRiseTimeCmd(0)
77 fDir->
SetGuidance(
"Commands related to the optical physics simulation engine.");
82 ->
SetGuidance(
"Select optical process for applying use/verbose/trackfirst commands");
94 fSetOpProcessUseCmd->
SetGuidance(
"Use/Not use selected optical process");
98 fSetOpProcessVerboseCmd
100 fSetOpProcessVerboseCmd->
SetGuidance(
"Set verbosity level for selected optical process");
102 fSetOpProcessVerboseCmd->
SetRange(
"OpProcessVerbose>=0");
105 fSetCerenkovMaxPhotonsCmd
107 fSetCerenkovMaxPhotonsCmd->
SetGuidance(
"Set maximum number of photons per step");
109 fSetCerenkovMaxPhotonsCmd->
SetRange(
"CerenkovMaxPhotons>=0");
112 fSetCerenkovMaxBetaChangeCmd
114 fSetCerenkovMaxBetaChangeCmd
115 ->
SetGuidance(
"Set maximum change of beta of parent particle per step");
116 fSetCerenkovMaxBetaChangeCmd->
SetParameterName(
"CerenkovMaxBetaChange",
false);
117 fSetCerenkovMaxBetaChangeCmd->
SetRange(
"CerenkovMaxBetaChange>=0");
120 fSetScintillationYieldFactorCmd
122 fSetScintillationYieldFactorCmd->
SetGuidance(
"Set scintillation yield factor");
123 fSetScintillationYieldFactorCmd->
SetParameterName(
"ScintillationYieldFactor",
false);
124 fSetScintillationYieldFactorCmd->
SetRange(
"ScintillationYieldFactor>=0");
127 fSetScintillationByParticleTypeCmd
128 =
new G4UIcmdWithABool(
"/optics_engine/setScintillationByParticleType",
this);
129 fSetScintillationByParticleTypeCmd->
SetGuidance(
"Activate/Inactivate scintillation process by particle type");
130 fSetScintillationByParticleTypeCmd->
SetParameterName(
"ScintillationByParticleTypeActivation",
false);
141 fSetWLSTimeProfileCmd
143 fSetWLSTimeProfileCmd
144 ->
SetGuidance(
"Set the WLS time profile (delta or exponential)");
149 fSetTrackSecondariesFirstCmd
151 fSetTrackSecondariesFirstCmd
152 ->
SetGuidance(
"Set option to track secondaries before finishing their parent track");
153 fSetTrackSecondariesFirstCmd->
SetParameterName(
"TrackSecondariesFirst",
false);
156 fSetFiniteRiseTimeCmd
158 fSetFiniteRiseTimeCmd
159 ->
SetGuidance(
"Set option of a finite rise-time for G4Scintillation - If set, the G4Scintillation process expects the user to have set the constant material property FAST/SLOWSCINTILLATIONRISETIME");
169 delete fSelectOpProcessCmd;
170 delete fSetOpProcessUseCmd;
171 delete fSetOpProcessVerboseCmd;
172 delete fSetCerenkovMaxPhotonsCmd;
173 delete fSetCerenkovMaxBetaChangeCmd;
174 delete fSetScintillationYieldFactorCmd;
175 delete fSetScintillationByParticleTypeCmd;
177 delete fSetWLSTimeProfileCmd;
178 delete fSetTrackSecondariesFirstCmd;
179 delete fSetFiniteRiseTimeCmd;
186 if (command == fSelectOpProcessCmd) {
187 if ( newValue ==
"Cerenkov" ) {
189 }
else if ( newValue ==
"Scintillation" ) {
191 }
else if ( newValue ==
"OpAbsorption" ) {
193 }
else if ( newValue ==
"OpRayleigh" ) {
195 }
else if ( newValue ==
"OpMieHG" ) {
196 fSelectedProcessIndex =
kMieHG;
197 }
else if ( newValue ==
"OpBoundary" ) {
199 }
else if ( newValue ==
"OpWLS" ) {
200 fSelectedProcessIndex =
kWLS;
203 else if (command == fSetOpProcessUseCmd) {
208 else if (command == fSetOpProcessVerboseCmd) {
211 SetProcessVerbose(fSelectedProcessIndex,
216 SetProcessVerbose(i,fSetOpProcessVerboseCmd->
GetNewIntValue(newValue));
220 else if (command == fSetCerenkovMaxPhotonsCmd) {
225 else if (command == fSetCerenkovMaxBetaChangeCmd) {
230 else if (command == fSetScintillationYieldFactorCmd) {
235 else if (command == fSetScintillationByParticleTypeCmd) {
240 else if (command == fSetFiniteRiseTimeCmd) {
255 else if (command == fSetWLSTimeProfileCmd) {
256 if ( newValue ==
"delta" ) {
259 if ( newValue ==
"exponential" ) {
264 else if (command == fSetTrackSecondariesFirstCmd) {
266 fSetTrackSecondariesFirstCmd->
267 GetNewBoolValue(newValue));
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
virtual void SetNewValue(G4UIcommand *, G4String)
Number of processes, no selected process.
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetMaxBetaChangePerStep(G4double)
virtual ~G4OpticalPhysicsMessenger()
Scintillation process index.
Mie scattering process index.
void SetFiniteRiseTime(G4bool)
Absorption process index.
static G4bool GetNewBoolValue(const char *paramString)
void SetScintillationByParticleType(G4bool)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetMaxNumPhotonsPerStep(G4int)
static G4double GetNewDoubleValue(const char *paramString)
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
Wave Length Shifting process index.
G4String G4OpticalProcessName(G4int)
Return the name for a given optical process index.
void SetScintillationYieldFactor(G4double)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetWLSTimeProfile(G4String)
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool)
void SetCandidates(const char *candidateList)
Rayleigh scattering process index.
G4OpticalPhysicsMessenger(G4OpticalPhysics *)