ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
EndPlateFactory Class Reference

#include <EndPlateFactory.h>

Inheritance diagram for EndPlateFactory:
Collaboration diagram for EndPlateFactory:

Public Member Functions

 EndPlateFactory (InDetDD::AthenaComps *athenaComps, InDetMaterialManager *matManager)
 
 ~EndPlateFactory ()
 
void create (GeoPhysVol *mother)
 
StoreGateSvcdetStore ()
 
const IGeoDbTagSvcgeoDbTagSvc () const
 
IRDBAccessSvcrdbAccessSvc ()
 
const IGeometryDBSvcgeomDB () const
 
InDetMaterialManagermaterialManager ()
 
MsgStream & msg (MSG::Level lvl) const
 
bool msgLvl (MSG::Level lvl) const
 
InDetDD::AthenaCompsgetAthenaComps ()
 

Protected Attributes

InDetMaterialManagerm_materialManager
 
std::unique_ptr< InDetMaterialManagerm_materialManagerUnique
 

Private Member Functions

const EndPlateFactoryoperator= (const EndPlateFactory &right)
 
 EndPlateFactory (const EndPlateFactory &right)
 

Private Attributes

InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Definition at line 12 of file EndPlateFactory.h.

Constructor & Destructor Documentation

◆ EndPlateFactory() [1/2]

EndPlateFactory::EndPlateFactory ( InDetDD::AthenaComps athenaComps,
InDetMaterialManager matManager 
)

Definition at line 33 of file EndPlateFactory.cxx.

34  : InDetDD::SubDetectorFactoryBase(athenaComps, matManager)
35 {
36 }

◆ ~EndPlateFactory()

EndPlateFactory::~EndPlateFactory ( )

Definition at line 39 of file EndPlateFactory.cxx.

40 {
41 }

◆ EndPlateFactory() [2/2]

EndPlateFactory::EndPlateFactory ( const EndPlateFactory right)
private

Member Function Documentation

◆ create()

void EndPlateFactory::create ( GeoPhysVol *  mother)

Definition at line 46 of file EndPlateFactory.cxx.

