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

#include <SCT_OuterSide.h>

Inheritance diagram for SCT_OuterSide:
Collaboration diagram for SCT_OuterSide:

Public Member Functions

 SCT_OuterSide (const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * >> mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * >> mapAX)
 
 ~SCT_OuterSide ()
 
 SCT_OuterSide (const SCT_OuterSide &)=delete
 
SCT_OuterSideoperator= (const SCT_OuterSide &)=delete
 
virtual GeoVPhysVol * build (SCT_Identifier id)
 
double thickness () const
 
double width () const
 
double length () const
 
const GeoTrf::Vector3D * env1RefPointVector () const
 
const GeoTrf::Vector3D * env2RefPointVector () const
 
const SCT_Hybridhybrid () const
 
const SCT_Pigtailpigtail () const
 
const SCT_Sensorsensor () const
 
double hybridOffsetX () const
 
double hybridOffsetZ () const
 
const std::string & getName () const
 
std::string intToString (int i) const
 

Protected Member Functions

double epsilon () const
 

Protected Attributes

const GeoLogVol * m_logVolume
 
GeoModelIO::ReadGeoModel * m_sqliteReader
 
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
 
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
 
InDetDD::SCT_DetectorManagerm_detectorManager
 
SCT_GeometryManagerm_geometryManager
 
SCT_MaterialManagerm_materials
 

Private Member Functions

void getParameters ()
 
virtual const GeoLogVol * preBuild ()
 

Private Attributes

double m_thickness = 0.0
 
double m_width = 0.0
 
double m_length = 0.0
 
double m_hybridOffsetX = 0.0
 
double m_hybridOffsetZ = 0.0
 
double m_safety = 0.0
 
std::unique_ptr< SCT_Hybridm_hybrid
 
std::unique_ptr< SCT_Pigtailm_pigtail
 
std::unique_ptr< SCT_Sensorm_sensor
 
GeoIntrusivePtr< GeoTransform > m_hybridPos {}
 
GeoIntrusivePtr< GeoTransform > m_pigtailPos {}
 
GeoIntrusivePtr< GeoTransform > m_sensorPos {}
 
std::unique_ptr< GeoTrf::Vector3D > m_env1RefPointVector
 
std::unique_ptr< GeoTrf::Vector3D > m_env2RefPointVector
 
std::string m_name
 

Static Private Attributes

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

Detailed Description

Definition at line 26 of file SCT_OuterSide.h.

Constructor & Destructor Documentation

◆ SCT_OuterSide() [1/2]

SCT_OuterSide::SCT_OuterSide ( const std::string &  name,
InDetDD::SCT_DetectorManager detectorManager,
SCT_GeometryManager geometryManager,
SCT_MaterialManager materials,
GeoModelIO::ReadGeoModel *  sqliteReader,
std::shared_ptr< std::map< std::string, GeoFullPhysVol * >>  mapFPV,
std::shared_ptr< std::map< std::string, GeoAlignableTransform * >>  mapAX 
)

Definition at line 36 of file SCT_OuterSide.cxx.

43  : SCT_UniqueComponentFactory(name, detectorManager, geometryManager, materials, sqliteReader, mapFPV, mapAX)
44 {
45  getParameters();
47 }

◆ ~SCT_OuterSide()

SCT_OuterSide::~SCT_OuterSide ( )
default

◆ SCT_OuterSide() [2/2]

SCT_OuterSide::SCT_OuterSide ( const SCT_OuterSide )
delete

Member Function Documentation

◆ build()

GeoVPhysVol * SCT_OuterSide::build ( SCT_Identifier  id)
virtual

Implements SCT_UniqueComponentFactory.

Definition at line 171 of file SCT_OuterSide.cxx.

