File indexing completed on 2025-01-18 09:54:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef RandSkewNormal_h
0022 #define RandSkewNormal_h 1
0023
0024 #include "CLHEP/Random/defs.h"
0025 #include "CLHEP/Random/Random.h"
0026 #include "CLHEP/Utility/memory.h"
0027
0028 namespace CLHEP {
0029
0030
0031
0032
0033
0034 class RandSkewNormal : public HepRandom {
0035
0036 public:
0037
0038 inline RandSkewNormal ( HepRandomEngine& anEngine, double shape=0. );
0039 inline RandSkewNormal ( HepRandomEngine* anEngine, double shape=0. );
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 virtual ~RandSkewNormal();
0050
0051
0052
0053
0054 static double shoot();
0055
0056 static double shoot( double shape );
0057
0058 static void shootArray ( const int size, double* vect,
0059 double shape=0. );
0060
0061
0062
0063
0064 static double shoot( HepRandomEngine* anEngine );
0065
0066 static double shoot( HepRandomEngine* anEngine, double shape );
0067
0068 static void shootArray ( HepRandomEngine* anEngine, const int size,
0069 double* vect, double shape=0. );
0070
0071
0072
0073
0074 double fire();
0075
0076 double fire( double shape );
0077
0078 void fireArray ( const int size, double* vect );
0079 void fireArray ( const int size, double* vect, double shape );
0080
0081 double operator()();
0082 double operator()( double shape );
0083
0084
0085
0086 std::ostream & put ( std::ostream & os ) const;
0087 std::istream & get ( std::istream & is );
0088
0089 std::string name() const;
0090 HepRandomEngine & engine();
0091
0092 static std::string distributionName() {return "RandSkewNormal";}
0093
0094
0095 protected:
0096
0097 static double gaussianSkewNormal ( HepRandomEngine *e, double k);
0098 double getShapeParameter() { return shapeParameter; }
0099
0100 inline HepRandomEngine* getLocalEngine();
0101
0102 private:
0103
0104 shared_ptr<HepRandomEngine> localEngine;
0105 double shapeParameter;
0106
0107 };
0108
0109 }
0110
0111 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0112
0113 using namespace CLHEP;
0114 #endif
0115
0116 #include "CLHEP/Random/RandSkewNormal.icc"
0117
0118 #endif