File indexing completed on 2025-01-30 10:03:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef RandBreitWigner_h
0026 #define RandBreitWigner_h 1
0027
0028 #include "CLHEP/Random/defs.h"
0029 #include "CLHEP/Random/RandFlat.h"
0030 #include "CLHEP/Utility/memory.h"
0031
0032 namespace CLHEP {
0033
0034
0035
0036
0037
0038 class RandBreitWigner : public HepRandom {
0039
0040 public:
0041
0042 inline RandBreitWigner ( HepRandomEngine& anEngine, double a=1.0,
0043 double b=0.2 );
0044 inline RandBreitWigner ( HepRandomEngine* anEngine, double a=1.0,
0045 double b=0.2 );
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 virtual ~RandBreitWigner();
0056
0057
0058
0059
0060 static double shoot( double a=1.0, double b=0.2 );
0061
0062 static double shoot( double a, double b, double c );
0063
0064 static double shootM2( double a=1.0, double b=0.2 );
0065
0066 static double shootM2( double a, double b, double c );
0067
0068 static void shootArray ( const int size, double* vect);
0069
0070 static void shootArray ( const int size, double* vect,
0071 double a, double b );
0072
0073 static void shootArray ( const int size, double* vect,
0074 double a, double b, double c );
0075
0076
0077
0078
0079 static double shoot( HepRandomEngine* anEngine, double a=1.0,
0080 double b=0.2 );
0081 static double shoot( HepRandomEngine* anEngine, double a,
0082 double b, double c );
0083 static double shootM2( HepRandomEngine* anEngine, double a=1.0,
0084 double b=0.2 );
0085 static double shootM2( HepRandomEngine* anEngine, double a,
0086 double b, double c );
0087 static void shootArray ( HepRandomEngine* anEngine,
0088 const int size, double* vect );
0089 static void shootArray ( HepRandomEngine* anEngine,
0090 const int size, double* vect,
0091 double a, double b );
0092 static void shootArray ( HepRandomEngine* anEngine,
0093 const int size, double* vect,
0094 double a, double b, double c );
0095
0096
0097
0098
0099
0100
0101 double fire();
0102
0103 double fire( double a, double b );
0104
0105 double fire( double a, double b, double c );
0106
0107 double fireM2();
0108
0109 double fireM2( double a, double b );
0110
0111 double fireM2( double a, double b, double c );
0112
0113 void fireArray ( const int size, double* vect);
0114
0115 void fireArray ( const int size, double* vect,
0116 double a, double b );
0117
0118 void fireArray ( const int size, double* vect,
0119 double a, double b, double c );
0120 double operator()();
0121 double operator()( double a, double b );
0122 double operator()( double a, double b, double c );
0123
0124
0125
0126 std::ostream & put ( std::ostream & os ) const;
0127 std::istream & get ( std::istream & is );
0128
0129 std::string name() const;
0130 HepRandomEngine & engine();
0131
0132 static std::string distributionName() {return "RandBreitWigner";}
0133
0134
0135 private:
0136
0137 std::shared_ptr<HepRandomEngine> localEngine;
0138 double defaultA;
0139 double defaultB;
0140
0141 };
0142
0143 }
0144
0145 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0146
0147 using namespace CLHEP;
0148 #endif
0149
0150 #include "CLHEP/Random/RandBreitWigner.icc"
0151
0152 #endif