43 reinterpret_cast<float_v&
>(
fP[iP][iTr]) = value;
47 if(iTr +
i >=
Size())
continue;
48 fP[iP][iTr+
i] = value[
i];
69 reinterpret_cast<float_v&
>(
fC[iC][iTr]) = value;
73 if(iTr +
i >=
Size())
continue;
74 fC[iC][iTr+
i] = value[
i];
84 for(
int i=0;
i<6;
i++)
86 for(
int i=0;
i<21;
i++)
88 #ifdef NonhomogeneousField
89 for(
int i=0;
i<10;
i++)
109 for(
int iV=0; iV<vSize; iV++)
111 for(
int i=0;
i<6;
i++)
112 fP[
i][offset+iV] = v.
fP[
i][iV];
113 for(
int i=0;
i<21;
i++)
114 fC[
i][offset+iV] = v.
fC[
i][iV];
115 #ifdef NonhomogeneousField
116 for(
int i=0;
i<10;
i++)
117 fField[
i][offset+iV] = v.fField[
i][iV];
121 fId[offset+iV] = v.
fId[iV];
123 fQ[offset+iV] = v.
fQ[iV];
136 if(nIndexes == 0)
return;
140 for(
int iP=0; iP<6; iP++)
145 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
146 float_v&
vec =
reinterpret_cast<float_v&
>(
fP[iP][iElement]);
147 vec.gather(&(track.
fP[iP][0]), index);
149 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
150 float_v&
vec =
reinterpret_cast<float_v&
>(
fP[iP][iElement]);
151 vec.gather(&(track.
fP[iP][0]), index, simd_cast<float_m>(iElement+uint_v::IndexesFromZero()<nIndexes));
154 for(
int iC=0; iC<21; iC++)
159 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
160 float_v&
vec =
reinterpret_cast<float_v&
>(
fC[iC][iElement]);
161 vec.gather(&(track.
fC[iC][0]), index);
163 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
164 float_v&
vec =
reinterpret_cast<float_v&
>(
fC[iC][iElement]);
165 vec.gather(&(track.
fC[iC][0]), index, simd_cast<float_m>(iElement+uint_v::IndexesFromZero()<nIndexes));
167 #ifdef NonhomogeneousField
168 for(
int iP=0; iP<10; iP++)
173 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
174 float_v&
vec =
reinterpret_cast<float_v&
>(fField[iP][iElement]);
175 vec.gather(&(track.fField[iP][0]), index);
177 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
178 float_v&
vec =
reinterpret_cast<float_v&
>(fField[iP][iElement]);
179 vec.gather(&(track.fField[iP][0]), index, simd_cast<float_m>(iElement+uint_v::IndexesFromZero()<nIndexes));
186 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
187 int_v&
vec =
reinterpret_cast<int_v&
>(
fId[iElement]);
188 vec.gather(&(track.
fId[0]), index);
190 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
191 int_v&
vec =
reinterpret_cast<int_v&
>(
fId[iElement]);
192 vec.gather(&(track.
fId[0]), index, int_m(iElement+uint_v::IndexesFromZero()<nIndexes));
198 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
199 int_v&
vec =
reinterpret_cast<int_v&
>(
fPDG[iElement]);
200 vec.gather(&(track.
fPDG[0]), index);
202 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
203 int_v&
vec =
reinterpret_cast<int_v&
>(
fPDG[iElement]);
204 vec.gather(&(track.
fPDG[0]), index, int_m(iElement+uint_v::IndexesFromZero()<nIndexes));
210 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
211 int_v&
vec =
reinterpret_cast<int_v&
>(
fQ[iElement]);
212 vec.gather(&(track.
fQ[0]), index);
214 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
215 int_v&
vec =
reinterpret_cast<int_v&
>(
fQ[iElement]);
216 vec.gather(&(track.
fQ[0]), index, int_m(iElement+uint_v::IndexesFromZero()<nIndexes));
222 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
223 int_v&
vec =
reinterpret_cast<int_v&
>(
fPVIndex[iElement]);
224 vec.gather(&(track.
fPVIndex[0]), index);
226 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
227 int_v&
vec =
reinterpret_cast<int_v&
>(
fPVIndex[iElement]);
228 vec.gather(&(track.
fPVIndex[0]), index, int_m(iElement+uint_v::IndexesFromZero()<nIndexes));
234 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
238 const uint_v&
index =
reinterpret_cast<const uint_v&
>(trackIndex[iElement]);
240 vec.gather(&(track.
fNPixelHits[0]), index, int_m(iElement+uint_v::IndexesFromZero()<nIndexes));
251 for(
int i=0;
i<21;
i++)
258 #ifdef NonhomogeneousField
259 for(
int i=0;
i<10;
i++)
260 track.SetFieldCoeff( fField[
i][n],
i);
280 const float_v cA = KFPMath::Cos( alpha );
281 const float_v sA = KFPMath::Sin( alpha );
283 const float_v xInit =
reinterpret_cast<const float_v&
>(
fP[0][firstElement]);
284 const float_v yInit =
reinterpret_cast<const float_v&
>(
fP[1][firstElement]);
286 float_v&
x =
reinterpret_cast<float_v&
>(
fP[0][firstElement]);
287 float_v&
y =
reinterpret_cast<float_v&
>(
fP[1][firstElement]);
289 x = -(xInit*sA + yInit*cA);
290 y = xInit*cA - yInit*sA;
292 const float_v pxInit =
reinterpret_cast<const float_v&
>(
fP[3][firstElement]);
293 const float_v pyInit =
reinterpret_cast<const float_v&
>(
fP[4][firstElement]);
295 float_v& px =
reinterpret_cast<float_v&
>(
fP[3][firstElement]);
296 float_v& py =
reinterpret_cast<float_v&
>(
fP[4][firstElement]);
298 px = -(pxInit*sA + pyInit*cA);
299 py = pxInit*cA - pyInit*sA;
302 for(
int iC=0; iC<21; iC++)
303 cov[iC] = reinterpret_cast<const float_v&>(
fC[iC][firstElement]);
305 reinterpret_cast<float_v&
>(
fC[0][firstElement]) = cA*cA* cov[2] + 2* cA* cov[1]* sA + cov[0]*sA* sA;
307 reinterpret_cast<float_v&
>(
fC[1][firstElement]) = -(cA*cA * cov[1]) + cA* (-cov[0] + cov[2])* sA + cov[1]*sA* sA;
308 reinterpret_cast<float_v&
>(
fC[2][firstElement]) = cA*cA* cov[0] - 2* cA* cov[1]* sA + cov[2]*sA* sA;
310 reinterpret_cast<float_v&
>(
fC[3][firstElement]) = -(cA* cov[4]) - cov[3]* sA;
311 reinterpret_cast<float_v&
>(
fC[4][firstElement]) = cA* cov[3] - cov[4]* sA;
314 reinterpret_cast<float_v&
>(
fC[6][firstElement]) = cA*cA* cov[11] + cA *(cov[10] + cov[7])* sA + cov[6]*sA* sA;
315 reinterpret_cast<float_v&
>(
fC[7][firstElement]) = -(cA*cA * cov[10]) + cA* (cov[11] - cov[6])* sA + cov[7] *sA*sA;
316 reinterpret_cast<float_v&
>(
fC[8][firstElement]) = -(cA *cov[12]) - cov[8] *sA;
317 reinterpret_cast<float_v&
>(
fC[9][firstElement]) = cA*cA* cov[14] + 2 *cA* cov[13]* sA + cov[9]* sA*sA;
319 reinterpret_cast<float_v&
>(
fC[10][firstElement]) = -(cA*cA* cov[7]) + cA* (cov[11] - cov[6])* sA + cov[10]*sA* sA;
320 reinterpret_cast<float_v&
>(
fC[11][firstElement]) = cA*cA* cov[6] - cA* (cov[10] + cov[7]) *sA + cov[11]*sA* sA;
321 reinterpret_cast<float_v&
>(
fC[12][firstElement]) = cA* cov[8] - cov[12]* sA;
322 reinterpret_cast<float_v&
>(
fC[13][firstElement]) = -(cA*cA* cov[13]) + cA* (cov[14] - cov[9])* sA + cov[13]* sA*sA;
323 reinterpret_cast<float_v&
>(
fC[14][firstElement]) = cA*cA* cov[9] - 2* cA* cov[13]* sA + cov[14]* sA*sA;
325 reinterpret_cast<float_v&
>(
fC[15][firstElement]) = -(cA* cov[16]) - cov[15]* sA;
326 reinterpret_cast<float_v&
>(
fC[16][firstElement]) = cA* cov[15] - cov[16]* sA;
328 reinterpret_cast<float_v&
>(
fC[18][firstElement]) = -(cA* cov[19]) - cov[18]* sA;
329 reinterpret_cast<float_v&
>(
fC[19][firstElement]) = cA* cov[18] - cov[19]* sA;
339 for(
int i=0;
i<6;
i++)
340 std::cout <<
fP[
i][n] <<
" ";
341 std::cout << std::endl;
343 for(
int i=0;
i<21;
i++)
344 std::cout <<
fC[
i][n] <<
" ";
345 std::cout << std::endl;
354 std::cout <<
"NTracks " <<
Size() << std::endl;
355 if(
Size()==0 )
return;
357 std::cout <<
"Parameters: " << std::endl;
358 for(
int iP=0; iP<6; iP++)
360 std::cout <<
" iP " << iP <<
": ";
361 for(
int iTr=0; iTr<
Size(); iTr++)
363 std::cout << std::endl;
366 std::cout <<
"Cov matrix: " << std::endl;
367 for(
int iC=0; iC<21; iC++)
369 std::cout <<
" iC " << iC <<
": ";
370 for(
int iTr=0; iTr<
Size(); iTr++)
372 std::cout << std::endl;
375 std::cout <<
"Id: " << std::endl;
376 for(
int iTr=0; iTr<
Size(); iTr++)
377 std::cout <<
Id()[iTr] <<
" ";
378 std::cout << std::endl;
380 std::cout <<
"Pdg: " << std::endl;
381 for(
int iTr=0; iTr<
Size(); iTr++)
382 std::cout <<
PDG()[iTr] <<
" ";
383 std::cout << std::endl;
385 std::cout <<
"Q: " << std::endl;
386 for(
int iTr=0; iTr<
Size(); iTr++)
387 std::cout <<
Q()[iTr] <<
" ";
388 std::cout << std::endl;
390 std::cout <<
"PV index: " << std::endl;
391 for(
int iTr=0; iTr<
Size(); iTr++)
392 std::cout <<
PVIndex()[iTr] <<
" ";
393 std::cout << std::endl;
395 std::cout <<
"fNPixelHits: " << std::endl;
396 for(
int iTr=0; iTr<
Size(); iTr++)
398 std::cout << std::endl;
400 #ifdef NonhomogeneousField
401 std::cout <<
"Field: " << std::endl;
402 for(
int iF=0; iF<6; iF++)
404 std::cout <<
" iF " << iF <<
": ";
405 for(
int iTr=0; iTr<
Size(); iTr++)
406 std::cout << FieldCoefficient(iF)[iTr]<<
" ";
407 std::cout << std::endl;
411 std::cout <<
"Last particle index: " << std::endl;