FairRoot/PandaRoot
Functions
mzfunctions_pp_to_leplep_vandewi.cxx File Reference
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include "ranlxs.h"
#include "ranlxd.h"
#include "mzparameters.h"
#include "mzfunctions.h"
#include "mzfunctions_pp_to_leplep_vandewi.h"

Go to the source code of this file.

Functions

void ranlxs (float r[], int n)
 
void ranlxd (double r[], int n)
 
void rlxs_init (int level, int seed)
 
void rlxd_init (int level, int seed)
 
void mz_pp_to_leplep_vandewi_init (int seed, int particle_flag, double P, double GE_to_GM, double cos_theta_min, double cos_theta_max)
 
double mz_pp_to_leplep_vandewi_sigma (int particle_flag, double P, double GE, double GM, double cos_theta)
 
double mz_pp_to_leplep_vandewi_sigma_nonorm (int particle_flag, double P, double GE_to_GM, double cos_theta)
 
void mz_pp_to_leplep_vandewi_event (int particle_flag, double P, double GE_to_GM, double cos_theta_min, double cos_theta_max, double *lepplus_p, double *lepminus_p)
 

Function Documentation

void mz_pp_to_leplep_vandewi_event ( int  particle_flag,
double  P,
double  GE_to_GM,
double  cos_theta_min,
double  cos_theta_max,
double *  lepplus_p,
double *  lepminus_p 
)

function mz_pp_to_leplep_vandewi_event

INPUT: particle_flag: 0=electron, 1=muon, 2=tau P: anti-proton momentum (lab frame) [GeV] GE_to_GM: ratio |G_E|/|G_M| cos_theta_min: cos(theta*) minimum; theta*=angle(lep-,pbar) CMS frame cos_theta_max: cos(theta*) maximum

OUTPUT:

lepplus_p: 4-momentum lep+ lab frame lepminus_p: 4-momentum lep- lab frame

Definition at line 331 of file mzfunctions_pp_to_leplep_vandewi.cxx.

References acos(), cos(), fabs(), i, max(), me, mmu, mp, mtau, mz_pp_to_leplep_vandewi_sigma_nonorm(), mzboost(), mzrnd(), mzvmod2(), P, phi, PI, R, sin(), theta, x, and y.

Referenced by PndLepLepGenerator::ReadEvent().

