2 #ifndef GEAR_SiPlanesLayerLayoutImpl_H
3 #define GEAR_SiPlanesLayerLayoutImpl_H 1
5 #include "gear/SiPlanesLayerLayout.h"
37 Layer() : ID(0), PositionX(0.), PositionY(0.), PositionZ(0.), RotationXY(0.), RotationZX(0.), RotationZY(0.), SizeX(0.), SizeY(0.), Thickness(0.), RadLength(0.)
66 SensLayer() : ID(0), PositionX(0.), PositionY(0.), PositionZ(0.), RotationXY(0.), RotationZX(0.), RotationZY(0.), SizeX(0.), SizeY(0.), Thickness(0.), RadLength(0.)
67 , NpixelX(0), NpixelY(0), Resolution(0.), ResolutionX(0.),ResolutionY(0.),
68 Rotation1(0.0), Rotation2(0.0), Rotation3(0.0), Rotation4(0.0)
72 typedef std::vector<Layer> LayerVec ;
73 typedef std::vector<SensLayer> SensLayerVec ;
75 typedef SensLayer SensDUT ;
82 virtual int getID(
int layerIndex)
const {
return _lVec.at( layerIndex ).ID ; }
84 virtual double getLayerRadLength(
int layerIndex)
const {
return _lVec.at( layerIndex ).RadLength ; }
86 virtual double getLayerPositionX(
int layerIndex)
const {
return _lVec.at( layerIndex ).PositionX ; }
87 virtual double getLayerPositionY(
int layerIndex)
const {
return _lVec.at( layerIndex ).PositionY ; }
88 virtual double getLayerPositionZ(
int layerIndex)
const {
return _lVec.at( layerIndex ).PositionZ ; }
90 virtual double getLayerRotationXY(
int layerIndex)
const {
return _lVec.at( layerIndex ).RotationXY ; }
91 virtual double getLayerRotationZX(
int layerIndex)
const {
return _lVec.at( layerIndex ).RotationZX ; }
92 virtual double getLayerRotationZY(
int layerIndex)
const {
return _lVec.at( layerIndex ).RotationZY ; }
94 virtual double getLayerSizeX(
int layerIndex)
const {
return _lVec.at( layerIndex ).SizeX ; }
95 virtual double getLayerSizeY(
int layerIndex)
const {
return _lVec.at( layerIndex ).SizeY ; }
96 virtual double getLayerThickness(
int layerIndex)
const {
return _lVec.at( layerIndex ).Thickness ; }
99 virtual void setID(
int layerIndex,
int value ) { _lVec.at( layerIndex ).ID = value ; }
100 virtual void setLayerPositionX(
int layerIndex,
double value) { _lVec.at( layerIndex ).PositionX = value ; }
101 virtual void setLayerPositionY(
int layerIndex,
double value) { _lVec.at( layerIndex ).PositionY = value ; }
102 virtual void setLayerPositionZ(
int layerIndex,
double value) { _lVec.at( layerIndex ).PositionZ = value ; }
103 virtual void setLayerRotationXY(
int layerIndex,
double value) { _lVec.at( layerIndex ).RotationXY = value ; }
104 virtual void setLayerRotationZX(
int layerIndex,
double value) { _lVec.at( layerIndex ).RotationZX = value ; }
105 virtual void setLayerRotationZY(
int layerIndex,
double value) { _lVec.at( layerIndex ).RotationZY = value ; }
106 virtual void setLayerSizeX(
int layerIndex,
double value) { _lVec.at( layerIndex ).SizeX = value ; }
107 virtual void setLayerSizeY(
int layerIndex,
double value) { _lVec.at( layerIndex ).SizeY = value ; }
108 virtual void setLayerThickness(
int layerIndex,
double value) { _lVec.at( layerIndex ).Thickness = value ; }
109 virtual void setLayerRadLength(
int layerIndex,
double value) { _lVec.at( layerIndex ).RadLength = value ; }
112 virtual int getSensitiveID(
int layerIndex)
const {
return _sVec.at( layerIndex ).ID ; }
122 virtual double getSensitiveSizeX(
int layerIndex)
const {
return _sVec.at( layerIndex ).SizeX ; }
123 virtual double getSensitiveSizeY(
int layerIndex)
const {
return _sVec.at( layerIndex ).SizeY ; }
127 virtual void setSensitiveID(
int layerIndex,
int value) { _sVec.at( layerIndex ).ID = value ; }
129 virtual void setSensitivePositionX(
int layerIndex,
double value) { _sVec.at( layerIndex ).PositionX = value ; }
130 virtual void setSensitivePositionY(
int layerIndex,
double value) { _sVec.at( layerIndex ).PositionY = value ; }
131 virtual void setSensitivePositionZ(
int layerIndex,
double value) { _sVec.at( layerIndex ).PositionZ = value ; }
132 virtual void setSensitiveRotationXY(
int layerIndex,
double value) { _sVec.at( layerIndex ).RotationXY = value ; }
133 virtual void setSensitiveRotationZX(
int layerIndex,
double value) { _sVec.at( layerIndex ).RotationZX = value ; }
134 virtual void setSensitiveRotationZY(
int layerIndex,
double value) { _sVec.at( layerIndex ).RotationZY = value ; }
135 virtual void setSensitiveSizeX(
int layerIndex,
double value) { _sVec.at( layerIndex ).SizeX = value ; }
136 virtual void setSensitiveSizeY(
int layerIndex,
double value) { _sVec.at( layerIndex ).SizeY = value ; }
137 virtual void setSensitiveThickness(
int layerIndex,
double value) { _sVec.at( layerIndex ).Thickness = value ; }
138 virtual void setSensitiveRadLength(
int layerIndex,
double value) { _sVec.at( layerIndex ).RadLength = value ; }
160 virtual void setSensitivePitchX(
int layerIndex,
double value) { _sVec.at( layerIndex ).PitchX = value ; }
161 virtual void setSensitivePitchY(
int layerIndex,
double value) { _sVec.at( layerIndex ).PitchY = value ; }
171 double layerPositionX,
double layerPositionY,
double layerPositionZ,
172 double layerRotationXY,
double layerRotationZX,
double layerRotationZY,
173 double layerSizeX,
double layerSizeY,
double layerThickness,
174 double layerRadLength,
177 double sensitivePositionX,
double sensitivePositionY,
double sensitivePositionZ,
178 double sensitiveRotationXY,
double sensitiveRotationZX,
double sensitiveRotationZY,
179 double sensitiveSizeX,
double sensitiveSizeY,
double sensitiveThickness,
180 int sensitiveNpixelX,
int sensitiveNpixelY,
181 double sensitivePitchX,
double sensitivePitchY,
182 double sensitiveResolution,
183 double sensitiveResolutionX,
184 double sensitiveResolutionY,
189 double sensitiveRadLength);
192 double layerPositionX,
double layerPositionY,
double layerPositionZ,
194 double layerSizeX,
double layerSizeY,
double layerThickness,
195 double layerRadLength,
198 double sensitivePositionX,
double sensitivePositionY,
double sensitivePositionZ,
200 double sensitiveSizeX,
double sensitiveSizeY,
double sensitiveThickness,
201 int sensitiveNpixelX,
int sensitiveNpixelY,
202 double sensitivePitchX,
double sensitivePitchY,
203 double sensitiveResolution,
209 double sensitiveRadLength);
254 virtual void addDUT(
int dutID,
255 double dutPositionX,
double dutPositionY,
double dutPositionZ,
256 double dutSizeX,
double dutSizeY,
double dutThickness,
260 double dutsensitivePositionX,
double dutsensitivePositionY,
double dutsensitivePositionZ,
261 double dutsensitiveSizeX,
double dutsensitiveSizeY,
double dutsensitiveThickness,
262 int dutsensitiveNpixelX,
int dutsensitiveNpixelY,
263 double dutsensitivePitchX,
double dutsensitivePitchY,
264 double dutsensitiveResolution,
265 double dutsensitiveRotation1,
266 double dutsensitiveRotation2,
267 double dutsensitiveRotation3,
268 double dutsensitiveRotation4,
269 double dutsensitiveRadLength);
273 typedef double MyMatrix[2][2];
278 SensLayerVec _sVec {};
virtual double getDUTSizeY() const
Size in y direction of nonsensitive volume of the DUT.
virtual double getSensitiveRotation2(int layerIndex) const
Second element (-sin(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer index...
virtual double getLayerSizeX(int layerIndex) const
Size in x direction of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the l...
virtual void setSensitiveResolutionY(int layerIndex, double value)
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual double getSensitiveSizeY(int layerIndex) const
Size in y direction of sensitive volume of layer layerIndex - layer indexing starts at 0 for the laye...
virtual void setSensitiveNpixelX(int layerIndex, int value)
Number of pixels in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
Layer()
safe default contructor
virtual void setSensitiveResolution(int layerIndex, double value)
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual double getDUTSensitiveRotation4() const
Fourth element (cos(theta)) of rotation matrix of sensitive volume of the DUT.
virtual double getDUTSensitiveRadLength() const
The radiation length of sensitive volume of the DUT.
virtual void setSensitiveRotation1(int layerIndex, double value)
First element (cos(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexin...
virtual double getLayerPositionX(int layerIndex) const
x position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
SensLayer()
safe default contructor
virtual double getDUTSensitiveThickness() const
Thickness of sensitive volume of the DUT.
virtual void setSensitivePitchY(int layerIndex, double value)
Pitch size in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual double getLayerPositionZ(int layerIndex) const
z position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
virtual void setSensitiveNpixelY(int layerIndex, int value)
Number of pixels in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
virtual void addLayer(int layerID, double layerPositionX, double layerPositionY, double layerPositionZ, double layerRotationXY, double layerRotationZX, double layerRotationZY, double layerSizeX, double layerSizeY, double layerThickness, double layerRadLength, int sensitiveID, double sensitivePositionX, double sensitivePositionY, double sensitivePositionZ, double sensitiveRotationXY, double sensitiveRotationZX, double sensitiveRotationZY, double sensitiveSizeX, double sensitiveSizeY, double sensitiveThickness, int sensitiveNpixelX, int sensitiveNpixelY, double sensitivePitchX, double sensitivePitchY, double sensitiveResolution, double sensitiveResolutionX, double sensitiveResolutionY, double Rotation1, double Rotation2, double Rotation3, double Rotation4, double sensitiveRadLength)
Add a new layer at the given position.
virtual void setSensitiveRotation3(int layerIndex, double value)
Third element (sin(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexin...
Abstract description of layers in pixel beam telescope.
virtual int getDUTID() const
ID of nonsensitive volume of the DUT.
virtual double getDUTPositionY() const
y position of the center of nonsensitive volume of the DUT.
virtual double getDUTPositionZ() const
z position of the center of nonsensitive volume of the DUT.
virtual int getNLayers() const
The total number of layers.
virtual double getSensitiveRadLength(int layerIndex) const
The radiation length of sensitive volume of layer layerIndex - layer indexing starts at 0 for the lay...
virtual int getDUTSensitiveNpixelX() const
Number of pixels in x direction of sensitive volume of the DUT.
virtual double getSensitiveRotation4(int layerIndex) const
Fourth element (cos(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexi...
virtual void setSensitiveRotation4(int layerIndex, double value)
Fourth element (cos(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexi...
virtual double getDUTPositionX() const
x position of the center of nonsensitive volume of the DUT.
Abstract description of layers in a pixel beam telescope.
virtual double getSensitiveRotation1(int layerIndex) const
First element (cos(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexin...
virtual int getDUTSensitiveID() const
ID of sensitive volume of the DUT.
virtual void setSensitivePitchX(int layerIndex, double value)
Pitch size in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual double getLayerRotationXY(int layerIndex) const
rotation angles according to Euler implementation scheme (in XY plane -> around axis Z: gamma ) ...
virtual double getDUTThickness() const
Thickness of nonsensitive layer of the DUT.
virtual double getDUTSensitivePositionY() const
y position of the center of sensitive volume of the DUT.
virtual double getSensitiveSizeX(int layerIndex) const
Size in x direction of sensitive volume of layer layerIndex - layer indexing starts at 0 for the laye...
virtual double getLayerRadLength(int layerIndex) const
The radiation length of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the ...
virtual int getSensitiveNpixelX(int layerIndex) const
Number of pixels in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
virtual double getDUTSensitivePositionX() const
x position of the center of sensitive volume of the DUT.
virtual double getSensitivePositionY(int layerIndex) const
y position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual void addDUT(int dutID, double dutPositionX, double dutPositionY, double dutPositionZ, double dutSizeX, double dutSizeY, double dutThickness, double dutRadLength, int dutsensitiveID, double dutsensitivePositionX, double dutsensitivePositionY, double dutsensitivePositionZ, double dutsensitiveSizeX, double dutsensitiveSizeY, double dutsensitiveThickness, int dutsensitiveNpixelX, int dutsensitiveNpixelY, double dutsensitivePitchX, double dutsensitivePitchY, double dutsensitiveResolution, double dutsensitiveRotation1, double dutsensitiveRotation2, double dutsensitiveRotation3, double dutsensitiveRotation4, double dutsensitiveRadLength)
Add a DUT at the given position.
virtual double getSensitivePositionZ(int layerIndex) const
z position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual int getDUTSensitiveNpixelY() const
Number of pixels in y direction of sensitive volume of the DUT.
virtual int getSensitiveID(int layerIndex) const
ID of sensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closest to the ...
virtual double getSensitiveRotationZY(int layerIndex) const
rotation angles according to Euler implmentation scheme (in ZY plane -> around axis X: alfa ) ...
virtual double getSensitivePitchX(int layerIndex) const
Pitch size in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual double getLayerRotationZY(int layerIndex) const
rotation angles according to Euler implmentation scheme (in ZY plane -> around axis X: alfa ) ...
Helper class for layer properties.
virtual double getDUTSensitivePitchY() const
Pitch size in y direction of sensitive volume of the DUT.
virtual double getSensitivePitchY(int layerIndex) const
Pitch size in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual double getSensitiveResolutionX(int layerIndex) const
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual double getSensitiveRotation3(int layerIndex) const
Third element (sin(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer indexin...
virtual double getDUTSensitiveSizeY() const
Size in y direction of sensitive volume of the DUT.
virtual double getDUTSensitivePitchX() const
Pitch size in x direction of sensitive volume of the DUT.
virtual double getLayerRotationZX(int layerIndex) const
rotation angles according to Euler implmentation scheme (in ZX plane -> around axis Y: beta ) ...
virtual double getDUTRadLength() const
The radiation length of nonsensitive volume of the DUT.
virtual double getDUTSizeX() const
Size in x direction of nonsensitive volume of the DUT.
virtual double getDUTSensitiveRotation1() const
First element (cos(theta)) of rotation matrix of sensitive volume of the DUT.
virtual double getDUTSensitivePositionZ() const
z position of the center of sensitive volume of the DUT.
virtual int getSensitiveNpixelY(int layerIndex) const
Number of pixels in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
virtual double getDUTSensitiveResolution() const
Intrinsic resolution of the DUT, not relevant.
virtual double getSensitivePositionX(int layerIndex) const
x position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual double getSensitiveResolution(int layerIndex) const
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual double getSensitiveResolutionY(int layerIndex) const
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual int getID(int layerIndex) const
Layer ID of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closes...
virtual void setSensitiveResolutionX(int layerIndex, double value)
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual double getSensitiveThickness(int layerIndex) const
Thickness of sensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closest ...
virtual double getDUTSensitiveRotation3() const
Third element (sin(theta)) of rotation matrix of sensitive volume of the DUT.
virtual void setSensitiveRotation2(int layerIndex, double value)
Second element (-sin(theta)) of rotation matrix of sensitive volume of layer layerIndex - layer index...
virtual double getSensitiveRotationXY(int layerIndex) const
rotation angles according to Euler implementation scheme (in XY plane -> around axis Z: gamma ) ...
virtual double getSensitiveRotationZX(int layerIndex) const
rotation angles according to Euler implmentation scheme (in ZX plane -> around axis Y: beta ) ...
virtual double getDUTSensitiveRotation2() const
Second element (-sin(theta)) of rotation matrix of sensitive volume of the DUT.
virtual double getLayerSizeY(int layerIndex) const
Size in y direction of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the l...
virtual double getLayerPositionY(int layerIndex) const
y position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
virtual double getLayerThickness(int layerIndex) const
Thickness of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the layer close...
virtual double getDUTSensitiveSizeX() const
Size in x direction of sensitive volume of the DUT.