105 if (
m_numModules % 2) std::cout <<
"SCT_FwdRing: Number of modules in ring must be even." << std::endl;
121 double divisionAngle = 2*Gaudi::Units::pi /
m_numModules;
124 double moduleCount =
angle / divisionAngle;
125 int moduleCountInt =
static_cast<int>(floor(moduleCount +0.5 -0.0001));
127 m_startAngle = divisionAngle * (moduleCount - moduleCountInt);
133 double moduleCountNegEC = angleNegEC / divisionAngle;
134 m_moduleZero =
static_cast<int>(floor(moduleCountNegEC + 0.5 - 0.0001));
145 double moduleClearanceZ = 0.6 * Gaudi::Units::mm;
146 double moduleClearanceR = 0.5 * Gaudi::Units::mm;
150 + 0.5*
m_module->stereoAngle()*(0.5*
m_module->outerWidth()) + moduleClearanceR;
164 const GeoShape & ringEnvelopeShape = (*tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift));
165 GeoLogVol * ringLog =
new GeoLogVol(
getName(), &ringEnvelopeShape,
m_materials->gasMaterial());
177 GeoPhysVol * ring=
nullptr;
178 bool negativeEndCap = (
id.getBarrelEC() < 0);
205 int idModule = idNumber;
207 if (negativeEndCap) {
228 rot = rot*GeoTrf::RotateX3D(180*Gaudi::Units::degree);
230 rot = rot*GeoTrf::RotateY3D(90*Gaudi::Units::degree);
233 GeoTrf::Vector3D
xyz(
m_module->sensorCenterRadius(), 0, zPos);
235 GeoTrf::Transform3D modulePos = GeoTrf::Translate3D(
xyz.x(),
xyz.y(),
xyz.z())*rot;
240 ring->add(
new GeoNameTag(moduleName));
241 ring->add(
new GeoIdentifierTag(idModule));
242 GeoAlignableTransform * moduleTransform =
new GeoAlignableTransform(modulePos);
243 ring->add(moduleTransform);
244 id.setPhiModule(idModule);
245 GeoVPhysVol * modulePV =
m_module->build(
id);
249 m_detectorManager->addAlignableTransform(1,
id.getWaferId(), moduleTransform, modulePV);
256 double zModuleServices = 0;
257 double rModuleServices = 0;
258 GeoVPhysVol * moduleServices =
nullptr;
259 if (staggerUpperLower > 0){
270 ring->add(
new GeoTransform(GeoTrf::RotateZ3D(
phi)*GeoTrf::Translate3D(rModuleServices, 0, zModuleServices)));
271 ring->add(moduleServices);
297 int idModule = idNumber;
299 if (negativeEndCap) {
305 id.setPhiModule(idModule);
307 std::string key=
"FwdModuleR" +
intToString(
m_iRing)+
"_"+std::to_string(
id.getBarrelEC())+
"_"+std::to_string(
id.getLayerDisk())+
"_"+std::to_string(
id.getEtaModule())+
"_"+std::to_string(
id.getPhiModule());
345 double coolingBlkMainR =
m_module->mainMountPointRadius();
346 double coolingBlkSecR =
m_module->endModuleRadius();
349 double moduleServicesHiLength = std::abs(coolingBlkMainR - coolingBlkSecR) + 0.5 *
m_coolingBlockHiMain->deltaR();
350 double moduleServicesLoLength = std::abs(coolingBlkMainR - coolingBlkSecR) + 0.5 *
m_coolingBlockLoMain->deltaR();
355 double moduleOrientation = (coolingBlkMainR > coolingBlkSecR) ? +1 : -1;
360 double coolingBlkHiSecRMid = coolingBlkSecR + moduleOrientation * 0.5 *
m_coolingBlockHiSec->deltaR();
361 double coolingBlkLoSecRMid = coolingBlkSecR + moduleOrientation * 0.5 *
m_coolingBlockLoSec->deltaR();
379 const GeoBox * moduleServicesHiShape =
new GeoBox(0.5*moduleServicesHiLength +
m_safety,
380 0.5*moduleServicesHiWidth +
m_safety,
381 0.5*moduleServicesHiThickness +
m_safety);
382 const GeoBox * moduleServicesLoShape =
new GeoBox(0.5*moduleServicesLoLength +
m_safety,
383 0.5*moduleServicesLoWidth +
m_safety,
384 0.5*moduleServicesLoThickness +
m_safety);
385 const GeoLogVol * moduleServicesHiLog =
new GeoLogVol(
"ModuleServicesHi", moduleServicesHiShape,
m_materials->gasMaterial());
386 const GeoLogVol * moduleServicesLoLog =
new GeoLogVol(
"ModuleServicesLo", moduleServicesLoShape,
m_materials->gasMaterial());
SCT_FwdRing(const std::string &name, SCT_FwdModule *module, int iWheel, int iRing, int ec, 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_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)