37 {
38
39 GeoFullPhysVol* ecPhys{nullptr};
41
42
43
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);
51 }
52
53 int ndisks =
m_gmt_mgr->PixelEndcapNDisk();
54 m_gmt_mgr->msg(MSG::DEBUG) <<
"Number of disks is " << ndisks <<
endmsg;
55
56
57 m_DDmgr->numerology().setNumDisks(ndisks);
58
59
60 double endcapZOffset = 0.5* (
m_gmt_mgr->PixelEndcapZMax()+
m_gmt_mgr->PixelEndcapZMin());
61
62
63
64
67 for(int idisk = 0; idisk < ndisks; idisk++) {
69
70
76 Identifier
id =
m_gmt_mgr->getIdHelper()->wafer_id(brl_ec,idisk,0,0);
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());
79 }
80 else {
81
82
83
84
85
86 double zdisk =
m_gmt_mgr->PixelDiskZPosition()-endcapZOffset;
87
88 std::ostringstream nameTag;
89 nameTag << "Disk" << idisk;
90 GeoNameTag *
tag =
new GeoNameTag(nameTag.str());
91 GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zdisk));
92
93 GeoVPhysVol * diskPhys =
pd->Build();
94 ecPhys->add(tag);
95 ecPhys->add(new GeoIdentifierTag(idisk));
96 ecPhys->add(xform);
97 ecPhys->add(diskPhys);
98
99
101 Identifier
id =
m_gmt_mgr->getIdHelper()->wafer_id(brl_ec,idisk,0,0);
102 m_DDmgr->addAlignableTransform(1,
id, xform, diskPhys);
103
104
105
106
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() );
114 }
115 } else {
117 }
118 }
120 delete pecc;
121
122 std::string region =
m_gmt_mgr->GetSide()>0 ?
"A" :
"C";
123
125 std::ostringstream ename;
126 ename << "EndCap" << region;
127 ecPhys = (*m_mapFPV)[ename.str()];
128 }
130
131
132
133 m_pixServices->getBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
135 m_pixServices->getServMatBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
136 }
137 }
138
139 {
140
141 InDetDD::ExtraMaterial xMat(
m_gmt_mgr->distortedMatManager());
142 xMat.add(ecPhys,"PixelEndcap",endcapZOffset);
144 xMat.add(ecPhys,"PixelEndcapA",endcapZOffset);
145 } else {
146 xMat.add(ecPhys,"PixelEndcapC",endcapZOffset);
147 }
148 }
149
150 return ecPhys;
151}
virtual GeoVPhysVol * Build() override
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
GeoModelIO::ReadGeoModel * m_sqliteReader
PixelGeometryManager * m_gmt_mgr
InDetDD::PixelDetectorManager * m_DDmgr
InDetMaterialManager * m_mat_mgr