GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
Classes | Public Member Functions | List of all members
gear::TPCModule Class Referenceabstract

A wrapper Class for PadRowLayout2D which converts between the actual pad layouts local coodinate system and the TPCs global coordinate systems. More...

#include <TPCModule.h>

Inheritance diagram for gear::TPCModule:
gear::GearParameters gear::PadRowLayout2D gear::TPCModuleImpl

Classes

class  NoZPositionException
 An exception that is special for the TPCModule. More...
 

Public Member Functions

virtual ~TPCModule ()
 Destructor.
 
virtual int getPadLayoutType () const =0
 The type of the row layout: PadRowLayout2D.CARTESIAN or PadRowLayout2D.POLAR.
 
virtual int getPadShape () const =0
 The shape of the pads, one of PadRowLayout2D.RECTANGLE (Keystone) , PadRowLayout2D.DIAMOND, PadRowLayout2D.HEXAGON, PadRowLayout2D.CHEVRON.
 
virtual int getNPads () const =0
 The total number of pads on this module.
 
virtual int getNRows () const =0
 The number of rows on this module.
 
virtual double getRowHeight (int rowNumber) const =0
 The row height in mm.
 
virtual double getPadWidth (int padIndex) const =0
 The width of the pad at padIndex in mm (CARTESIAN) or radians (POLAR).
 
virtual Vector2D getPadCenter (int padIndex) const =0
 The center of the pad in global 2D coordinates, (x,y) or (r,phi).
 
virtual double getPadHeight (int padIndex) const =0
 The height of the pad in mm.
 
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 center (POLAR)).
 
virtual const std::vector
< double > & 
getPlaneExtent () const =0
 Inherited from PadRowLayout2D. More...
 
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. More...
 
virtual const std::vector
< double > & 
getLocalModuleExtent () const =0
 The module extent in local coordinates. More...
 
virtual int getRowNumber (int padIndex) const =0
 The number of the row within this module that contains the pad at padIndex - numbering starts at lowest r/y.
 
virtual int getPadNumber (int padIndex) const =0
 The pad number (column) within the row - numbering starts at lowest phi/x.
 
virtual int getPadIndex (int rowNum, int padNum) const =0
 Create a padIndex for the given row and pad ( column ) number.
 
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,phi).
 
virtual int getRightNeighbour (int padIndex) const =0
 The index of the right neighbour pad.
 
virtual int getLeftNeighbour (int padIndex) const =0
 The index of the left neighbour pad.
 
virtual bool isInsidePad (double c0, double c1, int padIndex) const =0
 True if global coordinate (c0,c1) is within the given pad.
 
virtual bool isInsidePad (double c0, double c1) const =0
 True if global coordinate (c0,c1) is within any pad.
 
virtual bool isInsideModule (double c0, double c1) const =0
 True if global coordinate (c0,c1) is within this modules area of amplification/interest. More...
 
virtual double getReadoutFrequency () const =0
 The readout frequency in Hz.
 
virtual const Vector2DgetOffset () const =0
 Returns the offest of Modules origin from the global origin A vector from Global (0,0) to module (0,0)
 
virtual double getZPosition () const =0
 Returns the z position of the module. More...
 
virtual double getAngle () const =0
 Returns the rotation of the module, in Rads, with respect to the modules internal origin.
 
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,c1,index)
 
virtual double getDistanceToModule (double c0, double c1) const =0
 Returns distastance from a global coodinate (c0,c1), to the module's nearest boundery; (c0,c1)
 
virtual int getModuleID () const =0
 Returns module ID.
 
virtual bool isOverlapping (TPCModule *testThisModule) const =0
 Returns True if this and The given module * overlap pad regions Note: overlaping sensitive regions is ok, Just no two pads with shared physical space.
 
virtual double getBorderWidth () const =0
 Returns the amount by which the pad plane has been extended to produce the module plane. More...
 
virtual int getTPCCoordinateType () const =0
 Returns the TPCs coordinate type. More...
 
virtual const PadRowLayout2DgetLocalPadLayout () const =0
 Returns a reference to the instance of the underlaying pad layout. More...
 
