ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SCT_SkiPowerTape Class Reference

#include <SCT_SkiPowerTape.h>

Inheritance diagram for SCT_SkiPowerTape:
Collaboration diagram for SCT_SkiPowerTape:

Public Member Functions

 SCT_SkiPowerTape (const std::string &name, const SCT_Ski *ski, double length, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
 
double thickness () const
 
double width () const
 
double length () const
 
double powerTapeThickness () const
 
GeoVPhysVol * getVolume ()
 
const std::string & getName () const
 
std::string intToString (int i) const
 

Protected Member Functions

double epsilon () const
 

Protected Attributes

GeoVPhysVol * m_physVolume
 
InDetDD::SCT_DetectorManagerm_detectorManager
 
SCT_GeometryManagerm_geometryManager
 
SCT_MaterialManagerm_materials
 

Private Member Functions

void getParameters ()
 
virtual GeoVPhysVol * build ()
 

Private Attributes

double m_length
 
double m_width = 0.0
 
double m_thickness = 0.0
 
double m_powerTapeThickness = 0.0
 
const SCT_Skim_ski
 
double m_powerTapeStartPointOffset = 0.0
 
std::string m_name
 

Static Private Attributes

static const double s_epsilon = 1.0e-6 * Gaudi::Units::mm
 

Detailed Description

Definition at line 14 of file SCT_SkiPowerTape.h.

Constructor & Destructor Documentation

◆ SCT_SkiPowerTape()

SCT_SkiPowerTape::SCT_SkiPowerTape ( const std::string &  name,
const SCT_Ski ski,
double  length,
InDetDD::SCT_DetectorManager detectorManager,
SCT_GeometryManager geometryManager,
SCT_MaterialManager materials 
)

Definition at line 34 of file SCT_SkiPowerTape.cxx.

39  :
40  SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
41  m_length(length), m_ski(ski)
42 {
43  getParameters();
45 }

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_SkiPowerTape::build ( )
privatevirtual

Implements SCT_SharedComponentFactory.

Definition at line 60 of file SCT_SkiPowerTape.cxx.

61 {
62  // The power tapes are stacked going from the nearest interlink to the
63  // nearset edge of the dogleg.
64  //
65  // --- ---
66  // ------ ------
67  // --------- ---------
68 
69 
70  int nHalfModules = m_ski->modulesPerSki()/2;
71 
72  // Thickness of the stack.
73  m_thickness = nHalfModules * m_powerTapeThickness;
74 
75 
76  // This is a volume containing all the power tapes.
77  const GeoBox * skiPowerTapeShape = new GeoBox(0.5*m_thickness, 0.5*m_width, 0.5*m_length);
78  const GeoLogVol *skiPowerTapeLog =
79  new GeoLogVol(getName(), skiPowerTapeShape, m_materials->gasMaterial());
80  GeoPhysVol * skiPowerTape = new GeoPhysVol(skiPowerTapeLog);
81 
82  // Loop over modules in ski as we need their z positions.
83  for (int iModule = 0; iModule < m_ski->modulesPerSki(); iModule++) {
84 
85  // Position PowerTapes
86  // These run from the nearest interlink to the edge of the dogleg
87  double tapeLength, tapeMid, tapeStart, tapeEnd;
88 
89  // nPos is used to stack the power tapes. Modules closest to interlink are
90  // furthest from support. The positive and negative z positions are
91  // syGaudi::Units::mmetric. nPos = 5,4,3,2,1,0,0,1,2,3,4,5 for the 12 modules.
92  int nPos;
93 
94  // test sign of zpos to determine whether the tape runs to the
95  // high z end or low z end.
96 
97  if (m_ski->zPos(iModule) > 0) {
98 
99  // Tape runs from high z end to edge of dogleg. NB width of dogleg is in z-direction
100  tapeStart = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() + m_powerTapeStartPointOffset;
101  tapeEnd = 0.5 * m_length;
102 
103  // For 12 module: iModule = 6, 7, 8, ..., 11 --> nPos = 0, 1, 2, ..., 5
104  nPos = iModule - nHalfModules;
105 
106  } else {
107 
108  // Tape runs from low z end to edge of dogleg. NB width of dogleg is in z-direction
109  tapeStart = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ() - m_powerTapeStartPointOffset;
110  tapeEnd = -0.5 * m_length;
111 
112  // For 12 module: iModule = 0, 1, 2, ..., 5 --> nPos = 5, 4, 3, ..., 0
113  nPos = nHalfModules - iModule - 1;
114 
115  }
116 
117  tapeLength = std::abs(tapeEnd - tapeStart);
118  tapeMid = 0.5 * (tapeEnd + tapeStart);
119 
120 
121  // Make sure that first half are negative and secand half are positive.
122  // Checking that nPos is >= 0 is equivalent to this.
123  if (nPos < 0) {
124  std::cout << "SCT_SkiPowerTape: Module position inconsistent with assumption that\n"
125  << " first half has z < 0 and second half has z > 0"
126  << std::endl;
127  }
128 
129  // Create the tape
130 
131  // Label tape with M# at end of string
132  SCT_PowerTape powerTape(getName()+"PowerTapeM"+intToString(iModule + 1), tapeLength,
134 
135  // Calculate x position of tape. This will depend on the module number.
136  // The reference point is the middle of the stack.
137  double xTapePos = - 0.5 * m_thickness +
138  (nPos + 0.5) * powerTape.thickness();
139  double yTapePos = 0;
140 
141 
142  // Position the tape
143  skiPowerTape->add(new GeoTransform(GeoTrf::Translate3D(xTapePos, yTapePos, tapeMid)));
144  skiPowerTape->add(powerTape.getVolume());
145 
146  }
147 
148  return skiPowerTape;
149 }

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 38 of file SCT_ComponentFactory.cxx.

39 {
40  return s_epsilon;
41 }

◆ getName()

const std::string& SCT_ComponentFactory::getName ( ) const
inlineinherited

Definition at line 35 of file SCT_ComponentFactory.h.

35 {return m_name;}

◆ getParameters()

void SCT_SkiPowerTape::getParameters ( )
private

Definition at line 48 of file SCT_SkiPowerTape.cxx.

49 {
51 
52  // Width is the same as the width of a single powertape.
53  m_powerTapeThickness = parameters->powerTapeThickness();
54  m_width = parameters->powerTapeWidth();
55  m_powerTapeStartPointOffset = parameters->powerTapeStartPointOffset();
56 }

◆ getVolume()

GeoVPhysVol* SCT_SharedComponentFactory::getVolume ( )
inlineinherited

Definition at line 67 of file SCT_ComponentFactory.h.

67 {return m_physVolume;}

◆ intToString()

std::string SCT_ComponentFactory::intToString ( int  i) const
inherited

Definition at line 30 of file SCT_ComponentFactory.cxx.

31 {
32  std::ostringstream str;
33  str << i;
34  return str.str();
35 }

◆ length()

double SCT_SkiPowerTape::length ( ) const
inline

Definition at line 31 of file SCT_SkiPowerTape.h.

31 {return m_length;}

◆ powerTapeThickness()

double SCT_SkiPowerTape::powerTapeThickness ( ) const
inline

Definition at line 32 of file SCT_SkiPowerTape.h.

32 {return m_powerTapeThickness;}

◆ thickness()

double SCT_SkiPowerTape::thickness ( ) const
inline

Definition at line 29 of file SCT_SkiPowerTape.h.

29 {return m_thickness;}

◆ width()

double SCT_SkiPowerTape::width ( ) const
inline

Definition at line 30 of file SCT_SkiPowerTape.h.

30 {return m_width;}

Member Data Documentation

◆ m_detectorManager

InDetDD::SCT_DetectorManager* SCT_ComponentFactory::m_detectorManager
protectedinherited

Definition at line 41 of file SCT_ComponentFactory.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager
protectedinherited

Definition at line 42 of file SCT_ComponentFactory.h.

◆ m_length

double SCT_SkiPowerTape::m_length
private

Definition at line 39 of file SCT_SkiPowerTape.h.

◆ m_materials

SCT_MaterialManager* SCT_ComponentFactory::m_materials
protectedinherited

Definition at line 43 of file SCT_ComponentFactory.h.

◆ m_name

std::string SCT_ComponentFactory::m_name
privateinherited

Definition at line 49 of file SCT_ComponentFactory.h.

◆ m_physVolume

GeoVPhysVol* SCT_SharedComponentFactory::m_physVolume
protectedinherited

Definition at line 70 of file SCT_ComponentFactory.h.

◆ m_powerTapeStartPointOffset

double SCT_SkiPowerTape::m_powerTapeStartPointOffset = 0.0
private

Definition at line 49 of file SCT_SkiPowerTape.h.

◆ m_powerTapeThickness

double SCT_SkiPowerTape::m_powerTapeThickness = 0.0
private

Definition at line 42 of file SCT_SkiPowerTape.h.

◆ m_ski

const SCT_Ski* SCT_SkiPowerTape::m_ski
private

Definition at line 45 of file SCT_SkiPowerTape.h.

◆ m_thickness

double SCT_SkiPowerTape::m_thickness = 0.0
private

Definition at line 41 of file SCT_SkiPowerTape.h.

◆ m_width

double SCT_SkiPowerTape::m_width = 0.0
private

Definition at line 40 of file SCT_SkiPowerTape.h.

◆ s_epsilon

const double SCT_ComponentFactory::s_epsilon = 1.0e-6 * Gaudi::Units::mm
staticprivateinherited

Definition at line 50 of file SCT_ComponentFactory.h.


The documentation for this class was generated from the following files:
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition: SCT_ComponentFactory.h:42
SCT_ComponentFactory::m_name
std::string m_name
Definition: SCT_ComponentFactory.h:49
SCT_Ski::coolingBlockOffsetZ
double coolingBlockOffsetZ() const
Definition: SCT_Ski.h:75
SCT_SkiPowerTape::m_powerTapeStartPointOffset
double m_powerTapeStartPointOffset
Definition: SCT_SkiPowerTape.h:49
SCT_ComponentFactory::m_detectorManager
InDetDD::SCT_DetectorManager * m_detectorManager
Definition: SCT_ComponentFactory.h:41
SCT_SkiPowerTape::m_thickness
double m_thickness
Definition: SCT_SkiPowerTape.h:41
SCT_SkiPowerTape::build
virtual GeoVPhysVol * build()
Definition: SCT_SkiPowerTape.cxx:60
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:69
SCT_SkiPowerTape::getParameters
void getParameters()
Definition: SCT_SkiPowerTape.cxx:48
SCT_SkiPowerTape::m_width
double m_width
Definition: SCT_SkiPowerTape.h:40
SCT_GeometryManager::barrelParameters
const SCT_BarrelParameters * barrelParameters() const
Definition: SCT_GeometryManager.cxx:78
SCT_ComponentFactory::intToString
std::string intToString(int i) const
Definition: SCT_ComponentFactory.cxx:30
SCT_SkiPowerTape::length
double length() const
Definition: SCT_SkiPowerTape.h:31
SCT_ComponentFactory::s_epsilon
static const double s_epsilon
Definition: SCT_ComponentFactory.h:50
SCT_SkiPowerTape::m_powerTapeThickness
double m_powerTapeThickness
Definition: SCT_SkiPowerTape.h:42
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition: SCT_ComponentFactory.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition: SCT_ComponentFactory.h:70
SCT_SharedComponentFactory::SCT_SharedComponentFactory
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
Definition: SCT_ComponentFactory.h:59
SCT_SkiPowerTape::m_ski
const SCT_Ski * m_ski
Definition: SCT_SkiPowerTape.h:45
SCT_Ski::zPos
double zPos(int i) const
Definition: SCT_Ski.h:52
SCT_BarrelParameters
Definition: SCT_BarrelParameters.h:12
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
str
Definition: BTagTrackIpAccessor.cxx:11
SCT_PowerTape
Definition: SCT_PowerTape.h:18
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_SkiPowerTape::m_length
double m_length
Definition: SCT_SkiPowerTape.h:39
SCT_Ski::modulesPerSki
int modulesPerSki() const
Definition: SCT_Ski.h:56