LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
evgenbase.h
Go to the documentation of this file.
1
#ifndef EVGENBASE_H
2
#define EVGENBASE_H
3
4
#include "TRandom3.h"
5
7
namespace
evgb
{
14
enum
{
15
kNeutrinoGenerator
= -100,
16
kCosmicRayGenerator
= -200
17
};
18
19
unsigned
int
GetRandomNumberSeed
();
20
}
21
22
inline
unsigned
int
evgb::GetRandomNumberSeed
()
23
{
24
25
// the maximum allowed seed for the art::RandomNumberGenerator
26
// is 900000000. Use the system random number generator to get a pseudo-random
27
// number for the seed value, and take the modulus of the maximum allowed
28
// seed to ensure we don't ever go over that maximum
29
30
// Set gRandom to be a TRandom3 based on this state in case we need to pull
31
// random values from histograms, etc
32
TRandom3 *rand =
new
TRandom3(0);
33
gRandom = rand;
34
return
rand->Integer(900000000);
35
}
36
37
#endif
evgb::GetRandomNumberSeed
unsigned int GetRandomNumberSeed()
Definition:
evgenbase.h:22
evgb::kNeutrinoGenerator
Definition:
evgenbase.h:15
evgb::kCosmicRayGenerator
Definition:
evgenbase.h:16
evgb
Physics generators for neutrinos, cosmic rays, and others.
Definition:
CRYHelper.cxx:33
nutools
EventGeneratorBase
evgenbase.h
Generated on Wed Dec 12 2018 14:43:06 for LArSoft by
1.8.11