virtual Vector2D globalToLocal (double c0, double c1) const =0
 Returns the local coordinates for a point in global coordinates. More...
 
virtual Vector2D localToGlobal (double c0, double c1) const =0
 Returns the global coordinates for a point in local coordinates. More...
 
- Public Member Functions inherited from gear::GearParameters
virtual ~GearParameters ()
 Destructor.
 
virtual int getIntVal (const std::string &key) const =0
 Integer value for key. More...
 
virtual double getDoubleVal (const std::string &key) const =0
 Double value for key. More...
 
virtual const std::string & getStringVal (const std::string &key) const =0
 String value for key. More...
 
virtual const std::vector< int > & getIntVals (const std::string &key) const =0
 Integer values for key. More...
 
virtual const std::vector
< double > & 
getDoubleVals (const std::string &key) const =0
 Double values for key. More...
 
virtual const std::vector
< std::string > & 
getStringVals (const std::string &key) const =0
 String values for key. More...
 
virtual const std::vector
< std::string > & 
getIntKeys () const =0
 All keys of int variables. More...
 
virtual const std::vector
< std::string > & 
getDoubleKeys () const =0
 All keys of double variables. More...
 
virtual const std::vector
< std::string > & 
getStringKeys () const =0
 All keys of string variables. More...
 
virtual const std::vector
< std::string > & 
getIntVecKeys () const =0
 All keys of IntVec variables. More...
 
virtual const std::vector
< std::string > & 
getDoubleVecKeys () const =0
 All keys of DoubleVec variables. More...
 
virtual const std::vector
< std::string > & 
getStringVecKeys () const =0
 All keys of StringVec variables. More...
 
- Public Member Functions inherited from gear::PadRowLayout2D
virtual ~PadRowLayout2D ()
 Destructor.
 
virtual PadRowLayout2Dclone () const =0
 Returns a copy (clone) of this class. More...
 
virtual int getPadLayoutImplType () const =0
 The type of the row layout implementation: PadRowLayout2D.RECTANGULARPADROWLAYOUT, PadRowLayout2D.FIXEDPADSIZEDISKLAYOUT, PadRowLayout2D.FIXEDPADANGLEDISKLAYOUT or PadRowLayout2D.TPCMODULE.
 
virtual int getCoordinateType () const =0
 The type of the row layouts coordinate system: PadRowLayout2D.CARTESIAN or PadRowLayout2D.POLAR.
 
