|
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "GeoModelKernel/GeoAlignableTransform.h"
22 #include "GeoModelKernel/GeoDefinitions.h"
23 #include "GeoModelKernel/GeoIdentifierTag.h"
24 #include "GeoModelKernel/GeoLogVol.h"
25 #include "GeoModelKernel/GeoMaterial.h"
26 #include "GeoModelKernel/GeoNameTag.h"
27 #include "GeoModelKernel/GeoPhysVol.h"
28 #include "GeoModelKernel/GeoShape.h"
29 #include "GeoModelKernel/GeoShapeShift.h"
30 #include "GeoModelKernel/GeoShapeUnion.h"
31 #include "GeoModelKernel/GeoTransform.h"
32 #include "GeoModelKernel/GeoTube.h"
33 #include "GeoModelKernel/GeoVPhysVol.h"
57 #include "GaudiKernel/ISvcLocator.h"
58 #include "GaudiKernel/SystemOfUnits.h"
69 :
InDetDD::DetectorFactoryBase(athenaComps),
70 m_useDynamicAlignFolders(false)
77 m_db = std::make_unique<SCT_DataBase>(athenaComps);
83 std::unique_ptr<InDetDD::SiCommonItems> commonItems{std::make_unique<InDetDD::SiCommonItems>(athenaComps->
getIdHelper())};
102 std::string layout =
"Final";
112 std::string versionName = switches->
getString(
"VERSIONNAME");
113 int versionMajorNumber = 3;
114 int versionMinorNumber = 6;
115 int versionPatchNumber = 0;
137 msg(MSG::INFO) <<
"Building SCT Detector." <<
endmsg;
141 int oldPrecision = std::cout.precision(6);
144 GeoPhysVol *indet = world;
150 std::string barrelLabel =
"Barrel";
151 std::string forwardPlusLabel =
"EndcapA";
152 std::string forwardMinusLabel =
"EndcapC";
154 bool barrelPresent = sctGeneral->
partPresent(barrelLabel);
155 bool forwardPlusPresent = sctGeneral->
partPresent(forwardPlusLabel);
156 bool forwardMinusPresent = sctGeneral->
partPresent(forwardMinusLabel);
174 GeoVPhysVol * barrelPV = sctBarrel.
build(
id);
175 GeoAlignableTransform * barrelTransform =
new GeoAlignableTransform(sctTransform * sctGeneral->
partTransform(barrelLabel));
179 GeoNameTag *topLevelNameTag =
new GeoNameTag(
"SCT");
180 indet->add(topLevelNameTag);
181 indet->add(
new GeoIdentifierTag(0));
182 indet->add(barrelTransform);
183 indet->add(barrelPV);
194 if (forwardPlusPresent) {
204 idFwdPlus.setBarrelEC(2);
205 GeoVPhysVol * forwardPlusPV = sctForwardPlus.
build(idFwdPlus);
208 * GeoTrf::TranslateZ3D(sctForwardPlus.
zCenter()));
209 GeoAlignableTransform * fwdGeoTransformPlus =
new GeoAlignableTransform(fwdTransformPlus);
213 GeoNameTag *topLevelNameTag =
new GeoNameTag(
"SCT");
214 indet->add(topLevelNameTag);
215 indet->add(
new GeoIdentifierTag(2));
216 indet->add(fwdGeoTransformPlus);
217 indet->add(forwardPlusPV);
228 if (forwardMinusPresent) {
237 idFwdMinus.setBarrelEC(-2);
238 GeoVPhysVol * forwardMinusPV = sctForwardMinus.
build(idFwdMinus);
246 * GeoTrf::TranslateZ3D(sctForwardMinus.
zCenter()));
247 GeoAlignableTransform * fwdGeoTransformMinus =
new GeoAlignableTransform(fwdTransformMinus);
251 GeoNameTag *topLevelNameTag =
new GeoNameTag(
"SCT");
252 indet->add(topLevelNameTag);
253 indet->add(
new GeoIdentifierTag(-2));
254 indet->add(fwdGeoTransformMinus);
255 indet->add(forwardMinusPV);
289 if (forwardPlusPresent) {
300 if (forwardMinusPresent) {
327 if (forwardPlusPresent) {
338 if (forwardMinusPresent) {
352 std::cout.precision(oldPrecision);
virtual const InDetDD::SCT_DetectorManager * getDetectorManager() const
bool partPresent(const std::string &partName) const
const SiNumerology & numerology() const
Access Numerology.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
InDetDD::SCT_DetectorManager * m_detectorManager
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
void setVersion(const Version &version)
const std::string & node() const
Return the version node.
virtual void create(GeoPhysVol *world)
MsgStream & msg(MSG::Level lvl) const
int cells() const
number of readout stips within module side:
void addAlignFolderType(const AlignFolderType alignfolder)
void setCommonItems(std::unique_ptr< const SiCommonItems > &&commonItems)
Set SiCommonItems.
const GeoTrf::Transform3D & partTransform(const std::string &partName) const
SCT_DetectorFactory(SCT_GeoModelAthenaComps *athenaComps, const SCT_Options &options)
virtual GeoVPhysVol * build(SCT_Identifier id)
Definition of the abstract IRDBAccessSvc interface.
std::unique_ptr< SCT_MaterialManager > m_materials
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
StoreGateSvc * detStore()
void addFolder(const std::string &key)
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Eigen::Affine3d Transform3D
void setMaxNumPhiCells(int cells)
void addTreeTop(const PVConstLink &vol)
Add tree top.
const Version & getVersion() const
Get version information.
const std::string & tag() const
Return version tag.
void addGlobalFolder(const std::string &key)
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
const SCT_ModuleSideDesign * getSCT_Design(int i) const
Access to module design, casts to SCT_ModuleSideDesign.
const IGeoDbTagSvc * geoDbTagSvc() const
bool m_useDynamicAlignFolders
std::unique_ptr< SCT_DataBase > m_db
virtual ~SCT_DetectorFactory()
std::unique_ptr< SCT_GeometryManager > m_geometryManager
Class to hold various Athena components.
const SCT_ID * getIdHelper() const
Definition of the abstract IRDBRecord interface.
std::string fullDescription() const
Full Description For example, Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 2....
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
IRDBRecord is one record in the IRDBRecordset object.
IRDBAccessSvc * rdbAccessSvc()
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms. No access to these, they will be changed by manager:
Definition of the abstract IRDBRecordset interface.
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.
virtual GeoVPhysVol * build(SCT_Identifier id)
std::string description
glabal timer - how long have I taken so far?
virtual void initNeighbours() override
Initialize the neighbours. This can only be done when all elements are built.