Classes | Enumerations | Functions | Variables
evgb Namespace Reference

Physics generators for neutrinos, cosmic rays, and others. More...

Classes

class  CRYHelper
 Interface to the CRY cosmic-ray generator. More...
 
class  RNGWrapper
 

Enumerations

enum  { kNeutrinoGenerator = -100, kCosmicRayGenerator = -200 }
 

Functions

unsigned int GetRandomNumberSeed ()
 

Variables

template<class T >
double(T::* RNGWrapper )(void)
 

Detailed Description

Physics generators for neutrinos, cosmic rays, and others.

Enumeration Type Documentation

anonymous enum

Enumerate mother codes for primary particles.

Normally the mother code for a primary particle would be set to some arbitrary invalid value like -1, however, we can use this to mark the source of the particle as being either, eg., neutrino induced or from cosmic-rays.

Enumerator
kNeutrinoGenerator 
kCosmicRayGenerator 

Definition at line 14 of file evgenbase.h.

Function Documentation

unsigned int evgb::GetRandomNumberSeed ( )
inline

Definition at line 22 of file evgenbase.h.

References central_limit::rand.

Referenced by chaninfo::BadChanList::BadChanList(), evgen::CosmicPionGen::CosmicPionGen(), evgen::CosmicsGen::CosmicsGen(), fuzz::FuzzyKVertex::FuzzyKVertex(), g4n::G4Gen::G4Gen(), photrans::ImprovedTransport::ImprovedTransport(), evgen::IsoGen::IsoGen(), rsim::MakeNoiseSpectrumFile::MakeNoiseSpectrumFile(), mix::MixSimEvents::MixSimEvents(), photrans::PhotonSystRewriter::PhotonSystRewriter(), photrans::PhotonTransport::PhotonTransport(), rsim::ReadoutSim::ReadoutSim(), evgen::SingleGen::SingleGen(), and evgen::SupernovaGen::SupernovaGen().

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 }

Variable Documentation

template<class T >
double(T::* evgb::RNGWrapper) (void)

Definition at line 82 of file CRYHelper.h.