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) {
205 Configure(fSelectedProcessIndex,
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));
@ kWLS
Wave Length Shifting process index.
@ kScintillation
Scintillation process index.
@ kRayleigh
Rayleigh scattering process index.
@ kAbsorption
Absorption process index.
@ kBoundary
Boundary process index.
@ kNoProcess
Number of processes, no selected process.
@ kCerenkov
Cerenkov process index.
@ kMieHG
Mie scattering process index.
G4String G4OpticalProcessName(G4int)
Return the name for a given optical process index.
virtual void SetNewValue(G4UIcommand *, G4String)
virtual ~G4OpticalPhysicsMessenger()
G4OpticalPhysicsMessenger(G4OpticalPhysics *)
void SetMaxBetaChangePerStep(G4double)
void SetScintillationYieldFactor(G4double)
void SetScintillationByParticleType(G4bool)
void SetMaxNumPhotonsPerStep(G4int)
void SetTrackSecondariesFirst(G4OpticalProcessIndex, G4bool)
void SetWLSTimeProfile(G4String)
void SetFiniteRiseTime(G4bool)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)