335 {
353  double M=mp; //proton mass
354  double PI=acos(-1.0);
355 
356  double p_p[4]; //lab frame: 4-mom p (proton target)
357  double pbar_p[4]; //lab frame: 4-mom pbar (anti-proton beam)
358  double pbarp_p[4]; //lab frame: 4-mom pbarpsystem
359  double E; //lab frame: energy pbar
360  double S; //invariant mass square pbarpsystem
361  double sqrt_S; //invariant mass pbarpsystem
362 
363  double mlepton; //lepton mass
364 
365  double tau; // q^2/(4M^2) M: proton mass
366  double beta_l; // sqrt{1-4m^2/s} m: lepton mass
367  double R; // |G_E|/|G_M|
368  double A; // beta_l^2[1-R^2/tau] / ( 2-beta_l^2 + R^2/tau )
369 
370  int flag;
371  double x,y;
372  double max;
373  double prob;
374  double costheta, theta, phi;
375 
376  double lepplus_pcm[4]; //CMS frame: 4-mom lepton+
377  double lepminus_pcm[4]; //CMS frame: 4-mom lepton-
378 
379 
380  //set the lepton mass
381  if(particle_flag==0) mlepton=me;
382  if(particle_flag==1) mlepton=mmu;
383  if(particle_flag==2) mlepton=mtau;
384 
385 
386  //initial state kinematic
387 
388  //4-mom of p (lab frame)
389  p_p[0]=M;
390  p_p[1]=0.;
391  p_p[2]=0.;
392  p_p[3]=0.;
393 
394  //4-mom of pbar (lab frame)
395  E=pow((P*P+M*M),0.5);
396 
397  pbar_p[0]=E;
398  pbar_p[1]=0.;
399  pbar_p[2]=0.;
400  pbar_p[3]=P;
401 
402  //4-mom pbarpsystem (lab frame)
403  for(int i=0; i<4; i++){
404  pbarp_p[i]=p_p[i]+pbar_p[i];
405  }
406 
407  //invariant mass pbarpsystem (cms energy)
408  S=mzvmod2(4,pbarp_p);
409  sqrt_S=pow(S,0.5);
410 
411 
412  //get upper bound to non-normalized cross section
413  tau=S/(4.0*M*M);
414  beta_l=pow(1.0-4.0*mlepton*mlepton/S,0.5);
415  R=GE_to_GM;
416  A=( beta_l*beta_l*(1.0-R*R/tau) )/( 2.0-beta_l*beta_l + R*R/tau );
417  max=1.0 + fabs(A);
418 
419 
420  flag=0;
421 
422  while(flag==0){
423  x=mzrnd(cos_theta_min,cos_theta_max); //random cos(theta*) in range [cos_theta_min,cos_theta_max]
424  y=mzrnd(0.0,max); //random in range [0.0,upper bound to the cross section]
425  prob=mz_pp_to_leplep_vandewi_sigma_nonorm(particle_flag,P,GE_to_GM,x); //cross section at generated cos(theta*)
426 
427  if(y<prob){ //accept event
428  flag=1;
429 
430  costheta=x;
431  if(costheta > 1.0) costheta=1.0; //just make sure about range...
432  if(costheta < -1.0) costheta=-1.0;
433  theta=acos(costheta); //theta* lepton- in [0,PI]
434  phi=mzrnd(0.0,2.0*PI); //phi lepton- in [0,2.0*PI]
435 
436  //build lepton- 4-momentum in CMS frame
437  lepminus_pcm[0]=sqrt_S/2.0;
438  lepminus_pcm[1]=pow(S/4.0-mlepton*mlepton,0.5)*sin(theta)*cos(phi);
439  lepminus_pcm[2]=pow(S/4.0-mlepton*mlepton,0.5)*sin(theta)*sin(phi);
440  lepminus_pcm[3]=pow(S/4.0-mlepton*mlepton,0.5)*cos(theta);
441 
442  //build lepton+ 4-momentum in CMS frame
443  lepplus_pcm[0]=lepminus_pcm[0];
444  lepplus_pcm[1]=-1.0*lepminus_pcm[1];
445  lepplus_pcm[2]=-1.0*lepminus_pcm[2];
446  lepplus_pcm[3]=-1.0*lepminus_pcm[3];
447 
448  //boost lep+ and lep- 4-momenta to lab frame
449  mzboost(1,pbarp_p,lepplus_pcm,lepplus_p);
450  mzboost(1,pbarp_p,lepminus_pcm,lepminus_p);
451  }
452 
453  }
454 
455 
456 }
friend F32vec4 acos(const F32vec4 &a)
Definition: P4_F32vec4.h:113
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Int_t i
Definition: run_full.C:25
static const double me
Definition: mzparameters.h:12
double mzvmod2(int n, double *p)
Definition: mzfunctions.cxx:93
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
static const double mmu
Definition: mzparameters.h:13
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
static const double mp
Definition: mzparameters.h:11
double mzrnd(double a, double b)
double mz_pp_to_leplep_vandewi_sigma_nonorm(int particle_flag, double P, double GE_to_GM, double cos_theta)
static const double mtau
Definition: mzparameters.h:14
const Double_t PI
void mzboost(int flag, double *p, double *q, double *q_prime)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
GeV c P
Double_t x
Double_t y
Double_t R
Definition: checkhelixhit.C:61
void mz_pp_to_leplep_vandewi_init ( int  seed,
int  particle_flag,
double  P,
double  GE_to_GM,
double  cos_theta_min,
double  cos_theta_max 
)

