Belle II Software development
niel_fun.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <vxd/background/niel_fun.h>
9#include <gtest/gtest.h>
10#include <iostream>
11#include <string>
12
13using namespace std;
14
15namespace Belle2 {
20 namespace SVD {
21
25 TEST(TNiel, output)
26 {
27 // First create a niel function and load it with data.
28 TNiel niel("vxd/tests/niel_test.csv");
29 // Value from within the range
30 EXPECT_EQ(niel.getNielFactor(3.0), 3.126E-2);
31 // Underflow value
32 EXPECT_EQ(niel.getNielFactor(0.0), 1.543E-2);
33 // Overflow value
34 EXPECT_EQ(niel.getNielFactor(20.0), 5.160E-2);
35 }
36
37 } // namespace SVD
39} // namespace Belle2
TNiel - the class providing values for NIEL factors.
Definition: niel_fun.h:17
double getNielFactor(double EMeV)
Get NIEL factor for a given particle energy.
Definition: niel_fun.cc:77
Abstract base class for different kinds of events.
STL namespace.