ATLAS Offline Software
Loading...
Searching...
No Matches
GeoPixelIFlexServices Class Reference

#include <GeoPixelIFlexServices.h>

Inheritance diagram for GeoPixelIFlexServices:
Collaboration diagram for GeoPixelIFlexServices:

Public Member Functions

 GeoPixelIFlexServices (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, int iSection)
virtual GeoVPhysVol * Build () override
GeoPhysVol * getSupportA ()
GeoPhysVol * getSupportC ()
GeoTransform * getSupportTrfA ()
GeoTransform * getSupportTrfC ()

Protected Attributes

PixelGeometryManagerm_gmt_mgr
InDetMaterialManagerm_mat_mgr
InDetDD::PixelDetectorManagerm_DDmgr
GeoModelIO::ReadGeoModel * m_sqliteReader
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
const double m_epsilon

Private Attributes

double m_section
GeoPhysVol * m_supportPhysA
GeoPhysVol * m_supportPhysC
GeoTransform * m_xformSupportA
GeoTransform * m_xformSupportC

Detailed Description

Definition at line 17 of file GeoPixelIFlexServices.h.

Constructor & Destructor Documentation

◆ GeoPixelIFlexServices()

GeoPixelIFlexServices::GeoPixelIFlexServices ( 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,
int iSection )

Definition at line 26 of file GeoPixelIFlexServices.cxx.

32 : GeoVPixelFactory(ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX)),
33 m_section(iSection),
34 m_supportPhysA(nullptr),
35 m_supportPhysC(nullptr),
36 m_xformSupportA(nullptr),
37 m_xformSupportC(nullptr)
38{
39}
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)

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelIFlexServices::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 41 of file GeoPixelIFlexServices.cxx.