function mz_pp_to_leplep_vandewi_init

INPUT:

seed -> RANLUX seed particle_flag -> 0=electron, 1=muon, 2=tau P -> anti-proton momentum (lab frame) [GeV] GE_to_GM -> ratio |G_E|/|G_M| cos_theta_min -> cos(theta*) minimum; theta*=angle(lep-,pbar) CMS frame cos_theta_max -> cos_theta_max: cos(theta*) maximum

OUTPUT:

without output

DESCRIPTION:

function mz_pp_to_leplep_vandewi_init checks the values of all arguments, killing the job if at least one value lies outside its allowed range. In case of tau production, it determines compatibility with the input antiproton momentum, killing the job if the proton-antiproton center-of-mass energy does not reach the threshold for tau production. Kinematic information is printed out to the log file. RANLUX is initialised.

Definition at line 30 of file mzfunctions_pp_to_leplep_vandewi.cxx.

References exit(), mp, mtau, printf(), and rlxd_init().

Referenced by PndLepLepGenerator::Init().

33 {
62  double P_PANDA_THRESHOLD=1.5; //pbar momentum threshold in PANDA
63  double P_PANDA_UP=15.0; //pbar momentum upper limit in PANDA
64 
65  double M=mp; //proton mass
66 
67  double E; //lab frame: pbar energy
68  double S; //center-of-mass energy squared of pbarpsystem
69  double sqrt_S; //center-of-mass energy of pbarpsystem
70  double S_min; //threshold for tau+tau- production: center-of-mass energy squared of pbarpsystem
71  double E_min; //threshold for tau+tau- production: (lab frame) pbar energy
72  double P_min; //threshold for tau+tau- production: (lab frame) pbar momentum
73 
74  //checking parameter range...
75 
76  if( (seed<1)||(seed>2147483647) ){
77  printf("ERROR: RANLUX seed out of range: \n");
78  printf(" => RANLUX seed should be contained within [1,2^31-1]\n");
79  printf(" => job killed!!! \n");
80  printf("\n\n");
81  exit(1);
82  }
83 
84 
85  if( !( ( particle_flag==0)||( particle_flag==1)||( particle_flag==2) ) ){
86  printf("ERROR: particle flag out of range: \n");
87  printf(" => particle flag should be 0 (=electron), 1 (=muon) or 2 (=tau)\n");
88  printf(" => job killed!!! \n");
89  printf("\n\n");
90  exit(1);
91  }
92 
93 
94  if(P<0.0){
95  printf("ERROR: P (anti-proton momentum) out of range: \n");
96  printf(" => P should be a positive real number \n");
97  printf(" => job killed!!! \n");
98  printf("\n\n");
99  exit(1);
100  }
101 
102 
103  if(P<P_PANDA_THRESHOLD){
104  printf("WARNING: P (anti-proton momentum) smaller than PANDA threshold %4.2f GeV \n",
105  P_PANDA_THRESHOLD);
106  printf("\n\n");
107  }
108 
109 
110  if(P>P_PANDA_UP){
111  printf("WARNING: P (anti-proton momentum) larger than PANDA upper limit %4.2f GeV \n",
112  P_PANDA_UP);
113  printf("\n\n");
114  }
115 
116 
117  if(GE_to_GM<0.0){
118  printf("ERROR: |G_E|/|G_M| out of range: \n");
119  printf(" => |G_E|/|G_M| should be a positive real number \n");
120  printf(" => job killed!!! \n");
121  printf("\n\n");
122  exit(1);
123  }
124 
125 
126  if( !( (cos_theta_min>=-1.0)&&(cos_theta_max>cos_theta_min)&&(cos_theta_max<=1.0) ) ){
127  printf("ERROR: cos(theta*) range NOT allowed \n");
128  printf(" => cos(theta*) range [cos(theta*) min, cos(theta*) max]\n");
129  printf(" should be contained within [-1.0,1.0]\n");
130  printf(" => job killed!!! \n");
131  printf("\n\n");
132  exit(1);
133  }
134 
135 
136 
137  //initial state kinematics
138 
139 
140  //antiproton energy
141  E=pow((P*P+M*M),0.5);
142 
143 
144  //center-of-mass energy squared and center-of-mass energy of pbarpsystem
145  S=2.0*M*(M+E);
146  sqrt_S=pow(S,0.5);
147 
148 
149  //kinematic thershold for tau production
150  S_min=4.0*mtau*mtau;
151  E_min=S_min/(2.0*M)-M;
152  P_min=pow((E_min*E_min-M*M),0.5);
153 
154 
155  //check if tau production is possible
156  if( (particle_flag==2)&&(S<=S_min) ){
157  printf("ERROR: center of mass energy below threshold for tau+tau- production \n");
158  printf(" => tau+tau- production requires: \n");
159  printf(" center-of-mass energy squared s > 4.0*m_{tau}^2 = %4.2f GeV^2, i.e. \n", S_min);
160  printf(" antiproton energy E > %4.2f GeV, i.e. \n", E_min);
161  printf(" antiproton momentum P > %4.2f GeV \n", P_min);
162  printf(" => job killed!!! \n");
163  exit(1);
164  printf("\n\n");
165  }
166 
167  //print out kinematics
168  printf("Initial state kinematics\n");
169  printf("------------------------\n");
170  printf("\n");
171  printf("=> CM energy square: S = %5.2f GeV^2 \n", S);
172  printf(" CM energy: sqrt(S) = %5.2f GeV \n", sqrt_S);
173  printf("\n\n\n\n");
174 
175 
176  //initialize RANLUX
177  rlxd_init(1,seed);
178 
179 }
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
void rlxd_init(int level, int seed)
Definition: ranlxd.cxx:501
exit(0)
static const double mp
Definition: mzparameters.h:11
static const double mtau
Definition: mzparameters.h:14
unsigned int seed
GeV c P
double mz_pp_to_leplep_vandewi_sigma ( int  particle_flag,
double  P,
double  GE,
double  GM,
double  cos_theta 
)

