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

#include <GeoPixelOldFrame.h>

Inheritance diagram for GeoPixelOldFrame:
Collaboration diagram for GeoPixelOldFrame:

Public Member Functions

 GeoPixelOldFrame (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)
virtual GeoVPhysVol * Build () override
void BuildInBarrel (GeoFullPhysVol *parent)
void BuildOutBarrel (GeoFullPhysVol *parent)

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 Member Functions

GeoVPhysVol * BuildBox ()
GeoVPhysVol * BuildTrap ()

Private Attributes

PixelLegacyManagerm_legacyManager

Detailed Description

Definition at line 14 of file GeoPixelOldFrame.h.

Constructor & Destructor Documentation

◆ GeoPixelOldFrame()

GeoPixelOldFrame::GeoPixelOldFrame ( 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 )

Definition at line 25 of file GeoPixelOldFrame.cxx.

30 : GeoVPixelFactory (ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX))
31{
32 m_legacyManager = m_gmt_mgr->legacyManager();
33}
PixelLegacyManager * m_legacyManager
PixelGeometryManager * m_gmt_mgr
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 * GeoPixelOldFrame::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 35 of file GeoPixelOldFrame.cxx.

36{
37 return nullptr;
38}

◆ BuildBox()

GeoVPhysVol * GeoPixelOldFrame::BuildBox ( )
private

Definition at line 40 of file GeoPixelOldFrame.cxx.

40 {
41 //
42 std::string logName = "BoxFrBarOutLog";
43 std::string volumeName = "Frame";
44 int typenum = 1;
45 if(m_legacyManager->isBarrelInSFrame() ) {
46 logName = "BoxFrBarInLog";
47 typenum = 0;
48 }
49 if(m_legacyManager->isEndcapInSFrame() ) {
50 logName = "BoxFrEndcapLog";
51 typenum = 2;
52 }
53 //
54 // Dimensions
55 //
56 double length = m_legacyManager->PixelBFrameHalfLength();
57 double thickness = m_legacyManager->PixelBFrameHalfThickness();
58 double width = m_legacyManager->PixelBFrameHalfWidth();
59 //
60 const GeoBox* frameBox = new GeoBox(thickness,width,length);
61 std::string matName = m_gmt_mgr->getMaterialName(volumeName, 0, typenum);
62 const GeoMaterial* frameMat = m_mat_mgr->getMaterialForVolume(matName, frameBox->volume());
63 GeoLogVol* theFrame = new GeoLogVol(logName,frameBox,frameMat);
64 GeoPhysVol* framePhys = new GeoPhysVol(theFrame);
65
66 return framePhys;
67}
double length(const pvec &v)
const double width
InDetMaterialManager * m_mat_mgr

◆ BuildInBarrel()

void GeoPixelOldFrame::BuildInBarrel ( GeoFullPhysVol * parent)

Definition at line 117 of file GeoPixelOldFrame.cxx.

