GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
ZPlanarParametersImpl.h
1 // -*- C++ -*-
2 #ifndef GEAR_ZPlanarParametersImpl_H
3 #define GEAR_ZPlanarParametersImpl_H 1
4 
5 #include "gear/ZPlanarParameters.h"
6 #include "gearimpl/GearParametersImpl.h"
7 #include "gearimpl/ZPlanarLayerLayoutImpl.h"
8 
9 
10 namespace gear {
11 
12 class ZPlanarLayerLayoutImpl;
13 
27 
28 public:
37  ZPlanarParametersImpl( int type, double shellInnerRadius, double shellOuterRadius, double shellHalfLength, double shellGap, double shellRadLength ) ;
38 
39  // Destructor.
40  virtual ~ZPlanarParametersImpl() { /* nop */; }
41 
42  // static constants enums( for the type of layout )
43 
44  static const int CCD = 1 ;
45  static const int CMOS = 2 ;
46  static const int HYBRID = 3 ;
47 
70  virtual void addLayer(int nLadders, double phi0,
71  double ladderDistance, double ladderOffset, double ladderThickness,
72  double ladderLength, double ladderWidth, double ladderRadLength,
73  double sensitiveDistance, double sensitiveOffset, double sensitiveThickness,
74  double sensitiveLength, double sensitiveWidth, double sensitiveRadLength )
75  {
76  _layer.addLayer( nLadders, phi0,
77  ladderDistance, ladderOffset, ladderThickness, ladderLength, ladderWidth, ladderRadLength,
78  sensitiveDistance, sensitiveOffset, sensitiveThickness, sensitiveLength, sensitiveWidth, sensitiveRadLength ) ;
79  return ;
80  }
81 
82 
84  virtual const ZPlanarLayerLayout & getZPlanarLayerLayout() const { return _layer ; }
85 
89  virtual int getType() const { return _type ; }
90 
93  virtual double getShellHalfLength() const { return _shellHalfLength ; }
94 
97  virtual double getShellGap() const { return _shellGap ; }
98 
101  virtual double getShellInnerRadius() const { return _shellInnerRadius ; }
102 
105  virtual double getShellOuterRadius() const { return _shellOuterRadius ; }
106 
109  virtual double getShellRadLength() const { return _shellRadLength ; }
110 
113  virtual bool isPointInLadder(Vector3D p) const {
114  return isPointInLadder( p, false );
115  }
116 
119  virtual bool isPointInSensitive(Vector3D p, SensorID* sensorID=0 ) const {
120  return isPointInLadder( p, true , sensorID ) ;
121  }
122 
126  return distanceToNearestLadder( p, false ) ;
127  }
128 
132  return distanceToNearestLadder( p, true ) ;
133  }
134 
139  return intersectionLadder( p, v, false ) ;
140  }
141 
146  return intersectionLadder( p, v, true ) ;
147  }
148 
149 protected:
150 
151  ZPlanarLayerLayoutImpl _layer{} ;
152 
153  int _type{} ;
154 
155  double _shellInnerRadius{} ;
156 
157  double _shellOuterRadius{} ;
158 
159  double _shellHalfLength{} ;
160 
161  double _shellGap{} ;
162 
163  double _shellRadLength{} ;
164 
165 private:
166 
169  bool isPointInLadder(Vector3D p , bool sensitive = false, SensorID* sensorID=0 ) const ;
170 
173  Vector3D distanceToNearestLadder(Vector3D p, bool sensitive = false) const ;
174 
182  Vector3D distanceToPlane(Vector3D p, Vector3D r, Vector3D n, Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV) const ;
183 
186  Vector3D intersectionLadder( Vector3D p, Vector3D v, bool sensitive = false) const ;
187 
190  Vector3D planeLineIntersection( Vector3D r, Vector3D n, Vector3D linePoint, Vector3D lineDir) const ;
191 
195  double confiningRatio( Vector3D p , Vector3D r, Vector3D n, Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV ) const ;
196 
201  Vector3D correctToBorderPoint( Vector3D vPlane , Vector3D u, Vector3D v, float minU, float maxU, float minV, float maxV ) const ;
202 
203  bool isEqual( double valueOne , double valueTwo ) const ;
204 
205  bool isEqual( Vector3D p1 , Vector3D p2 ) const ;
206 
207  bool differsLess( double valueOne , double valueTwo ) const ;
208 
209 
212  double correctPhiRange( double Phi ) const ;
213 
216  double getPhiPoint( Vector3D p ) const ;
217 
218 }; // class
219 
220 } // namespace gear
221 
222 #endif /* ifndef GEAR_ZPlanarPARAMETERS_H */
Implementation of GearParameters - a set off parameters that can be used to describe the geometrical ...
Geometry properties of a vertex detector needed for reconstruction code.
virtual bool isPointInSensitive(Vector3D p, SensorID *sensorID=0) const
returns wheter a point is inside a sensitive volume
virtual double getShellOuterRadius() const
The outer radius of the support shell in mm.
Abstract description of layers in a Vertex detector.
virtual double getShellGap() const
The gap length (z) of the support shell in mm.
virtual const ZPlanarLayerLayout & getZPlanarLayerLayout() const
Returns the layer layout in the Vertex.
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
Definition: Vector3D.h:18
Abstract description of layers in a Vertex detector.
virtual double getShellRadLength() const
The radiation length in the support shell.
virtual double getShellInnerRadius() const
The inner radius of the support shell in mm.
Geometry properties of a planar detector (parallel to z-axis) needed for reconstruction code...
virtual Vector3D intersectionSensitive(Vector3D p, Vector3D v) const
returns the first point where a given strainght line (parameters point p and direction v) crosses a s...
virtual Vector3D distanceToNearestLadder(Vector3D p) const
returns vector from given point p to nearest ladder
virtual Vector3D distanceToNearestSensitive(Vector3D p) const
returns vector from given point p to nearest sensitive volume
virtual void addLayer(int nLadders, double phi0, double ladderDistance, double ladderOffset, double ladderThickness, double ladderLength, double ladderWidth, double ladderRadLength, double sensitiveDistance, double sensitiveOffset, double sensitiveThickness, double sensitiveLength, double sensitiveWidth, double sensitiveRadLength)
Add a new layer at the given positon.
virtual Vector3D intersectionLadder(Vector3D p, Vector3D v) const
returns the first point where a given strainght line (parameters point p and direction v) crosses a l...
virtual double getShellHalfLength() const
The half length (z) of the support shell in mm.
virtual int getType() const
The type of Vertex detector: ZPlanarParametersImpl.CCD, ZPlanarParametersImpl.CMOS or ZPlanarParamete...
Helper struct for decoding a sensor ID.
Definition: GEAR.h:133
virtual void addLayer(int nLadders, double phi0, double ladderDistance, double ladderOffset, double ladderThickness, double ladderLength, double ladderWidth, double ladderRadLength, double sensitiveDistance, double sensitiveOffset, double sensitiveThickness, double sensitiveLength, double sensitiveWidth, double sensitiveRadLength)
adding a Layer to the vertex one layer consiste of a number of ladders and sensitive areas (nLadders)...
virtual bool isPointInLadder(Vector3D p) const
returns whether a point is inside a ladder
ZPlanarParametersImpl(int type, double shellInnerRadius, double shellOuterRadius, double shellHalfLength, double shellGap, double shellRadLength)
C'tor.