00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef RandBreitWigner_h
00034 #define RandBreitWigner_h 1
00035
00036 #include "RandFlat.h"
00037
00038 class RandBreitWigner : public HepRandom {
00039
00040 public:
00041
00042 inline RandBreitWigner ( HepRandomEngine& anEngine );
00043 inline RandBreitWigner ( HepRandomEngine* anEngine );
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 virtual ~RandBreitWigner();
00054
00055
00056
00057
00058 static HepDouble shoot( HepDouble a=1.0, HepDouble b=0.2 );
00059
00060 static HepDouble shoot( HepDouble a, HepDouble b, HepDouble c );
00061
00062 static HepDouble shootM2( HepDouble a=1.0, HepDouble b=0.2 );
00063
00064 static HepDouble shootM2( HepDouble a, HepDouble b, HepDouble c );
00065
00066 static void shootArray ( const HepInt size, HepDouble* vect,
00067 HepDouble a=1.0, HepDouble b=0.2, HepDouble c=1.0 );
00068
00069 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00070 static void shootArray ( vector<HepDouble>& vec, HepDouble a=1.0,
00071 HepDouble b=0.2, HepDouble c=1.0 );
00072 #else
00073 static void shootArray ( vector<HepDouble, allocator<HepDouble> >& vec,
00074 HepDouble a=1.0,
00075 HepDouble b=0.2, HepDouble c=1.0 );
00076 #endif
00077
00078
00079
00080 static HepDouble shoot( HepRandomEngine* anEngine, HepDouble a=1.0,
00081 HepDouble=0.2 );
00082 static HepDouble shoot( HepRandomEngine* anEngine, HepDouble a,
00083 HepDouble b, HepDouble c );
00084 static HepDouble shootM2( HepRandomEngine* anEngine, HepDouble a=1.0,
00085 HepDouble b=0.2 );
00086 static HepDouble shootM2( HepRandomEngine* anEngine, HepDouble a,
00087 HepDouble b, HepDouble c );
00088 static void shootArray ( HepRandomEngine* anEngine,
00089 const HepInt size, HepDouble* vect,
00090 HepDouble a=1.0, HepDouble b=0.2, HepDouble c=1.0 );
00091 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00092 static void shootArray ( HepRandomEngine*,
00093 vector<HepDouble>&, HepDouble a=1.0,
00094 HepDouble b=0.2, HepDouble c=1.0 );
00095 #else
00096 static void shootArray ( HepRandomEngine*,
00097 vector<HepDouble, allocator<HepDouble> >&,
00098 HepDouble a=1.0,
00099 HepDouble b=0.2, HepDouble c=1.0 );
00100 #endif
00101
00102
00103
00104 HepDouble fire( HepDouble a=1.0, HepDouble b=0.2 );
00105
00106 HepDouble fire( HepDouble a, HepDouble b, HepDouble c );
00107
00108 HepDouble fireM2( HepDouble a=1.0, HepDouble b=0.2 );
00109
00110 HepDouble fireM2( HepDouble a, HepDouble b, HepDouble c );
00111
00112 void fireArray ( const HepInt size, HepDouble* vect,
00113 HepDouble a=1.0, HepDouble b=0.2, HepDouble c=1.0 );
00114 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00115 void fireArray ( vector<HepDouble>&,
00116 HepDouble a=1.0, HepDouble b=0.2, HepDouble c=1.0 );
00117 #else
00118 void fireArray ( vector<HepDouble, allocator<HepDouble> >&,
00119 HepDouble a=1.0, HepDouble b=0.2, HepDouble c=1.0 );
00120 #endif
00121 HepDouble operator()();
00122
00123 private:
00124
00125 HepRandomEngine* localEngine;
00126 HepBoolean deleteEngine;
00127
00128 };
00129
00130
00131
00132
00133
00134 inline RandBreitWigner::RandBreitWigner(HepRandomEngine & anEngine)
00135 : localEngine(&anEngine), deleteEngine(false) {}
00136
00137 inline RandBreitWigner::RandBreitWigner(HepRandomEngine * anEngine)
00138 : localEngine(anEngine), deleteEngine(true) {}
00139
00140 #endif