1 #ifndef FixedPadSizeDiskLayout_h
2 #define FixedPadSizeDiskLayout_h 1
5 #include "gearimpl/FixedDiskLayoutBase.h"
45 std::vector<Row> _rows {};
46 std::vector<double> _extent {};
47 mutable std::vector< std::vector<int>* > _padIndices {};
73 double phiMax=2*M_PI) ;
89 PadRowLayout2D*
clone()
const;
93 virtual double getPadGap()
const {
return _padGap ; }
114 virtual int getPadShape()
const {
return PadRowLayout2D::RECTANGLE ; }
148 virtual const std::vector<int>&
getPadsInRow(
int rowNumber)
const ;
157 virtual int getRowNumber(
int padIndex)
const {
return ( 0xffff0000 & padIndex ) >> 16 ; }
161 virtual int getPadNumber(
int padIndex)
const {
return ( 0x0000ffff & padIndex ) ; }
165 virtual int getPadIndex(
int rowNum,
int padNum)
const;
182 virtual bool isInsidePad(
double c0,
double c1,
int padIndex)
const;
186 virtual bool isInsidePad(
double c0,
double c1)
const;
191 #endif // ifndef FixedPadSizeDiskLayout_h
FixedPadSizeDiskLayout(double rMin, double rMax, double padHeight, double PadWidth, int nRow=0, double padGap=0., double phiMax=2 *M_PI)
Construct the FixedPadSizeDiskLayout from the given parameters rMin, rMax, padHeight and PadWidth whe...
FixedPadSizeDiskLayout & operator=(const FixedPadSizeDiskLayout &)
The assignment operator.
virtual int getNRows() const
The number of rows.
virtual double getRowHeight(int) const
The row height in mm.
virtual double getPadPitch(int padIndex) const
The pitch of the pad in radians (metal + gap)
void copy_and_assign(const FixedPadSizeDiskLayout &)
function to copy all internal variables, incl.
virtual int getPadNumber(int padIndex) const
The pad number (column) within the row - numbering starts at phi/x =.
void cleanup()
function to delete all the objects pointed to and owned by the FixedPadSizeDiskLayout.
Implementation of PadRowLayout2D for a disk with fixed sized keystone pads.
virtual int getNearestPad(double c0, double c1) const
The index of the pad nearest to the given point in 2d coordinates (x,y,) or (r,phi).
Base class for circular PadRowLayout2D implementations.
virtual int getPadShape() const
The shape of the pads: PadRowLayout2D::RECTANGLE (i.e.
virtual double getPadGap() const
The gap width in mm that was given in the C'tor.
virtual int getRightNeighbour(int padIndex) const
The index of the right neighbour pad.
virtual bool isInsidePad(double c0, double c1, int padIndex) const
True if coordinate (c0,c1) is within the given pad.
virtual double getFixedPadWidth() const
The fixed width of the pads in mm.
virtual double getPadHeight(int) const
The height of the pad in mm.
Internal helper class for FixedPadSizeDiskLayout.
virtual int getPadLayoutImplType() const
The type of the row layout implementation: PadRowLayout2D.FIXEDPADSIZEDISKLAYOUT. ...
virtual int getLeftNeighbour(int padIndex) const
The index of the left neighbour pad.
virtual int getNPads() const
The total number of pads in the TPC.
virtual int getPadIndex(int rowNum, int padNum) const
Create a padIndex for the given row and pad ( column ) number.
virtual const std::vector< double > & getPlaneExtent() const
Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.
virtual const std::vector< int > & getPadsInRow(int rowNumber) const
Indices of all pads in row rowNumber (row indices start from 0 at the bottom (CARTESIAN) or at the ce...
virtual int getRowNumber(int padIndex) const
The number of the row that contains the pad at padIndex - numbering starts at r/y==0.
virtual Vector2D getPadCenter(int padIndex) const
The center of the pad in 2d coordinates, (x,y) or (r,phi).
PadRowLayout2D * clone() const
Returns a copy (clone) of this class.
virtual ~FixedPadSizeDiskLayout()
Destructor.
virtual double getPadWidth(int padIndex) const
The width of the pad in radians (only the metal)