Geant4  10.02.p01
G4MTRandBit.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id:$
28 //
29 // Class G4MTRandBit
30 //
31 // Modified version with MT extensions
32 // of corresponding CLHEP class RandBit
33 
34 // --------------------------------------------------------------------
35 #ifndef G4MTRandBit_h
36 #define G4MTRandBit_h 1
37 
38 #include "G4MTRandFlat.hh"
39 
40 class G4MTRandBit : public G4MTRandFlat
41 {
42 
43 public:
44 
45  inline G4MTRandBit ( CLHEP::HepRandomEngine& anEngine );
46  inline G4MTRandBit ( CLHEP::HepRandomEngine& anEngine, G4double width );
47  inline G4MTRandBit ( CLHEP::HepRandomEngine& anEngine, G4double a, G4double b );
48  inline G4MTRandBit ( CLHEP::HepRandomEngine* anEngine );
49  inline G4MTRandBit ( CLHEP::HepRandomEngine* anEngine, G4double width );
50  inline G4MTRandBit ( CLHEP::HepRandomEngine* anEngine, G4double a, G4double b );
51  // These constructors should be used to instantiate a G4MTRandBit
52  // distribution object defining a local engine for it.
53  // The static generator will be skipped using the non-static methods
54  // defined below.
55  // If the engine is passed by pointer the corresponding engine object
56  // will be deleted by the G4MTRandBit destructor.
57  // If the engine is passed by reference the corresponding engine object
58  // will not be deleted by the G4MTRandBit destructor.
59 
60  virtual ~G4MTRandBit();
61  // Destructor
62 
63  // Other than the Bit routines, constructors, and destructor, everything is
64  // simply inherited from RandFlat.
65 
66  static G4int shootBit();
67 
68  static G4int shootBit( CLHEP::HepRandomEngine* );
69 
70  // Methods using the localEngine to shoot random values, by-passing
71  // the static generator.
72 
73  inline G4int fireBit();
74 
75 };
76 
77 #include "G4MTRandBit.icc"
78 
79 #endif
G4MTRandBit(CLHEP::HepRandomEngine &anEngine)
#define width
G4double a
Definition: TRTMaterials.hh:39
int G4int
Definition: G4Types.hh:78
virtual ~G4MTRandBit()
G4int fireBit()
double G4double
Definition: G4Types.hh:76
static G4int shootBit()