Skip to content
Snippets Groups Projects
Select Git revision
  • 8d55f28c8d0f795a3d31ebe1f5241692c697c037
  • master default
  • yezhenyu-btof-20210520
  • 41-detailed-zero-degree-calorimeter-hcal
  • testBranchRobin
  • 73-pion-rejection-yr-benchmark
  • default_visibilities
  • view_update
  • wdconinc-ecal-testing
  • 65-trigger-detector-benchmarks
  • upstream_trigger
  • 14-implement-cb_vtx_endcaps
  • 28-implement-ffi_offm_trk-2
  • 32-implement-ffi_rpot_d2
  • 27-implement-fi_b0_emcal
  • 15-implement-cb_sidiscs
  • 24-implement-ci_hcal
  • fix_ci_GEM
  • 8-implement-cb_ctd
  • Implement_AMEGOX_layers
  • yezhenyu_work_master
  • v0.2.0
  • v0.1.0
23 results

ffi_ZDC_HCAL.cpp

Blame
  • GeometryHelpers.h 1.03 KiB
    #pragma once
    #include <vector>
    #include "Math/Point2D.h"
    
    // some utility functions that can be shared
    namespace athena::geo {
    
    using Point =  ROOT::Math::XYPoint;
    
    /** Fill rectangles in a ring (disk).
     *
     * @param ref  2D reference point.
     * @param sx   x side length
     * @param sy   y side length
     * @param rmin inner radius of disk
     * @param rmax  outer radius of disk to fill
     * @param phmin  phi min
     * @param phmax phi max
     */
    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