GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
ZPlanarLayerLayoutImpl.h
1 // -*- C++ -*-
2 #ifndef GEAR_ZPlanarLayerLayoutImpl_H
3 #define GEAR_ZPlanarLayerLayoutImpl_H 1
4 
5 #include "gear/ZPlanarLayerLayout.h"
6 #include <vector>
7 #include <math.h>
8 
9 namespace gear {
10 
21 
22 
23  friend class ZPlanarParametersImpl ;
24 
25 public:
26 
28  struct Layer {
29  int NLadders{} ;
30  double internalPhi0{} ;
31  double Distance{} ;
32  double Offset{} ;
33  double Thickness{} ;
34  double Length{} ;
35  double Width{} ;
36  double RadLength{} ;
37  } ;
38 
39  typedef std::vector<Layer> LayerVec ;
40 
41  // Destructor.
42  virtual ~ZPlanarLayerLayoutImpl() { /* nop */; }
43 
46  virtual int getNLayers() const { return _lVec.size() ; }
47 
51  virtual int getNLadders(int layerIndex) const { return _lVec.at( layerIndex ).NLadders ; }
52 
57  virtual double getPhi0(int layerIndex) const { return M_PI/2. - _lVec.at( layerIndex ).internalPhi0 ; }
58 
62  virtual double getLadderRadLength(int layerIndex) const { return _lVec.at( layerIndex ).RadLength ; }
63 
67  virtual double getLadderDistance(int layerIndex) const { return _lVec.at( layerIndex ).Distance ; }
68 
72  virtual double getLadderThickness(int layerIndex) const { return _lVec.at( layerIndex ).Thickness ; }
73 
81  virtual double getLadderOffset(int layerIndex) const { return _lVec.at( layerIndex ).Offset ; }
82 
86  virtual double getLadderWidth(int layerIndex) const { return _lVec.at( layerIndex ).Width ; }
87 
88 
94  virtual double getLadderLength(int layerIndex) const { return _lVec.at( layerIndex ).Length ; }
95 
99  virtual double getSensitiveRadLength(int layerIndex) const { return _sVec.at( layerIndex ).RadLength ; }
100 
103  virtual double getSensitiveDistance(int layerIndex) const { return _sVec.at( layerIndex ).Distance ; }
104 
107  virtual double getSensitiveThickness(int layerIndex) const { return _sVec.at( layerIndex ).Thickness ; }
108 
112  virtual double getSensitiveOffset(int layerIndex) const { return _sVec.at( layerIndex ).Offset ; }
113 
116  virtual double getSensitiveWidth(int layerIndex) const { return _sVec.at( layerIndex ).Width ; }
117 
120  virtual double getSensitiveLength(int layerIndex) const { return _sVec.at( layerIndex ).Length ; }
121 
124  virtual void addLayer(int nLadders, double phi0,
125  // ladder
126  double ladderDistance, double ladderOffset, double ladderThickness,
127  double ladderLength, double ladderWidth, double ladderRadLength,
128  // sensitive
129  double sensitiveDistance, double sensitiveOffset, double sensitiveThickness,
130  double sensitiveLength, double sensitiveWidth, double sensitiveRadLength);
131 
134  virtual double getMaxRadius( int layerIndex , bool sensitive=false ) const ;
135 
138  virtual double getStartInnerPhi( int layerIndex , bool sensitive=false ) const ;
139 
142  virtual double getEndInnerPhi( int layerIndex , bool sensitive=false ) const ;
143 
146  virtual double getStartOuterPhi( int layerIndex , bool sensitive=false ) const ;
147 
150  virtual double getEndOuterPhi( int layerIndex , bool sensitive=false ) const ;
151 
156  virtual double getThicknessForPhi( int layerIndex, double phi , bool sensitive=false ) const ;
157 
158 
159 protected:
160 
161  double getInternalPhi0(int layerIndex) const { return _lVec.at( layerIndex ).internalPhi0 ; }
162 
163 
164  // Ladder
165  LayerVec _lVec{} ;
166  // Sensitive
167  LayerVec _sVec{} ;
168 
169 private:
170 
171 
172 }; // class
173 } // namespace gear
174 #endif /* ifndef GEAR_ZPlanarLAYERLAYOUT_H */
virtual int getNLadders(int layerIndex) const
The number of ladders in the layer layerIndex - layer indexing starts at 0 for the layer closest to I...
virtual double getSensitiveThickness(int layerIndex) const
The thickness in mm of the sensitive area in ladders in layer layerIndex.
virtual double getLadderRadLength(int layerIndex) const
The radiation length in the support structure ladders of layer layerIndex - layer indexing starts at ...
virtual double getSensitiveOffset(int layerIndex) const
Same as getLadderOffset() except for the sensitive part of the ladder.
virtual double getMaxRadius(int layerIndex, bool sensitive=false) const
returns maximum radius for a given layer
Abstract description of layers in a Vertex detector.
virtual double getLadderDistance(int layerIndex) const
The distance of ladders in layer layerIndex from the IP - layer indexing starts at 0 for the layer cl...
virtual double getStartOuterPhi(int layerIndex, bool sensitive=false) const
returns starting phi for first ladder in layer layerIndex (on side away from IP)
virtual double getSensitiveRadLength(int layerIndex) const
The radiation length in sensitive volumes in layer layerIndex - layer indexing starts at 0 for the la...
virtual double getSensitiveWidth(int layerIndex) const
The width of the sensitive area in ladders in layer layerIndex in mm.
virtual double getSensitiveDistance(int layerIndex) const
The distance of sensitive area in ladders in layer layerIndex from the IP.
Abstract description of layers in a Vertex detector.
virtual double getLadderWidth(int layerIndex) const
The width of the ladder in layer in mm for ladders in layer layerIndex - layer indexing starting at 0...
virtual int getNLayers() const
The total number of layers.
virtual double getLadderThickness(int layerIndex) const
The thickness in mm of the ladders in layerIndex - layer indexing starting at 0 for the layer closest...
virtual double getLadderOffset(int layerIndex) const
The offset of the ladder in mm defines the shift of the ladder in the direction of increasing phi per...
virtual double getPhi0(int layerIndex) const
Azimuthal angle of the (outward pointing) normal of the first ladder.
virtual double getThicknessForPhi(int layerIndex, double phi, bool sensitive=false) const
returns thickness as viewed under the angle phi only for the first ladder in layer layerIndex...
Geometry properties of a planar detector (parallel to z-axis) needed for reconstruction code...
virtual double getSensitiveLength(int layerIndex) const
The length of the sensitive area in ladders in z direction in mm for ladders in layer layerIndex...
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 double getEndOuterPhi(int layerIndex, bool sensitive=false) const
returns ending phi for first ladder in layer layerIndex (on side away from IP)
virtual double getEndInnerPhi(int layerIndex, bool sensitive=false) const
returns ending phi for first ladder in layer layerIndex (on side facing IP)
virtual double getLadderLength(int layerIndex) const
The (half) length of the ladder in z direction in mm for ladders in layer layerIndex - layer indexing...
Helper class for layer properties.
virtual double getStartInnerPhi(int layerIndex, bool sensitive=false) const
returns starting phi for first ladder in layer layerIndex (on side facing IP)