40 return std::accumulate(vertices.begin(), vertices.end(), 0, [](
unsigned int N,
const Amg::Vector3D& vtx){return N+inBarrel(vtx);});
46 return std::accumulate(vertices.begin(), vertices.end(), 0, [](
unsigned int N,
const Amg::Vector3D& vtx){return N+inEndcaps(vtx);});
69 return eta && Lxy &&
z;
108 for (
unsigned int i=0; i<candidates.size(); ++i){
113 best = candidates[i];
122 return match_candidate.mag() > 0.001;
133std::vector<Amg::Vector3D>
getVertexPos(
const std::vector<double> &vtx_x,
const std::vector<double> &vtx_y,
const std::vector<double> &vtx_z){
134 std::vector<Amg::Vector3D> vertices;
135 for (
unsigned int i=0; i<vtx_x.size(); ++i){
137 vertices.push_back(vtx_pos);
144std::vector<std::vector<Amg::Vector3D>>
getConstituentPos(
int Nvtx,
const std::vector<int> &obj_vtx_link,
145 const std::vector<double> &obj_x,
const std::vector<double> &obj_y,
const std::vector<double> &obj_z){
147 std::vector<std::vector<Amg::Vector3D>> consti_vec;
148 for (
int j=0; j<Nvtx; ++j){
149 std::vector<Amg::Vector3D> consti;
150 for (
unsigned int k=0; k<obj_x.size(); ++k){
151 if (obj_vtx_link[k] == j){consti.push_back(
Amg::Vector3D(obj_x[k], obj_y[k], obj_z[k]));}
153 consti_vec.push_back(consti);
Scalar eta() const
pseudorapidity method
Eigen::Matrix< double, 3, 1 > Vector3D
int getNvtxDetectorRegion(const std::vector< Amg::Vector3D > &vertices)
constexpr double fidVol_endcaps_Lxy_up
bool isValidMatch(const Amg::Vector3D &match_candidate)
constexpr double fidVol_Lxy_low
constexpr double fidVol_barrel_etaCut
bool inFiducialVol(const Amg::Vector3D &vtx)
constexpr double fidVol_Lxy_up
int NvtxFiducialVol(const std::vector< Amg::Vector3D > &vertices)
double getMatchMetric(const Amg::Vector3D &vtx1, const Amg::Vector3D &vtx2)
constexpr double fidVol_endcaps_etaCut_low
bool isGoodVtx(const Amg::Vector3D &vtx)
bool inEndcaps(double eta)
constexpr double fidVol_endcaps_etaCut_up
bool hasMatch(const Amg::Vector3D &vtx1, const std::vector< Amg::Vector3D > &vtx2_vec)
std::vector< Amg::Vector3D > getVertexPos(const std::vector< double > &vtx_x, const std::vector< double > &vtx_y, const std::vector< double > &vtx_z)
bool inDetectorRegion(const Amg::Vector3D &vtx)
Amg::Vector3D findBestMatch(const Amg::Vector3D &vtx, const std::vector< Amg::Vector3D > &candidates)
bool inFiducialVolEndcaps(const Amg::Vector3D &vtx)
constexpr double fidVol_z_up
int getNvtxEndcaps(const std::vector< Amg::Vector3D > &vertices)
bool inBarrel(double eta)
int getNvtxBarrel(const std::vector< Amg::Vector3D > &vertices)
constexpr double match_max
bool inFiducialVolBarrel(const Amg::Vector3D &vtx)
constexpr double fidVol_z_low
std::vector< std::vector< Amg::Vector3D > > getConstituentPos(int Nvtx, const std::vector< int > &obj_vtx_link, const std::vector< double > &obj_x, const std::vector< double > &obj_y, const std::vector< double > &obj_z)
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi