2 #ifndef GEAR_TrackerPlanesLayerLayoutImpl_H
3 #define GEAR_TrackerPlanesLayerLayoutImpl_H 1
5 #include "gear/TrackerPlanesLayerLayout.h"
51 TrackerPlanesMaterialLayerImpl() : ID(0), info(
""), PositionX(0.), PositionY(0.), PositionZ(0.), RotationXY(0.), RotationZX(0.), RotationZY(0.), SizeX(0.), SizeY(0.), Thickness(0.), RadLength(0.) {} ;
57 virtual int getID()
const {
return ID ; }
59 virtual std::string getInfo()
const {
return info ; }
73 virtual double getSizeX()
const {
return SizeX ; }
75 virtual double getSizeY()
const {
return SizeY ; }
83 virtual void setID(
int value ) { ID = value ; }
85 virtual void setInfo( std::string value) { info = value ; }
101 virtual void setSizeX(
double value) { SizeX = value ; }
103 virtual void setSizeY(
double value) { SizeY = value ; }
149 double ResolutionX{};
151 double ResolutionY{};
155 TrackerPlanesSensitiveLayerImpl() : ID(0), info(
""), PositionX(0.), PositionY(0.), PositionZ(0.), RotationXY(0.), RotationZX(0.), RotationZY(0.), SizeX(0.), SizeY(0.), Thickness(0.), RadLength(0.)
156 , NpixelX(0), NpixelY(0), PitchX(0.), PitchY(0.), ResolutionX(0.), ResolutionY(0.)
163 virtual int getID()
const {
return ID ; }
165 virtual std::string getInfo()
const {
return info ; }
201 virtual void setID(
int value ) { ID = value ; }
203 virtual void setInfo( std::string value) { info = value ; }
219 virtual void setSizeX(
double value) { SizeX = value ; }
221 virtual void setSizeY(
double value) { SizeY = value ; }
227 virtual void setNpixelX(
int value ) { NpixelX = value ; }
229 virtual void setNpixelY(
double value ) { NpixelY = value ; }
231 virtual void setPitchX(
double value ) { PitchX = value ; }
233 virtual void setPitchY(
double value ) { PitchY = value ; }
235 virtual void setResolutionX(
double value ) { ResolutionX = value ; }
237 virtual void setResolutionY(
double value ) { ResolutionY = value ; }
241 typedef std::vector<TrackerPlanesMaterialLayerImpl> TrackerPlanesMaterialLayerImplVec ;
242 typedef std::vector<TrackerPlanesSensitiveLayerImpl> TrackerPlanesSensitiveLayerImplVec ;
257 TrackerPlanesMaterialLayerImplVec _materialVec {};
260 TrackerPlanesSensitiveLayerImplVec _sensitiveVec {};
269 TrackerPlanesLayerImpl( TrackerPlanesMaterialLayerImplVec& materials, TrackerPlanesSensitiveLayerImplVec& sensors) : ID(0), info(
"")
272 _materialVec.clear();
273 for(
unsigned int i=0; i< materials.size(); i++){
274 _materialVec.push_back( materials.at(i) );
278 _sensitiveVec.clear();
279 for(
unsigned int i=0; i< sensors.size(); i++){
280 _sensitiveVec.push_back( sensors.at(i) );
290 virtual int getID()
const {
return ID; }
294 virtual std::string
getInfo()
const {
return info ; }
298 virtual void setID(
int value) { ID = value; }
302 virtual void setInfo( std::string value) { info = value ; }
321 int ID, std::string info,
322 double PositionX,
double PositionY,
double PositionZ,
323 double RotationXY,
double RotationZX,
double RotationZY,
324 double SizeX,
double SizeY,
double Thickness,
double RadLength
331 int ID, std::string info,
332 double PositionX,
double PositionY,
double PositionZ,
333 double RotationXY,
double RotationZX,
double RotationZY,
334 double SizeX,
double SizeY,
double Thickness,
double RadLength,
335 int NpixelX,
int NpixelY,
336 double PitchX,
double PitchY,
double ResolutionX,
double ResolutionY
342 typedef std::vector<TrackerPlanesLayerImpl> TrackerPlanesLayerImplVec ;
361 TrackerPlanesLayerImplVec _layerVec {};
366 TrackerPlanesLayerLayoutImpl() {
372 _layerVec.push_back( *layer ) ;
379 virtual int getID()
const {
return 0; }
382 virtual void setID(
int value) { ID = value; }
385 virtual std::string getInfo()
const {
return info; }
388 virtual void setInfo(std::string value) { info = value; }
392 return _layerVec.size() ;
398 if(
id < _layerVec.size() ) {
399 return &(_layerVec.at(
id));
408 for( TrackerPlanesLayerImplVec::const_iterator it = _layerVec.begin(); it != _layerVec.end(); it++ ) {
409 if( (*it).getID() == id )
return &(*it);
419 s <<
" Number of layers : " <<
getNLayers() << std::endl << std::endl ;
420 s <<
" layer parameters : " << std::endl ;
423 sprintf(buffer,
"|------------------|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n") ;
425 sprintf(buffer,
"| layer: | ladder/scattering only | sensitive / scattering part ` measurement part |\n") ;
427 sprintf(buffer,
"| ID info | ID info pozX pozY pozZ rotXY rotZX rotZY sizX sizY Thick X | ID info pozX pozY pozZ rotXY rotZX rotZY sizX sizY Thick X ` NX NY PitchX PitchY ResX RexY| \n") ;
429 sprintf(buffer,
"|------------------|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n") ;
440 for( TrackerPlanesLayerImplVec::const_iterator it = _layerVec.begin(); it != _layerVec.end(); it++ ) {
443 sprintf(buffer,
"|%3d %14s|%3s %14s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s|%3s %14s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s`%5s %5s %6s %6s %6s %6s|\n"
446 , a,a ,a,a,a,a,a,a,a,a,a,a, a,a ,a,a,a,a,a,a,a,a,a,a, a,a,a,a,a,a
450 TrackerPlanesMaterialLayerImplVec::const_iterator mb = layer->
getMaterialLayerVec().begin();
455 for( TrackerPlanesMaterialLayerImplVec::const_iterator ml = mb ; ml < me; ml++) {
456 sprintf(buffer,
"|%3s %14s|%3d %14s %5.0f %5.0f %5.0f %5.0f %5.0f %5.0f %5.2f %5.2f %5.2f %5.2f|%3s %14s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s`%5s %5s %6s %6s %6s %6s|\n"
459 , (*ml).getInfo().c_str()
460 , (*ml).getPositionX()
461 , (*ml).getPositionY()
462 , (*ml).getPositionZ()
463 , (*ml).getRotationXY()
464 , (*ml).getRotationZX()
465 , (*ml).getRotationZY()
468 , (*ml).getThickness()
469 , (*ml).getRadLength()
470 , a,a ,a,a,a,a,a,a,a,a,a,a, a,a,a,a,a,a
475 for( TrackerPlanesSensitiveLayerImplVec::const_iterator sl = sb ; sl < se; sl++) {
476 sprintf(buffer,
"|%3s %14s|%3s %14s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s|%3d %14s %5.0f %5.0f %5.0f %5.0f %5.0f %5.0f %5.2f %5.2f %5.2f %5.2f`%5d %5d %5.4f %5.4f %5.4f %5.4f|\n"
477 , a,a, a,a, a,a, a,a, a,a, a,a, a,a
479 , (*sl).getInfo().c_str()
480 , (*sl).getPositionX()
481 , (*sl).getPositionY()
482 , (*sl).getPositionZ()
483 , (*sl).getRotationXY()
484 , (*sl).getRotationZX()
485 , (*sl).getRotationZY()
488 , (*sl).getThickness()
489 , (*sl).getRadLength()
495 , (*sl).getResolutionX()
496 , (*sl).getResolutionY()
501 sprintf(buffer,
"|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
510 sprintf(buffer,
"|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n") ;
virtual void setPositionX(double value)
a free parameter string field
virtual int getID() const
ID of sensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closest to the ...
virtual int getNMaterialLayers() const
The total number of nonSense layers.
virtual void addLayer(TrackerPlanesLayerImpl *layer)
a free parameter string field
virtual double getRotationXY() const
rotation angles according to Euler implementation scheme (in XY plane -> around axis Z: gamma ) ...
virtual double getResolutionY() const
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
virtual const TrackerPlanesLayerImpl * getLayerByID(int id) const
a free parameter string field
virtual void setID(int value)
a free parameter string field
virtual int getNpixelX() const
Number of pixels in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
virtual double getRotationZX() const
rotation angles according to Euler implmentation scheme (in ZX plane -> around axis Y: beta ) ...
virtual void setID(int value)
a free parameter string field
virtual void setThickness(double value)
a free parameter string field
TrackerPlanesLayerImpl(TrackerPlanesMaterialLayerImplVec &materials, TrackerPlanesSensitiveLayerImplVec &sensors)
normal constructor
virtual void setRotationZX(double value)
a free parameter string field
virtual void setPositionY(double value)
a free parameter string field
virtual void PrintHeader(std::ostream &s) const
a free parameter string field
virtual double getSizeY() const
Size in y direction of sensitive volume of layer layerIndex - layer indexing starts at 0 for the laye...
virtual double getPositionZ() const
z position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual void setThickness(double value)
a free parameter string field
virtual double getRotationZY() const
rotation angles according to Euler implmentation scheme (in ZY plane -> around axis X: alfa ) ...
virtual double getSizeX() const
Size in x direction of sensitive volume of layer layerIndex - layer indexing starts at 0 for the laye...
virtual void PrintLayers(std::ostream &s) const
a free parameter string field
virtual double getSizeY() const
Size in y direction of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the l...
virtual double getPositionY() const
y position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
virtual void addMaterialLayer(int ID, std::string info, double PositionX, double PositionY, double PositionZ, double RotationXY, double RotationZX, double RotationZY, double SizeX, double SizeY, double Thickness, double RadLength)
add methods
virtual ~TrackerPlanesLayerLayoutImpl()
Destructor.
virtual void setPositionZ(double value)
a free parameter string field
virtual double getThickness() const
Thickness of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the layer close...
virtual double getPositionZ() const
z position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
virtual void setRotationZX(double value)
a free parameter string field
virtual void setRotationZY(double value)
a free parameter string field
virtual double getRotationZX() const
rotation angles according to Euler implmentation scheme (in ZX plane -> around axis Y: beta ) ...
virtual void setSizeX(double value)
a free parameter string field
virtual void setInfo(std::string value)
get methods
virtual double getPositionX() const
x position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual int getNLayers() const
The total number of layers.
virtual void setPositionZ(double value)
a free parameter string field
virtual ~TrackerPlanesSensitiveLayerImpl()
Destructor.
virtual std::string getInfo() const
get methods
virtual double getResolutionX() const
Intrinsic resolution of layer layerIndex - layer indexing starts at 0 for the layer closest to the be...
TrackerPlanesSensitiveLayerImplVec & getSensitiveLayerVec()
get methods
virtual int getNpixelY() const
Number of pixels in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 ...
virtual void addSensitiveLayer(int ID, std::string info, double PositionX, double PositionY, double PositionZ, double RotationXY, double RotationZX, double RotationZY, double SizeX, double SizeY, double Thickness, double RadLength, int NpixelX, int NpixelY, double PitchX, double PitchY, double ResolutionX, double ResolutionY)
add methods
virtual double getRotationZY() const
rotation angles according to Euler implmentation scheme (in ZY plane -> around axis X: alfa ) ...
virtual void setRotationXY(double value)
a free parameter string field
virtual const TrackerPlanesLayerImpl * getLayer(unsigned int id) const
a free parameter string field
TrackerPlanesLayerImpl()
default constructor
TrackerPlanesMaterialLayerImpl()
safe default contructor
virtual double getPositionY() const
y position of the center of sensitive volume of layer layerIndex - layer indexing starts at 0 for the...
virtual double getSizeX() const
Size in x direction of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the l...
virtual double getRadLength() const
The radiation length of sensitive volume of layer layerIndex - layer indexing starts at 0 for the lay...
virtual ~TrackerPlanesMaterialLayerImpl()
Destructor.
virtual int getNSensitiveLayers() const
The total number of Sensitive layers.
virtual double getPositionX() const
x position of the center of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for ...
a collection of layers = telescope description
virtual void setSizeX(double value)
a free parameter string field
virtual void setSizeY(double value)
a free parameter string field
virtual double getRotationXY() const
rotation angles according to Euler implementation scheme (in XY plane -> around axis Z: gamma ) ...
Abstract description of layers in pixel beam telescope.
virtual double getPitchY() const
Pitch size in y direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual ~TrackerPlanesLayerImpl()
Destructor.
double MyMatrix[2][2]
Layer.
virtual void setPositionY(double value)
a free parameter string field
virtual void PrintFooter(std::ostream &s) const
a free parameter string field
virtual int getID() const
Layer ID of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closes...
virtual void setPositionX(double value)
a free parameter string field
virtual void setSizeY(double value)
a free parameter string field
TrackerPlanesSensitiveLayerImpl()
safe default contructor
virtual void setRadLength(double value)
a free parameter string field
virtual void setRotationXY(double value)
a free parameter string field
virtual void setRadLength(double value)
a free parameter string field
virtual void setRotationZY(double value)
a free parameter string field
virtual double getRadLength() const
The radiation length of nonsensitive volume of layer layerIndex - layer indexing starts at 0 for the ...
virtual double getPitchX() const
Pitch size in x direction in sensitive volume of layer layerIndex - layer indexing starts at 0 for th...
virtual void setID(int value)
set methods
virtual int getID() const
get methods
TrackerPlanesMaterialLayerImplVec & getMaterialLayerVec()
get methods
virtual double getThickness() const
Thickness of sensitive volume of layer layerIndex - layer indexing starts at 0 for the layer closest ...