47 {
48  DecodeVersionKey indetVersionKey(geoDbTagSvc(),"InnerDetector");
49  IRDBRecordset_ptr shell = rdbAccessSvc()->getRecordsetPtr("EPShell", indetVersionKey.tag(), indetVersionKey.node());
50  IRDBRecordset_ptr insert = rdbAccessSvc()->getRecordsetPtr("EPInsert", indetVersionKey.tag(), indetVersionKey.node());
51  IRDBRecordset_ptr ribs = rdbAccessSvc()->getRecordsetPtr("EPRibs", indetVersionKey.tag(), indetVersionKey.node());
52 //----------------------------------------------------------------------------------
53 // std::string matName = mat[(int) (*pbfi)[ii]->getFloat("MAT")];
54 // const GeoMaterial* cylMat = materialManager()->getMaterial(matName);
55 // double rmin = (*pbfi)[ii]->getFloat("RIN")*Gaudi::Units::cm;
56 //----------------------------------------------------------------------------------
57  double safety = 0.01*Gaudi::Units::mm;
58  double maxRofEP = 1075.0*Gaudi::Units::mm - safety; // Interfere with TRT PatchPanel1
59  double RibConnection = 550.0*Gaudi::Units::mm;
60 
61  maxRofEP = (*shell)[0]->getDouble("EPMAXR")*Gaudi::Units::mm - safety;
62  RibConnection = (*ribs)[0]->getDouble("RIBCONNECTION")*Gaudi::Units::mm;
63 //
64 // Internal shell. Default (initial) values
65 //
66  double rminInt = 425.*Gaudi::Units::mm;
67  double rmaxInt = 1040.*Gaudi::Units::mm;
68  double thickShell = 3.*Gaudi::Units::mm;
69  double thick2 = 10.*Gaudi::Units::mm;
70  double zposEP = 3370.*Gaudi::Units::mm;
71  double zleng = 42.*Gaudi::Units::mm;
72  rminInt = (*shell)[0]->getDouble("RMININT")*Gaudi::Units::mm;
73  rmaxInt = (*shell)[0]->getDouble("RMAXINT")*Gaudi::Units::mm;
74  thickShell = (*shell)[0]->getDouble("THICKSHELL")*Gaudi::Units::mm;
75  thick2 = (*shell)[0]->getDouble("THICKADD")*Gaudi::Units::mm;
76  zposEP = (*shell)[0]->getDouble("ZSTART")*Gaudi::Units::mm;
77  zleng = (*shell)[0]->getDouble("ZSHIFT")*Gaudi::Units::mm;
78 
79 
80  GeoPcon* shellInt = new GeoPcon(0.,2*M_PI);
81  shellInt->addPlane(0. , rminInt, rminInt+thick2);
82  shellInt->addPlane(zleng , rminInt, rminInt+thick2);
83  shellInt->addPlane(zleng , rminInt, rmaxInt );
84  shellInt->addPlane(zleng+thickShell, rminInt, rmaxInt );
85 
86 // Build the Phys Vol
87 // const GeoMaterial* shellMat = materialManager()->getMaterial("std::Aluminium");
88  const GeoMaterial* shellMat = materialManager()->getMaterial((*shell)[0]->getString("MATERIAL"));
89 // std::cout << "Shell mat. den.="<<shellMat->getDensity()<<" Rad.length="<<shellMat->getRadLength()<<'\n';
90 
91 
92  const GeoLogVol* shellLogInt = new GeoLogVol("EPShellInt",shellInt,shellMat);
93  GeoVPhysVol* shellPhysInt = new GeoPhysVol(shellLogInt);
94 
95  GeoTrf::Translate3D servpos1(0.,0., zposEP);
96  GeoTrf::Vector3D servpos2(0.,0.,-zposEP);
97  GeoTransform* xform1 = new GeoTransform(servpos1);
98  GeoTransform* xform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,-M_PI,0),servpos2));
99  mother->add(xform1);
100  mother->add(shellPhysInt);
101  mother->add(xform2);
102  mother->add(shellPhysInt);
103 
104 //----------------------------------------------------------------------------------
105 //
106 // External shell (default/initial values)
107 
108  double zgap = 50.*Gaudi::Units::mm;
109  double rminExt = 250.*Gaudi::Units::mm;
110  double rmaxExt = maxRofEP;
111 
112  zgap = (*shell)[0]->getDouble("ZGAP")*Gaudi::Units::mm;
113  rminExt = (*shell)[0]->getDouble("RMINEXT")*Gaudi::Units::mm;
114 
115 
116  const GeoTube* shellExt = new GeoTube(rminExt,rmaxExt,thickShell/2.);
117  const GeoLogVol* shellLogExt = new GeoLogVol("EPShellExt",shellExt,shellMat);
118  GeoVPhysVol* shellPhysExt = new GeoPhysVol(shellLogExt);
119 
120  GeoTrf::Translate3D servpos3(0.,0., zposEP+zleng+thickShell+zgap+thickShell/2.);
121  GeoTrf::Vector3D servpos4(0.,0.,-zposEP-zleng-thickShell-zgap-thickShell/2.);
122  GeoTransform *xform3 = new GeoTransform(servpos3);
123  GeoTransform* xform4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,-M_PI,0),servpos4));
124 
125  mother->add(xform3);
126  mother->add(shellPhysExt);
127  mother->add(xform4);
128  mother->add(shellPhysExt);
129 
130 //----------------------------------------------------------------------------------
131 //
132 // Insert - default (initial) values
133 
134  double zthick = 16.0*Gaudi::Units::mm;
135  double zinsert = 3018.*Gaudi::Units::mm-zthick;
136  double rminins = 252.*Gaudi::Units::mm;
137  double rmaxins = 435.*Gaudi::Units::mm;
138  double rthick = 5.*Gaudi::Units::mm;
139  double zlengi = 410.*Gaudi::Units::mm;
140 
141  zthick = (*insert)[0]->getDouble("ZTHICK")*Gaudi::Units::mm;
142  zinsert = (*insert)[0]->getDouble("ZINSERT")*Gaudi::Units::mm;
143  rminins = (*insert)[0]->getDouble("RMININS")*Gaudi::Units::mm;
144  rmaxins = (*insert)[0]->getDouble("RMAXINS")*Gaudi::Units::mm;
145  rthick = (*insert)[0]->getDouble("RTHICK")*Gaudi::Units::mm;
146  zlengi = (*insert)[0]->getDouble("ZLENGINS")*Gaudi::Units::mm;
147 
148  GeoPcon* Insert = new GeoPcon(0.,2*M_PI);
149  Insert->addPlane(0. , rminins, rmaxins+rthick);
150  Insert->addPlane(zthick , rminins, rmaxins+rthick);
151  Insert->addPlane(zthick , rmaxins, rmaxins+rthick);
152  Insert->addPlane(zlengi , rmaxins, rmaxins+rthick);
153 
154  const GeoMaterial* insertMat = materialManager()->getMaterial((*insert)[0]->getString("MATERIAL"));
155 // std::cout << "Insert mat. den.="<<insertMat->getDensity()<<" Rad.length="<<insertMat->getRadLength()<<'\n';
156 // Build the Phys Vol
157  const GeoLogVol* InsertLog = new GeoLogVol("EPInsert",Insert,insertMat);
158  GeoVPhysVol* InsertPhys = new GeoPhysVol(InsertLog);
159 
160  GeoTrf::Translate3D servpos5(0.,0., zinsert);
161  GeoTrf::Vector3D servpos6(0.,0.,-zinsert);
162  GeoTransform *xform5 = new GeoTransform(servpos5);
163  GeoTransform* xform6 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,-M_PI,0),servpos6));
164 
165  mother->add(xform5);
166  mother->add(InsertPhys);
167  mother->add(xform6);
168  mother->add(InsertPhys);
169 
170 // std::cout << "End of EP building !!!" <<zinsert<< '\n';
171 //----------------------------------------------------------------------------------
172 //
173 // Short ribs - default (initial) values
174 // Initial position is along X axis then move and rotate
175 //
176  double ribY = 12.0*Gaudi::Units::mm;
177  double ribZ = zgap - safety;
178  double ribX = 380.0*Gaudi::Units::mm;
179  double posX = 550.0*Gaudi::Units::mm+ribX/2.;
180 
181  ribY = (*ribs)[0]->getDouble("SHORTWID")*Gaudi::Units::mm;
182  ribZ = zgap - safety;
183  ribX = (*ribs)[0]->getDouble("SHORTLENG")*Gaudi::Units::mm;
184  posX = (*ribs)[0]->getDouble("SHORTRSTART")*Gaudi::Units::mm + ribX/2.;
185 
186  const GeoBox* ribShort = new GeoBox(ribX/2., ribY/2., ribZ/2.);
187 
188 
189  const GeoMaterial* ribsMat = materialManager()->getMaterial((*ribs)[0]->getString("MATERIAL"));
190 // std::cout << "Ribs mat. den.="<<ribsMat->getDensity()<<" Rad.length="<<ribsMat->getRadLength()<<'\n';
191 //----------
192  const GeoLogVol* ribShortLog = new GeoLogVol("ShortRib",ribShort,ribsMat);
193  GeoVPhysVol* ribShortPhys = new GeoPhysVol(ribShortLog);
194 
195 
196  GeoTransform *xrib;
197 
198  for (int ip=1; ip<12; ip++){
199  if( ip==3 || ip==6 || ip==9) continue;
200  double angl= ip*M_PI/6.;
201  GeoTrf::Vector3D ribpos_pos( posX*cos(angl), posX*sin(angl), zposEP+zleng+thickShell+zgap/2.);
202  GeoTrf::Vector3D ribpos_neg( posX*cos(angl), posX*sin(angl),-zposEP-zleng-thickShell-zgap/2.);
203  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_pos));
204  mother->add(xrib);
205  mother->add(ribShortPhys);
206  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_neg));
207  mother->add(xrib);
208  mother->add(ribShortPhys);
209  }
210 
211 //---------------------------------------------------------------------------------
212 // Long ribs (initial position is along X axis then move and rotate)
213 //
214  double ribY1 = 20.0*Gaudi::Units::mm;
215  double ribZ1 = zgap - safety;
216  double ribX1 = RibConnection-250.*Gaudi::Units::mm;
217  double posX1 = 250.*Gaudi::Units::mm+ribX1/2.;
218 
219  double ribY2 = 30.0*Gaudi::Units::mm;
220  double ribZ2 = zgap - safety;
221  double ribX2 = maxRofEP - RibConnection;
222  double posX2 = RibConnection+ribX2/2.;
223 
224  ribY1 = (*ribs)[0]->getDouble("LONGWID1")*Gaudi::Units::mm;
225  ribZ1 = zgap - safety;
226  ribX1 = RibConnection - (*ribs)[0]->getDouble("LONGLENG1")*Gaudi::Units::mm; // LONGLENG1 is a RMIN of ribs
227  posX1 = (*ribs)[0]->getDouble("LONGLENG1")*Gaudi::Units::mm + ribX1/2.; // It's determined by Pixel volume -> so 250.0!!!
228 
229  ribY2 = (*ribs)[0]->getDouble("LONGWID2")*Gaudi::Units::mm;
230  ribZ2 = zgap - safety;
231  ribX2 = maxRofEP - RibConnection;
232  posX2 = RibConnection+ribX2/2.;
233 
234 
235 
236  const GeoBox* ribLong1 = new GeoBox(ribX1/2. , ribY1/2., ribZ1/2.);
237  const GeoBox* ribLong2 = new GeoBox(ribX2/2.-safety, ribY2/2., ribZ2/2.);
238 
239  const GeoLogVol* ribLong1Log = new GeoLogVol("LongRib1",ribLong1,shellMat);
240  const GeoLogVol* ribLong2Log = new GeoLogVol("LongRib2",ribLong2,shellMat);
241  GeoVPhysVol* ribLong1Phys = new GeoPhysVol(ribLong1Log);
242  GeoVPhysVol* ribLong2Phys = new GeoPhysVol(ribLong2Log);
243 
244 
245  for (int ip=0; ip<4; ip++){
246  double angl= ip*M_PI/2.;
247 // 1st part
248  GeoTrf::Vector3D ribpos_pos1( posX1*cos(angl), posX1*sin(angl), zposEP+zleng+thickShell+zgap/2.);
249  GeoTrf::Vector3D ribpos_neg1( posX1*cos(angl), posX1*sin(angl),-zposEP-zleng-thickShell-zgap/2.);
250  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_pos1));
251  mother->add(xrib);
252  mother->add(ribLong1Phys);
253  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_neg1));
254  mother->add(xrib);
255  mother->add(ribLong1Phys);
256 // 2nd part
257  GeoTrf::Vector3D ribpos_pos2( posX2*cos(angl), posX2*sin(angl), zposEP+zleng+thickShell+zgap/2.);
258  GeoTrf::Vector3D ribpos_neg2( posX2*cos(angl), posX2*sin(angl),-zposEP-zleng-thickShell-zgap/2.);
259  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_pos2));
260  mother->add(xrib);
261  mother->add(ribLong2Phys);
262  xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(angl,0,0),ribpos_neg2));
263  mother->add(xrib);
264  mother->add(ribLong2Phys);
265  }
266 }

