1 #ifndef VersatileDiskRowLayout_h
2 #define VersatileDiskRowLayout_h 1
5 #include "gearimpl/FixedDiskLayoutBase.h"
50 double distanceToPhiMin(
double r,
double phi)
const;
51 double distanceToPhiMax(
double r,
double phi)
const;
54 Row(
int rowNumber,
int nPads,
double rCentre,
double padPitch_mm,
double rowHeight,
55 double padWidth_mm,
double padHeight,
double offset_mm);
57 int getNPads()
const {
return _nPads;}
59 double getPadPitch()
const {
return _padPitch;}
61 double getPadWidth()
const {
return _padWidth;}
62 double getRowHeight()
const {
return _rowHeight;}
63 double getPadHeight()
const {
return _padHeight;}
64 double getOffset_mm()
const {
return _offset_mm;}
65 double getOffset()
const {
return _offset;}
66 double getRCentre()
const {
return _rCentre;}
67 double getPhiMin()
const {
return _offset;}
68 double getPhiMax()
const {
return _phiMax;}
69 double getRMin()
const {
return _rMin;}
70 double getRMax()
const {
return _rMax;}
132 virtual void addRow(
int nPads ,
double padPitch ,
double rowHeight ,
133 double offset = 0.,
double padWidth =0.,
double padHeight = 0.,
160 virtual int getPadShape()
const {
return PadRowLayout2D::RECTANGLE ; }
194 virtual const std::vector<int>&
getPadsInRow(
int rowNumber)
const ;
207 virtual int getPadNumber(
int padIndex)
const {
return ( 0x0000ffff & padIndex ) ; }
211 virtual int getPadIndex(
int rowNum,
int padNum)
const;
228 virtual bool isInsidePad(
double c0,
double c1,
int padIndex)
const;
232 virtual bool isInsidePad(
double c0,
double c1)
const;
243 #endif // ifndef VersatileDiskRowLayout_h
double getDistanceToRow(double r, double phi) const
Function to calculate closest distance to the row.
bool _isFrayed
Flag that describes if the geometry is frayed.
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
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).
int _nPad
number of pads, keep for performance reasons
virtual const std::vector< double > & getPlaneExtent() const
Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.
virtual bool isInsidePad(double c0, double c1, int padIndex) const
True if coordinate (c0,c1) is within the given pad.
double _rMax
upper edge of the pad (incl.gap)
PadRowLayout2D * clone() const
Returns a copy (clone) of this class.
int getNearestPad(double r, double phi) const
Function to determine the nearest pad in the row.
VersatileDiskRowLayout(double rMin)
Construct the VersatileDiskRowLayout.
const std::vector< Row > & rows() const
Get access to the individual rows.
Base class for circular PadRowLayout2D implementations.
double _padPitch_mm
the pad pitch in mm
virtual bool isFrayed() const
Get information whether geometry has large staggering.
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 getPadIndex(int rowNum, int padNum) const
Create a padIndex for the given row and pad ( column ) number.
VersatileDiskRowLayout & operator=(const VersatileDiskRowLayout &)
The assignment operator.
virtual int getNPads() const
The total number of pads in the TPC.
virtual void addRow(int nPads, double padPitch, double rowHeight, double offset=0., double padWidth=0., double padHeight=0., int repeat=1)
Add 'repeat' rows with the given parameters.
double _padWidth_mm
the pad width (without gap) in mm
int _rowNumber
the row number
virtual int getRowNumber(int padIndex) const
The number of the row that contains the pad at padIndex - numbering starts at r/y==0.
double _rowHeight
the row height in mm
virtual int getPadNumber(int padIndex) const
The pad number (column) within the row - numbering starts at phi/x =.
virtual int getNRows() const
The number of rows.
virtual int getPadShape() const
The shape of the pads: PadRowLayout2D::RECTANGLE (i.e.
virtual Vector2D getPadCenter(int padIndex) const
The center of the pad in 2d coordinates, (x,y) or (r,phi).
double _phiMax
the maximum Angle of this row
virtual int getPadLayoutImplType() const
The type of the row layout implementation: PadRowLayout2D.FIXEDPADSIZEDISKLAYOUT. ...
double _offset_mm
the offset (staggering) with respect to phi=0 in mm
double _padPitch
the pad pitch in radians
void cleanup()
function to delete all the objects pointed to and owned by the VersatileDiskRowLayout.
Internal helper class for VersatileDiskRowLayout, describing one row.
std::vector< std::vector< int > * > _padIndices
vector for getPadsInRow
void copy_and_assign(const VersatileDiskRowLayout &)
function to copy all internal variables, incl.
virtual double getPadHeight(int padIndex) const
The height of the pad in mm.
double _padWidth
the pad width (without gap) in radians
virtual double getRowHeight(int rowNumber) const
The row height in mm.
virtual double getPadPitch(int padIndex) const
The pitch of the pad in radians.
virtual ~VersatileDiskRowLayout()
Destructor.
virtual double getPadWidth(int padIndex) const
The width of the pad in radians.
std::vector< Row > _rows
vector with all the rows of the pad plane
std::vector< double > _extent
the plane extent
double _rCentre
radius at the pad centre
double _offset
the offset (staggering) with respect to phi=0 in radians, aka phiMin
double _rMin
lower edge of the pad (incl. gap)
Implementation of PadRowLayout2D for a wedge shaped module.
double _padHeight
the height of the pad (without gap)
virtual int getLeftNeighbour(int padIndex) const
The index of the left neighbour pad.
virtual int getPadLayoutType() const
virtual int getRightNeighbour(int padIndex) const
The index of the right neighbour pad.
int _nPads
number of pads in the row