32 AmgVector(5) VectPerig; VectPerig.setZero();
34 double CovVertTrk[15];
std::fill(CovVertTrk,CovVertTrk+15,0.);
35 double tmp_refFrameX=0, tmp_refFrameY=0, tmp_refFrameZ=0;
49 for (
auto i_ntrk = InpTrk.begin(); i_ntrk != InpTrk.end(); ++i_ntrk) {
51 mPer = &(*i_ntrk)->perigeeParameters();
52 if( mPer==
nullptr )
continue;
53 perGlobalPos = mPer->position();
56 tmp_refFrameX += perGlobalPos.x() ;
57 tmp_refFrameY += perGlobalPos.y() ;
58 tmp_refFrameZ += perGlobalPos.z() ;
69 if(
counter == 0)
return StatusCode::FAILURE;
73 Amg::Vector3D refGVertex (tmp_refFrameX, tmp_refFrameY, tmp_refFrameZ);
83 for (
auto i_ntrk = InpTrk.begin(); i_ntrk != InpTrk.end(); ++i_ntrk) {
87 mPer = &(*i_ntrk)->perigeeParameters();
88 if( mPer==
nullptr )
continue;
89 perGlobalPos = mPer->position();
90 if( !
convertAmg5SymMtx(mPer->covariance(), CovVertTrk) )
return StatusCode::FAILURE;
97 const Perigee tmpPer(mPer->position(),mPer->momentum(),mPer->charge(),surfGRefPoint,std::move(tmpCov));
98 VectPerig = tmpPer.parameters();
101 if(fabs(effectiveBMAG) < 0.01) effectiveBMAG=0.01;
103 VKalTransform( effectiveBMAG, (
double)VectPerig[0], (
double)VectPerig[1],
104 (
double)VectPerig[2], (
double)VectPerig[3], (
double)VectPerig[4], CovVertTrk,
109 return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
130 std::vector<const xAOD::NeutralParticle*>::const_iterator i_ntrk;
131 AmgVector(5) VectPerig; VectPerig.setZero();
133 double CovVertTrk[15];
std::fill(CovVertTrk,CovVertTrk+15,0.);
134 double tmp_refFrameX=0, tmp_refFrameY=0, tmp_refFrameZ=0;
148 for (i_ntrk = InpTrk.begin(); i_ntrk != InpTrk.end(); ++i_ntrk) {
150 mPer = &(*i_ntrk)->perigeeParameters();
151 if( mPer==
nullptr )
continue;
152 perGlobalPos = mPer->position();
153 if(fabs(perGlobalPos.z()) >
m_IDsizeZ)
return StatusCode::FAILURE;
154 if( perGlobalPos.perp() >
m_IDsizeR)
return StatusCode::FAILURE;
155 tmp_refFrameX += perGlobalPos.x() ;
156 tmp_refFrameY += perGlobalPos.y() ;
157 tmp_refFrameZ += perGlobalPos.z() ;
168 if(
counter == 0)
return StatusCode::FAILURE;
172 Amg::Vector3D refGVertex (tmp_refFrameX, tmp_refFrameY, tmp_refFrameZ);
183 for (i_ntrk = InpTrk.begin(); i_ntrk != InpTrk.end(); ++i_ntrk) {
187 mPer = &(*i_ntrk)->perigeeParameters();
188 if( mPer==
nullptr )
continue;
189 perGlobalPos = mPer->position();
190 if( !
convertAmg5SymMtx(mPer->covariance(), CovVertTrk) )
return StatusCode::FAILURE;
198 const Perigee tmpPer(mPer->position(),mPer->momentum(),mPer->charge(),surfGRefPoint,std::move(tmpCov));
199 VectPerig = tmpPer.parameters();
202 if(fabs(effectiveBMAG) < 0.01) effectiveBMAG=0.01;
203 VKalTransform( effectiveBMAG, (
double)VectPerig[0], (
double)VectPerig[1],
204 (
double)VectPerig[2], (
double)VectPerig[3], (
double)VectPerig[4], CovVertTrk,
215 return StatusCode::FAILURE;
223 return StatusCode::SUCCESS;
232 mPer =
dynamic_cast<const Perigee*
> (i_ntrk);