39 GeoFullPhysVol* ecPhys{
nullptr};
44 double rmin =
m_gmt_mgr->PixelEndcapRMin();
45 double rmax =
m_gmt_mgr->PixelEndcapRMax();
47 const GeoMaterial* air =
m_mat_mgr->getMaterial(
"std::Air");
48 const GeoTube* ecTube =
new GeoTube(rmin,rmax,halflength);
49 const GeoLogVol* ecLog =
new GeoLogVol(
"EndCap",ecTube,air);
50 ecPhys =
new GeoFullPhysVol(ecLog);
53 int ndisks =
m_gmt_mgr->PixelEndcapNDisk();
54 m_gmt_mgr->msg(MSG::DEBUG) <<
"Number of disks is " << ndisks <<
endmsg;
57 m_DDmgr->numerology().setNumDisks(ndisks);
60 double endcapZOffset = 0.5* (
m_gmt_mgr->PixelEndcapZMax()+
m_gmt_mgr->PixelEndcapZMin());
67 for(
int idisk = 0; idisk < ndisks; idisk++) {
77 std::string key=
"Disk_"+std::to_string(brl_ec)+
"_"+std::to_string(idisk)+
"_"+std::to_string(
m_gmt_mgr->GetLD())+
"_"+std::to_string(
m_gmt_mgr->Phi())+
"_"+std::to_string(
m_gmt_mgr->Eta());
86 double zdisk =
m_gmt_mgr->PixelDiskZPosition()-endcapZOffset;
88 std::ostringstream nameTag;
89 nameTag <<
"Disk" << idisk;
90 GeoNameTag * tag =
new GeoNameTag(nameTag.str());
91 GeoAlignableTransform* xform =
new GeoAlignableTransform(GeoTrf::TranslateZ3D(zdisk));
93 GeoVPhysVol * diskPhys = pd->Build();
95 ecPhys->add(
new GeoIdentifierTag(idisk));
97 ecPhys->add(diskPhys);
102 m_DDmgr->addAlignableTransform(1,
id, xform, diskPhys);
107 double dz = pd->Thickness()/2. +
m_gmt_mgr->PixelECCablesDistance() ;
108 GeoTransform * xformCablesPlus =
new GeoTransform(GeoTrf::TranslateZ3D(zdisk+dz));
109 ecPhys->add(xformCablesPlus);
110 ecPhys->add(pecc->
Build() );
111 GeoTransform * xformCablesMinus =
new GeoTransform(GeoTrf::TranslateZ3D(zdisk-dz));
112 ecPhys->add(xformCablesMinus);
113 ecPhys->add(pecc->
Build() );
122 std::string region =
m_gmt_mgr->GetSide()>0 ?
"A" :
"C";
125 std::ostringstream ename;
126 ename <<
"EndCap" << region;
127 ecPhys = (*m_mapFPV)[ename.str()];
133 m_pixServices->getBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
135 m_pixServices->getServMatBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
142 xMat.
add(ecPhys,
"PixelEndcap",endcapZOffset);
144 xMat.
add(ecPhys,
"PixelEndcapA",endcapZOffset);
146 xMat.
add(ecPhys,
"PixelEndcapC",endcapZOffset);
GeoPixelEndCap(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, GeoPixelServices *pixServices)
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)