Project

General

Profile

Bug #1290

MapCppTrackerMCDigitization uses srand(time(NULL))

Added by Taylor, Ian about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Tracker
Target version:
Start date:
16 June 2013
Due date:
% Done:

100%

Estimated time:
12.00 h
Workflow:
Under Test

Description

The noise code in MapCppTrackerMCDigitization is based on rand(), and has a line setting the seed from the current time:

srand(time(NULL))

MAUS policy is to have the MC produce the same result each time, using a global seed. This is defined at the level of a GEANT4 primary particle. Using the current time as the seed will break this policy.

The fix should be relatively simple, as srand can be passed the correct seed value. I'm assuming that some example code can be found relatively quickly (the seed is a data member of Primary.hh).

#1

Updated by Heidt, Christopher about 9 years ago

  • Workflow changed from New Issue to Under Test

Changed the code to use seed value pulled from Primary GetRandomSeed(). Uploaded the changes to tracker development branch.

#2

Updated by Heidt, Christopher almost 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Going through old issues. Looks like this has been completed, closing issue.

#3

Updated by Rajaram, Durga almost 9 years ago

  • Target version changed from Future MAUS release to MAUS-v0.7.2

Also available in: Atom PDF