29 std::vector<const TrackParameters*>::const_iterator i_pbase;
35 double tmp_refFrameX = 0, tmp_refFrameY = 0, tmp_refFrameZ = 0;
36 double rxyMin = 1000000.;
46 if(msgLvl(MSG::WARNING))
msg()<<
"No InDet extrapolator given. Can't use TrackParameters!!!" <<
endmsg;
47 return StatusCode::FAILURE;
56 for (i_pbase = InpTrk.begin(); i_pbase != InpTrk.end(); ++i_pbase) {
58 perGlobalPos = (*i_pbase)->position();
60 if(std::abs(perGlobalPos.z()) >
m_IDsizeZ)
return StatusCode::FAILURE;
61 if(perGlobalPos.perp() >
m_IDsizeR)
return StatusCode::FAILURE;
62 tmp_refFrameX += perGlobalPos.x();
63 tmp_refFrameY += perGlobalPos.y();
64 tmp_refFrameZ += perGlobalPos.z();
74 tmpMat.
TrkPnt = (*i_pbase);
83 if(perGlobalPos.perp() < rxyMin){
84 rxyMin=perGlobalPos.perp();
89 if(
counter == 0)
return StatusCode::FAILURE;
94 Amg::Vector3D refGVertex(tmp_refFrameX, tmp_refFrameY, tmp_refFrameZ);
97 double fx, fy, fz, BMAG_FIXED;
107 double CovVertTrk[15];
108 std::fill(CovVertTrk, CovVertTrk+15, 0.);
110 for (i_pbase = InpTrk.begin(); i_pbase != InpTrk.end(); ++i_pbase) {
120 if(trkparN ==
nullptr)
return StatusCode::FAILURE;
122 if(mPer ==
nullptr) {
124 return StatusCode::FAILURE;
127 VectPerig = mPer->parameters();
129 perGlobalPos = mPer->position();
133 if( !
convertAmg5SymMtx(mPer->covariance(), CovVertTrk) )
return StatusCode::FAILURE;
143 if(std::abs(BMAG_FIXED) < 0.01) BMAG_FIXED = 0.01;
146 (
double)VectPerig[0], (
double)VectPerig[1],
147 (
double)VectPerig[2], (
double)VectPerig[3],
148 (
double)VectPerig[4], CovVertTrk,
153 if( trkparO==
nullptr ) {
155 if(state.
m_apar[ntrk][4]<0){
165 if(ntrk>=
NTrMaxVFit)
return StatusCode::FAILURE;
174 return StatusCode::SUCCESS;
184 std::vector<const NeutralParameters*>::const_iterator i_pbase;
188 double CovVertTrk[15];
189 double tmp_refFrameX = 0, tmp_refFrameY = 0, tmp_refFrameZ = 0;
190 double rxyMin = 1000000.;
200 if(msgLvl(MSG::WARNING))
msg()<<
"No InDet extrapolator given. Can't use TrackParameters!!!" <<
endmsg;
201 return StatusCode::FAILURE;
210 for (i_pbase = InpTrk.begin(); i_pbase != InpTrk.end(); ++i_pbase) {
212 perGlobalPos = (*i_pbase)->position();
214 if(std::abs(perGlobalPos.z()) >
m_IDsizeZ)
return StatusCode::FAILURE;
215 if(perGlobalPos.perp() >
m_IDsizeR)
return StatusCode::FAILURE;
217 tmp_refFrameX += perGlobalPos.x() ;
218 tmp_refFrameY += perGlobalPos.y() ;
219 tmp_refFrameZ += perGlobalPos.z() ;
237 if(perGlobalPos.perp()<rxyMin){
238 rxyMin = perGlobalPos.perp();
243 if(
counter == 0)
return StatusCode::FAILURE;
248 Amg::Vector3D refGVertex (tmp_refFrameX, tmp_refFrameY, tmp_refFrameZ);
251 double fx,fy,fz,BMAG_FIXED;
261 for (i_pbase = InpTrk.begin(); i_pbase != InpTrk.end(); ++i_pbase) {
263 if(neuparO ==
nullptr)
return StatusCode::FAILURE;
266 if(mPerN ==
nullptr) {
268 return StatusCode::FAILURE;
271 VectPerig = mPerN->parameters();
273 perGlobalPos = mPerN->position();
277 if( !
convertAmg5SymMtx(mPerN->covariance(), CovVertTrk) )
return StatusCode::FAILURE;
286 if(std::abs(BMAG_FIXED) < 0.01) BMAG_FIXED = 0.01;
289 (
double)VectPerig[0], (
double)VectPerig[1],
290 (
double)VectPerig[2], (
double)VectPerig[3],
291 (
double)VectPerig[4], CovVertTrk,
296 if(state.
m_apar[ntrk][4]<0){
305 if(ntrk>=
NTrMaxVFit)
return StatusCode::FAILURE;
314 return StatusCode::SUCCESS;