33 if (not hgtdDetEleHandle.
isValid() or hgtdElements==
nullptr) {
35 return StatusCode::FAILURE;
39 if (not inputHgtdClusterContainer.
isValid()){
41 return StatusCode::FAILURE;
49 std::vector<float> global_x (hgtdClusterContainer->
size(), 0);
50 std::vector<float> global_y (hgtdClusterContainer->
size(), 0);
51 std::vector<float> global_z (hgtdClusterContainer->
size(), 0);
52 std::vector<float> global_r (hgtdClusterContainer->
size(), 0);
53 std::vector<float> eta (hgtdClusterContainer->
size(), 0);
55 for (std::size_t
i(0
ul);
i<hgtdClusterContainer->
size(); ++
i) {
61 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
62 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
63 double R [3] = {T(0,3),T(1,3),T(2,3)};
65 const auto& local_position = cluster->template localPosition<3>();
67 M[0] = local_position(0,0);
68 M[1] = local_position(1,0);
69 Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
71 global_x[
i] = globalPos.x();
72 global_y[
i] = globalPos.y();
73 global_z[
i] = globalPos.z();
74 global_r[
i] = std::sqrt(global_x[
i]*global_x[
i] + global_y[
i]*global_y[
i]);
75 eta[
i] = globalPos.eta();
80 [] (
const auto cluster) ->
float
82 const auto& localPos = cluster->template localPosition<3>();
86 [] (
const auto cluster) ->
float
88 const auto& localPos = cluster->template localPosition<3>();
93 [] (
const auto cluster) ->
float
95 const auto& localPos = cluster->template localPosition<3>();
101 [] (
const auto* cluster) ->
float
102 {
return cluster->template localCovariance<3>()(0, 0); });
104 [] (
const auto* cluster) ->
float
105 {
return cluster->template localCovariance<3>()(1, 1); });
108 [] (
const auto* cluster) ->
float
109 {
return cluster->template localCovariance<3>()(2, 2); });
118 monitor_localX, monitor_localY, monitor_localT,
119 monitor_localCovXX, monitor_localCovYY, monitor_localCovTT,
120 monitor_globalX, monitor_globalY, monitor_globalZ, monitor_globalR,
122 return StatusCode::SUCCESS;