172 {
173 
174  if(m_sqliteReader){
175 
176  m_sensor->build(id);
177  return nullptr;
178  }
179 
180  GeoFullPhysVol * outerSide = new GeoFullPhysVol(m_logVolume);
181 
182  //
183  // Build the outerSide
184  //
185  // Add Sensor
186  outerSide->add(new GeoIdentifierTag(1000));
187  outerSide->add(m_sensorPos);
188  outerSide->add(m_sensor->build(id));
189 
190  // Add Hybrid
191  outerSide->add(m_hybridPos);
192  outerSide->add(m_hybrid->getVolume());
193 
194  // Add Pigtail
195  outerSide->add(m_pigtailPos);
196  outerSide->add(m_pigtail->getVolume());
197 
198  return outerSide;
199 }

◆ env1RefPointVector()

const GeoTrf::Vector3D* SCT_OuterSide::env1RefPointVector ( ) const
inline

Definition at line 50 of file SCT_OuterSide.h.

50 {return m_env1RefPointVector.get();}

◆ env2RefPointVector()

const GeoTrf::Vector3D* SCT_OuterSide::env2RefPointVector ( ) const
inline

Definition at line 51 of file SCT_OuterSide.h.

51 {return m_env2RefPointVector.get();}

◆ epsilon()

double SCT_ComponentFactory::epsilon ( ) const
protectedinherited

Definition at line 37 of file SCT_ComponentFactory.cxx.

38 {
39  return s_epsilon;
40 }

◆ 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_OuterSide::getParameters ( )
private

Definition at line 54 of file SCT_OuterSide.cxx.

55 {
56  const SCT_GeneralParameters * generalParameters = m_geometryManager->generalParameters();
58 
59  m_safety = generalParameters->safety();
60  m_hybridOffsetZ = parameters->hybridOffsetZ();
61  m_hybridOffsetX = parameters->hybridOffsetX();
62 }

◆ hybrid()

const SCT_Hybrid* SCT_OuterSide::hybrid ( ) const
inline

Definition at line 53 of file SCT_OuterSide.h.

53 {return m_hybrid.get();}

◆ hybridOffsetX()

double SCT_OuterSide::hybridOffsetX ( ) const
inline

Definition at line 57 of file SCT_OuterSide.h.

57 {return m_hybridOffsetX;}

◆ hybridOffsetZ()

double SCT_OuterSide::hybridOffsetZ ( ) const
inline

Definition at line 58 of file SCT_OuterSide.h.

58 {return m_hybridOffsetZ;}

◆ intToString()

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

Definition at line 29 of file SCT_ComponentFactory.cxx.

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

◆ length()

double SCT_OuterSide::length ( ) const
inline

Definition at line 48 of file SCT_OuterSide.h.

48 {return m_length;}

◆ operator=()

SCT_OuterSide& SCT_OuterSide::operator= ( const SCT_OuterSide )
delete

◆ pigtail()

const SCT_Pigtail* SCT_OuterSide::pigtail ( ) const
inline

Definition at line 54 of file SCT_OuterSide.h.

54 {return m_pigtail.get();}

◆ preBuild()

const GeoLogVol * SCT_OuterSide::preBuild ( )
privatevirtual

Implements SCT_UniqueComponentFactory.

Definition at line 66 of file SCT_OuterSide.cxx.