function mz_pp_to_leplep_vandewi_sigma

INPUT: particle_flag: 0=electron, 1=muon, 2=tau P: anti-proton momentum (lab frame) [GeV] GE: |G_E| GM: |G_M| cos_theta: cos(theta*), theta*=angle(lep-,pbar) CMS frame

RETURNS:

value of the cross section d / d cos(theta*) [fb] for antiproton momentum P, electric and magnetic form factors GE_to_GM at the point cos_theta

Definition at line 183 of file mzfunctions_pp_to_leplep_vandewi.cxx.

References acos(), alpha_QED, hc2, me, mmu, mp, mtau, PI, and sigma.

185  {
205  double sigma;
206 
207  double hc2_units=hc2*1000000000000.0; //(hbar*c)^2 [fb*GeV^2]
208 
209  double PI=acos(-1.0);
210 
211  double M=mp; //proton mass
212  double mlepton; //lepton mass
213 
214  double E; //lab frame: pbar energy
215  double S; //center-of-mass-energy squared of pbarpsystem
216 
217  double tau; // q^2/(4M^2) M: proton mass
218  double beta_l; // sqrt{1-4m^2/s} m: lepton mass
219  double beta_p; // sqrt{1-4M^2/s}
220 
221  double A_1, A_2, A_3, A_4; //kinematic factors
222 
223  double S_min; //threshold for tau+tau- production: center-of-mass energy squared of pbarpsystem
224 
225  //set the lepton mass
226  if(particle_flag==0) mlepton=me;
227  if(particle_flag==1) mlepton=mmu;
228  if(particle_flag==2) mlepton=mtau;
229 
230  //antiproton energy
231  E=pow((P*P+M*M),0.5);
232 
233  //center-of-mass-energy squared of pbarpsystem
234  S=2.0*M*(M+E);
235 
236  //kinematic factors
237  tau=S/(4.0*M*M);
238  beta_l=pow(1.0-4.0*mlepton*mlepton/S,0.5);
239  beta_p=pow(1.0-4.0*M*M/S,0.5);
240 
241  A_1 = hc2_units*PI*alpha_QED*alpha_QED/2.0;
242 
243  A_2 = beta_l/(beta_p*S);
244 
245  A_3 = (2.0 -beta_l*beta_l +beta_l*beta_l*cos_theta*cos_theta)*GM*GM;
246 
247  A_4 = (1.0/tau)*(1.0 -beta_l*beta_l*cos_theta*cos_theta)*GE*GE;
248 
249  //calculate cross section
250  sigma = A_1*A_2*(A_3+A_4);
251 
252  //return null value for tau production below threshold
253  S_min=4.0*mtau*mtau;
254  if( (particle_flag==2)&&(S<=S_min) ) sigma=0.0;
255 
256  return sigma;
257 }
friend F32vec4 acos(const F32vec4 &a)
Definition: P4_F32vec4.h:113
static const double me
Definition: mzparameters.h:12
Double_t sigma[nsteps]
Definition: dedx_bands.C:65
static const double mmu
Definition: mzparameters.h:13
static const double mp
Definition: mzparameters.h:11
static const double mtau
Definition: mzparameters.h:14
const Double_t PI
static const double hc2
Definition: mzparameters.h:25
static const double alpha_QED
Definition: mzparameters.h:23
GeV c P
float GM[1000]
double mz_pp_to_leplep_vandewi_sigma_nonorm ( int  particle_flag,
double  P,
double  GE_to_GM,
double  cos_theta 
)

