ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TCS::KFLUT Class Reference

#include <KFLUT.h>

Collaboration diagram for TCS::KFLUT:

Public Member Functions

 KFLUT ()
 
 ~KFLUT ()
 
int getetabin (double eta)
 
int getetbin (unsigned int et)
 
double getcorrKF (int i, int j)
 

Private Member Functions

void fillLUT ()
 

Private Attributes

vector< unsigned int > etlimits
 
vector< double > etalimits
 
vector< vector< double > > LUTKF
 

Detailed Description

Definition at line 20 of file KFLUT.h.

Constructor & Destructor Documentation

◆ KFLUT()

TCS::KFLUT::KFLUT ( )

Definition at line 15 of file KFLUT.cxx.

15  {
16 
17  fillLUT();
18 }

◆ ~KFLUT()

TCS::KFLUT::~KFLUT ( )

Definition at line 20 of file KFLUT.cxx.

20  {
21 
22 }

Member Function Documentation

◆ fillLUT()

void TCS::KFLUT::fillLUT ( )
private

Definition at line 69 of file KFLUT.cxx.

69  {
70 
71  etalimits = {-0.10,0.10,0.30,0.50,0.70,0.90,1.10,1.30,1.50,1.70,1.90,2.10,2.33,2.55,2.80,3.42};
72  etlimits = {8,16,32,64,128,1024};
73 
74  vector<double> v0 {0.14,0.12,0.12,0.17,0.26,0.3,0.3,0.42,0.38,0.19,0.16,0.15,0.52,0.59,0.62,0.33};
75  vector<double> v1 {0.19,0.17,0.18,0.2,0.27,0.3,0.3,0.43,0.36,0.19,0.16,0.14,0.33,0.35,0.38,0.28};
76  vector<double> v2 {0.13,0.11,0.11,0.13,0.17,0.19,0.18,0.28,0.21,0.11,0.09,0.08,0.12,0.09,0.12,0.17};
77  vector<double> v3 {-0.01,-0.02,-0.02,-0.01,0.02,0.03,0.03,0.12,0.04,-0.04,-0.05,-0.06,-0.03,-0.06,-0.03,0.05};
78  vector<double> v4 {-0.12,-0.12,-0.12,-0.11,-0.08,-0.07,-0.08,-0.01,-0.08,-0.14,-0.14,-0.15,-0.13,-0.15,-0.12,-0.04};
79 
80  LUTKF.push_back(v0);
81  LUTKF.push_back(v1);
82  LUTKF.push_back(v2);
83  LUTKF.push_back(v3);
84  LUTKF.push_back(v4);
85 
86  //Correction for rounding when 7 decimal bit applied
87  for (auto &vet : LUTKF){
88  for (auto &veta : vet){
89  veta = std::round(veta*std::pow(2,7))/std::pow(2,7);
90  }
91  }
92 }

◆ getcorrKF()

double TCS::KFLUT::getcorrKF ( int  i,
int  j 
)

Definition at line 62 of file KFLUT.cxx.

62  {
63 
64  return LUTKF.at(iet).at(jeta);
65 
66 
67 }

◆ getetabin()

int TCS::KFLUT::getetabin ( double  eta)

Definition at line 25 of file KFLUT.cxx.

25  {
26 
27  int bin = 0;
28  if (eta >= etalimits.back()) return (etalimits.size()-1);
29  if (eta < etalimits[0]) return 0;
30 
31  int sizelim = etalimits.size() - 1 ;
32  for (int j=0;j< sizelim ;j++) {
33  if (abs(eta) >= etalimits[j] && abs(eta) < etalimits[j+1]) {
34  bin = j;
35  }
36  }
37 
38  return bin;
39 
40 
41 }

◆ getetbin()

int TCS::KFLUT::getetbin ( unsigned int  et)

Definition at line 44 of file KFLUT.cxx.

44  {
45 
46  int binet = 0;
47  if (et >= etlimits.back()) return (etlimits.size()-1);
48  if (et < etlimits[0]) return 0;
49 
50  int sizelimet = etlimits.size() - 1 ;
51  for (int i=0;i< sizelimet ;i++) {
52  if (et >= etlimits[i] && et < etlimits[i+1]) {
53  binet = i;
54  }
55  }
56  return binet;
57 
58 
59 }

Member Data Documentation

◆ etalimits

vector<double> TCS::KFLUT::etalimits
private

Definition at line 37 of file KFLUT.h.

◆ etlimits

vector<unsigned int> TCS::KFLUT::etlimits
private

Definition at line 36 of file KFLUT.h.

◆ LUTKF

vector<vector<double> > TCS::KFLUT::LUTKF
private

Definition at line 39 of file KFLUT.h.


The documentation for this class was generated from the following files:
et
Extra patterns decribing particle interation process.
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
bin
Definition: BinsDiffFromStripMedian.h:43
TCS::KFLUT::LUTKF
vector< vector< double > > LUTKF
Definition: KFLUT.h:39
parseMapping.v0
def v0
Definition: parseMapping.py:149
lumiFormat.i
int i
Definition: lumiFormat.py:85
TCS::KFLUT::fillLUT
void fillLUT()
Definition: KFLUT.cxx:69
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
TCS::KFLUT::etlimits
vector< unsigned int > etlimits
Definition: KFLUT.h:36
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
TCS::KFLUT::etalimits
vector< double > etalimits
Definition: KFLUT.h:37
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15