1 #include "gearimpl/TPCModuleImpl.h"
2 #include "gearimpl/FixedPadSizeDiskLayout.h"
3 #include "gearimpl/RectangularPadRowLayout.h"
22 case PadRowLayout2D::POLAR :
26 case PadRowLayout2D::CARTESIAN :
30 throw gear::Exception(
"TPCModuleImpl::globalToLocal: unkown coorinate type");
41 case PadRowLayout2D::POLAR :
49 double localAngle = c1 -
_angle ;
51 if (localAngle < 0) localAngle+= 2*M_PI;
52 if (localAngle > 2*M_PI) localAngle+= 2*M_PI;
58 x = c0 * std::cos( c1 );
59 y = c0 * std::sin( c1 );
62 case PadRowLayout2D::CARTESIAN :
69 throw gear::Exception(
"TPCModuleImpl::globalToLocal: unkown coorinate type");
74 double y_prime = y - _offset_cartesian[1];
83 case PadRowLayout2D::POLAR :
85 toReturn[0] = std::sqrt(x_prime_rot*x_prime_rot + y_prime_rot*y_prime_rot);
86 toReturn[1] = atan2( y_prime_rot, x_prime_rot);
94 case PadRowLayout2D::CARTESIAN :
96 toReturn[0] = x_prime_rot;
97 toReturn[1] = y_prime_rot;
101 throw gear::Exception(
"TPCModuleImpl::localToGlobal: unkown coorinate type");
110 if ( _localIsGlobal )
116 double x_prime, y_prime;
119 case PadRowLayout2D::POLAR :
137 if (phi < 0) phi += 2*M_PI;
138 if (phi > 2*M_PI) phi -= 2*M_PI;
142 x_prime = r * std::cos( phi );
143 y_prime = r * std::sin( phi );
146 case PadRowLayout2D::CARTESIAN :
153 throw gear::Exception(
"TPCModuleImpl::localToGlobal: unkown coorinate type");
158 double y = y_prime + _offset_cartesian[1];
170 case PadRowLayout2D::POLAR :
172 toReturn[0] = std::sqrt(x*x+y*y);
173 toReturn[1] = atan2(y,x) ;
175 if ( toReturn[1] < 0 )
177 toReturn[1] += 2*M_PI;
181 case PadRowLayout2D::CARTESIAN :
188 throw gear::Exception(
"TPCModuleImpl::localToGlobal: unkown coorinate type");
206 case PadRowLayout2D::POLAR :
230 if (phiMax - phiMin > 2*M_PI)
233 phiBorder = (2*M_PI - phiMax + phiMin)/2.;
243 case PadRowLayout2D::CARTESIAN :
253 throw gear::Exception(
"TPCModuleImpl::convertLocalPlaneToGlobalPlaneExtend(): unkown coorinate type");
262 case PadRowLayout2D::POLAR :
266 case PadRowLayout2D::POLAR :
272 case PadRowLayout2D::CARTESIAN :
273 throw gear::NotImplementedException(
"TPCModuleImpl::convertLocalPlaneToGlobalPlaneExtend: not implemented for global polar/cartesian coordinates.");
280 throw gear::Exception(
"TPCModuleImpl::convertLocalPlaneToGlobalPlaneExtend():: unkown coorinate type");
285 case PadRowLayout2D::CARTESIAN :
289 case PadRowLayout2D::POLAR :
295 case PadRowLayout2D::CARTESIAN :
302 throw gear::Exception(
"TPCModuleImpl::convertLocalPlaneToGlobalPlaneExtend():: unkown coorinate type");
307 throw gear::Exception(
"TPCModuleImpl::convertLocalPlaneToGlobalPlaneExtend(): unkown coorinate type");
320 double xMin=firstEdge[0];
321 double xMax=firstEdge[0];
322 double yMin=firstEdge[1];
323 double yMax=firstEdge[1];
332 for (
unsigned int i = 0; i < 3 ; i++)
334 if (xMin > edges[i][0]) xMin = edges[i][0];
335 if (xMax < edges[i][0]) xMax = edges[i][0];
336 if (yMin > edges[i][1]) yMin = edges[i][1];
337 if (yMax < edges[i][1]) yMax = edges[i][1];
340 std::vector<double> globalExtent;
341 globalExtent.push_back(xMin);
342 globalExtent.push_back(xMax);
343 globalExtent.push_back(yMin);
344 globalExtent.push_back(yMax);
358 double xMin=firstEdge[0];
359 double xMax=firstEdge[0];
360 double yMin=firstEdge[1];
361 double yMax=firstEdge[1];
369 for (
unsigned int i = 0; i < 3 ; i++)
371 if (xMin > edges[i][0]) xMin = edges[i][0];
372 if (xMax < edges[i][0]) xMax = edges[i][0];
373 if (yMin > edges[i][1]) yMin = edges[i][1];
374 if (yMax < edges[i][1]) yMax = edges[i][1];
381 double testYMax = localOriginInGlobalCoordinates[1] + localExtent[1];
382 double localPhi1 =
globalToLocal( localOriginInGlobalCoordinates[0], testYMax )[1];
386 localPhi2 = localPhi1 + 2*M_PI;
388 localPhi2 = localPhi1 - 2*M_PI;
390 if ( ( (localPhi1 > localExtent[2]) && (localPhi1 < localExtent[3]) ) ||
391 ( (localPhi2 > localExtent[2]) && (localPhi2 < localExtent[3]) ) )
400 double testYMin = localOriginInGlobalCoordinates[1] - localExtent[1];
401 localPhi1 =
globalToLocal( localOriginInGlobalCoordinates[0], testYMin )[1];
405 localPhi2 = localPhi1 + 2*M_PI;
407 localPhi2 = localPhi1 - 2*M_PI;
411 if ( ( (localPhi1 > localExtent[2]) && (localPhi1 < localExtent[3]) ) ||
412 ( (localPhi2 > localExtent[2]) && (localPhi2 < localExtent[3]) ) )
419 double testXMax = localOriginInGlobalCoordinates[0] + localExtent[1];
420 localPhi1 =
globalToLocal( testXMax, localOriginInGlobalCoordinates[1] )[1];
423 localPhi2 = localPhi1 + 2*M_PI;
425 localPhi2 = localPhi1 - 2*M_PI;
427 if ( ( (localPhi1 > localExtent[2]) && (localPhi1 < localExtent[3]) ) ||
428 ( (localPhi2 > localExtent[2]) && (localPhi2 < localExtent[3]) ) )
435 double testXMin = localOriginInGlobalCoordinates[0] - localExtent[1];
436 localPhi1 =
globalToLocal( testXMin, localOriginInGlobalCoordinates[1] )[1];
439 localPhi2 = localPhi1 + 2*M_PI;
441 localPhi2 = localPhi1 - 2*M_PI;
443 if ( ( (localPhi1 > localExtent[2]) && (localPhi1 < localExtent[3]) ) ||
444 ( (localPhi2 > localExtent[2]) && (localPhi2 < localExtent[3]) ) )
450 std::vector<double> globalExtent;
451 globalExtent.push_back(xMin);
452 globalExtent.push_back(xMax);
453 globalExtent.push_back(yMin);
454 globalExtent.push_back(yMax);
467 double phiMin, phiMax;
471 phiMin = localExtent[2] +
_angle;
472 phiMax = localExtent[3] +
_angle;
476 phiMin = M_PI - localExtent[3] -
_angle;
477 phiMax = M_PI - localExtent[2] -
_angle;
481 while (phiMax > 2*M_PI) phiMax -= 2*M_PI;
482 while (phiMax < 0 ) phiMax += 2*M_PI;
485 while ( phiMin > phiMax ) phiMin -= 2*M_PI;
486 while ( phiMin < phiMax - 2*M_PI ) phiMin += 2*M_PI;
488 std::vector<double> globalExtent;
489 globalExtent.push_back(localExtent[0]);
490 globalExtent.push_back(localExtent[1]);
491 globalExtent.push_back(phiMin);
492 globalExtent.push_back(phiMax);
509 edges_global[0] =
localToGlobal(localExtent[0],localExtent[2] );
510 edges_global[1] =
localToGlobal(localExtent[0],localExtent[3] );
511 edges_global[2] =
localToGlobal(localExtent[1],localExtent[2] );
512 edges_global[3] =
localToGlobal(localExtent[1],localExtent[3] );
514 for (
int i=0; i<4; i++)
522 double phiTest1 = fmod(globalOriginInLocal[1], 2*M_PI);
525 phiTest2 = phiTest1 + 2*M_PI;
527 phiTest2 = phiTest1 - 2*M_PI;
531 if ( ( (phiTest1 > localExtent[2]) && (phiTest1 < localExtent[3]) ) ||
532 ( (phiTest2 > localExtent[2]) && (phiTest2 < localExtent[3]) ) )
541 if ( globalOriginInLocal[0] < localExtent[0] )
543 rMin = localExtent[0] - globalOriginInLocal[0] ;
546 if ( globalOriginInLocal[0] > localExtent[1] )
548 rMin = globalOriginInLocal[0] - localExtent[1];
556 rMin = edges_global[0][0];
559 for (
int i=1; i <4 ; i++)
561 if ( edges_global[i][0] < rMin ) rMin = edges_global[i][0];
567 if ( globalOriginInLocal[0] > localExtent[0] )
576 double phiMinEdge = localExtent[2];
577 double phi= globalOriginInLocal[1];
578 double r = globalOriginInLocal[0];
582 double r_intersect_phiMin = r * (cos(phi)*cos(phiMinEdge) + sin(phi)*sin(phiMinEdge));
583 double m_phiMin = fabs (r * (cos(phi)*sin(phiMinEdge) - sin(phi)*cos(phiMinEdge)));
589 if ( (r_intersect_phiMin > localExtent[0] ) &&
590 (r_intersect_phiMin < localExtent[1] ) &&
598 double phiMaxEdge = localExtent[3 ];
602 double r_intersect_phiMax = r * (cos(phi)*cos(phiMaxEdge) + sin(phi)*sin(phiMaxEdge));
603 double m_phiMax = fabs (r * (cos(phi)*sin(phiMaxEdge) - sin(phi)*cos(phiMaxEdge)));
610 if ( (r_intersect_phiMax > localExtent[0] ) &&
611 (r_intersect_phiMax < localExtent[1] ) &&
623 double phiTest3 = fmod(globalOriginInLocal[1] + M_PI, 2*M_PI);
626 phiTest4 = phiTest3 + 2*M_PI;
628 phiTest4 = phiTest3 - 2*M_PI;
632 if ( ( (phiTest3 > localExtent[2]) && (phiTest3 < localExtent[3]) ) ||
633 ( (phiTest4 > localExtent[2]) && (phiTest4 < localExtent[3]) ) )
637 rMax= globalOriginInLocal[0] + localExtent[1];
642 rMax = edges_global[0][0];
644 for (
int i=1; i <4 ; i++)
646 if ( edges_global[i][0] > rMax ) rMax = edges_global[i][0];
652 double phiMin, phiMax;
665 if ( globalOriginInLocal[0] >= localExtent[1] )
672 double phi_tangent_min = localOriginInGlobalCoordinates[1] - asin( localExtent[1] / globalOriginInLocal[0] );
673 double phi_tangent_max = localOriginInGlobalCoordinates[1] + asin( localExtent[1] / globalOriginInLocal[0] );
679 for (
int i=0; i < 4; i++)
681 angles[i] = edges_global[i][1];
682 while ( angles[i] < phi_tangent_min )
684 while ( angles[i] > phi_tangent_min + 2*M_PI)
693 double phiTestMin =
globalToLocal( sqrt(localOriginInGlobalCoordinates[0]*
694 localOriginInGlobalCoordinates[0]
695 - localExtent[1] * localExtent[1]),
697 : phi_tangent_max ) )[1];
701 while ( phiTestMin < localExtent[2] )
702 phiTestMin += 2*M_PI;
703 while ( phiTestMin > localExtent[2] + 2*M_PI)
704 phiTestMin -= 2*M_PI;
708 if ( phiTestMin < localExtent[3] )
715 phiMin = phi_tangent_min;
719 phiMax = phi_tangent_max ;
728 for (
int i=1; i <4 ; i++)
730 if ( angles[i] < phiMin ) phiMin = angles[i];
737 for (
int i=1; i <4 ; i++)
739 if ( angles[i] > phiMax ) phiMax = angles[i];
750 double phiTestMax =
globalToLocal( sqrt(localOriginInGlobalCoordinates[0]*
751 localOriginInGlobalCoordinates[0]
752 - localExtent[1] * localExtent[1]),
754 : phi_tangent_min ) )[1];
757 while ( phiTestMax < localExtent[2] )
758 phiTestMax += 2*M_PI;
759 while ( phiTestMax > localExtent[2] + 2*M_PI)
760 phiTestMax -= 2*M_PI;
764 if ( phiTestMax < localExtent[3] )
771 phiMax = phi_tangent_max;
775 phiMin = phi_tangent_min;
784 for (
int i=1; i <4 ; i++)
786 if ( angles[i] > phiMax ) phiMax = angles[i];
793 for (
int i=1; i <4 ; i++)
795 if ( angles[i] < phiMin ) phiMin = angles[i];
832 double phiGlobalOrigin = globalOriginInLocal[1];
833 while ( phiGlobalOrigin < localExtent[2] )
834 phiGlobalOrigin += 2*M_PI;
835 while ( phiGlobalOrigin > localExtent[2] + 2 *M_PI )
836 phiGlobalOrigin -= 2*M_PI;
839 if (localExtent[3] - localExtent[2] < M_PI)
841 if ( phiGlobalOrigin < localExtent[3] )
843 if ( globalOriginInLocal[0] <= localExtent[0] )
847 phiMin = edges_global[0][1];
848 phiMax = edges_global[1][1];
852 phiMin = edges_global[1][1];
853 phiMax = edges_global[0][1];
858 while ( phiMin > phiMax)
862 while (phiMax > 2*M_PI)
867 while (phiMin < -2*M_PI)
875 phiMin=0; phiMax=2*M_PI;
878 else if ( phiGlobalOrigin < localExtent[2] + M_PI)
885 phiMax = edges_global[3][1];
887 double phiMin1 = edges_global[0][1];
888 while ( phiMin1 < phiMax - 2*M_PI )
890 while ( phiMin1 > phiMax )
893 double phiMin2 = edges_global[1][1];
894 while ( phiMin2 < phiMax - 2*M_PI )
896 while ( phiMin2 > phiMax )
899 phiMin = (phiMin1 < phiMin2 ? phiMin1 : phiMin2);
903 phiMin = edges_global[3][1];
905 double phiMax1 = edges_global[0][1];
906 while ( phiMax1 > phiMin + 2*M_PI )
908 while ( phiMax1 < phiMin )
911 double phiMax2 = edges_global[1][1];
912 while ( phiMax2 > phiMin + 2*M_PI )
914 while ( phiMax2 < phiMin )
917 phiMax = (phiMax1 > phiMax2 ? phiMax1 : phiMax2);
920 else if ( phiGlobalOrigin < localExtent[3] + M_PI)
924 phiMin = edges_global[2][1];
925 phiMax = edges_global[3][1];
929 phiMin = edges_global[3][1];
930 phiMax = edges_global[2][1];
935 while ( phiMin > phiMax)
939 while (phiMax > 2*M_PI)
944 while (phiMin < -2*M_PI)
954 phiMin = edges_global[2][1];
956 double phiMax1 = edges_global[0][1];
957 while ( phiMax1 < phiMin )
959 while ( phiMax1 > phiMin + 2*M_PI )
962 double phiMax2 = edges_global[1][1];
963 while ( phiMax2 < phiMin )
965 while ( phiMax2 > phiMin + 2*M_PI )
968 phiMax = (phiMax1 > phiMax2 ? phiMax1 : phiMax2);
972 phiMax = edges_global[2][1];
974 double phiMin1 = edges_global[0][1];
975 while ( phiMin1 < phiMax - 2*M_PI )
977 while ( phiMin1 > phiMax )
980 double phiMin2 = edges_global[1][1];
981 while ( phiMin2 < phiMax - 2*M_PI )
983 while ( phiMin2 > phiMax )
986 phiMin = (phiMin1 < phiMin2 ? phiMin1 : phiMin2);
992 if ( phiGlobalOrigin > localExtent[3] )
996 phiMin = edges_global[2][1];
997 phiMax = edges_global[3][1];
1001 phiMin = edges_global[3][1];
1002 phiMax = edges_global[2][1];
1006 while ( phiMin > phiMax)
1010 while (phiMax > 2*M_PI)
1015 while (phiMin < -2*M_PI)
1023 if ( globalOriginInLocal[0] <= localExtent[0] )
1026 if ( phiGlobalOrigin < localExtent[3] - M_PI )
1030 phiMin = edges_global[0][1];
1031 phiMax = edges_global[3][1];
1035 phiMin = edges_global[3][1];
1036 phiMax = edges_global[0][1];
1041 while ( phiMin > phiMax)
1050 if ( phiMax - phiMin < M_PI )
1057 while (phiMax > 2*M_PI)
1062 while (phiMin < -2*M_PI)
1069 else if ( phiGlobalOrigin < localExtent[2] + M_PI)
1073 phiMin = edges_global[0][1];
1074 phiMax = edges_global[1][1];
1078 phiMin = edges_global[1][1];
1079 phiMax = edges_global[0][1];
1081 while ( phiMin > phiMax)
1085 while (phiMax > 2*M_PI)
1090 while (phiMin < -2*M_PI)
1096 else if ( phiGlobalOrigin < localExtent[3] + M_PI)
1100 phiMin = edges_global[2][1];
1101 phiMax = edges_global[1][1];
1105 phiMin = edges_global[1][1];
1106 phiMax = edges_global[2][1];
1110 while ( phiMin > phiMax)
1119 if ( phiMax - phiMin < M_PI )
1126 while (phiMax > 2*M_PI)
1131 while (phiMin < -2*M_PI)
1151 std::vector<double> globalExtent;
1152 globalExtent.push_back(rMin);
1153 globalExtent.push_back(rMax);
1154 globalExtent.push_back(phiMin);
1155 globalExtent.push_back(phiMax);
1160 return globalExtent;
1165 double readoutFrequency)
1167 _moduleID = moduleID;
1168 _readoutFrequency= readoutFrequency;
1169 _padRowLayout= padRowLayout;
1173 _planeExtent.resize(4);
1174 _moduleExtent.resize(4);
1179 _moduleExtent = _planeExtent;
1213 _planeExtent = right._planeExtent;
1214 _moduleExtent = right._moduleExtent;
1216 _readoutFrequency = right._readoutFrequency;
1223 _moduleID = right._moduleID;
1225 _localIsGlobal = right._localIsGlobal;
1231 _padRowLayout = right._padRowLayout->
clone();
1245 delete _padRowLayout;
1264 return PadRowLayout2D::TPCMODULE;
1273 return _planeExtent;
1283 return _padRowLayout->
isInsidePad(temp[0],temp[1],padIndex);
1291 case PadRowLayout2D::CARTESIAN :
1294 case PadRowLayout2D::POLAR :
1301 int nearestPad = _padRowLayout->
getNearestPad(temp[0],temp[1]);
1302 return _padRowLayout->
isInsidePad(temp[0],temp[1],nearestPad);
1312 case PadRowLayout2D::CARTESIAN :
1315 case PadRowLayout2D::POLAR :
1317 localC[1] += 2*M_PI;
1319 localC[1] -= 2*M_PI;
1334 return _padRowLayout->
getDistanceToPad(localCoordinates[0],localCoordinates[1], padIndex);
1345 case PadRowLayout2D::CARTESIAN :
1348 case PadRowLayout2D::POLAR :
1350 localC[1] += 2*M_PI;
1352 localC[1] -= 2*M_PI;
1375 case PadRowLayout2D::CARTESIAN :
1409 case PadRowLayout2D::POLAR :
1419 double distance_phiMin;
1433 distance_phiMin = fabs( m_phiMin );
1440 double distance_phiMax;
1453 distance_phiMax = fabs( m_phiMax );
1455 return (distance_phiMin < distance_phiMax ? distance_phiMin : distance_phiMax);
1459 throw gear::Exception(
"TPCModuleImpl::getDistanceToModule: unkown coorinate type");
1470 void TPCModuleImpl::setBorderWidth(
double border) {
1483 case PadRowLayout2D::POLAR :
1489 case PadRowLayout2D::CARTESIAN :
1496 throw gear::Exception(
"TPCModuleImpl::globalToLocal: unkown coorinate type");
1509 void TPCModuleImpl::setAngle(
double angle)
1526 _readoutFrequency = frequency;
1537 _localIsGlobal =
true;
1541 _localIsGlobal =
false;
bool _zPositionIsSet
Flag to show whether the setZPosition() function had been called.
virtual bool isInsideModule(double c0, double c1) const
True if global coordinate (c0,c1) is within this modules area of amplification/interest.
virtual int getNearestPad(double x, double y) const
The index of the pad nearest to the given point in Global 2d coordinates (x,y,) or (r...
std::vector< double > calculateGlobalExtentPolarPolar(std::vector< double > localExtent)
Calculate the global extent for a given local extent if both local and global coordinate system are p...
void setOffset(double x_r, double y_phi)
Set the offset of the local pad plane wrt.
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 int getPadLayoutImplType() const
The type of the row layout implementation: PadRowLayout2D.TPCMODULE.
std::vector< double > _localModuleExtent
The module extend in the pad plane's coordinate system.
virtual bool isOverlapping(TPCModule *testThisModule) const
Returns True if this and The given module * overlap pad regions Note: overlaping sensitive regions is...
virtual int getPadLayoutType() const
virtual double getDistanceToPad(double c0, double c1, int index) const
Returns the distance from a global coodinate (c0,c1), to a given pad's nearest boundery; (c0...
virtual bool isInsidePad(double c0, double c1, int padIndex) const =0
True if coordinate (c0,c1) is within the given pad.
std::vector< double > calculateGlobalExtentCartesianPolar(std::vector< double > localExtent)
Calculate the global extent for a given local extent if the global coordinates are cartesian and the ...
void checkLocalIsGlobal()
Function to set the _localIsGlobal flag in case both coordinate systems are identical.
int _momsCoordinateType
AKA coordinate type of the TPC which contains this module.
gear::Vector2D _offset
The offset in cordinates described by _momsCoordinateType.
NotImplementedException used for features that are not implemented.
TPCModuleImpl(int moduleID, PadRowLayout2D *padRowLayout, int TPCCoordinateType, double readoutFrequency=0)
Construct the empty RectangularPadRowLayout with the width and x position specified through xMin and ...
virtual int getCoordinateType() const =0
The type of the row layouts coordinate system: PadRowLayout2D.CARTESIAN or PadRowLayout2D.POLAR.
void setReadoutFrequency(double frequency)
kept for backward compatibility, please set readout frequency in constructor
void setZPosition(double z)
Set the z position of the module.
virtual double getZPosition() const
Returns the z position of the module.
PadRowLayout2D * clone() const
Returns a copy (clone) of this class.
double _sin_angle
For performance: cache the sine of the angle.
virtual const std::vector< double > & getPlaneExtent() const
Inherited from PadRowLayout2D.
TPCModuleImpl & operator=(const TPCModuleImpl &)
The assignment operator.
virtual ~TPCModuleImpl()
Destructor.
void cleanup()
function to delete all the objects pointed to and owned by the TPCModule.
void copy_and_assign(const TPCModuleImpl &)
function to copy all internal variables, incl.
double _cos_angle
For performance: cache the cosine of the angle.
gear::Vector2D localToGlobal(double c0, double c1) const
Returns the global coordinates for a point in local coordinates.
virtual gear::Vector2D getPadCenter(int padIndex) const
The center of the pad in mother's 2d coordinates, (x,y) or (r,phi).
double _angle
The angle wrt. the local coordinate system.
virtual double getDistanceToModule(double c0, double c1) const
Returns distastance from a global coodinate (c0,c1), to the module's nearest boundery; (c0...
void convertLocalPlaneToGlobalPlaneExtend(void)
Transforms the local planeExtend to a global planeExtend, global moduleExtend and localModuleExtend...
gear::Vector2D _offset_cartesian
The offset in cartesian cordinates.
double _zPosition
The z positon of the module.
virtual bool isInsidePad(double c0, double c1, int padIndex) const
True if coordinate (x,y) is within the given pad.
double _border
Area around a pad Plane to extend the amplification reagion so that the outmost pads don't loose elec...
virtual double getDistanceToPad(double c0, double c1, int padIndex) const =0
Returns the closest distance to the edge (outer border) of the pad.
std::vector< double > calculateGlobalExtentCartesianCartesian(std::vector< double > localExtent)
Calculate the global extent for a given local extent if both local and global coordinate system are c...
virtual PadRowLayout2D * clone() const =0
Returns a copy (clone) of this class.
virtual const std::vector< double > & getPlaneExtent() const =0
Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.
virtual int getNearestPad(double c0, double c1) const =0
The index of the pad nearest to the given point in 2d coordinates (x,y,) or (r,phi).
An exception that is special for the TPCModule.
A wrapper Class for PadRowLayout2D which converts between the actual pad layouts local coodinate syst...
A wrapper Class for PadRowLayout2D, allowing which converts between local and global coordinate syste...
gear::Vector2D globalToLocal(double c0, double c1) const
Returns the local coordinates for a point in global coordinates.
virtual Vector2D getPadCenter(int padIndex) const =0
The center of the pad in 2d coordinates, (x,y) or (r,phi).
virtual int getCoordinateType() const
Identical to getTPCCoordinateType(), because this is the type of coordinates which are returned...