Project
Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef O2_ZDC_FAST_SIMULATION_UTILS_H
18#define O2_ZDC_FAST_SIMULATION_UTILS_H
19
20#include <istream>
21#include <random>
22#include <vector>
23
24namespace o2::zdc::fastsim
25{
34std::vector<float> normal_distribution(double mean, double stddev, size_t size);
35
45std::vector<std::vector<float>> normal_distribution_batch(double mean, double stddev, size_t size, long batchSize);
46
55std::vector<float> parse_block(std::istream& input, const std::string& option);
56
63std::vector<float> flat_vector(std::vector<std::vector<float>>& vector2D);
64
65} // namespace o2::zdc::fastsim
66#endif // O2_ZDC_FAST_SIMULATION_UTILS_H
GLsizeiptr size
Definition glcorearb.h:659
std::vector< float > flat_vector(std::vector< std::vector< float > > &vector2D)
Definition Utils.cxx:85
std::vector< std::vector< float > > normal_distribution_batch(double mean, double stddev, size_t size, long batchSize)
Generates a batch of vectors of numbers with a given normal distribution and length.
Definition Utils.cxx:35
std::vector< float > normal_distribution(double mean, double stddev, size_t size)
Generates a vector of numbers with a given normal distribution and length.
Definition Utils.cxx:19
std::vector< float > parse_block(std::istream &input, const std::string &option)
Parses .txt file containing scales for model. Function will search for given marker (option) and read...
Definition Utils.cxx:58