ATLAS Offline Software
Loading...
Searching...
No Matches
GeoPixelHybrid.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
6// This class builds one Hybrid to be placed in one module
7//
8// The information on which layer to build is retrieved by the Geometry Manager
9//
10// Contained by: PixelModule_log
11//
12// Contains: nothing
13//
14#include "GeoPixelHybrid.h"
15#include "GeoModelKernel/GeoBox.h"
16#include "GeoModelKernel/GeoLogVol.h"
17#include "GeoModelKernel/GeoPhysVol.h"
18#include "GeoModelKernel/GeoMaterial.h"
19
20GeoVPhysVol* GeoPixelHybrid::Build() {
21 //
22 // Dimensions
23 //
24 double length = m_gmt_mgr->PixelHybridLength(m_isModule3D);
25 double thickness = m_gmt_mgr->PixelHybridThickness(m_isModule3D);
26 double width = m_gmt_mgr->PixelHybridWidth(m_isModule3D);
27
28 const GeoBox* hybridBox = new GeoBox(thickness/2.,width/2.,length/2.);
29 std::string matName = m_gmt_mgr->getMaterialName("Hybrid",0,m_gmt_mgr->moduleType());
30 if(m_isModule3D)matName = m_gmt_mgr->getMaterialName("Hybrid3D",0,m_gmt_mgr->moduleType());
31
32 const GeoMaterial* hybridMat = m_mat_mgr->getMaterialForVolume(matName,hybridBox->volume());
33 std::string logName = "HybridEC";
34 if(m_gmt_mgr->isBarrel() ) logName = "HybridBrl";
35 GeoLogVol* theHybrid = new GeoLogVol(logName,hybridBox,hybridMat);
36 GeoPhysVol* hybridPhys = new GeoPhysVol(theHybrid);
37
38 return hybridPhys;
39}
double length(const pvec &v)
const double width
virtual GeoVPhysVol * Build() override
PixelGeometryManager * m_gmt_mgr
InDetMaterialManager * m_mat_mgr