17 #include <gsl/gsl_const_mksa.h>
27 template<
class T>
inline constexpr
T square(
const T&
x ) {
return x*
x; }
30 static constexpr
double speed_of_light = GSL_CONST_MKSA_SPEED_OF_LIGHT*1
e-7;
82 m_surfmaps = findNode::getClass<ActsSurfaceMaps>(topNode,
"ActsSurfaceMaps");
86 m_tGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
"ActsTrackingGeometry");
90 m_track_map = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
93 m_cluster_map = findNode::getClass<TrkrClusterContainer>(topNode,
"CORRECTED_TRKR_CLUSTER");
96 if(
Verbosity() > 0) std::cout <<
" Using CORRECTED_TRKR_CLUSTER node " << std::endl;
100 if(
Verbosity() > 0) std::cout <<
" CORRECTED_TRKR_CLUSTER node not found, using TRKR_CLUSTER" << std::endl;
101 m_cluster_map = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
135 const Acts::Vector2D orig_vect = {origin.x()-center_x, origin.y()-center_y };
140 std::cout <<
"PHTpcDeltaZCorrection -"
143 <<
" center: " << center_x <<
", " << center_y
144 <<
" radius: " << radius
152 const auto& cluster_key = *key_iter;
162 if(!cluster)
continue;
168 const double delta_z = global.z() - origin.z();
171 const Acts::Vector2D cluster_vect = {global.x()-center_x, global.y()-center_y};
175 cluster_vect.y()*orig_vect.x()-cluster_vect.x()*orig_vect.y(),
176 cluster_vect.x()*orig_vect.x() + cluster_vect.y()*orig_vect.y() );
179 const double pathlength = std::sqrt(
square( delta_z ) +
square( radius*delta_phi ) );
181 { std::cout <<
"PHTpcDeltaZCorrection::process_track - cluster: " << cluster_key <<
" path length: " << pathlength << std::endl; }
189 if( global.z() > 0 ) cluster->setLocalY( cluster->getLocalY()+z_correction);
190 else cluster->setLocalY( cluster->getLocalY()-z_correction);