1 #include <gearimpl/TPCModuleImpl.h>
2 #include <gearimpl/RectangularPadRowLayout.h>
3 #include <gearimpl/FixedPadSizeDiskLayout.h>
4 #include <gear/PadRowLayout2D.h>
12 cout <<
"#--------------------------------" << endl;
13 for (
int row = 0; row < layout->
getNRows() ; row++)
15 const std::vector< int > & padsInRow = layout->
getPadsInRow (row);
16 for (
unsigned int i=0; i < (padsInRow.size() < 10 ? padsInRow.size() : 10 ); i++)
21 int padIndex = layout->
getNearestPad( padCenter[0] , padCenter[1] );
23 cout << padCenter[0] <<
"\t" << padCenter[1] <<
"\t"
24 << padsInRow[i] <<
"\t" << padIndex << endl;
33 rectangularPadPlane->
addRow(3, 10, 2., 5.);
35 dumpCoordinates( rectangularPadPlane );
41 rectangularModule1->setAngle(M_PI/4);
42 dumpCoordinates( rectangularModule1 );
57 circularModule1->setAngle(M_PI/4);
58 dumpCoordinates( circularModule1 );
63 circularModule2->setAngle(M_PI/4);
64 dumpCoordinates( circularModule2 );
66 delete circularModule2;
delete circularModule1;
delete rectangularModule1;
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 ...
Implementation of PadRowLayout2D for a disk with fixed sized keystone pads.
virtual void addRow(int nRow, int nPad, double padWidth, double padHeight, double rowHeight=0.0, double leftOffset=0.0, double rightOffset=0.0)
Add nRow rows with the given parameters.
virtual int getNRows() const =0
The number of rows.
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 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).
Implementation of PadRowLayout2D for a rectangular row based layout where all pads in a given row are...
A wrapper Class for PadRowLayout2D, allowing which converts between local and global coordinate syste...
virtual Vector2D getPadCenter(int padIndex) const =0
The center of the pad in 2d coordinates, (x,y) or (r,phi).