◆ detStore()

StoreGateSvc* InDetDD::SubDetectorFactoryBase::detStore ( )
inlineinherited

Definition at line 39 of file InDetSubDetectorFactoryBase.h.

39 {return m_athenaComps->detStore();}

◆ geoDbTagSvc()

const IGeoDbTagSvc* InDetDD::SubDetectorFactoryBase::geoDbTagSvc ( ) const
inlineinherited

Definition at line 41 of file InDetSubDetectorFactoryBase.h.

41 {return std::as_const(*m_athenaComps).geoDbTagSvc();}

◆ geomDB()

const IGeometryDBSvc* InDetDD::SubDetectorFactoryBase::geomDB ( ) const
inlineinherited

Definition at line 45 of file InDetSubDetectorFactoryBase.h.

45 {return m_athenaComps->geomDB();}

◆ getAthenaComps()

InDetDD::AthenaComps* InDetDD::SubDetectorFactoryBase::getAthenaComps ( )
inlineinherited

Definition at line 55 of file InDetSubDetectorFactoryBase.h.

55 {return m_athenaComps;}

◆ materialManager()

InDetMaterialManager* InDetDD::SubDetectorFactoryBase::materialManager ( )
inlineinherited

Definition at line 47 of file InDetSubDetectorFactoryBase.h.