117 {
118 // It is split into two parts : one is the barrel part and one
119 // is part of the endcap frame.
120 //
121
122 // First part
123 m_legacyManager->setBarrelInSFrame();
124 double alpha = 45.*Gaudi::Units::deg;
125 double w1 = m_legacyManager->PixelBarrelBFrameWidth();
126 double w2 = m_legacyManager->PixelBarrelTFrameWidth();
127 double off = m_legacyManager->PixelBarrelFrameOffset();
128 for (int ii = 0; ii < m_legacyManager->PixelBarrelNBFrame(); ii++) {
129 GeoNameTag* tag = new GeoNameTag("Inside Box Frame");
130 double thet = ((float)ii+0.5)*alpha;
131 GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off);
132 GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha);
133 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm));
134 parent->add(tag);
135 parent->add(xform);
136 parent->add(BuildBox());
137 }
138
139 for (int ii = 0; ii < m_legacyManager->PixelBarrelNTFrame(); ii++) {
140 GeoNameTag* tag = new GeoNameTag("Inside Trap Frame");
141 double thet = ((float)ii+1.)*alpha;
142 GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off);
143 GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha);
144 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm));
145 parent->add(tag);
146 parent->add(xform);
147 parent->add(BuildTrap());
148 }
149 //
150 // Second part
151 m_legacyManager->setBarrelOutSFrame();
152 w1 = m_legacyManager->PixelBarrelBFrameWidth();
153 w2 = m_legacyManager->PixelBarrelTFrameWidth();
154 off = m_legacyManager->PixelBarrelFrameOffset()+m_legacyManager->PixelBarrelFrameLength();
155 double radi = m_legacyManager->PixelBarrelFrameECRadius();
156 double zpec = m_legacyManager->PixelBarrelFrameECZPos();
157 double alxec = m_legacyManager->PixelBarrelFrameECAlphaX();
158 for (int ii = 0; ii < m_legacyManager->PixelBarrelNBFrame(); ii++) {
159 GeoNameTag* tag = new GeoNameTag("Outside Box Frame");
160 double thet = ((float)ii+0.5)*alpha;
161 GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off);
162 GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha);
163 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm));
164 parent->add(tag);
165 parent->add(xform);
166 parent->add(BuildBox());
167 pos.z()= -off;
168 GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
169 parent->add(tag);
170 parent->add(xform2);
171 parent->add(BuildBox());
172 }
173 for (int ii = 0; ii < m_legacyManager->PixelBarrelNTFrame(); ii++) {
174 m_legacyManager->setBarrelOutSFrame();
175 GeoNameTag* tag = new GeoNameTag("Outside Trap Frame");
176 double thet = ((float)ii+1.)*alpha;
177 GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off);
178 GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha);
179 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm));
180 parent->add(tag);
181 parent->add(xform);
182 parent->add(BuildTrap());
183 pos.z() = -off;
184 GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
185 parent->add(tag);
186 parent->add(xform2);
187 parent->add(BuildTrap());
188 //
189 m_legacyManager->setEndConeSFrame();
190 GeoNameTag* tag2 = new GeoNameTag("Outside End Cone Trap Frame");
191 thet = ((float)ii+0.5)*alpha;
192 GeoTrf::Translation3D posec(radi*cos(thet),radi*sin(thet),zpec);
193 GeoTrf::Transform3D rm2 = GeoTrf::RotateZ3D(((float)ii+2.5)*alpha)*GeoTrf::RotateX3D(alxec);
194 GeoTransform* xform3 = new GeoTransform(GeoTrf::Transform3D(posec*rm2));
195 parent->add(tag2);
196 parent->add(xform3);
197 parent->add(BuildTrap());
198 posec.z() = -zpec;
199 GeoTrf::Transform3D rm3 = GeoTrf::RotateZ3D(((float)ii+2.5)*alpha)*GeoTrf::RotateX3D(-alxec);
200 GeoTransform* xform4 = new GeoTransform(GeoTrf::Transform3D(posec*rm3));
201 parent->add(tag2);
202 parent->add(xform4);
203 parent->add(BuildTrap());
204 }
205}
GeoVPhysVol * BuildTrap()
GeoVPhysVol * BuildBox()

◆ BuildOutBarrel()

void GeoPixelOldFrame::BuildOutBarrel ( GeoFullPhysVol * parent)

Definition at line 207 of file GeoPixelOldFrame.cxx.