42{
43
44 m_gmt_mgr->msg(MSG::INFO) <<"Build IBL I-Flex services"<<endmsg;
45
46 double safety = 0.01*Gaudi::Units::mm;
47
48 // IBL layer shift ( 2mm shift issue )
49 double layerZshift = m_gmt_mgr->PixelLayerGlobalShift();
50
51 double barrelZmax = m_gmt_mgr->PixelBarrelHalfLength();
52 int nSectors = m_gmt_mgr->NPixelSectors();
53
54 // check if sectors are properly defined
55 if(nSectors==0) return nullptr;
56 double angle=360./(double)nSectors*Gaudi::Units::deg;
57
58 double zmin=0., zmax=0.;
59 double deltaLength = 0.;
60 if(m_section==0) {
61 zmin = m_gmt_mgr->IBLFlexPP0Z(1);
62 zmax=barrelZmax-0.001;
63 deltaLength=layerZshift;
64 }
65 else if(m_section==1) {
66 zmin = barrelZmax+0.001;
67 zmax = m_gmt_mgr->IBLFlexPP0Z(2);
68 deltaLength=-layerZshift;
69 }
70 else if(m_section==2) {
71 zmin = m_gmt_mgr->IBLFlexPP0Z(2);
72 zmax = m_gmt_mgr->IBLFlexPP0Z(3);
73 }
74 else if(m_section==3) {
75 zmin = m_gmt_mgr->IBLFlexPP0Z(3);
76 zmax = m_gmt_mgr->IBLFlexPP0Z(4);
77 }
78
79 double zStartPosA = zmin+layerZshift;
80 double zStartPosC = -zmax+layerZshift;
81 // Caution : section 0 is in thebarrel volume that is already globally shifted
82 if(m_section==0){
83 zStartPosC=-zmax;
84 }
85 if(m_section==1) zStartPosA=zmin;
86
87 double innerRadius = m_gmt_mgr->IBLServiceGetMaxRadialPosition("IPT","simple",zmin,zmax)+safety;
88 double outerRadius = m_gmt_mgr->IBLServiceGetMinRadialPosition("IST","simple",zmin,zmax)-safety;
89 double phiOfModuleZero = m_gmt_mgr->PhiOfModuleZero();
90 double layerRadius = m_gmt_mgr->PixelLayerRadius();
91
92 double halfLengthA = (zmax-zmin)*0.5-deltaLength*.5;
93 double halfLengthC = (zmax-zmin)*0.5+deltaLength*.5;
94
95 // Define IFlex section for side A and C
96 std::ostringstream lnameA;
97 lnameA<<"Brl0A_FlexRingPP0_S"<<m_section;
98 std::ostringstream lnameC;
99 lnameC<<"Brl0C_FlexRingPP0_S"<<m_section;
100
101 // Define IFlex section for side A
102 const GeoTube* supportShapeA = new GeoTube(innerRadius,outerRadius,halfLengthA);
103 const GeoTube* supportShapeC = new GeoTube(innerRadius,outerRadius,halfLengthC);
104 const GeoMaterial* ether = m_mat_mgr->getMaterial("special::Ether");
105// GeoLogVol* supportLogVol_A = new GeoLogVol("Brl0A_FlexRingPP0",supportShapeA,ether);
106// GeoLogVol* supportLogVol_C = new GeoLogVol("Brl0C_FlexRingPP0",supportShapeC,ether);
107 GeoLogVol* supportLogVol_A = new GeoLogVol(lnameA.str(),supportShapeA,ether);
108 GeoLogVol* supportLogVol_C = new GeoLogVol(lnameC.str(),supportShapeC,ether);
109
110 m_supportPhysA = new GeoPhysVol(supportLogVol_A);
111 m_supportPhysC = new GeoPhysVol(supportLogVol_C);
112
113
114 // -------------- Creation du cooling pipe
115
116 double cooling_radius = 35.1;
117 double TubeOuterDiam = m_gmt_mgr->IBLStaveTubeOuterDiameter();
118 double TubeInnerDiam = m_gmt_mgr->IBLStaveTubeInnerDiameter();
119 double cooling_angle = -2.154*Gaudi::Units::deg;
120
121 if(m_gmt_mgr->PixelStaveAxe()==1)
122 {
123 cooling_radius = 34.7 + layerRadius-33.25;
124 cooling_angle = -.1*Gaudi::Units::deg;
125 }
126
127 const GeoTube* service_coolingPipeA = new GeoTube(0.0,TubeOuterDiam*0.5,halfLengthA);
128 const GeoTube* service_coolingPipeC = new GeoTube(0.0,TubeOuterDiam*0.5,halfLengthC);
129
130 const GeoMaterial* cp_service_material = m_mat_mgr->getMaterial("pix::CoolingPipe_IBL");
131 GeoLogVol * cp_service_logA = new GeoLogVol("PP0CoolingPipe",service_coolingPipeA,cp_service_material);
132 GeoLogVol * cp_service_logC = new GeoLogVol("PP0CoolingPipe",service_coolingPipeC,cp_service_material);
133 GeoPhysVol* cpPhysVolA = new GeoPhysVol(cp_service_logA);
134 GeoPhysVol* cpPhysVolC = new GeoPhysVol(cp_service_logC);
135
136 const GeoTube* service_coolingPipeInnerA = new GeoTube(0.0,TubeInnerDiam*0.5,halfLengthA);
137 const GeoTube* service_coolingPipeInnerC = new GeoTube(0.0,TubeInnerDiam*0.5,halfLengthC);
138 const GeoMaterial* cp_service_inner_material = m_mat_mgr->getMaterial(m_gmt_mgr->getMaterialName("CoolingFluid",0,0));
139 GeoLogVol * cp_service_inner_logA = new GeoLogVol("PP0CoolingPipeInner",service_coolingPipeInnerA,cp_service_inner_material);
140 GeoLogVol * cp_service_inner_logC = new GeoLogVol("PP0CoolingPipeInner",service_coolingPipeInnerC,cp_service_inner_material);
141 GeoPhysVol * cp_service_inner_logPVA = new GeoPhysVol(cp_service_inner_logA);
142 GeoPhysVol * cp_service_inner_logPVC = new GeoPhysVol(cp_service_inner_logC);
143
144 GeoNameTag* cp_service_inner_tag = new GeoNameTag("PP0CoolingPipeInner");
145 GeoTransform* cp_service_inner_xform = new GeoTransform(GeoTrf::Transform3D::Identity());
146 cpPhysVolA->add(cp_service_inner_tag);
147 cpPhysVolA->add(cp_service_inner_xform);
148 cpPhysVolA->add(cp_service_inner_logPVA);
149 cpPhysVolC->add(cp_service_inner_tag);
150 cpPhysVolC->add(cp_service_inner_xform);
151 cpPhysVolC->add(cp_service_inner_logPVC);
152
153 GeoLogVol* flex_logVolA = nullptr;
154 GeoLogVol* flex_logVolC = nullptr;
155
156 double flex_angle = -15.001*Gaudi::Units::deg;
157 if(m_gmt_mgr->PixelStaveAxe()==1)
158 flex_angle += 2.14*Gaudi::Units::deg;
159
160 double flex_rot=0.30265;
161 flex_rot=-0.30265*.5;
162 double flex_rmin=0, flex_rmax=0;
163 double flexYmidPos=0;
164 double flex_width = m_gmt_mgr->IBLStaveFlexWidth();
165
166 if(m_section!=2){
167
168 // -------------- Creation du flex (GeoBox)
169
170 int secIdx=(m_section==3)?3:1;
171 flex_rmin = m_gmt_mgr->IBLFlexPP0Rmin(secIdx);
172 flex_rmax = m_gmt_mgr->IBLFlexPP0Rmax(secIdx);
173
174 std::string flexMatName="noFlexMatDefined";
175 if(m_section==0)
176 flexMatName = m_gmt_mgr->IBLFlexMaterial(2,"doglegA");
177 else if(m_section==1)
178 flexMatName = m_gmt_mgr->IBLFlexMaterial(3,"doglegA");
179 else if(m_section==3)
180 flexMatName = m_gmt_mgr->IBLFlexMaterial(1,"PP0FlexA");
181
182 GeoBox * flex_shapeA = new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthA);
183 GeoBox * flex_shapeC = new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthC);
184 const GeoMaterial* flex_material = m_mat_mgr->getMaterial(flexMatName);
185 if(flex_material==nullptr)
186 {
187 m_gmt_mgr->msg(MSG::ERROR)<<"-> error while reading material "<<flexMatName<<__FILE__<< ":"<< __LINE__<<endmsg;
188 std::abort();
189 } else{
190 flex_logVolA = new GeoLogVol("Flex",flex_shapeA,flex_material);
191 flex_logVolC = new GeoLogVol("Flex",flex_shapeC,flex_material);
192 }
193 }
194 else {
195
196 // -------------- Creation du flex (GeoSimplePolygonBRep)
197
198 unsigned int nbFlexPoint=59;
199 double xFlex[59]={-18.029,-15.546,-14.108,-12.832,-12.530,-11.770,-10.522,-9.285,-7.727,-6.132,-4.856,-3.906,-3.183,-1.643,-0.371,1.163,2.590,3.591,4.489,4.933,5.691,6.912,8.018,9.560,10.830,11.159,12.048,12.768,13.982,15.317,18.029,18.029,15.191,13.449,12.742,11.838,10.729,9.181,7.643,6.087,4.643,3.877,3.027,1.953,1.480,-0.071,-1.925,-3.102,-3.864,-5.065,-6.524,-7.999,-9.447,-10.867,-12.305,-13.289,-13.816,-15.377,-18.029};
200 double yFlex[59]={32.768,32.749,32.997,34.143,34.552,35.888,36.844,37.204,37.260,36.858,35.875,34.396,32.984,31.517,31.110,31.364,32.348,33.602,35.204,36.151,37.422,38.466,38.761,38.453,37.521,37.182,35.860,34.828,33.877,33.653,33.668,34.589,34.566,35.449,36.501,37.805,38.814,39.571,39.665,39.034,37.597,36.057,34.440,33.014,32.612,32.021,32.858,34.847,36.074,37.383,37.962,38.205,38.111,37.698,36.831,35.075,34.406,33.655,33.689};
201
202 flexYmidPos=(yFlex[0]+yFlex[nbFlexPoint-1])*.5;
203
204 std::vector<double> xShape, yShape;
205 xShape.clear(); yShape.clear();
206 GeoSimplePolygonBrep* Iflex_shape = new GeoSimplePolygonBrep(flex_width*0.5);
207 for(unsigned int iPt=0; iPt<nbFlexPoint; iPt++) Iflex_shape->addVertex(xFlex[iPt],yFlex[iPt]-flexYmidPos);
208
209 std::string IflexMatName = m_gmt_mgr->IBLFlexMaterial(1, "IFlexA");
210 m_gmt_mgr->msg(MSG::DEBUG)<<"IFlex material : "<<m_section<<" "<<IflexMatName<<endmsg;
211 const GeoMaterial* Iflex_material = m_mat_mgr->getMaterial(IflexMatName);
212
213 if(Iflex_material==nullptr)
214 {
215 m_gmt_mgr->msg(MSG::ERROR)<<"-> error while reading material "<<IflexMatName<<__FILE__<< ":"<< __LINE__<<endmsg;
216 std::abort();
217 } else{
218 flex_logVolA = new GeoLogVol("IFlex",Iflex_shape,Iflex_material);
219 flex_logVolC = new GeoLogVol("IFlex",Iflex_shape,Iflex_material);
220 }
221 }
222
223 GeoPhysVol * flexPhysVolA = new GeoPhysVol(flex_logVolA);
224 GeoPhysVol * flexPhysVolC = new GeoPhysVol(flex_logVolC);
225
226 // Loop over sectors
227 for(int ii = 0; ii < nSectors; ii++) {
228
229 m_gmt_mgr->SetPhi(ii);
230
231 // cooling transform
232 double phiOfCooling = phiOfModuleZero+ cooling_angle + ii*angle;
233 std::ostringstream tmp1;
234 tmp1 << "fl" << ii;
235 GeoNameTag * tag1 = new GeoNameTag(tmp1.str());
236 GeoTransform* xform1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius));
237 m_supportPhysA->add(tag1);
238 m_supportPhysA->add(xform1);
239 m_supportPhysA->add(cpPhysVolA);
240
241 m_supportPhysC->add(tag1);
242 m_supportPhysC->add(xform1);
243 m_supportPhysC->add(cpPhysVolC);
244
245
246 // flex transform
247 double phiOfFlex = phiOfModuleZero+ flex_angle + ii*angle;
248 std::ostringstream tmp2;
249 tmp2 << "fl" << ii;
250 GeoNameTag * tag2 = new GeoNameTag(tmp2.str());
251
252 if(m_section==2){
253
254 // Intermediate flex
255 GeoTransform* xformA2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*Gaudi::Units::deg)*GeoTrf::RotateY3D(-90.*Gaudi::Units::deg)*GeoTrf::RotateX3D(flex_rot));
256 m_supportPhysA->add(tag2);
257 m_supportPhysA->add(xformA2);
258 m_supportPhysA->add(flexPhysVolA);
259
260 GeoTransform* xformC2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*Gaudi::Units::deg)*GeoTrf::RotateY3D(90.*Gaudi::Units::deg)*GeoTrf::RotateX3D(-flex_rot));
261 m_supportPhysC->add(tag2);
262 m_supportPhysC->add(xformC2);
263 m_supportPhysC->add(flexPhysVolC);
264
265 }
266 else {
267
268 // dogleg and PP0 flexes
269
270 GeoTransform* xform2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D((flex_rmin+flex_rmax)*.5)*GeoTrf::RotateZ3D(flex_rot));
271
272 m_supportPhysA->add(tag2);
273 m_supportPhysA->add(xform2);
274 m_supportPhysA->add(flexPhysVolA);
275
276 m_supportPhysC->add(tag2);
277 m_supportPhysC->add(xform2);
278 m_supportPhysC->add(flexPhysVolC);
279 }
280
281
282 }
283
284 double middleA = zStartPosA+halfLengthA;
285 double middleC = zStartPosC+halfLengthC;
286
287 GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(middleA); //(zmin+zmax)*0.5+layerZshift);
288 m_xformSupportA = new GeoTransform(supportTrfA);
289
290 // std::cout<<"Section final A "<<m_section<<" - "<<middleA-halfLengthA<<" "<<middleA+halfLengthA<<" "<<middleA<<std::endl;
291
292 GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(middleC); //(zmin+zmax)*0.5+layerZshift);
293 m_xformSupportC = new GeoTransform(supportTrfC);
294
295 // std::cout<<"Section final C "<<m_section<<" - "<<middleC-halfLengthC<<" "<<middleC+halfLengthC<<" "<<middleC<<std::endl;
296 // std::cout<<"Section ---"<<std::endl;
297
298 return nullptr;
299}
#define endmsg
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
PixelGeometryManager * m_gmt_mgr
InDetMaterialManager * m_mat_mgr