47 {return m_materialManager;}

◆ msg()

MsgStream& InDetDD::SubDetectorFactoryBase::msg ( MSG::Level  lvl) const
inlineinherited

Definition at line 50 of file InDetSubDetectorFactoryBase.h.

50 { return m_athenaComps->msg(lvl); }

◆ msgLvl()

bool InDetDD::SubDetectorFactoryBase::msgLvl ( MSG::Level  lvl) const
inlineinherited

Definition at line 53 of file InDetSubDetectorFactoryBase.h.

53 { return m_athenaComps->msgLvl(lvl); }

◆ operator=()

const EndPlateFactory& EndPlateFactory::operator= ( const EndPlateFactory right)
private

◆ rdbAccessSvc()

IRDBAccessSvc* InDetDD::SubDetectorFactoryBase::rdbAccessSvc ( )
inlineinherited

Definition at line 43 of file InDetSubDetectorFactoryBase.h.

43 {return m_athenaComps->rdbAccessSvc();}

Member Data Documentation

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::SubDetectorFactoryBase::m_athenaComps
privateinherited

Definition at line 58 of file InDetSubDetectorFactoryBase.h.

◆ m_materialManager

InDetMaterialManager* InDetDD::SubDetectorFactoryBase::m_materialManager
protectedinherited

