BmnRoot
Loading...
Searching...
No Matches
L1AddMaterial.h
Go to the documentation of this file.
1#ifndef L1AddMaterial_h
2#define L1AddMaterial_h
3
4#include "CbmL1Def.h"
5#include "L1MaterialInfo.h"
6#include "L1TrackPar.h"
7
8//#define cnst static const fvec
9#define cnst const fvec
10
11inline void L1AddMaterial( L1TrackPar &T, fvec radThick, fvec qp0, fvec w = 1, fvec mass2 = 0.1395679f*0.1395679f )
12{
13 cnst /*ZERO = 0.0f,*/ ONE = 1.;
14
15 fvec tx = T.tx;
16 fvec ty = T.ty;
17 fvec txtx = tx*tx;
18 fvec tyty = ty*ty;
19 fvec txtx1 = txtx + ONE;
20 fvec h = txtx + tyty;
21 fvec t = sqrt(txtx1 + tyty);
22 fvec h2 = h*h;
23 fvec qp0t = qp0*t;
24
25 cnst c1=0.0136f, c2=c1*0.038f, c3=c2*0.5f, c4=-c3/2.0f, c5=c3/3.0f, c6=-c3/4.0f;
26
27 fvec s0 = (c1+c2*log(radThick) + c3*h + h2*(c4 + c5*h +c6*h2) )*qp0t;
28 fvec a = ( (ONE+mass2*qp0*qp0t)*radThick*s0*s0 );
29
30// std::cout <<" a " << a << std::endl;
31// a=0.000005;
32 T.C22 += w*txtx1*a;
33 T.C32 += w*tx*ty*a; T.C33 += w*(ONE+tyty)*a;
34}
35
36inline void L1AddMaterial( L1TrackPar &T, L1MaterialInfo &info, fvec qp0, fvec w = 1, fvec mass2 = 0.1395679f*0.1395679f )
37{
38 cnst /*ZERO = 0.0f,*/ ONE = 1.f;
39
40 fvec tx = T.tx;
41 fvec ty = T.ty;
42 fvec txtx = tx*tx;
43 fvec tyty = ty*ty;
44 fvec txtx1 = txtx + ONE;
45 fvec h = txtx + tyty;
46 fvec t = sqrt(txtx1 + tyty);
47 fvec h2 = h*h;
48 fvec qp0t = qp0*t;
49
50 cnst c1=0.0136f, c2=c1*0.038f, c3=c2*0.5f, c4=-c3/2.0f, c5=c3/3.0f, c6=-c3/4.0f;
51
52 fvec s0 = (c1+c2*info.logRadThick + c3*h + h2*(c4 + c5*h +c6*h2) )*qp0t;
53 fvec a = ( (ONE+mass2*qp0*qp0t)*info.RadThick*s0*s0 );
54
55 T.C22 += w*txtx1*a;
56 T.C32 += w*tx*ty*a; T.C33 += w*(ONE+tyty)*a;
57}
58
59inline void L1AddHalfMaterial( L1TrackPar &T, L1MaterialInfo &info, fvec qp0 )
60{
61 cnst /*ZERO = 0.0f,*/ ONE = 1.;
62 cnst mass2 = 0.1395679f*0.1395679f;
63
64 fvec tx = T.tx;
65 fvec ty = T.ty;
66 fvec txtx = tx*tx;
67 fvec tyty = ty*ty;
68 fvec txtx1 = txtx + ONE;
69 fvec h = txtx + tyty;
70 fvec t = sqrt(txtx1 + tyty);
71 fvec h2 = h*h;
72 fvec qp0t = qp0*t;
73
74 cnst c1=0.0136f, c2=c1*0.038f, c3=c2*0.5f, c4=-c3/2.0f, c5=c3/3.0f, c6=-c3/4.0f;
75
76 fvec s0 = (c1+c2*(info.logRadThick + log(0.5)) + c3*h + h2*(c4 + c5*h +c6*h2) )*qp0t;
77 fvec a = ( (ONE+mass2*qp0*qp0t)*info.RadThick*0.5*s0*s0 );
78// std::cout <<" a " << a << std::endl;
79// a=0.000005;
80 T.C22 += txtx1*a;
81 T.C32 += tx*ty*a; T.C33 += (ONE+tyty)*a;
82}
83
84inline void L1AddPipeMaterial( L1TrackPar &T, fvec qp0, fvec w = 1, fvec mass2 = 0.1395679f*0.1395679f )
85{
86 cnst /*ZERO = 0.0f,*/ ONE = 1.f;
87
88// static const fscal RadThick=0.0009f;//0.5/18.76;
89// static const fscal logRadThick=log(RadThick);
90 const fscal RadThick=0.0009f;//0.5/18.76;
91 const fscal logRadThick=log(RadThick);
92 fvec tx = T.tx;
93 fvec ty = T.ty;
94 fvec txtx = tx*tx;
95 fvec tyty = ty*ty;
96 fvec txtx1 = txtx + ONE;
97 fvec h = txtx + tyty;
98 fvec t = sqrt(txtx1 + tyty);
99 fvec h2 = h*h;
100 fvec qp0t = qp0*t;
101
102 cnst c1=0.0136f, c2=c1*0.038f, c3=c2*0.5f, c4=-c3/2.0f, c5=c3/3.0f, c6=-c3/4.0f;
103 fvec s0 = (c1+c2*(logRadThick) + c3*h + h2*(c4 + c5*h +c6*h2) )*qp0t;
104 fvec a = ( (ONE+mass2*qp0*qp0t)*RadThick*s0*s0 );
105 T.C22 += w*txtx1*a;
106 T.C32 += w*tx*ty*a; T.C33 += w*(ONE+tyty)*a;
107
108}
109
110#undef cnst
111
112#endif
void L1AddHalfMaterial(L1TrackPar &T, L1MaterialInfo &info, fvec qp0)
void L1AddPipeMaterial(L1TrackPar &T, fvec qp0, fvec w=1, fvec mass2=0.1395679f *0.1395679f)
#define cnst
void L1AddMaterial(L1TrackPar &T, fvec radThick, fvec qp0, fvec w=1, fvec mass2=0.1395679f *0.1395679f)
float fscal
Definition P4_F32vec4.h:232
friend F32vec4 sqrt(const F32vec4 &a)
Definition P4_F32vec4.h:34
friend F32vec4 log(const F32vec4 &a)
Definition P4_F32vec4.h:123