virtual double getPadPitch (int padIndex) const =0
 The pitch (i. More...
 

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

A wrapper Class for PadRowLayout2D which converts between the actual pad layouts local coodinate system and the TPCs global coordinate systems.

Adds some module appropriate functionality.

The local pad layout, which is contained in the module, can have an offset and be rotated with respect to the global coordinate system, and it can have a different coodinate type.

The global coordinate type of the TPC can be chosen by the user (usually cartesian is the right choise. Global polar coordinates only make sense if there is no offset and the local coordinate systems are also polar). The local coordinate type is determinded by the local pad geometry (type of the pad layout).

For a visualisation of the module specific parameters please refer to the documentation of the XML syntax in TPCModuleXML.

New in v00-15: The z position of the module can be set to distinguish the two end plates.

Attention
For the "negative" half TPC (the half with drift direction in negative z direction) the x coodinate of global system is mirrored. The reason is that in case of two identical end plates, the one mounted on the negative side is rotated by 180 degrees around the y axis, which changes the z coordinate (drift direction) and the x coordinate. The prototype case, which is described by zPosition = 0, also has the drift direction in negative z direction.

original author F. Gaede, DESY

Author
M. Killenberg, (Bonn) S. Turnbull, (Saclay/Carleton)

Definition at line 41 of file TPCModule.h.

Member Function Documentation

virtual double gear::TPCModule::getBorderWidth ( ) const
pure virtual

Returns the amount by which the pad plane has been extended to produce the module plane.

In cartesian coordinates the plane is extended in x and y by this ammount on all sides.

In polar coordinates the r-coordinate is extended by the borderwidth, in $\varphi$ it is extended by an angle corresponding to borderWidth/rMin, so that the border is at least boderWidth at the inner radius and somewhat wider for larger r.

Implemented in gear::TPCModuleImpl.

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

virtual const std::vector<double>& gear::TPCModule::getLocalModuleExtent ( ) const
pure virtual

The module extent in local coordinates.

This is the (local) pad plane, enlarged by the border. As the plane extent in global coordinates does not correspond to the actual shape, this is the only way to describe the module extent without dead space (everything in the module extent is considerred active, for instance due to a resistive coating which causes signals even if there is no pad at the specific position).

Attention
Returns LOCAL coordinates!

Implemented in gear::TPCModuleImpl.

virtual const PadRowLayout2D& gear::TPCModule::getLocalPadLayout ( ) const
pure virtual

Returns a reference to the instance of the underlaying pad layout.

Attention
This pad layout has it's own, local coordinate system! Usually it is not necessary to deal with the pad layout directly. It is preferred to use the modules memberfunctions, since the module is an implementation of PadRowLayout2D which is implemented such that all coordinates are delivered in global coordinates. However there are cases it can be handy to have the local coordinates available, for instance for debugging or to perform the coordinate transformations on the graphics processor for an event display.

Implemented in gear::TPCModuleImpl.

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

virtual const std::vector<double>& gear::TPCModule::getModuleExtent ( ) const
pure virtual

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.

The sensitive plane / amplification plane is the pad plane extended by a border (see getBorderWidth()). This allows the gas amplification structure to be larger than the pad plane, which in the case of a resistive coating will also produce signal on the pad plane for electrons arriving within this border.

Note: Amplification planes may overlap, pad planes may not.

Implemented in gear::TPCModuleImpl.

Referenced by gear::TPCParametersImpl::addModule().

virtual const std::vector<double>& gear::TPCModule::getPlaneExtent ( ) const
pure virtual

Inherited from PadRowLayout2D.

It gives the minimal set of global coodinates that contains the pad plane. In general this does not mean that the global plane extent if fully covered with avtive area, but only that there is no active area outside the plane extent.

Implements gear::PadRowLayout2D.

Implemented in gear::TPCModuleImpl.

virtual int gear::TPCModule::getTPCCoordinateType ( ) const
pure virtual

Returns the TPCs coordinate type.

Note that this is NOT the coordinate type of the (local) pad plane on the module but of the end plate this module is mounted in.

Implemented in gear::TPCModuleImpl.

Referenced by gear::TPCParametersImpl::addModule().

virtual double gear::TPCModule::getZPosition ( ) const
pure virtual

Returns the z position of the module.

This is the position of the anode surface terminating the drift volume. For prototypes this will typically be 0 so z is propotional to the drift distance. For a full detector positive and negative values correspond to modules on the first and second end cap, resepctively. It throws a gear::TPCModule::NoZPositionException in case setZPosition has not been called before.

Implemented in gear::TPCModuleImpl.

Referenced by gear::TPCParametersImpl::addModule(), and gear::TPCModuleXML::toXML().

virtual Vector2D gear::TPCModule::globalToLocal ( double  c0,
double  c1 
) const
pure virtual

Returns the local coordinates for a point in global coordinates.

It performs a complete coordinate transformation, applying the translation, rotation and coordinate conversion to the coordinate type of the local pad layout. Use getLocalPadLayout()->getCoordinateType() to interpret the return value correctly.

Usally you don't need this function since all member functions of the module use global coordinates only.

Implemented in gear::TPCModuleImpl.

virtual bool gear::TPCModule::isInsideModule ( double  c0,
double  c1 
) const
pure virtual

True if global coordinate (c0,c1) is within this modules area of amplification/interest.

i.e. the pad plane plus the surrounding border (see getBorderWidth() ).

Implemented in gear::TPCModuleImpl.

virtual Vector2D gear::TPCModule::localToGlobal ( double  c0,
double  c1 
) const
pure virtual

Returns the global coordinates for a point in local coordinates.

It performs a complete coordinate transformation, applying the coordinate conversion from the coordinate type of the local pad layout to the global coordinate type, rotation and translation. Use getLocalPadLayout()->getCoordinateType() to produce the input in the correct coordinate type.

Usally you don't need this fuction since all member functions of the module use global coordinates only.

Implemented in gear::TPCModuleImpl.


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