22 #ifndef KFPINPUTDATA_H
23 #define KFPINPUTDATA_H
59 int pdg1 = a.
fPdg == -1 ? 250 : a.
fPdg;
60 int pdg2 = b.
fPdg == -1 ? 250 : b.
fPdg;
62 return (abs(pdg1) < abs(pdg2));
81 void *
operator new(
size_t size) {
return _mm_malloc(
size,
sizeof(float_v)); }
82 void *
operator new[](
size_t size) {
return _mm_malloc(
size,
sizeof(float_v)); }
83 void *
operator new(
size_t size,
void *ptr) { return ::operator
new(
size, ptr);}
84 void *
operator new[](
size_t size,
void *ptr) { return ::operator
new(
size, ptr);}
85 void operator delete(
void *ptr, size_t) { _mm_free(ptr); }
86 void operator delete[](
void *ptr, size_t) { _mm_free(ptr); }
96 std::ifstream ifile(prefix.data());
97 if ( !ifile.is_open() )
return 0;
101 for(
int iSet=0; iSet<nSets; iSet++)
107 for(
int iP=0; iP<6; iP++)
117 for(
int iC=0; iC<21; iC++)
167 for(
unsigned int iPV=0; iPV <
fPV.size(); iPV++)
169 for(
int iP=0; iP<3; iP++)
172 for(
int iC=0; iC<6; iC++)
189 dataSize +=
fPV.size() * 9;
195 float&
field =
reinterpret_cast<float&
>(data[NInputSets+1]);
198 int offset = NInputSets+2;
203 for(
int iP=0; iP<3; iP++)
205 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
207 float& tmpFloat =
reinterpret_cast<float&
>(data[offset + iPV]);
208 tmpFloat =
fPV[iPV].Parameter(iP);
210 offset +=
fPV.size();
213 for(
int iC=0; iC<6; iC++)
215 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
217 float& tmpFloat =
reinterpret_cast<float&
>(data[offset + iPV]);
218 tmpFloat =
fPV[iPV].Covariance(iC);
220 offset +=
fPV.size();
236 float&
field =
reinterpret_cast<float&
>(data[NInputSets+1]);
239 fPV.resize(data[NInputSets]);
241 for(
int iP=0; iP<3; iP++)
243 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
245 float& tmpFloat =
reinterpret_cast<float&
>(data[offset + iPV]);
246 fPV[iPV].Parameter(iP) = tmpFloat;
248 offset +=
fPV.size();
251 for(
int iC=0; iC<6; iC++)
253 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
255 float& tmpFloat =
reinterpret_cast<float&
>(data[offset + iPV]);
256 fPV[iPV].Covariance(iC) = tmpFloat;
258 offset +=
fPV.size();
267 std::cout <<
"N PV: " <<
fPV.size() << std::endl;
270 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
271 std::cout <<
fPV[iPV].
X() <<
" ";
272 std::cout << std::endl;
274 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
275 std::cout <<
fPV[iPV].
Y() <<
" ";
276 std::cout << std::endl;
278 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
279 std::cout <<
fPV[iPV].
Z() <<
" ";
280 std::cout << std::endl;
282 std::cout <<
"Cov matrix: " << std::endl;
283 for(
int iC=0; iC<6; iC++)
285 std::cout <<
" iC " << iC <<
": ";
286 for(
unsigned int iPV=0; iPV<
fPV.size(); iPV++)
288 std::cout << std::endl;
291 std::cout <<
"Field: " <<
fBz << std::endl;
296 const std::vector<KFParticle>&
GetPV()
const {
return fPV; }
330 std::vector<KFParticle>
fPV;
369 void *
operator new(
size_t size) {
return _mm_malloc(
size,
sizeof(float_v)); }
370 void *
operator new[](
size_t size) {
return _mm_malloc(
size,
sizeof(float_v)); }
371 void *
operator new(
size_t size,
void *ptr) { return ::operator
new(
size, ptr);}
372 void *
operator new[](
size_t size,
void *ptr) { return ::operator
new(
size, ptr);}
373 void operator delete(
void *ptr, size_t) { _mm_free(ptr); }
374 void operator delete[](
void *ptr, size_t) { _mm_free(ptr); }