BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
L1MaterialInfo.h
Go to the documentation of this file.
1#ifndef L1MaterialInfo_h
2#define L1MaterialInfo_h
3
4#include "CbmL1Def.h"
5
6#include <vector>
7using std::vector;
8
10{
11 public:
13 : thick(0)
14 , RL(0)
15 , RadThick(0)
16 , logRadThick(0) {};
17
20
22{
23 public:
25 : table()
26 , NBins(0)
27 , RMax(0.)
28 , iD(0.)
29 {}
30
31 vector<vector<float>> table;
32
33 // static const int NBins = 100; // TODO file?
34 // static const float RMax = 60.f;
35 // static const float iD = 0.5*NBins/60.f;//RMax!;
36
37 void SetBins(int n, float r)
38 {
39 NBins = n;
40 RMax = r;
41 iD = 0.5 * NBins / RMax;
42 }
43
44 float GetRadThick(float x, float y)
45 {
46 x = (x < RMax && x >= -RMax) ? x : 0;
47 y = (y < RMax && y >= -RMax) ? y : 0;
48 // L1_ASSERT( x < RMax && x >= -RMax, "x = " << x );
49 // L1_ASSERT( y < RMax && y >= -RMax, "y = " << y );
50 return table[(x + RMax) * iD][(y + RMax) * iD];
51 }
53 {
54 fvec r;
55 for (int i = 0; i < fvecLen; i++)
56 r[i] = GetRadThick(x[i], y[i]);
57 return r;
58 }
59
60 int NBins;
61 float RMax;
62 float iD;
63
65
66#endif
const int fvecLen
Definition P4_F32vec4.h:233
#define _fvecalignment
Definition P4_F32vec4.h:236
int i
Definition P4_F32vec4.h:22
F32vec4 fvec
Definition P4_F32vec4.h:231
vector< vector< float > > table
float GetRadThick(float x, float y)
fvec GetRadThick(fvec x, fvec y)
void SetBins(int n, float r)
*brief user defined string literal for JSON values *sa std::size_t n
Definition json.hpp:20362