108{
109
110
111
112
114
115
116
117
118
119
120
121
122 G4double analogInteractionLength =
123 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
124 if ( analogInteractionLength > DBL_MAX/10. ) return 0;
125
126
127 G4double analogXS = 1./analogInteractionLength;
128
129
130
131
132 G4double XStransformation = 2.0 ;
133
134
136
137 G4VBiasingOperation* previousOperation = callingProcess->GetPreviousOccurenceBiasingOperation();
138
139
140
141
142
143
144
145
146
147
148
149
150 if ( previousOperation == 0 )
151 {
152 operation->SetBiasedCrossSection( XStransformation * analogXS );
153 operation->Sample();
154 }
155 else
156 {
157 if ( previousOperation != operation )
158 {
159
160 G4ExceptionDescription ed;
161 ed << " Logic problem in operation handling !" << G4endl;
162 G4Exception("GB01BOptrChangeCrossSection::ProposeOccurenceBiasingOperation(...)",
163 "exGB01.02",
164 JustWarning,
165 ed);
166 return 0;
167 }
168 if ( operation->GetInteractionOccured() )
169 {
170 operation->SetBiasedCrossSection( XStransformation * analogXS );
171 operation->Sample();
172 }
173 else
174 {
175
176
177 operation->UpdateForStep( callingProcess->GetPreviousStepSize() );
178
179 operation->SetBiasedCrossSection( XStransformation * analogXS );
180
181
182 operation->UpdateForStep( 0.0 );
183 }
184 }
185
186 return operation;
187
188}