ATLAS Offline Software
Loading...
Searching...
No Matches
LogSampler Class Reference

#include <Samplers.h>

Inheritance diagram for LogSampler:
Collaboration diagram for LogSampler:

Public Member Functions

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

Public Attributes

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

Detailed Description

Definition at line 154 of file Samplers.h.

Constructor & Destructor Documentation

◆ LogSampler()

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

Definition at line 156 of file Samplers.h.

156 : UniformSampler (low, high){
157 m_low = low;
158 m_high = high;
159 };
UniformSampler()=default

◆ ~LogSampler()

LogSampler::~LogSampler ( )
inline

Definition at line 160 of file Samplers.h.

160{};

Member Function Documentation

◆ shoot()

float LogSampler::shoot ( )
inlinevirtual

Reimplemented from Sampler.

Definition at line 162 of file Samplers.h.

162 {
163 float rand = m_random.Uniform();
164 float logval = rand * TMath::Log(m_high) + (1 - rand) * TMath::Log(m_low);
165 float val = TMath::Exp(logval);
166 return val;
167 };
TRandom m_random
Definition Samplers.h:27

Member Data Documentation

◆ m_high

float UniformSampler::m_high {1.0}
inherited

Definition at line 63 of file Samplers.h.

63{}, m_high{1.0};

◆ m_low

float UniformSampler::m_low {}
inherited

Definition at line 63 of file Samplers.h.

63{}, m_high{1.0};

◆ m_random

TRandom Sampler::m_random
inherited

Definition at line 27 of file Samplers.h.

◆ m_val

float Sampler::m_val {}
inherited

Definition at line 26 of file Samplers.h.

26{};

The documentation for this class was generated from the following file: