LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
sim.h
Go to the documentation of this file.
1 
14 #ifndef LARDATAOBJ_SIMULATION_SIM_H
15 #define LARDATAOBJ_SIMULATION_SIM_H
16 
17 #include <limits>
18 #include "TRandom3.h"
19 
21 namespace sim{
22 
23  unsigned int GetRandomNumberSeed();
24 
25  // any track id method returns sim::Particle:NoParticleId, it means the
26  // associated particle was too low-energy to be written by the
27  // detector Monte Carlo.
29 
30 }
31 
32 inline unsigned int sim::GetRandomNumberSeed(){
33 
34  // the maximum allowed seed for the art::RandomNumberGenerator
35  // is 900000000. Use TRandom3 to get the seed value in that range.
36  // Instantiating TRandom3 with a 0 means that its seed is set based
37  // on the TUUID and should always be random, even for jobs running on the
38  // same machine
39  TRandom3 rand(0);
40  return rand.Integer(900000000);
41 }
42 
43 
44 #endif// LARDATAOBJ_SIMULATION_SIM_H
static const int NoParticleId
Definition: sim.h:28
Monte Carlo Simulation.
unsigned int GetRandomNumberSeed()
Definition: sim.h:32
Int_t min
Definition: plot.C:26