18 #include "GeoModelRead/ReadGeoModel.h"
19 #include "GeoModelKernel/GeoTube.h"
20 #include "GeoModelKernel/GeoBox.h"
21 #include "GeoModelKernel/GeoLogVol.h"
22 #include "GeoModelKernel/GeoPhysVol.h"
23 #include "GeoModelKernel/GeoNameTag.h"
24 #include "GeoModelKernel/GeoIdentifierTag.h"
25 #include "GeoModelKernel/GeoTransform.h"
26 #include "GeoModelKernel/GeoAlignableTransform.h"
27 #include "GeoModelKernel/GeoMaterial.h"
28 #include "GeoModelKernel/GeoShapeShift.h"
29 #include "GeoModelKernel/GeoDefinitions.h"
30 #include "GaudiKernel/PhysicalConstants.h"
36 inline double sqr(
double x) {
return x*
x;}
46 GeoModelIO::ReadGeoModel* sqliteReader,
47 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
48 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
105 if (
m_numModules % 2) std::cout <<
"SCT_FwdRing: Number of modules in ring must be even." << std::endl;
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));
164 const GeoShape & ringEnvelopeShape = (*tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift));
177 GeoPhysVol * ring=
nullptr;
178 bool negativeEndCap = (
id.getBarrelEC() < 0);
205 int idModule = idNumber;
207 if (negativeEndCap) {
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);
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);
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());