Message: Is random engine used in AnaEx01? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Is random engine used in AnaEx01? 

Forum: Documentation and Examples
Date: 26 Jan, 2010
From: Neoh <Neoh>

Hi,

I'm just beginning to learn about random engine and I have two questions. I'm running AnaEx01. I saw the line 67 of AnaEx01.cc:

CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);

but i did not see where is it called in other cc files. If I comment out this line the program gives the same result, seems like it runs just fine without it.

My first question is: Is the random engine being called in AnaEx01?


The other place where I notice randomization is used is in GeneratePrimaries() in AnaEx01PrimaryGeneratorAction.cc, I guess maybe random engine is used here. I change rndmFlag("off") to rndmFlag("on"), then recompile everything. The results for mean and rms is different this time, but if I rerun it will give identical results again.

My second question is: If I turn on rndmFlags, Should the program behave like this, where results will be different upon first compilation but identical results after that in every run?

Thanks


Neoh

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Is random engine used in AnaEx01?   (Neoh - 27 Jan, 2010)
1 Disagree: Re: Is random engine used in AnaEx01?   (Neoh - 28 Jan, 2010)
2 More: Re: Is random engine used in AnaEx01?   (Gabriele Cosmo - 29 Jan, 2010)
 Add Message Add Message
to: "Is random engine used in AnaEx01?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]