GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gear::FixedPadSizeDiskLayout Class Reference

Implementation of PadRowLayout2D for a disk with fixed sized keystone pads. More...

#include <FixedPadSizeDiskLayout.h>

Inheritance diagram for gear::FixedPadSizeDiskLayout:
gear::FixedDiskLayoutBase gear::PadRowLayout2D

Classes

struct  Row
 Internal helper class for FixedPadSizeDiskLayout. More...
 

Public Member Functions

 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 where the maximum number of pads are fitted to the plane. More...
 
 FixedPadSizeDiskLayout (const FixedPadSizeDiskLayout &)
 The copy constructor. More...
 
FixedPadSizeDiskLayoutoperator= (const FixedPadSizeDiskLayout &)
 The assignment operator.
 
virtual ~FixedPadSizeDiskLayout ()
 Destructor.
 
PadRowLayout2Dclone () const
 Returns a copy (clone) of this class. More...
 
virtual double getPadGap () const
 The gap width in mm that was given in the C'tor. More...
 
virtual double getFixedPadWidth () const
 The fixed width of the pads in mm.
 
virtual int getPadLayoutImplType () const
 The type of the row layout implementation: PadRowLayout2D.FIXEDPADSIZEDISKLAYOUT.
 
virtual int getPadShape () const
 The shape of the pads: PadRowLayout2D::RECTANGLE (i.e. More...
 
virtual int getNPads () const
 The total number of pads in the TPC.
 
virtual int getNRows () const
 The number of rows.
 
virtual double getRowHeight (int) const
 The row height in mm.
 
virtual double getPadHeight (int) const
 The height of the pad in mm.
 
virtual double getPadWidth (int padIndex) const
 The width of the pad in radians (only the metal)
 
virtual double getPadPitch (int padIndex) const
 The pitch of the pad in radians (metal + gap)
 
virtual Vector2D 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 r/y==0.
 
virtual int getPadNumber (int padIndex) const
 The pad number (column) within the row - numbering starts at phi/x =.
 
virtual int getPadIndex (int rowNum, int padNum) const
 Create a padIndex for the given row and pad ( column ) number.
 
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).
 
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 c0, double c1, int padIndex) const
 True if coordinate (c0,c1) is within the given pad.
 
virtual bool isInsidePad (double c0, double c1) const
 True if coordinate (c0,c1) is within any pad.
 
- Public Member Functions inherited from gear::FixedDiskLayoutBase
virtual int getPadLayoutType () const
 
virtual int getCoordinateType () const
 The type of the row layouts coordinate system: PadRowLayout2D.POLAR.
 
virtual double getDistanceToPad (double c0, double c1, int padIndex) const
 Returns the closest distance to the edge (outer border) of the pad.
 
- Public Member Functions inherited from gear::PadRowLayout2D
virtual ~PadRowLayout2D ()
 Destructor.
 

Protected Member Functions

void copy_and_assign (const FixedPadSizeDiskLayout &)
 function to copy all internal variables, incl. More...
 
void cleanup ()
 function to delete all the objects pointed to and owned by the FixedPadSizeDiskLayout. More...
 

Protected Attributes

double _rMin {}
 
double _rMax {}
 
double _phiMax {}
 
double _rowHeight {}
 
double _padWidth {}
 
double _padHeight {}
 
double _padGap {}
 
int _nRow {}
 
int _nPad {}
 
std::vector< Row_rows {}
 
std::vector< double > _extent {}
 
std::vector< std::vector< int > * > _padIndices {}
 

Additional Inherited Members

- Static Public Attributes inherited from gear::PadRowLayout2D
static const int RECTANGULARPADROWLAYOUT = 1
 
static const int FIXEDPADSIZEDISKLAYOUT = 2
 
static const int FIXEDPADANGLEDISKLAYOUT = 3
 
static const int VERSATILEDISKROWLAYOUT = 4
 
static const int TPCMODULE = 100
 
static const int CARTESIAN = 1
 
static const int POLAR = 2
 
static const int RECTANGLE = 1
 
static const int DIAMOND = 2
 
static const int HEXAGON = 3
 
static const int CHEVRON = 4
 

Detailed Description

Implementation of PadRowLayout2D for a disk with fixed sized keystone pads.

The pads with the given height and width are distributed in symmetrical rings starting with the pad number 0 above the x-axis so that the pad 0 is fully contained in the first quadrant (x>0,y>0 ) and symmetyrical to the last pad right below the the x-axis. The pad width is the width alog the ring's circumference at the middle of the row (through the pad center).

Author
F. Gaede, DESY
Version
$Id$

Definition at line 23 of file FixedPadSizeDiskLayout.h.

Constructor & Destructor Documentation

gear::FixedPadSizeDiskLayout::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 where the maximum number of pads are fitted to the plane.

Parameters
nRow: limits the number of rows - if given
padGap: additional gap between pads in r-phi in mm

Definition at line 28 of file FixedPadSizeDiskLayout.cc.

Referenced by clone().

gear::FixedPadSizeDiskLayout::FixedPadSizeDiskLayout ( const FixedPadSizeDiskLayout right)

The copy constructor.

Needed because _padIndices allocates memory dynamically

Definition at line 121 of file FixedPadSizeDiskLayout.cc.

References copy_and_assign().

Member Function Documentation

void gear::FixedPadSizeDiskLayout::cleanup ( )
protected

function to delete all the objects pointed to and owned by the FixedPadSizeDiskLayout.

Used by desctructor and assigment operator to avoid code duplication

Definition at line 21 of file FixedPadSizeDiskLayout.cc.

Referenced by operator=(), and ~FixedPadSizeDiskLayout().

PadRowLayout2D * gear::FixedPadSizeDiskLayout::clone ( ) const
virtual

Returns a copy (clone) of this class.

As PadRowLayout2D is an abstract interface with several implementation, this is used get a copy of the actual implementation without having to know what the actual implementation is.

Implements gear::PadRowLayout2D.

Definition at line 16 of file FixedPadSizeDiskLayout.cc.

References FixedPadSizeDiskLayout().

void gear::FixedPadSizeDiskLayout::copy_and_assign ( const FixedPadSizeDiskLayout right)
protected

function to copy all internal variables, incl.

the objects pointed to and owned by the FixedPadSizeDiskLayout. Used by constructor and assigment operator to avoid code duplication

Definition at line 133 of file FixedPadSizeDiskLayout.cc.

Referenced by FixedPadSizeDiskLayout(), and operator=().

virtual double gear::FixedPadSizeDiskLayout::getPadGap ( ) const
inlinevirtual

The gap width in mm that was given in the C'tor.

Definition at line 93 of file FixedPadSizeDiskLayout.h.

Referenced by gear::FixedPadSizeDiskLayoutXML::toXML().

virtual int gear::FixedPadSizeDiskLayout::getPadShape ( ) const
inlinevirtual

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

keystone).

Reimplemented from gear::FixedDiskLayoutBase.

Definition at line 114 of file FixedPadSizeDiskLayout.h.


The documentation for this class was generated from the following files: