Belle II Software
release-05-01-25
niel_fun.cc
1
#include <vxd/background/niel_fun.h>
2
#include <gtest/gtest.h>
3
#include <iostream>
4
#include <string>
5
6
using namespace
std;
7
8
namespace
Belle2
{
13
namespace
SVD {
14
18
TEST
(
TNiel
, output)
19
{
20
// First create a niel function and load it with data.
21
TNiel
niel(
"vxd/tests/niel_test.csv"
);
22
// Value from within the range
23
EXPECT_EQ(niel.
getNielFactor
(3.0), 3.126E-2);
24
// Underflow value
25
EXPECT_EQ(niel.
getNielFactor
(0.0), 1.543E-2);
26
// Overflow value
27
EXPECT_EQ(niel.
getNielFactor
(20.0), 5.160E-2);
28
}
29
30
}
// namespace SVD
32
}
// namespace Belle2
TNiel
TNiel - the class providing values for NIEL factors.
Definition:
niel_fun.h:10
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::TEST
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Definition:
utilityFunctions.cc:18
TNiel::getNielFactor
double getNielFactor(double EMeV)
Get NIEL factor for a given particle energy.
Definition:
niel_fun.cc:70
vxd
tests
niel_fun.cc
Generated on Fri Nov 5 2021 04:06:18 for Belle II Software by
1.8.17