67 {
68  // Create child components
69  m_sensor = std::make_unique<SCT_Sensor>("BRLSensor", m_detectorManager, m_geometryManager, m_materials, m_sqliteReader, m_mapFPV, m_mapAX);
70 
71  if(m_sqliteReader) return nullptr;
72 
73  m_hybrid = std::make_unique<SCT_Hybrid>("Hybrid", m_detectorManager, m_geometryManager, m_materials);
74  m_pigtail = std::make_unique<SCT_Pigtail>("Pigtail", m_detectorManager, m_geometryManager, m_materials);
75 
76  //
77  // Define constants for convenience.
78  // t_XXX: thickness of XXX.
79  // w_XXX: width of XXX.
80  // l_XXX: length of XXX.
81  //
82  const double t_hybrid = m_hybrid->thickness();
83  const double w_hybrid = m_hybrid->width();
84  //const double l_hybrid = m_hybrid->length();
85 
86  const double t_pigtail = m_pigtail->thickness();
87  const double w_pigtail = m_pigtail->width();
88  const double l_pigtail = m_pigtail->length();
89 
90  const double t_sensor = m_sensor->thickness();
91  const double w_sensor = m_sensor->width();
92  const double l_sensor = m_sensor->length();
93 
94  //
95  // Calculate a few things.
96  //
97  const double sensorPosX = 0.0;
98  const double sensorPosY = 0.0;
99  const double sensorPosZ = 0.0;
100 
101  const double hybridPosX = m_hybridOffsetX;
102  const double hybridPosY = 0.0;
103  const double hybridPosZ = m_hybridOffsetZ;
104 
105  const double pigtailPosX = hybridPosX + 0.5*t_hybrid - 0.5*t_pigtail;
106  const double pigtailPosY = -0.5*w_hybrid - 0.5*w_pigtail;
107  const double pigtailPosZ = hybridPosZ;
108 
109  //
110  // ose : OuterSideEnvelope
111  // Reference: sct_module_geometry.ps
112  //
113  const double w_ose1 = w_sensor + m_safety;
114  const double t_ose1 = t_sensor + m_safety;
115  const double l_ose1 = l_sensor + m_safety;
116 
117  const double t_ose2 = t_hybrid + m_safety;
118  const double w_ose2 = w_hybrid + w_pigtail + m_safety;
119  const double l_ose2 = l_pigtail + m_safety;
120 
121  const double ose2PosX = hybridPosX;
122  const double ose2PosY = hybridPosY - 0.5*w_pigtail;
123  const double ose2PosZ = hybridPosZ;
124 
125  m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(0.0, 0.0, 0.0);
126  m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-ose2PosX, -ose2PosY, -ose2PosZ);
127 
128  m_hybridPos = new GeoTransform(GeoTrf::Translate3D(hybridPosX, hybridPosY, hybridPosZ));
129  m_pigtailPos = new GeoTransform(GeoTrf::Translate3D(pigtailPosX, pigtailPosY, pigtailPosZ));
130 
131  // The depth axis goes from the backside to the implant side
132  // and so point to away from the module center.
133  // The two sensor+hybrid combinations are built in a similar way.
134  //
135  // ^
136  // --- hybrid |
137  // ------- sensor | x-axis
138  //
139  // Shown is the outer side. The inner side is the same but with a rotation of 180 Gaudi::Units::deg around the z-axis.
140  //
141  //Gaudi::Units::HepRotation rotSensor;
142  //rotSensor.rotateZ(180*Gaudi::Units::deg);
143  m_sensorPos = new GeoTransform(GeoTrf::Translate3D(sensorPosX, sensorPosY, sensorPosZ));
144 
145  //
146  // Make an envelope for the whole module.
147  //
148  const GeoBox * ose1Shape = new GeoBox(0.5 * t_ose1,
149  0.5 * w_ose1,
150  0.5 * l_ose1);
151  const GeoBox * ose2Shape = new GeoBox(0.5 * t_ose2,
152  0.5 * w_ose2,
153  0.5 * l_ose2);
154 
155  const GeoShape & OuterSideEnvelopeShape = (*ose1Shape).
156  add(*ose2Shape << GeoTrf::Translate3D(ose2PosX, ose2PosY, ose2PosZ));
157 
158  const GeoLogVol * OuterSideEnvelopeLog = new GeoLogVol("OuterSideEnvelope",
159  &OuterSideEnvelopeShape,
161 
162  m_thickness = 0.5*t_ose1 + m_hybridOffsetX + 0.5*t_ose2;
163  m_width = w_ose2;
164  m_length = l_ose1;
165 
166  return OuterSideEnvelopeLog;
167 }

◆ sensor()

const SCT_Sensor* SCT_OuterSide::sensor ( ) const
inline

Definition at line 55 of file SCT_OuterSide.h.

55 {return m_sensor.get();}

◆ thickness()

double SCT_OuterSide::thickness ( ) const
inline

Definition at line 46 of file SCT_OuterSide.h.

46 {return m_thickness;}

◆ width()

double SCT_OuterSide::width ( ) const
inline

Definition at line 47 of file SCT_OuterSide.h.

47 {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_env1RefPointVector

std::unique_ptr<GeoTrf::Vector3D> SCT_OuterSide::m_env1RefPointVector
private

Definition at line 79 of file SCT_OuterSide.h.

◆ m_env2RefPointVector

std::unique_ptr<GeoTrf::Vector3D> SCT_OuterSide::m_env2RefPointVector
private

Definition at line 80 of file SCT_OuterSide.h.

◆ m_geometryManager

SCT_GeometryManager* SCT_ComponentFactory::m_geometryManager
protectedinherited

Definition at line 42 of file SCT_ComponentFactory.h.

◆ m_hybrid

std::unique_ptr<SCT_Hybrid> SCT_OuterSide::m_hybrid
private

Definition at line 72 of file SCT_OuterSide.h.

◆ m_hybridOffsetX

double SCT_OuterSide::m_hybridOffsetX = 0.0
private

Definition at line 68 of file SCT_OuterSide.h.

◆ m_hybridOffsetZ

double SCT_OuterSide::m_hybridOffsetZ = 0.0
private

Definition at line 69 of file SCT_OuterSide.h.

◆ m_hybridPos

GeoIntrusivePtr<GeoTransform> SCT_OuterSide::m_hybridPos {}
private

Definition at line 76 of file SCT_OuterSide.h.

◆ m_length

double SCT_OuterSide::m_length = 0.0
private

Definition at line 66 of file SCT_OuterSide.h.

◆ m_logVolume

const GeoLogVol* SCT_UniqueComponentFactory::m_logVolume
protectedinherited

Definition at line 90 of file SCT_ComponentFactory.h.

◆ m_mapAX

std::shared_ptr<std::map<std::string, GeoAlignableTransform*> > SCT_UniqueComponentFactory::m_mapAX
protectedinherited

Definition at line 96 of file SCT_ComponentFactory.h.

◆ m_mapFPV

std::shared_ptr<std::map<std::string, GeoFullPhysVol*> > SCT_UniqueComponentFactory::m_mapFPV
protectedinherited

Definition at line 95 of file SCT_ComponentFactory.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_pigtail

std::unique_ptr<SCT_Pigtail> SCT_OuterSide::m_pigtail
private

Definition at line 73 of file SCT_OuterSide.h.

◆ m_pigtailPos

GeoIntrusivePtr<GeoTransform> SCT_OuterSide::m_pigtailPos {}
private

Definition at line 77 of file SCT_OuterSide.h.

◆ m_safety

double SCT_OuterSide::m_safety = 0.0
private

Definition at line 70 of file SCT_OuterSide.h.

◆ m_sensor

std::unique_ptr<SCT_Sensor> SCT_OuterSide::m_sensor
private

Definition at line 74 of file SCT_OuterSide.h.

◆ m_sensorPos

GeoIntrusivePtr<GeoTransform> SCT_OuterSide::m_sensorPos {}
private

Definition at line 78 of file SCT_OuterSide.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* SCT_UniqueComponentFactory::m_sqliteReader
protectedinherited

Definition at line 91 of file SCT_ComponentFactory.h.

◆ m_thickness

double SCT_OuterSide::m_thickness = 0.0
private

Definition at line 64 of file SCT_OuterSide.h.

◆ m_width

double SCT_OuterSide::m_width = 0.0
private

Definition at line 65 of file SCT_OuterSide.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_OuterSide::m_thickness
double m_thickness
Definition: SCT_OuterSide.h:64
SCT_ComponentFactory::m_name
std::string m_name
Definition: SCT_ComponentFactory.h:49
SCT_UniqueComponentFactory::m_mapFPV
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
Definition: SCT_ComponentFactory.h:95
SCT_GeneralParameters::safety
double safety() const
Definition: SCT_GeneralParameters.cxx:48
SCT_OuterSide::m_pigtail
std::unique_ptr< SCT_Pigtail > m_pigtail
Definition: SCT_OuterSide.h:73
SCT_OuterSide::m_hybridPos
GeoIntrusivePtr< GeoTransform > m_hybridPos
Definition: SCT_OuterSide.h:76
SCT_UniqueComponentFactory::m_mapAX
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
Definition: SCT_ComponentFactory.h:96
SCT_OuterSide::m_hybridOffsetX
double m_hybridOffsetX
Definition: SCT_OuterSide.h:68
SCT_UniqueComponentFactory::SCT_UniqueComponentFactory
SCT_UniqueComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr, GeoModelIO::ReadGeoModel *sqliteReader=nullptr, std::shared_ptr< std::map< std::string, GeoFullPhysVol * >> mapFPV=nullptr, std::shared_ptr< std::map< std::string, GeoAlignableTransform * >> mapAX=nullptr)
Definition: SCT_ComponentFactory.cxx:43
SCT_ComponentFactory::m_detectorManager
InDetDD::SCT_DetectorManager * m_detectorManager
Definition: SCT_ComponentFactory.h:41
SCT_OuterSide::m_env1RefPointVector
std::unique_ptr< GeoTrf::Vector3D > m_env1RefPointVector
Definition: SCT_OuterSide.h:79
SCT_GeometryManager::generalParameters
const SCT_GeneralParameters * generalParameters() const
Definition: SCT_GeometryManager.cxx:105
SCT_OuterSide::m_sensorPos
GeoIntrusivePtr< GeoTransform > m_sensorPos
Definition: SCT_OuterSide.h:78
SCT_OuterSide::preBuild
virtual const GeoLogVol * preBuild()
Definition: SCT_OuterSide.cxx:66
SCT_OuterSide::m_env2RefPointVector
std::unique_ptr< GeoTrf::Vector3D > m_env2RefPointVector
Definition: SCT_OuterSide.h:80
SCT_OuterSide::m_pigtailPos
GeoIntrusivePtr< GeoTransform > m_pigtailPos
Definition: SCT_OuterSide.h:77
lumiFormat.i
int i
Definition: lumiFormat.py:92
SCT_MaterialManager::gasMaterial
const GeoMaterial * gasMaterial() const
Definition: SCT_MaterialManager.cxx:80
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
SCT_OuterSide::m_safety
double m_safety
Definition: SCT_OuterSide.h:70
SCT_OuterSide::m_length
double m_length
Definition: SCT_OuterSide.h:66
SCT_GeneralParameters
Definition: SCT_GeneralParameters.h:16
SCT_ComponentFactory::s_epsilon
static const double s_epsilon
Definition: SCT_ComponentFactory.h:50
SCT_GeometryManager::barrelModuleParameters
const SCT_BarrelModuleParameters * barrelModuleParameters() const
Definition: SCT_GeometryManager.cxx:84
SCT_OuterSide::m_hybridOffsetZ
double m_hybridOffsetZ
Definition: SCT_OuterSide.h:69
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition: SCT_ComponentFactory.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_BarrelModuleParameters
Definition: SCT_BarrelModuleParameters.h:12
SCT_UniqueComponentFactory::m_logVolume
const GeoLogVol * m_logVolume
Definition: SCT_ComponentFactory.h:90
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
SCT_OuterSide::m_sensor
std::unique_ptr< SCT_Sensor > m_sensor
Definition: SCT_OuterSide.h:74
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_OuterSide::getParameters
void getParameters()
Definition: SCT_OuterSide.cxx:54
str
Definition: BTagTrackIpAccessor.cxx:11
SCT_UniqueComponentFactory::m_sqliteReader
GeoModelIO::ReadGeoModel * m_sqliteReader
Definition: SCT_ComponentFactory.h:91
SCT_OuterSide::m_hybrid
std::unique_ptr< SCT_Hybrid > m_hybrid
Definition: SCT_OuterSide.h:72
SCT_OuterSide::m_width
double m_width
Definition: SCT_OuterSide.h:65