|
ATLAS Offline Software
|
Go to the documentation of this file.
17 median(std::vector<double> &
v){
19 const auto n =
v.size();
20 const auto halfway =
n/2;
23 std::nth_element(
v.begin(),
it,
v.end());
27 const double mid2 = *
it;
29 const double mid1 = *std::max_element(
v.begin(),
it);
30 return (mid1 + mid2) *0.5;
49 IVKalState& istate)
const
60 assert(
dynamic_cast<State*
> (&istate)!=
nullptr);
67 if(
sc.isFailure() || ntrk<1 )
return StatusCode::FAILURE;
68 double fx,fy,BMAG_CUR;
70 if(fabs(BMAG_CUR) < 0.1) BMAG_CUR=0.1;
75 std::vector<double> xx,
yy,zz,difz;
83 for(
int i=0;
i<ntrk-1;
i++){
84 for(
int j=
i+1; j<ntrk; j++){
102 return StatusCode::SUCCESS;
111 assert(
dynamic_cast<State*
> (&istate)!=
nullptr);
118 if(
sc.isFailure() || ntrk<1 )
return StatusCode::FAILURE;
119 double fx,fy,BMAG_CUR;
121 if(fabs(BMAG_CUR) < 0.1) BMAG_CUR=0.1;
126 std::vector<double> xx,
yy,zz;
134 for(
int i=0;
i<ntrk-1;
i++){
135 for(
int j=
i+1; j<ntrk; j++){
137 xx.push_back(
out[0]);
138 yy.push_back(
out[1]);
139 zz.push_back(
out[2]);
152 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
Vertex_v1 Vertex
Define the latest version of the vertex class.
virtual StatusCode VKalVrtFitFast(std::span< const xAOD::TrackParticle *const >, Amg::Vector3D &Vertex, double &minDZ, IVKalState &istate) const
StatusCode CvtTrackParameters(const std::vector< const TrackParameters * > &InpTrk, int &ntrk, State &state) const
virtual void getMagFld(const double, const double, const double, double &, double &, double &) override
float median(std::vector< float > &Vec)
::StatusCode StatusCode
StatusCode definition for legacy code.
double vkvFastV(double *p1, double *p2, const double *vRef, double dbmag, double *out)
Ensure that the ATLAS eigen extensions are properly loaded.
VKalAtlasMagFld m_fitField
Eigen::Matrix< double, 3, 1 > Vector3D
StatusCode CvtTrackParticle(std::span< const xAOD::TrackParticle *const > list, int &ntrk, State &state) const
double m_apar[NTrMaxVFit][5]