4 #ifndef GEAR_TPCMODULE_H
5 #define GEAR_TPCMODULE_H 1
10 #include "gear/GearParameters.h"
11 #include "gear/PadRowLayout2D.h"
52 message =
"gear::TPCModule::NoZPositionException: Set the z position of a module before calling getZPosition(). There is no useful default value.";
99 virtual const std::vector<int> &
getPadsInRow(
int rowNumber)
const = 0;
147 virtual int getPadIndex(
int rowNum,
int padNum)
const = 0;
164 virtual bool isInsidePad(
double c0,
double c1,
int padIndex)
const = 0;
168 virtual bool isInsidePad(
double c0,
double c1)
const = 0;
198 virtual double getAngle()
const = 0;
virtual Vector2D getPadCenter(int padIndex) const =0
The center of the pad in global 2D coordinates, (x,y) or (r,phi).
virtual Vector2D globalToLocal(double c0, double c1) const =0
Returns the local coordinates for a point in global coordinates.
virtual double getZPosition() const =0
Returns the z position of the module.
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
Base exception class for GEAR - all other exceptions extend this.
virtual double getDistanceToPad(double c0, double c1, int index) const =0
Returns the distance from a global coodinate (c0,c1), to a given pad's nearest boundery; (c0...
virtual int getRightNeighbour(int padIndex) const =0
The index of the right neighbour pad.
virtual const Vector2D & getOffset() const =0
Returns the offest of Modules origin from the global origin A vector from Global (0,0) to module (0,0)
virtual double getPadHeight(int padIndex) const =0
The height of the pad in mm.
virtual int getNRows() const =0
The number of rows on this module.
virtual bool isInsidePad(double c0, double c1, int padIndex) const =0
True if global coordinate (c0,c1) is within the given pad.
virtual int getPadIndex(int rowNum, int padNum) const =0
Create a padIndex for the given row and pad ( column ) number.
virtual bool isInsideModule(double c0, double c1) const =0
True if global coordinate (c0,c1) is within this modules area of amplification/interest.
virtual Vector2D localToGlobal(double c0, double c1) const =0
Returns the global coordinates for a point in local coordinates.
virtual int getLeftNeighbour(int padIndex) const =0
The index of the left neighbour pad.
Abstract interface for a set of parameters that can be used to describe the geometrical properties of...
virtual const PadRowLayout2D & getLocalPadLayout() const =0
Returns a reference to the instance of the underlaying pad layout.
virtual int getPadShape() const =0
The shape of the pads, one of PadRowLayout2D.RECTANGLE (Keystone) , PadRowLayout2D.DIAMOND, PadRowLayout2D.HEXAGON, PadRowLayout2D.CHEVRON.
virtual double getPadWidth(int padIndex) const =0
The width of the pad at padIndex in mm (CARTESIAN) or radians (POLAR).
virtual double getReadoutFrequency() const =0
The readout frequency in Hz.
virtual const std::vector< double > & getLocalModuleExtent() const =0
The module extent in local coordinates.
virtual int getModuleID() const =0
Returns module ID.
virtual int getNPads() const =0
The total number of pads on this module.
virtual double getAngle() const =0
Returns the rotation of the module, in Rads, with respect to the modules internal origin...
virtual ~TPCModule()
Destructor.
virtual double getBorderWidth() const =0
Returns the amount by which the pad plane has been extended to produce the module plane...
virtual int getTPCCoordinateType() const =0
Returns the TPCs coordinate type.
virtual const std::vector< double > & getPlaneExtent() const =0
Inherited from PadRowLayout2D.
virtual int getPadNumber(int padIndex) const =0
The pad number (column) within the row - numbering starts at lowest phi/x.
virtual const std::vector< int > & getPadsInRow(int rowNumber) const =0
Indices of all pads in row rowNumber (row indices start from 0 at the bottom (CARTESIAN) or at the ce...
virtual bool isOverlapping(TPCModule *testThisModule) const =0
Returns True if this and The given module * overlap pad regions Note: overlaping sensitive regions is...
virtual double getRowHeight(int rowNumber) const =0
The row height in mm.
An exception that is special for the TPCModule.
virtual const std::vector< double > & getModuleExtent() const =0
Maximal extent of the sensitive plane, defined relative to global origin - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR, may contain dead space due to conversion from local to global coordinate system.
A wrapper Class for PadRowLayout2D which converts between the actual pad layouts local coodinate syst...
virtual double getDistanceToModule(double c0, double c1) const =0
Returns distastance from a global coodinate (c0,c1), to the module's nearest boundery; (c0...
virtual int getRowNumber(int padIndex) const =0
The number of the row within this module that contains the pad at padIndex - numbering starts at lowe...
virtual int getNearestPad(double c0, double c1) const =0
The index of the pad nearest to the given point in global 2D coordinates, (x,y,) or (r...
virtual int getPadLayoutType() const =0
The type of the row layout: PadRowLayout2D.CARTESIAN or PadRowLayout2D.POLAR.