65 G4int WLSSteppingAction::maxRndmSave = 10000;
81 delete steppingMessenger;
90 G4int temp = counterEnd; counterEnd = 0;
return temp;
95 inline void WLSSteppingAction::saveRandomStatus(
G4String subDir) {
98 if (WLSSteppingAction::maxRndmSave == 0)
return;
103 G4String fileIn = randomNumberStatusDir +
"currentEvent.rndm";
105 std::ostringstream os;
110 G4String fileOut = randomNumberStatusDir + subDir + os.str();
112 G4String copCmd =
"/control/shell cp "+fileIn+
" "+fileOut;
115 WLSSteppingAction::maxRndmSave--;
142 thePrePVname = thePrePV->
GetName();
143 thePostPVname = thePostPV->
GetName();
166 G4int MAXofPostStepLoops =
171 for (
G4int i=0; i<MAXofPostStepLoops; i++) {
172 G4VProcess* fCurrentProcess = (*fPostStepDoItVector)[i];
174 if (opProcess) { theStatus = opProcess->
GetStatus();
break;}
179 if ( initGamma == -1 &&
190 initGamma = x * px + y * py;
192 initGamma = initGamma / std::sqrt(px*px + py*py) / std::sqrt(x*x + y*y);
194 initGamma = std::acos(initGamma*
rad);
196 if ( initGamma /
deg > 90.0) { initGamma = 180 *
deg - initGamma;}
215 isFiber = thePostPVname ==
"WLSFiber"
216 || thePostPVname ==
"Clad1"
217 || thePostPVname ==
"Clad2";
255 if (bounceLimit > 0 && counterBounce >= bounceLimit)
268 if ( thePrePVname ==
"WLSFiber") counterWLSBounce++;
270 else if ( thePrePVname ==
"Clad1") counterClad1Bounce++;
272 else if ( thePrePVname ==
"Clad2") counterClad2Bounce++;
301 if ( thePostPVname ==
"Mirror" )
310 if ( thePostPVname ==
"PhotonDet" ) {