GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
LayerLayoutImpl.h
1 // -*- C++ -*-
2 // AID-GENERATED
3 // =========================================================================
4 // This class was generated by AID - Abstract Interface Definition
5 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6 // =========================================================================
7 #ifndef GEAR_LayerLayoutImpl_H
8 #define GEAR_LayerLayoutImpl_H 1
9 
10 
11 #include "gear/LayerLayout.h"
12 #include <vector>
13 
14 
15 namespace gear {
16 
24  class LayerLayoutImpl : public LayerLayout {
25 
26  public:
27 
29  struct Layer {
30  double Distance{};
31  double Thickness {};
32  double AbsorberThickness {};
33  double CellSize0 {};
34  double CellSize1 {};
35  } ;
36 
37  typedef std::vector<Layer> LayerVec ;
38 
40  virtual ~LayerLayoutImpl() { /* nop */; }
41 
44  virtual int getNLayers() const { return _vec.size() ; }
45 
49  virtual double getDistance(int layerIndex) const { return _vec.at( layerIndex ).Distance ; }
50 
54  virtual double getThickness(int layerIndex) const { return _vec.at( layerIndex ).Thickness ; }
55 
59  virtual double getAbsorberThickness(int layerIndex) const {
60  return _vec.at( layerIndex ).AbsorberThickness ;
61  }
62 
66  virtual double getCellSize0(int layerIndex) const {
67  return _vec.at( layerIndex ).CellSize0 ;
68  }
69 
72  virtual double getCellSize1(int layerIndex) const {
73  return _vec.at( layerIndex ).CellSize1 ;
74  }
75 
79  virtual void positionLayer(double distance, double thickness, double cellSize0, double cellSize1, double absorberThickness = 0. ) ;
80 
83  virtual void addLayer(double thickness, double cellSize0, double cellSize1, double absorberThickness = 0. ) ;
84 
85  protected:
86  LayerVec _vec{} ;
87 
88  }; // class
89 
90 } // namespace gear
91 
92 #endif /* ifndef GEAR_LayerLayoutImpl_H */
virtual ~LayerLayoutImpl()
Destructor.
virtual int getNLayers() const
The total number of layers.
Abstract description of a layered layout detector - typically a a sampling calorimeter.
Definition: LayerLayout.h:15
virtual double getThickness(int layerIndex) const
The thickness of the layer layerIndex - layer indexing starts at 0 for the layer closest to the origi...
virtual void positionLayer(double distance, double thickness, double cellSize0, double cellSize1, double absorberThickness=0.)
Position new layer at the given distance (after the last layer) - typically this will be used for the...
virtual double getCellSize0(int layerIndex) const
The cell size along the first axis where first is either along the beam (barrel type) or up (endcap) ...
Helper class for layer properties.
virtual void addLayer(double thickness, double cellSize0, double cellSize1, double absorberThickness=0.)
Add a new layer right after the last layer - at distance 0.
virtual double getCellSize1(int layerIndex) const
The second cell size, perpendicular to the first direction (getCellSize0()) and the depth of the laye...
virtual double getDistance(int layerIndex) const
The distance of the layer layerIndex from the origin - layer indexing starts at 0 for the layer close...
virtual double getAbsorberThickness(int layerIndex) const
The thickness of the absorber part of the layer layerIndex - layer indexing starts at 0 for the layer...
Implementation of layered layout detector - typically a a sampling calorimeter.