ATLAS Offline Software
Loading...
Searching...
No Matches
RandDouble.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TrigHLTJetHypoTests_RandDouble_h
5#define TrigHLTJetHypoTests_RandDouble_h
6
7#include <random>
8class RandDouble {
9 public:
10 RandDouble(): m_dist(0., 1.){}
11 RandDouble(double low, double high):m_dist(low, high){
12 // note the generation is not symmetric: [low, high)...
13 }
14 double operator ()() {return m_dist(m_re);}
15 private:
16 std::default_random_engine m_re;
17 std::uniform_real_distribution<double> m_dist;
18};
19#endif
RandDouble(double low, double high)
Definition RandDouble.h:11
std::uniform_real_distribution< double > m_dist
Definition RandDouble.h:17
double operator()()
Definition RandDouble.h:14
std::default_random_engine m_re
Definition RandDouble.h:16