Skip to content
Snippets Groups Projects
Commit b62e6729 authored by Matthias Steinke's avatar Matthias Steinke
Browse files

added a seed in EvtSimpleRandomEngine and cleaned up things

parent 389699bf
No related branches found
No related tags found
No related merge requests found
//--------------------------------------------------------------------------
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an appropriate acknowledgement.
//
// Copyright Information: See EvtGen/COPYRIGHT
// Copyright (C) 1998 Caltech, UCSB
//
// Module: EvtRandomEngine.cc
//
// Description: routines to generate random numbers
// really trivial random number
// implementation.
//
// Modification history:
//
// RYD December 25, 1999 Module created
//
//------------------------------------------------------------------------
//
#include <stdio.h>
#include <math.h>
#include <iostream>
#include "PspGen/EvtRandomEngine.hh"
double EvtRandomEngine::random(){
static unsigned long int next = 1;
next=next*1103515245+123345;
unsigned temp=(unsigned)(next/65536) % 32768;
return ( temp + 1.0 ) / 32769.0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment