GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
LayerLayoutImpl.cc
1 #include "gearimpl/LayerLayoutImpl.h"
2 
3 
4 namespace gear{
5 
6 
7 
8  void LayerLayoutImpl::addLayer(double thickness, double cellSize0, double cellSize1, double absorberThickness ) {
9 
10  Layer l ;
11 
12  if( _vec.size() == 0 ) {
13 
14  l.Distance = 0.0 ;
15 
16  } else {
17 
18  l.Distance = _vec.back().Distance + _vec.back().Thickness ;
19  }
20 
21  l.Thickness = thickness ;
22  l.AbsorberThickness = absorberThickness ;
23  l.CellSize0 = cellSize0 ;
24  l.CellSize1 = cellSize1 ;
25  _vec.push_back( l ) ;
26 
27  }
28 
29 
30  void LayerLayoutImpl::positionLayer(double distance, double thickness, double cellSize0, double cellSize1, double absorberThickness ) {
31 
32  Layer l ;
33 
34  l.Distance = distance ;
35  l.Thickness = thickness ;
36  l.AbsorberThickness = absorberThickness ;
37  l.CellSize0 = cellSize0 ;
38  l.CellSize1 = cellSize1 ;
39  _vec.push_back( l ) ;
40 
41  }
42 
43 }
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...
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.