Message: Re: How does work the method G4BooleanRand() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: How does work the method G4BooleanRand() 

Forum: Documentation and Examples
Re: Question How does work the method G4BooleanRand() (Nuno Fiuza de Barros)
Date: 14 Feb, 2003
From: Gumplinger Peter <Gumplinger Peter>

This is the code for G4BooleanRand in include/G4OpBoundaryProcess.hh

inline
G4bool G4OpBoundaryProcess::G4BooleanRand(const G4double prob) const
{
  /* Returns a random boolean variable with the specified probability */

return (G4UniformRand() < prob); }

i.e. it returns always TRUE for prob=1. So, since the reflectivity is 100% (=1), the code (DoAbsorption) is not executed.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: How does work the method G4BooleanRand()"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]