BmnRoot
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#include <vector>
6using std::vector;
7
14
15
17 public:
18
19 L1Material() : table(), NBins(0), RMax(0.), iD(0.) {}
20
21 vector<vector<float> > table;
22
23 // static const int NBins = 100; // TODO file?
24 // static const float RMax = 60.f;
25 // static const float iD = 0.5*NBins/60.f;//RMax!;
26
27 void SetBins( int n, float r ) {
28 NBins = n;
29 RMax = r;
30 iD = 0.5*NBins/RMax;
31 }
32
33 float GetRadThick( float x, float y ) {
34 x = ( x < RMax && x >= -RMax ) ? x : 0;
35 y = ( y < RMax && y >= -RMax ) ? y : 0;
36 // L1_ASSERT( x < RMax && x >= -RMax, "x = " << x );
37 // L1_ASSERT( y < RMax && y >= -RMax, "y = " << y );
38 return table[ (x + RMax)*iD ][ (y + RMax)*iD ];
39 }
41 fvec r;
42 for ( int i = 0; i < fvecLen; i++ )
43 r[i] = GetRadThick(x[i], y[i]);
44 return r;
45 }
46
47 int NBins;
48 float RMax;
49 float iD;
50
52
53#endif
class L1MaterialInfo _fvecalignment
const int fvecLen
Definition P4_F32vec4.h:233
int i
Definition P4_F32vec4.h:22
vector< vector< float > > table
float GetRadThick(float x, float y)
fvec GetRadThick(fvec x, fvec y)
void SetBins(int n, float r)