GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
FTDParametersImpl.h
1 // -*- C++ -*-
2 #ifndef GEAR_FTDParametersImpl_H
3 #define GEAR_FTDParametersImpl_H 1
4 
5 #include "gear/FTDParameters.h"
6 #include "gearimpl/GearParametersImpl.h"
7 #include "gearimpl/FTDLayerLayoutImpl.h"
8 
9 
10 namespace gear
11 {
12 class FTDLayerLayout;
27 {
28  public:
29 
30  FTDParametersImpl() : _ftdType(0) {}
31  // Destructor.
32  virtual ~FTDParametersImpl() { /* nop */; }
33 
34  // static constants enums( for the type of layout )
35  static const int PIXEL = 1 ;
36  static const int STRIP = 2 ;
37  // for the sensitive strips, facing the IP or backing it
38  static const int FACE = 1;
39  static const int BACK = 2;
40 
70  virtual void addLayer(int nPetals, int nSensors, bool isDoubleSided, int sensorType, double petalOpAngle, double phi0, double alpha,
71  double zposition, double zoffset, double zsign0,
72  //double supportZposition,
73  double supportRinner, double supportThickness,
74  double supportLengthMin, double supportLengthMax,
75  double supportWidth, double supportRadLength,
76  //double sensitiveZposition,
77  double sensitiveRinner, double sensitiveThickness,
78  double sensitiveLengthMin, double sensitiveLengthMax,
79  double sensitiveWidth, double sensitiveRadLength )
80  {
81  _layer.addLayer( nPetals, nSensors, isDoubleSided, sensorType, petalOpAngle,phi0, alpha,
82  zposition,zoffset,zsign0,
83  //supportZposition,
84  supportRinner,supportThickness,
85  supportLengthMin, supportLengthMax,
86  supportWidth, supportRadLength,
87  //sensitiveZposition,
88  sensitiveRinner,sensitiveThickness,
89  sensitiveLengthMin, sensitiveLengthMax,
90  sensitiveWidth, sensitiveRadLength ) ;
91  return ;
92  }
93 
94 
96  virtual const FTDLayerLayout & getFTDLayerLayout() const { return _layer ; }
97 
98 
102  virtual int getLayerIndex( const Vector3D & p ) const;
103 
104  // /** returns the petal Index which correspond to the layer where the point
105  // * is. If the point is not inside any layer returns -1
106  // */
107  // virtual int getPetalIndex( const Vector3D & p ) const { return getPetalIndex(p); }
108 
112  virtual int getSensitiveIndex( const Vector3D & p ) const;
113 
114  protected:
115 
116  FTDLayerLayoutImpl _layer{} ;
117 
118  int _ftdType{} ;
119 
120  // double _shellInnerRadiusMin;
121  // double _shellInnerRadiusMax;
122  // double _shellOuterRadius ;
123  // double _shellHalfLength ;
124  // double _shellGap ;
125  // double _shellRadLength ;
126 
127  //private:
128 public:
129 
132  bool isPointInFTD(const Vector3D & p ,const bool & sensitive = false) const ;
133 
137  int getPetalIndex(const Vector3D & p, const bool & sensitive = false) const;
138 
141 // Vector3D distanceToNearestFTD(Vector3D p, bool sensitive = false) const ;
142 
150  Vector3D distanceToPlane(Vector3D p, Vector3D r, Vector3D n, Vector3D u,
151  Vector3D v, float minU, float maxU, float minV, float maxV) const ;
152 
156 // Vector3D intersectionFTD( Vector3D p, Vector3D v, bool sensitive = false) const ;
157 
160  Vector3D planeLineIntersection( Vector3D r, Vector3D n, Vector3D linePoint, Vector3D lineDir) const ;
161 
165  double confiningRatio( Vector3D p , Vector3D r, Vector3D n, Vector3D u, Vector3D v,
166  float minU, float maxU, float minV, float maxV ) const ;
167 
172  Vector3D correctToBorderPoint( Vector3D vPlane , Vector3D u, Vector3D v,
173  float minU, float maxU, float minV, float maxV ) const ;
174 
175  bool isEqual( double valueOne , double valueTwo ) const ;
176 
177  bool isEqual( Vector3D p1 , Vector3D p2 ) const ;
178 
179  bool differsLess( double valueOne , double valueTwo ) const ;
180 
181 
184  double correctPhiRange( double Phi ) const ;
185 
187  double getPhiPoint( Vector3D p ) const ;
188 
189 }; // class
190 
191 } // namespace gear
192 
193 #endif /* ifndef GEAR_FTDPARAMETERS_H */
Implementation of GearParameters - a set off parameters that can be used to describe the geometrical ...
double getPhiPoint(Vector3D p) const
returns Phi for a point
virtual const FTDLayerLayout & getFTDLayerLayout() const
Returns the layer layout in the Vertex.
virtual int getSensitiveIndex(const Vector3D &p) const
returns the petal Index which correspond to the layer where the point is.
int getPetalIndex(const Vector3D &p, const bool &sensitive=false) const
returns the petal number corresponding to a given point.
Vector3D planeLineIntersection(Vector3D r, Vector3D n, Vector3D linePoint, Vector3D lineDir) const
returns the first point on the ftd, where it intersects with a given straight line (parameters point ...
bool isPointInFTD(const Vector3D &p, const bool &sensitive=false) const
returns if a point is in support (sensitive == false) or in sensitive (sensitive == true) ...
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
Definition: Vector3D.h:18
Abstract description of layers in a FTD detector.
virtual void addLayer(int nPetals, int nSensors, bool isDoubleSided, int sensorType, double petalOpAngle, double phi0, double alpha, double zposition, double zoffset, double zsign0, double supportRinner, double supportThickness, double supportLengthMin, double supportLengthMax, double supportWidth, double supportRadLength, double sensitiveRinner, double sensitiveThickness, double sensitiveLengthMin, double sensitiveLengthMax, double sensitiveWidth, double sensitiveRadLength)
adding a Layer to the vertex one layer consists of a number of petals and sensitive areas (nPetals) t...
virtual int getLayerIndex(const Vector3D &p) const
returns the layerIndex which correspond to the layer where the point is.
Geometry properties of a FTD detector needed for reconstruction code.
Definition: FTDParameters.h:29
Geometry properties of a FTD detector needed for reconstruction code.
Vector3D correctToBorderPoint(Vector3D vPlane, Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV) const
corrects the vector vPlane into the given borders, given by direction u (minU to maxU) and in directi...
double confiningRatio(Vector3D p, Vector3D r, Vector3D n, Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV) const
returns the confiningRatio of a point p in a plane when the plane (r,n) is reduced to a finite square...
double correctPhiRange(double Phi) const
returns Phi corrected to Range -M_PI/2 to +M_PI/2
virtual void addLayer(int nPetals, int nSensors, bool isDoubleSided, int sensorType, double petalOpAngle, double phi0, double alpha, double zposition, double zoffset, double zsign0, double supportRinner, double supportThickness, double supportLengthMin, double supportLengthMax, double supportWidth, double supportRadLength, double sensitiveRinner, double sensitiveThickness, double sensitiveLengthMin, double sensitiveLengthMax, double sensitiveWidth, double sensitiveRadLength)
Add a new layer at the given position.
Vector3D distanceToPlane(Vector3D p, Vector3D r, Vector3D n, Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV) const
returns distance to nearest support petal (sensitive == false) or nearest sensitiv (sensitive == true...