Definition at line 61 of file InDetSubDetectorFactoryBase.h.

◆ m_materialManagerUnique

std::unique_ptr<InDetMaterialManager> InDetDD::SubDetectorFactoryBase::m_materialManagerUnique
protectedinherited

Definition at line 63 of file InDetSubDetectorFactoryBase.h.


The documentation for this class was generated from the following files:
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
subproc.shell
shell
Definition: subproc.py:29
M_PI
#define M_PI
Definition: ActiveFraction.h:11
beamspotman.posX
posX
Definition: beamspotman.py:1624
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDetDD::SubDetectorFactoryBase::m_materialManager
InDetMaterialManager * m_materialManager
Definition: InDetSubDetectorFactoryBase.h:61
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
InDetDD::SubDetectorFactoryBase::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetSubDetectorFactoryBase.h:43
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
InDetDD::SubDetectorFactoryBase::geoDbTagSvc
const IGeoDbTagSvc * geoDbTagSvc() const
Definition: InDetSubDetectorFactoryBase.h:41
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
InDetDD::SubDetectorFactoryBase
Definition: InDetSubDetectorFactoryBase.h:25
InDetDD::AthenaComps::geomDB
const IGeometryDBSvc * geomDB() const
Definition: InDetDDAthenaComps.h:63
InDetDD::SubDetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetSubDetectorFactoryBase.h:58
InDetDD::SubDetectorFactoryBase::materialManager
InDetMaterialManager * materialManager()
Definition: InDetSubDetectorFactoryBase.h:47
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDetDD::AthenaComps::detStore
const StoreGateSvc * detStore() const
Definition: InDetDDAthenaComps.h:53
InDetMaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
Definition: InDetMaterialManager.cxx:96
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74