21 inline constexpr
T square(
const T&
x ) {
return x*
x; }
29 inline T bind_angle(
const T& angle )
31 if( angle >= M_PI )
return angle - 2*M_PI;
32 else if( angle < -M_PI )
return angle + 2*M_PI;
141 const auto phi = std::atan2( world_coordinates.y(), world_coordinates.x() );
142 const auto z = world_coordinates.z();
144 for(
size_t itile = 0; itile <
m_tiles.size(); ++itile )
148 if( std::abs( z -
tile.m_centerZ ) >
tile.m_sizeZ/2 )
continue;
149 if( std::abs( bind_angle(
phi -
tile.m_centerPhi ) ) >
tile.m_sizePhi/2 )
continue;
164 if( std::abs(local_coordinates.z() ) >=
m_thickness/2 )
166 std::cout <<
" CylinderGeomMicromegas::find_strip_from_world_coords - invalid world coordinates" << std::endl;
181 assert(
surface->bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle );
187 if( std::abs( local_coordinates.X() ) > half_length_x )
return -1;
190 if( std::abs( local_coordinates.Y() ) > half_length_y )
return -1;
196 return (
int) std::floor((local_coordinates.X() + half_length_x)/
m_pitch);
199 return (
int) std::floor((local_coordinates.Y() + half_length_y)/
m_pitch);
214 assert(
surface->bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle );
237 assert(
surface->bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle );
260 assert(
surface->bounds().type() == Acts::SurfaceBounds::BoundsType::eRectangle );
283 out <<
"CylinderGeomMicromegas" << std::endl;
284 out <<
"layer: " <<
m_layer << std::endl;
286 out <<
"drift_direction: " << (
m_drift_direction == MicromegasDefs::DriftDirection::INWARD ?
"INWARD":
"OUTWARD") << std::endl;
287 out <<
"radius: " <<
m_radius <<
"cm" << std::endl;
288 out <<
"thickness: " <<
m_thickness <<
"cm" << std::endl;
289 out <<
"zmin: " <<
m_zmin <<
"cm" << std::endl;
290 out <<
"zmax: " <<
m_zmax <<
"cm" << std::endl;
291 out <<
"pitch: " <<
m_pitch <<
"cm" << std::endl;
298 const auto radius =
get_r( world_coordinates.x(), world_coordinates.y() );