Forked from
EIC / detectors / athena
210 commits behind the upstream repository.
GeometryHelpers.h 811 B
#pragma once
#include <vector>
#include "Math/Point2D.h"
// some utility functions that can be shared
namespace athena::geo {
typedef ROOT::Math::XYPoint Point;
// fill rectangles in a ring
std::vector<Point> fillRectangles(Point ref, double sx, double sy, double rmin, double rmax,
double phmin = -M_PI, double phmax = M_PI);
// fill squares in a ring
inline std::vector<Point> fillSquares(Point ref, double size, double rmin, double rmax,
double phmin = -M_PI, double phmax = M_PI)
{
return fillRectangles(ref, size, size, rmin, rmax, phmin, phmax);
}
std::vector<Point> fillHexagons(Point ref, double lside, double rmin, double rmax,
double phmin = -M_PI, double phmax = M_PI);
} // athena::geo