ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_PAI_utils.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_PAI_utils_h
6#define TRT_PAI_utils_h
7
8#include <vector>
9
13namespace TRT_PAI_utils {
23 float Interpolate(float xval,
24 const std::vector<float>& xtabulated,
25 const std::vector<float>& ytabulated);
26 inline float calculate_interpolation(float xval, float x1, float x2, float y1, float y2)
27 {
28 return y1+(y2-y1)*(xval-x1)/(x2-x1);
29 }
30}
31#endif
Utilities.
float Interpolate(float xval, const std::vector< float > &xtabulated, const std::vector< float > &ytabulated)
Interpolation function.
float calculate_interpolation(float xval, float x1, float x2, float y1, float y2)