ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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 152 of file Samplers.h.

Constructor & Destructor Documentation

◆ LogSampler()

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

Definition at line 154 of file Samplers.h.

154  : UniformSampler (low, high){
155  m_low = low;
156  m_high = high;
157  };

◆ ~LogSampler()

LogSampler::~LogSampler ( )
inline

Definition at line 158 of file Samplers.h.

158 {};

Member Function Documentation

◆ shoot()

float LogSampler::shoot ( )
inlinevirtual

Reimplemented from UniformSampler.

Definition at line 160 of file Samplers.h.

160  {
161  float rand = m_random.Uniform();
162  float logval = rand * TMath::Log(m_high) + (1 - rand) * TMath::Log(m_low);
163  float val = TMath::Exp(logval);
164  return val;
165  };

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:
UniformSampler::UniformSampler
UniformSampler()=default
Sampler::m_random
TRandom m_random
Definition: Samplers.h:25
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
UniformSampler::m_high
float m_high
Definition: Samplers.h:61
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
UniformSampler::m_low
float m_low
Definition: Samplers.h:61