Add option to specify number of events to select.#76
Conversation
…using newer CMAKE versions
… gRandom->TRandom::GetSeed() / gRandom->TRandom::SetSeed()
|
After some digging, it seems that I can reproduce some issues specifically using a version of rapidsim that is installed within the lb-conda environment One issue that I observe nonetheless is that it is impossible to have seeded behaviour with this bug, as the set seed will always be 624. The other issue I am observing using lb-conda is that I would generate 2 unseeded samples of B0->D*enu decays with EvtGen, giving me some momenta distributions in the lab frame that seemed independent, but after boosting all particles to the B0 rest frame, the momenta were the same in both samples (as in event i of sample 1 has exact same momentum as event i of sample 2). This issue does not seem to happen with RapidSim compiled by hand in an environment that has EvtGen. For this study I used LCG_104c. |
|
@dcraik @gcowan Could it be possible to merge in order to propagate the changes to lb-conda? |
…of event to select is reached.
|
Issue with Random number generator seed has been fixed in #77 but this has also nice new feature to terminate generation after specified number of events are selected. Thus after fixing conflicts I renamed PR and accept this. |
A bug with
gRandom->SetSeed(x)andgRandom->GetSeed()was introduced in ROOT 6.24/00 , which causes issues with seeded (an unseeded) generation.Using evtgen yields the same distribution before rapidsim smearing/boosting as the effectively retrieved seed is always
624instead of a random number (expected fromgRandom->SetSeed(0))Breakdown of the issue (using ROOT 6.28/10):
When setting a seed, the requested seed would not be registered:
And
SetSeed(0)works as expected:But not setting a seed returns
624:which I believe is causing RapidSim to have some unseeded behaviour and some seeded, yielding seemingly independent samples that have, in fact, the same underlying kinematics. I am not 100% sure of my claim but this is what I observed in my samples.
The proposed fix is to call
GetSeed()andSetSeed()usingTRandom:::