43 int nbECSector =
m_gmt_mgr->PixelECNSectors1();
48 std::ostringstream ostr;
50 const GeoLogVol* theDisk{
nullptr};
58 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
59 const GeoTube* diskTube =
new GeoTube(rmin,rmax,halflength);
60 theDisk =
new GeoLogVol(
"Disk"+ostr.str(),diskTube,air);
66 GeoFullPhysVol* diskPhys =
m_sqliteReader==
nullptr ?
new GeoFullPhysVol(theDisk) :
nullptr;
72 double zpos =
m_gmt_mgr->PixelECSiDz1()*0.5;
73 double deltaPhi = 360.*Gaudi::Units::deg/ (float) nbECSector;
80 double moduleRadius =
m_gmt_mgr->PixelDiskRMin() + 0.5*
m_gmt_mgr->PixelBoardActiveLength();
83 bool oldGeometry = (
m_gmt_mgr->dbVersion() < 1);
137 int pixelECNSectors1 =
m_gmt_mgr->PixelECNSectors1();
138 for (
int ii = 0; ii < pixelECNSectors1*2; ii++) {
146 if(pixelECNSectors1>0) phiId = (
m_gmt_mgr->GetSide()>0) ? ii : (3*pixelECNSectors1-ii-1)%(pixelECNSectors1*2);
152 std::string key=
"ModuleEC_"+ std::to_string(phiId)+
"_"+std::to_string(
m_gmt_mgr->GetLD())+
"_"+std::to_string(
m_gmt_mgr->Phi())+
"_"+std::to_string(
m_gmt_mgr->Eta());
160 int diskSide = (ii%2) ? +1 : -1;
163 GeoTrf::Transform3D rmX(GeoTrf::Transform3D::Identity());
164 if (oldGeometry &&
m_gmt_mgr->GetSide()<0) {
165 if (diskSide > 0) rmX = GeoTrf::RotateX3D(180.*Gaudi::Units::deg);
167 if (diskSide < 0) rmX = GeoTrf::RotateX3D(180.*Gaudi::Units::deg);
169 GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(
angle) * rmX * GeoTrf::RotateY3D(90*Gaudi::Units::deg);
170 GeoTrf::Vector3D pos(moduleRadius,0.,diskSide*zpos);
171 pos = GeoTrf::RotateZ3D(
angle)*pos;
172 GeoAlignableTransform* xform =
new GeoAlignableTransform(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rm);
173 GeoVPhysVol * modulePhys = psd.
Build();
174 std::ostringstream nameTag;
175 nameTag <<
"ModuleEC" << phiId;
176 GeoNameTag * tag =
new GeoNameTag(nameTag.str());
178 diskPhys->add(
new GeoIdentifierTag(phiId));
179 diskPhys->add(xform);
180 diskPhys->add(modulePhys);
184 m_DDmgr->addAlignableTransform(0,
id,xform,modulePhys);
188 std::string key=
"PixelDisk_"+std::to_string(brl_ec)+
"_"+std::to_string(
m_gmt_mgr->GetLD())+
"_"+std::to_string(
m_gmt_mgr->Phi())+
"_"+std::to_string(
m_gmt_mgr->Eta());
189 diskPhys=(*m_mapFPV)[key];
198 GeoTransform* xform =
new GeoTransform( GeoTrf::Translate3D(0, 0, pds.
ZPos()) );
199 diskPhys->add(xform);
200 diskPhys->add(pds.
Build() );
206 xMat.
add(diskPhys,
"PixelDisc");
209 xMat.
add(diskPhys,
"PixelDisc"+ostr.str());
211 xMat.
add(diskPhys,
"PixelDiscA");
212 xMat.
add(diskPhys,
"PixelDiscA"+ostr.str());
214 xMat.
add(diskPhys,
"PixelDiscC");
215 xMat.
add(diskPhys,
"PixelDiscC"+ostr.str());
GeoPixelDisk(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX)
GeoVPixelFactory(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX)