Go to the documentation of this file.
6 const bool UseHitErrors,
9 for (
int iProc = 0; iProc < 4; iProc++) {
10 for (
int i = 0;
i < 8;
i++) {
14 for (
int i = 0;
i < 2;
i++) {
17 4 *
i + 8 + iProc + 64;
35 for (
int i = 0;
i < 3;
i++) {
41 std::cout <<
"L1Algo Input Magnetic field:" << z[
i][0] <<
" " << B[
i].
x[0]
42 <<
" " << B[
i].
y[0] <<
" " << B[
i].
z[0] << std::endl;
45 vtxFieldRegion.Set(B[0], z[0], B[1], z[1], B[2], z[2]);
60 std::cout <<
"L1Algo Input " <<
NStations <<
" Stations:" << std::endl;
73 double f_phi = geo[ind++];
74 double f_sigma = geo[ind++];
75 double b_phi = geo[ind++];
76 double b_sigma = geo[ind++];
77 double c_f =
cos(f_phi);
78 double s_f =
sin(f_phi);
79 double c_b =
cos(b_phi);
80 double s_b =
sin(b_phi);
90 if (
fabs(b_phi - f_phi) < .1) {
91 double th = b_phi - f_phi;
95 (s_b * s_b * f_sigma * f_sigma + s_f * s_f * b_sigma * b_sigma) / det;
97 -(s_b * c_b * f_sigma * f_sigma + s_f * c_f * b_sigma * b_sigma) / det;
99 (c_b * c_b * f_sigma * f_sigma + c_f * c_f * b_sigma * b_sigma) / det;
102 double det = c_f * s_b - s_f * c_b;
105 (s_b * s_b * f_sigma * f_sigma + s_f * s_f * b_sigma * b_sigma) / det;
107 -(s_b * c_b * f_sigma * f_sigma + s_f * c_f * b_sigma * b_sigma) / det;
109 (c_b * c_b * f_sigma * f_sigma + c_f * c_f * b_sigma * b_sigma) / det;
132 int N =
static_cast<int>(geo[ind++]);
133 for (
int iC = 0; iC < N; iC++)
135 for (
int iC = 0; iC < N; iC++)
137 for (
int iC = 0; iC < N; iC++)
143 std::cout <<
" " << f_phi <<
" " << f_sigma <<
" " << b_phi <<
" "
144 << b_sigma << std::endl;
155 fvec sy = 0., Sy = 0.;
159 fvec By = vStations[
i].fieldSlice.cy[0];
160 Sy += dz * sy + dz * dz * By / 2.;
174 std::cout <<
"L1Algo initialized" << std::endl;
180 const vector<L1Strip>& StsStrips_,
181 const vector<L1Strip>& StsStripsB_,
182 const vector<fscal>& StsZPos_,
183 const vector<unsigned char>& SFlag_,
184 const vector<unsigned char>& SFlagB_,
185 const THitI* StsHitsStartIndex_,
186 const THitI* StsHitsStopIndex_) {
224 const L1Strip& u = (*vStsStrips)[_h.
f];
240 fscal u = (*vStsStrips)[_h.
f];
241 fscal v = (*vStsStripsB)[_h.
b];
246 _z = (*vStsZPos)[_h.
iz];
260 _x = sta.xInfo.sin_phi[0] * u + sta.xInfo.cos_phi[0] *
v;
261 _y = sta.yInfo.cos_phi[0] * u + sta.yInfo.sin_phi[0] *
v;
275 _x = sta.xInfo.sin_phi * u + sta.xInfo.cos_phi *
v;
276 _y = sta.yInfo.cos_phi * u + sta.yInfo.sin_phi *
v;
313 x = sta.xInfo.sin_phi * u + sta.xInfo.cos_phi *
v;
314 y = sta.yInfo.cos_phi * u + sta.yInfo.sin_phi *
v;
322 const L1Strip& u = (*vStsStrips)[hit.
f];
323 const L1Strip&
v = (*vStsStripsB)[hit.
b];
324 const float& z = (*vStsZPos)[hit.
iz];
325 const float& time = hit.
t_reco;
333 const L1Strip& u = (*vStsStrips)[hit.
f];
334 const L1Strip&
v = (*vStsStripsB)[hit.
b];
335 const float& z = (*vStsZPos)[hit.
iz];
336 const float& time = hit.
t_reco;
337 const float& du_ = hit.
du;
338 const float& dv_ = hit.
dv;
340 point.
Set(z, u.
f,
v.f, du_, dv_, time, hit.
t_er);
const vector< fscal > * vStsZPos
const vector< L1StsHit > * vStsHits
friend F32vec4 sin(const F32vec4 &a)
contain strips positions and coordinates of hit
void dUdV_to_dY(const fvec &u, const fvec &v, fvec &_y, const L1Station &sta)
L1MaterialInfo materialInfo
void StripsToCoor(const fscal &u, const fscal &v, fscal &x, fscal &y, const L1Station &sta) const
friend F32vec4 sqrt(const F32vec4 &a)
const THitI * StsHitsStartIndex
void dUdV_to_dX(const fvec &u, const fvec &v, fvec &_x, const L1Station &sta)
const vector< L1Strip > * vStsStrips
L1UMeasurementInfo backInfo
const THitI * StsHitsStopIndex
const vector< L1Strip > * vStsStripsB
const vector< unsigned char > * vSFlagB
friend F32vec4 log(const F32vec4 &a)
void Set(const float &z1, const fscal &u1, const fscal &v1, const fscal &du1, const fscal &dv1, const float &time1, float timeEr1)
const vector< unsigned char > * vSFlag
void Init(const vector< fscal > &geo, const bool UseHitErrors, const bool mCBMmode)
map< int, int > threadNumberToCpuMap
friend F32vec4 fabs(const F32vec4 &a)
friend F32vec4 cos(const F32vec4 &a)
void dUdV_to_dXdY(const fvec &u, const fvec &v, fvec &_xy, const L1Station &sta)
void GetHitCoor(const L1StsHit &_h, fscal &_x, fscal &_y, fscal &_z, const L1Station &sta)
--— Hit-point-strips conversion routines ---—
L1HitPoint CreateHitPoint(const L1StsHit &hit, char ista)
full the hit point by hit information: takes hit as input (2 strips) and creates hit_point with all c...
void SetData(const vector< L1StsHit > &StsHits_, const vector< L1Strip > &StsStrips_, const vector< L1Strip > &StsStripsB_, const vector< fscal > &StsZPos_, const vector< unsigned char > &SFlag_, const vector< unsigned char > &SFlagB_, const THitI *StsHitsStartIndex_, const THitI *StsHitsStopIndex_)
L1UMeasurementInfo frontInfo
L1XYMeasurementInfo XYInfo