Main Page | Class Hierarchy | Class List | File List | Class Members

gear::RectangularPadRowLayout Class Reference

Implementation of PadRowLayout2D for a rectangular row based layout where all pads in a given row are equal and have rectangular shape. More...

#include <RectangularPadRowLayout.h>

Inheritance diagram for gear::RectangularPadRowLayout:

gear::PadRowLayout2D List of all members.

Public Member Functions

 RectangularPadRowLayout (double xMin, double xMax, double yMin=0.0)
 Construct the empty RectangularPadRowLayout with the width and x position specified through xMin and xMax and an optional yMin - yMax will be computed from the rows that are added with addRow().

virtual ~RectangularPadRowLayout ()
 Destructor.

virtual void addRow (int nRow, int nPad, double padWidth, double padHeight, double rowHeight=0.0, double leftOffset=0.0, double rightOffset=0.0)
 Add nRow rows with the given parameters.

virtual void repeatRows (unsigned count)
 Repeat the current rows 'count' times - this allows to easily repeat a pattern of several rows, e.g.

int getRepeatRowCount () const
 Returns the number number for which a given row pattern has been repaeted.

virtual int getPadLayoutType () const
 The type of the row layout: PadRowLayout2D::CARTESIAN.

virtual int getPadShape () const
 The shape of the pads: PadRowLayout2D::RECTANGLE (i.e.

virtual int getNPads () const
 The total number of pads in the TPC.

virtual int getNRows () const
 The number of rows.

virtual double getRowHeight (int rowNumber) const
 The row height in mm.

virtual double getPadHeight (int padIndex) const
 The height of the pad in mm.

virtual double getPadWidth (int padIndex) const
 The width of the pad in radians NB!

virtual Point2D getPadCenter (int padIndex) const
 The center of the pad in 2d coordinates, (x,y) or (r,phi).

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 center (POLAR)).

virtual const std::vector<
double > & 
getPlaneExtent () const
 Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.

virtual int getRowNumber (int padIndex) const
 The number of the row that contains the pad at padIndex - numbering starts at y==0 (bottom).

virtual int getPadNumber (int padIndex) const
 The pad number (column) within the row - numbering starts at x==0 (left).

virtual int getPadIndex (int rowNum, int padNum) const
 Create a padIndex for the given row and pad ( column ) number.

virtual int getNearestPad (double x, double y) const
 The index of the pad nearest to the given point in 2d coordinates (x,y,) or (r,phi).

virtual int getRightNeighbour (int padIndex) const
 The index of the right neighbour pad.

virtual int getLeftNeighbour (int padIndex) const
 The index of the left neighbour pad.

virtual bool isInsidePad (double x, double y, int padIndex) const
 True if coordinate (x,y) is within the given pad.

virtual bool isInsidePad (double x, double y) const
 True if coordinate (x,y) is within any pad.

const std::vector< unsigned > & equalRowNumbers () const
 Helper method to identify equal row numbers in this layout (as they have been added).

const std::vector< Row > & rows () const
 Helper method with all row data.


Protected Member Functions

double distanceToBox (const Point2D &p, double xMin, double yMin, double xMax, double yMax) const
 Helper function for finding the nearest pad - returns the distance for points outside the box and -1.


Protected Attributes

int _nRow
int _nPad
int _repeatRows
std::vector< Row_rows
std::vector< double > _extent
std::vector< std::vector<
int > * > 
_padIndices
std::vector< unsigned > _nRows

Detailed Description

Implementation of PadRowLayout2D for a rectangular row based layout where all pads in a given row are equal and have rectangular shape.

However rows can vary in height and layout. The pads with the given height and width are distributed in the rows symmetrically where an optional uninstrumented left or right offset is taken into account (this allows, e.g. staggering of rows). Rows are specified/filled from the bottom up. Uninstrumented areas on the plane will occur if a row height is given that exceeds the pad height and/or if the pads don't fill the complete row (minus the left/right offset).
This code is in parts based on ideas and an extension of original implementations by M. Weber RWTH Aachen and J. McGeachie UVic, Ca..

Author:
F. Gaede, DESY
Version:
Id
RectangularPadRowLayout.h,v 1.2 2006/05/12 12:56:31 gaede Exp


Member Function Documentation

double gear::RectangularPadRowLayout::distanceToBox const Point2D p,
double  xMin,
double  yMin,
double  xMax,
double  yMax
const [protected]
 

Helper function for finding the nearest pad - returns the distance for points outside the box and -1.

for points inside.

virtual int gear::RectangularPadRowLayout::getPadShape  )  const [inline, virtual]
 

The shape of the pads: PadRowLayout2D::RECTANGLE (i.e.

keystone).

Implements gear::PadRowLayout2D.

virtual void gear::RectangularPadRowLayout::repeatRows unsigned  count  )  [virtual]
 

Repeat the current rows 'count' times - this allows to easily repeat a pattern of several rows, e.g.

2 rows offset to each other by half a padWidth (staggering). Can only be called once per layout, i.e. no multiple rpeat patterns are allowed.


The documentation for this class was generated from the following file:
Generated on Tue Sep 5 11:36:31 2006 for Gear by doxygen 1.3.5