207 {
208
209
210 bool endcapAPresent = m_gmt_mgr->partPresent("EndcapA");
211 bool endcapCPresent = m_gmt_mgr->partPresent("EndcapC");
212
213 //
214 // Add the pixel frame inside the endcap volume
215 //
216 m_legacyManager->setEndcapInSFrame();
217 double alpha = 45.*Gaudi::Units::deg;
218 double w1 = m_legacyManager->PixelEndcapBFrameWidth();
219 double w2 = m_legacyManager->PixelEndcapTFrameWidth();
220 double off = m_legacyManager->PixelEndcapFrameOffset()+m_legacyManager->PixelEndcapFrameLength();
221
222 for (int ii = 0; ii < m_legacyManager->PixelEndcapNBFrame(); ii++) {
223 GeoNameTag* tag = new GeoNameTag("Outside Outer Endcap Box Frame");
224 double thet = ((float)ii+0.5)*alpha;
225 GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off);
226 GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha);
227
228 if (endcapAPresent) {
229 GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
230 parent->add(tag);
231 parent->add(xform1);
232 parent->add(BuildBox());
233 }
234 if (endcapCPresent) {
235 pos.z() = -off;
236 GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
237 parent->add(tag);
238 parent->add(xform2);
239 parent->add(BuildBox());
240 }
241 }
242
243 for (int ii = 0; ii < m_legacyManager->PixelEndcapNTFrame(); ii++) {
244 GeoNameTag* tag = new GeoNameTag("Outside Outer Endcap Trap Frame");
245 double thet = ((float)ii+1.)*alpha;
246 GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off);
247 GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha);
248 if (endcapAPresent) {
249 GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
250 parent->add(tag);
251 parent->add(xform1);
252 parent->add(BuildTrap());
253 }
254 if (endcapCPresent) {
255 pos.z() = -off;
256 GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm));
257 parent->add(tag);
258 parent->add(xform2);
259 parent->add(BuildTrap());
260 }
261 }
262}

◆ BuildTrap()

GeoVPhysVol * GeoPixelOldFrame::BuildTrap ( )
private

Definition at line 74 of file GeoPixelOldFrame.cxx.

74 {
75 //
76 std::string logName = "TrapFrBarOutLog";
77 std::string volumeName = "Frame";
78 int typenum = 4;
79 if(m_legacyManager->isBarrelInSFrame()) {
80 logName = "TrapFrBarInLog";
81 typenum = 3;
82 }
83 if(m_legacyManager->isEndcapInSFrame()) {
84 logName = "TrapFrEndcapLog";
85 typenum = 5;
86 }
87 if(m_legacyManager->isEndConeSFrame()) {
88 logName = "TrapFrEndCone";
89 volumeName = "EndCone";
90 typenum = 0;
91 }
92 //
93 // Dimensions
94 //
95 double al1 = 0.;
96 double al2 = 0.;
97 double phi = 0.;
98 double length = m_legacyManager->PixelTFrameHalfLength();
99 double widthy = m_legacyManager->PixelTFrameHalfWidthY();
100 double widthxzn = m_legacyManager->PixelTFrameHalfWidthXzn();
101 double widthxzp = m_legacyManager->PixelTFrameHalfWidthXzp();
102 double tet = m_legacyManager->PixelTFrameDzDr();
103 //
104
105 const GeoTrap* frameTrap = new GeoTrap(length,tet,phi,widthy,widthxzn,widthxzp,al1,widthy,widthxzn,widthxzp,al2);
106 std::string matName = m_gmt_mgr->getMaterialName(volumeName, 0, typenum);
107 const GeoMaterial* frameMat = m_mat_mgr->getMaterialForVolume(matName, frameTrap->volume());
108 GeoLogVol* theFrame = new GeoLogVol(logName,frameTrap,frameMat);
109 GeoPhysVol* framePhys = new GeoPhysVol(theFrame);
110
111 return framePhys;
112}
Scalar phi() const
phi method

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_legacyManager

PixelLegacyManager* GeoPixelOldFrame::m_legacyManager
private

Definition at line 30 of file GeoPixelOldFrame.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_sqliteReader

GeoModelIO::ReadGeoModel* GeoVPixelFactory::m_sqliteReader
protectedinherited

Definition at line 46 of file GeoVPixelFactory.h.


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