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)
78 SetGuidance(
"Commands related to the optical physics simulation engine.");
83 ->
SetGuidance(
"Select optical process for applying use/verbose/trackfirst commands");
95 fSetOpProcessUseCmd->
SetGuidance(
"Use/Not use selected optical process");
99 fSetOpProcessVerboseCmd
101 fSetOpProcessVerboseCmd->
SetGuidance(
"Set verbosity level for selected optical process");
104 fSetOpProcessVerboseCmd->
SetRange(
"OpProcessVerbose>=0");
107 fSetCerenkovMaxPhotonsCmd
109 fSetCerenkovMaxPhotonsCmd->
SetGuidance(
"Set maximum number of photons per step");
111 fSetCerenkovMaxPhotonsCmd->
SetRange(
"CerenkovMaxPhotons>=0");
114 fSetCerenkovMaxBetaChangeCmd
116 fSetCerenkovMaxBetaChangeCmd
117 ->
SetGuidance(
"Set maximum change of beta of parent particle per step");
118 fSetCerenkovMaxBetaChangeCmd->
119 SetParameterName(
"CerenkovMaxBetaChange",
false);
120 fSetCerenkovMaxBetaChangeCmd->
SetRange(
"CerenkovMaxBetaChange>=0");
121 fSetCerenkovMaxBetaChangeCmd->
124 fSetScintillationYieldFactorCmd
126 fSetScintillationYieldFactorCmd->
127 SetGuidance(
"Set scintillation yield factor");
128 fSetScintillationYieldFactorCmd->
129 SetParameterName(
"ScintillationYieldFactor",
false);
130 fSetScintillationYieldFactorCmd->
SetRange(
"ScintillationYieldFactor>=0");
131 fSetScintillationYieldFactorCmd->
134 fSetScintillationByParticleTypeCmd
135 =
new G4UIcmdWithABool(
"/optics_engine/setScintillationByParticleType",
this);
136 fSetScintillationByParticleTypeCmd->
137 SetGuidance(
"Activate/Inactivate scintillation process by particle type");
138 fSetScintillationByParticleTypeCmd->
139 SetParameterName(
"ScintillationByParticleTypeActivation",
false);
140 fSetScintillationByParticleTypeCmd->
152 fSetWLSTimeProfileCmd
154 fSetWLSTimeProfileCmd
155 ->
SetGuidance(
"Set the WLS time profile (delta or exponential)");
160 fSetTrackSecondariesFirstCmd
162 fSetTrackSecondariesFirstCmd
163 ->
SetGuidance(
"Set option to track secondaries before finishing their parent track");
164 fSetTrackSecondariesFirstCmd->
165 SetParameterName(
"TrackSecondariesFirst",
false);
166 fSetTrackSecondariesFirstCmd->
169 fSetFiniteRiseTimeCmd
171 fSetFiniteRiseTimeCmd
172 ->
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");
182 delete fSelectOpProcessCmd;
183 delete fSetOpProcessUseCmd;
184 delete fSetOpProcessVerboseCmd;
185 delete fSetCerenkovMaxPhotonsCmd;
186 delete fSetCerenkovMaxBetaChangeCmd;
187 delete fSetScintillationYieldFactorCmd;
188 delete fSetScintillationByParticleTypeCmd;
190 delete fSetWLSTimeProfileCmd;
191 delete fSetTrackSecondariesFirstCmd;
192 delete fSetFiniteRiseTimeCmd;
200 if (command == fSelectOpProcessCmd) {
201 if ( newValue ==
"Cerenkov" ) {
203 }
else if ( newValue ==
"Scintillation" ) {
205 }
else if ( newValue ==
"OpAbsorption" ) {
207 }
else if ( newValue ==
"OpRayleigh" ) {
209 }
else if ( newValue ==
"OpMieHG" ) {
210 fSelectedProcessIndex =
kMieHG;
211 }
else if ( newValue ==
"OpBoundary" ) {
213 }
else if ( newValue ==
"OpWLS" ) {
214 fSelectedProcessIndex =
kWLS;
217 else if (command == fSetOpProcessUseCmd) {
222 else if (command == fSetOpProcessVerboseCmd) {
225 SetProcessVerbose(fSelectedProcessIndex,
230 SetProcessVerbose(i,fSetOpProcessVerboseCmd->
GetNewIntValue(newValue));
234 else if (command == fSetCerenkovMaxPhotonsCmd) {
239 else if (command == fSetCerenkovMaxBetaChangeCmd) {
244 else if (command == fSetScintillationYieldFactorCmd) {
249 else if (command == fSetScintillationByParticleTypeCmd) {
254 else if (command == fSetFiniteRiseTimeCmd) {
269 else if (command == fSetWLSTimeProfileCmd) {
270 if ( newValue ==
"delta" ) {
273 if ( newValue ==
"exponential" ) {
278 else if (command == fSetTrackSecondariesFirstCmd) {
280 fSetTrackSecondariesFirstCmd->
281 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 SetWLSTimeProfile(G4String)
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool)
void SetCandidates(const char *candidateList)
void SetDefaultValue(G4int defVal)
Rayleigh scattering process index.
G4OpticalPhysicsMessenger(G4OpticalPhysics *)