ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
ModUniformSampler Class Reference

#include <Samplers.h>

Inheritance diagram for ModUniformSampler:
Collaboration diagram for ModUniformSampler:

Public Member Functions

 ~ModUniformSampler ()
 
 ModUniformSampler (float low, float high)
 
float shoot ()
 

Public Attributes

float m_low {}
 
float m_high {1.0}
 
float m_val {}
 
TRandom m_random
 

Detailed Description

Definition at line 65 of file Samplers.h.

Constructor & Destructor Documentation

◆ ~ModUniformSampler()

ModUniformSampler::~ModUniformSampler ( )
inline

Definition at line 67 of file Samplers.h.

67 {};

◆ ModUniformSampler()

ModUniformSampler::ModUniformSampler ( float  low,
float  high 
)
inline

Definition at line 68 of file Samplers.h.

68  : UniformSampler (low, high){
69  assert(low == fabs(low) && high == fabs(high));
70  assert(low <= high);
71  m_low = float(low);
72  m_high = float(high);
73  };

Member Function Documentation

◆ shoot()

float ModUniformSampler::shoot ( )
inlinevirtual

Reimplemented from UniformSampler.

Definition at line 75 of file Samplers.h.

75  {
76  m_val = m_random.Uniform(m_low, m_high);
77  if (m_random.Uniform() > 0.5)
78  m_val *= -1;
79  return m_val;
80  };

Member Data Documentation

◆ m_high

float UniformSampler::m_high {1.0}
inherited

Definition at line 61 of file Samplers.h.

◆ m_low

float UniformSampler::m_low {}
inherited

Definition at line 61 of file Samplers.h.

◆ m_random

TRandom Sampler::m_random
inherited

Definition at line 25 of file Samplers.h.

◆ m_val

float Sampler::m_val {}
inherited

Definition at line 24 of file Samplers.h.


The documentation for this class was generated from the following file:
Sampler::m_val
float m_val
Definition: Samplers.h:24
UniformSampler::UniformSampler
UniformSampler()=default
Sampler::m_random
TRandom m_random
Definition: Samplers.h:25
UniformSampler::m_high
float m_high
Definition: Samplers.h:61
UniformSampler::m_low
float m_low
Definition: Samplers.h:61
readCCLHist.float
float
Definition: readCCLHist.py:83