function mz_pp_to_leplep_vandewi_sigma_nonorm

INPUT: particle_flag: 0=electron, 1=muon, 2=tau P: anti-proton momentum (lab frame) [GeV] GE_to_GM: ratio |G_E|/|G_M| cos_theta: cos(theta*), theta*=angle(lep-,pbar) CMS frame

RETURNS:

value of the non-normalized cross section d / d cos(theta*) for antiproton momentum P and and ratio GE_to_GM at the point cos_theta

the non-normalized cross section is

d sigma / d cos(theta*) ~ 1 + A*cos(theta*), with

A = beta_l^2[1-R^2/tau] / ( 2-beta_l^2 + R^2/tau ), where

beta_l = sqrt{1-4m^2/s} m: lepton mass tau = q^2/(4M^2) M: proton mass

Definition at line 263 of file mzfunctions_pp_to_leplep_vandewi.cxx.

References me, mmu, mp, mtau, R, and sigma.

Referenced by mz_pp_to_leplep_vandewi_event().

265  {
290  double sigma;
291 
292  double M=mp; //proton mass
293  double mlepton; //lepton mass
294 
295  double E; //lab frame: pbar energy
296  double S; //center-of-mass-energy squared of pbarpsystem
297 
298  double tau; // q^2/(4M^2) M: proton mass
299  double beta_l; // sqrt{1-4m^2/s} m: lepton mass
300  double R; // |G_E|/|G_M|
301  double A; // beta_l^2[1-R^2/tau] / ( 2-beta_l^2 + R^2/tau )
302 
303 
304  //set the lepton mass
305  if(particle_flag==0) mlepton=me;
306  if(particle_flag==1) mlepton=mmu;
307  if(particle_flag==2) mlepton=mtau;
308 
309  //antiproton energy
310  E=pow((P*P+M*M),0.5);
311 
312  //center-of-mass-energy squared of pbarpsystem
313  S=2.0*M*(M+E);
314 
315  //kinematic factors
316  tau=S/(4.0*M*M);
317  beta_l=pow(1.0-4.0*mlepton*mlepton/S,0.5);
318  R=GE_to_GM;
319  A=( beta_l*beta_l*(1.0-R*R/tau) )/( 2.0-beta_l*beta_l + R*R/tau );
320 
321  //cross section
322  sigma = 1.0 +A*cos_theta*cos_theta;
323 
324  return sigma;
325 }
static const double me
Definition: mzparameters.h:12
Double_t sigma[nsteps]
Definition: dedx_bands.C:65
static const double mmu
Definition: mzparameters.h:13
static const double mp
Definition: mzparameters.h:11
static const double mtau
Definition: mzparameters.h:14
GeV c P
Double_t R
Definition: checkhelixhit.C:61
void ranlxd ( double  r[],
int  n 
)