◆ getSupportA()

GeoPhysVol * GeoPixelIFlexServices::getSupportA ( )
inline

Definition at line 29 of file GeoPixelIFlexServices.h.

29{ return m_supportPhysA; }

◆ getSupportC()

GeoPhysVol * GeoPixelIFlexServices::getSupportC ( )
inline

Definition at line 30 of file GeoPixelIFlexServices.h.

30{ return m_supportPhysC; }

◆ getSupportTrfA()

GeoTransform * GeoPixelIFlexServices::getSupportTrfA ( )
inline

Definition at line 31 of file GeoPixelIFlexServices.h.

31{ return m_xformSupportA; }

◆ getSupportTrfC()

GeoTransform * GeoPixelIFlexServices::getSupportTrfC ( )
inline

Definition at line 32 of file GeoPixelIFlexServices.h.

32{ return m_xformSupportC; }

Member Data Documentation

◆ m_DDmgr

InDetDD::PixelDetectorManager* GeoVPixelFactory::m_DDmgr
protectedinherited

Definition at line 45 of file GeoVPixelFactory.h.

◆ m_epsilon

const double GeoVPixelFactory::m_epsilon
protectedinherited

Definition at line 49 of file GeoVPixelFactory.h.

◆ m_gmt_mgr

PixelGeometryManager* GeoVPixelFactory::m_gmt_mgr
protectedinherited

