```/*****************************************************************************
* Project: RooFit                                                           *
* Package: RooFitCore                                                       *
*    File: \$Id: RooQuasiRandomGenerator.h,v 1.7 2007/05/11 09:11:30 verkerke Exp \$
* Authors:                                                                  *
*   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
*   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
*                                                                           *
* Copyright (c) 2000-2005, Regents of the University of California          *
*                                                                           *
* Redistribution and use in source and binary forms,                        *
* with or without modification, are permitted according to the terms        *
*****************************************************************************/
#ifndef ROO_QUASI_RANDOM_GENERATOR
#define ROO_QUASI_RANDOM_GENERATOR

#include "Rtypes.h"

class RooQuasiRandomGenerator {
public:
RooQuasiRandomGenerator();
virtual ~RooQuasiRandomGenerator();
void reset();
Bool_t generate(UInt_t dimension, Double_t vector[]);
enum { MaxDimension = 12 , NBits = 31 , MaxDegree = 50 , MaxPrimitiveDegree = 5 };
protected:
void calculateCoefs(UInt_t dimension);
void calculateV(const int px[], int px_degree,
int pb[], int * pb_degree, int v[], int maxv);
void polyMultiply(const int pa[], int pa_degree, const int pb[],
int pb_degree, int pc[], int  * pc_degree);
// Z_2 field operations
inline Int_t add(Int_t x, Int_t y) const { return (x+y)%2; }
inline Int_t mul(Int_t x, Int_t y) const { return (x*y)%2; }
inline Int_t sub(Int_t x, Int_t y) const { return add(x,y); }
private:
Int_t *_nextq;
Int_t _sequenceCount;

static Bool_t _coefsCalculated;
static Int_t _cj[NBits][MaxDimension];
static const Int_t _primitivePoly[MaxDimension+1][MaxPrimitiveDegree+1];
static const Int_t _polyDegree[MaxDimension+1];

ClassDef(RooQuasiRandomGenerator,0) // Quasi-random number generator
};

#endif

```
RooQuasiRandomGenerator.h:1
RooQuasiRandomGenerator.h:2
RooQuasiRandomGenerator.h:3
RooQuasiRandomGenerator.h:4
RooQuasiRandomGenerator.h:5
RooQuasiRandomGenerator.h:6
RooQuasiRandomGenerator.h:7
RooQuasiRandomGenerator.h:8
RooQuasiRandomGenerator.h:9
RooQuasiRandomGenerator.h:10
RooQuasiRandomGenerator.h:11
RooQuasiRandomGenerator.h:12
RooQuasiRandomGenerator.h:13
RooQuasiRandomGenerator.h:14
RooQuasiRandomGenerator.h:15
RooQuasiRandomGenerator.h:16
RooQuasiRandomGenerator.h:17
RooQuasiRandomGenerator.h:18
RooQuasiRandomGenerator.h:19
RooQuasiRandomGenerator.h:20
RooQuasiRandomGenerator.h:21
RooQuasiRandomGenerator.h:22
RooQuasiRandomGenerator.h:23
RooQuasiRandomGenerator.h:24
RooQuasiRandomGenerator.h:25
RooQuasiRandomGenerator.h:26
RooQuasiRandomGenerator.h:27
RooQuasiRandomGenerator.h:28
RooQuasiRandomGenerator.h:29
RooQuasiRandomGenerator.h:30
RooQuasiRandomGenerator.h:31
RooQuasiRandomGenerator.h:32
RooQuasiRandomGenerator.h:33
RooQuasiRandomGenerator.h:34
RooQuasiRandomGenerator.h:35
RooQuasiRandomGenerator.h:36
RooQuasiRandomGenerator.h:37
RooQuasiRandomGenerator.h:38
RooQuasiRandomGenerator.h:39
RooQuasiRandomGenerator.h:40
RooQuasiRandomGenerator.h:41
RooQuasiRandomGenerator.h:42
RooQuasiRandomGenerator.h:43
RooQuasiRandomGenerator.h:44
RooQuasiRandomGenerator.h:45
RooQuasiRandomGenerator.h:46
RooQuasiRandomGenerator.h:47
RooQuasiRandomGenerator.h:48
RooQuasiRandomGenerator.h:49
RooQuasiRandomGenerator.h:50
RooQuasiRandomGenerator.h:51
RooQuasiRandomGenerator.h:52