Definition at line 571 of file ranlxd.cxx.

572 {
573  int k;
574 
575  if (init==0)
576  rlxd_init(1,1);
577 
578  for (k=0;k<n;k++)
579  {
580  is=next[is];
581  if (is==is_old)
582  update();
583  r[k]=one_bit*((double)(x.num[is+4])+one_bit*(double)(x.num[is]));
584  }
585 }
void rlxd_init(int level, int seed)
Definition: ranlxd.cxx:501
double r
Definition: RiemannTest.C:14
static double one_bit
Definition: ranlxd.cxx:375
static void update(void)
Definition: ranlxd.cxx:453
int n
static int init
Definition: ranlxd.cxx:374
static int is
Definition: ranlxd.cxx:374
Double_t x
static int is_old
Definition: ranlxd.cxx:374
static int next[96]
Definition: ranlxd.cxx:374
void ranlxs ( float  r[],
int  n 
)
Author
Manuel Zambrana zambr.nosp@m.ana@.nosp@m.kph.u.nosp@m.ni-m.nosp@m.ainz..nosp@m.de and Dmitry Khaneftd khane.nosp@m.ftd@.nosp@m.kph.u.nosp@m.ni-m.nosp@m.ainz..nosp@m.de

Mainz, May 2011

Definition at line 566 of file ranlxs.cxx.

567 {
568  int k;
569 
570  if (init==0)
571  rlxs_init(0,1);
572 
573  for (k=0;k<n;k++)
574  {
575  is=next[is];
576  if (is==is_old)
577  update();
578  r[k]=one_bit*(float)(x.num[is]);
579  }
580 }
double r
Definition: RiemannTest.C:14
static float one_bit
Definition: ranlxs.cxx:373
int n
static int is_old
Definition: ranlxs.cxx:372
static int init
Definition: ranlxd.cxx:374
static int is
Definition: ranlxs.cxx:372
Double_t x
static void update(void)
Definition: ranlxs.cxx:451
void rlxs_init(int level, int seed)
Definition: ranlxs.cxx:495
static int next[96]
Definition: ranlxs.cxx:372
void rlxd_init ( int  level,
int  seed 
)

Definition at line 501 of file ranlxd.cxx.

502 {
503  int i,k,l;
504  int ibit,jbit,xbit[31];
505  int ix,iy;
506 
507  if ((INT_MAX<2147483647)||(FLT_RADIX!=2)||(FLT_MANT_DIG<24)||
508  (DBL_MANT_DIG<48))
509  error(0);
510 
512 
513  if (level==1)
514  pr=202;
515  else if (level==2)
516  pr=397;
517  else
518  error(1);
519 
520  i=seed;
521 
522  for (k=0;k<31;k++)
523  {
524  xbit[k]=i%2;
525  i/=2;
526  }
527 
528  if ((seed<=0)||(i!=0))
529  error(2);
530 
531  ibit=0;
532  jbit=18;
533 
534  for (i=0;i<4;i++)
535  {
536  for (k=0;k<24;k++)
537  {
538  ix=0;
539 
540  for (l=0;l<24;l++)
541  {
542  iy=xbit[ibit];
543  ix=2*ix+iy;
544 
545  xbit[ibit]=(xbit[ibit]+xbit[jbit])%2;
546  ibit=(ibit+1)%31;
547  jbit=(jbit+1)%31;
548  }
549 
550  if ((k%4)!=i)
551  ix=16777215-ix;
552 
553  x.num[4*k+i]=ix;
554  }
555  }
556 
557  carry.c1=0;
558  carry.c2=0;
559  carry.c3=0;
560  carry.c4=0;
561 
562  ir=0;
563  jr=7;
564  is=91;
565  is_old=0;
566  prm=pr%12;
567  init=1;
568 }
static int jr
Definition: ranlxd.cxx:374
static int prm
Definition: ranlxd.cxx:374
Int_t i
Definition: run_full.C:25
int c2
Definition: ranlxd.cxx:366
int c4
Definition: ranlxd.cxx:366
static void error(int no)
Definition: ranlxd.cxx:419
static int init
Definition: ranlxd.cxx:374
int c3
Definition: ranlxd.cxx:366
unsigned int seed
int c1
Definition: ranlxd.cxx:366
static void define_constants(void)
Definition: ranlxd.cxx:486
static int is
Definition: ranlxd.cxx:374
Double_t x
static int is_old
Definition: ranlxd.cxx:374
static vec_t carry
Definition: ranlxd.cxx:376
static int pr
Definition: ranlxd.cxx:374
static int ir
Definition: ranlxd.cxx:374
void rlxs_init ( int  level,
int  seed 
)

Definition at line 495 of file ranlxs.cxx.

496 {
497  int i,k,l;
498  int ibit,jbit,xbit[31];
499  int ix,iy;
500 
501  if ((INT_MAX<2147483647)||(FLT_RADIX!=2)||(FLT_MANT_DIG<24))
502  error(0);
503 
505 
506  if (level==0)
507  pr=109;
508  else if (level==1)
509  pr=202;
510  else if (level==2)
511  pr=397;
512  else
513  error(1);
514 
515  i=seed;
516 
517  for (k=0;k<31;k++)
518  {
519  xbit[k]=i%2;
520  i/=2;
521  }
522 
523  if ((seed<=0)||(i!=0))
524  error(2);
525 
526  ibit=0;
527  jbit=18;
528 
529  for (i=0;i<4;i++)
530  {
531  for (k=0;k<24;k++)
532  {
533  ix=0;
534 
535  for (l=0;l<24;l++)
536  {
537  iy=xbit[ibit];
538  ix=2*ix+iy;
539 
540  xbit[ibit]=(xbit[ibit]+xbit[jbit])%2;
541  ibit=(ibit+1)%31;
542  jbit=(jbit+1)%31;
543  }
544 
545  if ((k%4)==i)
546  ix=16777215-ix;
547 
548  x.num[4*k+i]=ix;
549  }
550  }
551 
552  carry.c1=0;
553  carry.c2=0;
554  carry.c3=0;
555  carry.c4=0;
556 
557  ir=0;
558  jr=7;
559  is=95;
560  is_old=0;
561  prm=pr%12;
562  init=1;
563 }
Int_t i
Definition: run_full.C:25
static int prm
Definition: ranlxs.cxx:372
static int ir
Definition: ranlxs.cxx:372
int c2
Definition: ranlxd.cxx:366
static int is_old
Definition: ranlxs.cxx:372
int c4
Definition: ranlxd.cxx:366
static int init
Definition: ranlxd.cxx:374
static int is
Definition: ranlxs.cxx:372
static void define_constants(void)
Definition: ranlxs.cxx:484
int c3
Definition: ranlxd.cxx:366
static void error(int no)
Definition: ranlxs.cxx:417
static int jr
Definition: ranlxs.cxx:372
unsigned int seed
static vec_t carry
Definition: ranlxs.cxx:374
int c1
Definition: ranlxd.cxx:366
static int pr
Definition: ranlxs.cxx:372
Double_t x