8#include <vxd/background/niel_fun.h>
10#include <framework/logging/Logger.h>
11#include <framework/utilities/FileSystem.h>
48 B2FATAL(
"TNIEL: Can't locate " << FileName);
52 inputfile.open(fullName.c_str(), ifstream::in);
53 if (!inputfile.good()) {
54 B2FATAL(
"TNIEL: Error opening input file " << FileName);
58 B2INFO(
"Reading file " << FileName);
62 while (getline(inputfile, line)) {
63 istringstream iss(line);
65 B2FATAL(
"Error reading NIEL correction data from " << fullName.c_str());
72 B2INFO(
"INITIALIZED TNIEL FROM " << fullName.c_str());
73 for (
int j = 0; j <
niel_N; j++)
81 for (
int i = 0; i <
niel_N; i++) {
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
int niel_N
number of rows in NIEL table
TNiel(const std::string &FileName)
Constructor takes NIEL table for a particle as input.
double nielfactor[1710]
factor values, enough to acommodate the longest file.
double getNielFactor(double EMeV)
Get NIEL factor for a given particle energy.
double E_nielfactor[1710]
particle energies at which the NIEL factor is tabulated.
Abstract base class for different kinds of events.