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

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

#include <FixedPadAngleDiskLayout.h>

Inheritance diagram for gear::FixedPadAngleDiskLayout:
gear::FixedDiskLayoutBase gear::PadRowLayout2D

Public Member Functions

 FixedPadAngleDiskLayout (double rMin, double rMax, int nRow, double phiMin, double phiMax, int nPadsInRow)
 Construct the FixedPadAngleDiskLayout from the given parameters rMin, rMax, nRow, phiMin, phiMax, and nPadsInRow.
 
 FixedPadAngleDiskLayout (const FixedPadAngleDiskLayout &)
 The copy constructor. More...
 
FixedPadAngleDiskLayoutoperator= (const FixedPadAngleDiskLayout &)
 The assignment operator.
 
virtual ~FixedPadAngleDiskLayout ()
 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 getFixedPadAngle () const
 The fixed width of the pads in mm.
 
virtual int getPadLayoutImplType () const
 The type of the row layout implementation: PadRowLayout2D.FIXEDPADANGLEDISKLAYOUT.
 
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) const
 The width of the pad in radians! (In this implementation there is no gap, identical to the pad pitch)
 
virtual double getPadPitch (int) const
 The pitch of the pad in radians! (In this implementation there is no gap, identical to the pad width)
 
virtual Vector2D getPadCenter (int padIndex) const
 The center of the pad in 2d coordinates (r,phi).
 
virtual int getNPadsInRow () const
 Get the (fixed) number of pads per row. More...
 
virtual const std::vector< int > & getPadsInRow (int rowNumber) const
 Indices of all pads in row rowNumber (row indices start at rMin).
 
virtual const std::vector
< double > & 
getPlaneExtent () const
 Extent of the sensitive plane [rmin,rmax,phimin,phimax].
 
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 (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 int getPadShape () const
 The shape of the pads: PadRowLayout2D::RECTANGLE (i.e. keystone).
 
virtual int getRowNumber (int padIndex) const
 The number of the row that contains the pad at padIndex. More...
 
virtual int getPadNumber (int padIndex) const
 The pad number (column) within the row. More...
 
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 FixedPadAngleDiskLayout &)
 Function to copy all internal variables, incl. the objects pointed to and owned by the FixedPadAngleDiskLayout. More...
 
void cleanup ()
 Function to delete all the objects pointed to and owned by the FixedPadAngleDiskLayout. More...
 

Protected Attributes

double _rMin {}
 
double _rMax {}
 
int _nRow {}
 
double _rowHeight {}
 
double _phiMin {}
 
double _phiMax {}
 
double _padAngle {}
 
int _nPadsInRow {}
 
int _nPad {}
 
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 angled keystone pads.

The number of pads is distrubuted on a wedge shaped segment starting with the right edge of the first pad in the row at phiMin to the left edge of the last pad in the row at phiMax. All rows have the same height, starting at rmin for the lower edge of the first row to rmax for the upper edge of the last row. The row height is calculated from the number of pads.

Row height and pad height are identical, and pad gap is 0 (the only thing that matters is the effective pitch).

Author
M. Killenberg, University of Bonn
Version
$Id$

Definition at line 24 of file FixedPadAngleDiskLayout.h.

Constructor & Destructor Documentation

gear::FixedPadAngleDiskLayout::FixedPadAngleDiskLayout ( const FixedPadAngleDiskLayout right)

The copy constructor.

Needed because _padIndices allocates memory dynamically

Definition at line 110 of file FixedPadAngleDiskLayout.cc.

References copy_and_assign().

Member Function Documentation

void gear::FixedPadAngleDiskLayout::cleanup ( )
protected

Function to delete all the objects pointed to and owned by the FixedPadAngleDiskLayout.

Used by destructor and assignment operator to avoid code duplication.

Definition at line 21 of file FixedPadAngleDiskLayout.cc.

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

PadRowLayout2D * gear::FixedPadAngleDiskLayout::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 FixedPadAngleDiskLayout.cc.

References FixedPadAngleDiskLayout().

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

Function to copy all internal variables, incl. the objects pointed to and owned by the FixedPadAngleDiskLayout.

Used by constructor and assignment operator to avoid code duplication.

Definition at line 122 of file FixedPadAngleDiskLayout.cc.

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

virtual int gear::FixedPadAngleDiskLayout::getNPadsInRow ( ) const
inlinevirtual

Get the (fixed) number of pads per row.

Just returns the value set in the constructor.

Definition at line 145 of file FixedPadAngleDiskLayout.h.

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

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

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

Always 0 in this implementation.

Definition at line 87 of file FixedPadAngleDiskLayout.h.


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