Definition at line 43 of file GeoVPixelFactory.h.

◆ m_mapAX

std::shared_ptr<std::map<std::string, GeoAlignableTransform*> > GeoVPixelFactory::m_mapAX
protectedinherited

Definition at line 48 of file GeoVPixelFactory.h.

◆ m_mapFPV

std::shared_ptr<std::map<std::string, GeoFullPhysVol*> > GeoVPixelFactory::m_mapFPV
protectedinherited

Definition at line 47 of file GeoVPixelFactory.h.

◆ m_mat_mgr

InDetMaterialManager* GeoVPixelFactory::m_mat_mgr
protectedinherited

Definition at line 44 of file GeoVPixelFactory.h.

◆ m_section

double GeoPixelIFlexServices::m_section
private

Definition at line 36 of file GeoPixelIFlexServices.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* GeoVPixelFactory::m_sqliteReader
protectedinherited

Definition at line 46 of file GeoVPixelFactory.h.

◆ m_supportPhysA

GeoPhysVol* GeoPixelIFlexServices::m_supportPhysA
private

Definition at line 37 of file GeoPixelIFlexServices.h.

◆ m_supportPhysC

GeoPhysVol* GeoPixelIFlexServices::m_supportPhysC
private

Definition at line 38 of file GeoPixelIFlexServices.h.

◆ m_xformSupportA

GeoTransform* GeoPixelIFlexServices::m_xformSupportA
private

Definition at line 39 of file GeoPixelIFlexServices.h.

◆ m_xformSupportC

GeoTransform* GeoPixelIFlexServices::m_xformSupportC
private

Definition at line 40 of file GeoPixelIFlexServices.h.


The documentation for this class was generated from the following files: