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

#include <GeoPixelEndCap.h>

Inheritance diagram for GeoPixelEndCap:
Collaboration diagram for GeoPixelEndCap:

Public Member Functions

 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)
virtual GeoVPhysVol * Build () override

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

GeoPixelServicesm_pixServices

Detailed Description

Definition at line 11 of file GeoPixelEndCap.h.

Constructor & Destructor Documentation

◆ GeoPixelEndCap()

GeoPixelEndCap::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 )

Definition at line 27 of file GeoPixelEndCap.cxx.

33 : GeoVPixelFactory(ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX)),
34 m_pixServices(pixServices)
35{}
GeoPixelServices * m_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)

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelEndCap::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 37 of file GeoPixelEndCap.cxx.

37 {
38
39 GeoFullPhysVol* ecPhys{nullptr};
40 if(!m_sqliteReader) {
41 //
42 // create the Barrel Mother volume
43 //
44 double rmin = m_gmt_mgr->PixelEndcapRMin();
45 double rmax = m_gmt_mgr->PixelEndcapRMax();
46 double halflength = (m_gmt_mgr->PixelEndcapZMax()-m_gmt_mgr->PixelEndcapZMin())/2.;
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 // Set numerology
57 m_DDmgr->numerology().setNumDisks(ndisks);
58
59 // position of the endcap
60 double endcapZOffset = 0.5* (m_gmt_mgr->PixelEndcapZMax()+m_gmt_mgr->PixelEndcapZMin());
61
62 //
63 // Place the disks and cables on both sides
64 //
65 GeoPixelDisk * pd = new GeoPixelDisk (m_DDmgr, m_gmt_mgr, m_sqliteReader, m_mapFPV, m_mapAX);
66 GeoPixelECCable * pecc = new GeoPixelECCable (m_DDmgr, m_gmt_mgr, m_sqliteReader, m_mapFPV, m_mapAX);
67 for(int idisk = 0; idisk < ndisks; idisk++) {
68 m_gmt_mgr->SetCurrentLD(idisk);
69 // Some method is accessing the eta before the disk is built so we set it
70 // to a valid value.
71 m_gmt_mgr->SetEta(0);
72 if(m_gmt_mgr->isLDPresent()) {
73 if(m_sqliteReader) {
74 pd->Build();
75 int brl_ec = 2*m_gmt_mgr->GetSide();
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());
78 m_DDmgr->addAlignableTransform(1, id, (*m_mapAX)[key], (*m_mapFPV)[key]);
79 }
80 else {
81
82 //
83 // The position is given w.r.t to the center of the detector!
84 //
85 //position of the disk
86 double zdisk = m_gmt_mgr->PixelDiskZPosition()-endcapZOffset;
87 // place the disk
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 // Store the alignable transform
100 int brl_ec = 2*m_gmt_mgr->GetSide();
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 // place the cables twice for the two active parts
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 {
116 if(m_gmt_mgr->msgLvl(MSG::DEBUG)) m_gmt_mgr->msg(MSG::DEBUG) << "Disk " << idisk << " not built" << endmsg;
117 }
118 }
119 delete pd;
120 delete pecc;
121
122 std::string region = m_gmt_mgr->GetSide()>0 ? "A" : "C";
123
124 if(m_sqliteReader) {
125 std::ostringstream ename;
126 ename << "EndCap" << region;
127 ecPhys = (*m_mapFPV)[ename.str()];
128 }
129 else if(m_pixServices) {
130 //
131 // Add the Endcap services inide the EC volume
132 //
133 m_pixServices->getBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
134 if (m_pixServices->getServMatBuilder()) {
135 m_pixServices->getServMatBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
136 }
137 }
138
139 {
140 // Extra Material
141 InDetDD::ExtraMaterial xMat(m_gmt_mgr->distortedMatManager());
142 xMat.add(ecPhys,"PixelEndcap",endcapZOffset);
143 if (m_gmt_mgr->GetSide()>0) { // EndcapA
144 xMat.add(ecPhys,"PixelEndcapA",endcapZOffset);
145 } else { // EndcapC
146 xMat.add(ecPhys,"PixelEndcapC",endcapZOffset);
147 }
148 }
149
150 return ecPhys;
151}
#define endmsg
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

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_pixServices

GeoPixelServices* GeoPixelEndCap::m_pixServices
private

Definition at line 21 of file GeoPixelEndCap.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: