ATLAS Offline Software
GeoPixelDiskSupports.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GeoPixelDiskSupports.h"
6 #include "GeoModelKernel/GeoTube.h"
7 #include "GeoModelKernel/GeoLogVol.h"
8 #include "GeoModelKernel/GeoPhysVol.h"
9 #include "GeoModelKernel/GeoMaterial.h"
10 #include "GeoModelKernel/GeoTransform.h"
11 
12 #include <sstream>
13 
16  GeoModelIO::ReadGeoModel* sqliteReader,
17  std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
18  std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
19  : GeoVPixelFactory (ddmgr, mgr, sqliteReader, mapFPV, mapAX)
20 {
21  //
22  // Initialize the vectors
23  //
24  //
25  // zpos is not needed, but it's here just in case...
26  //
27  for (int ii =0; ii< m_gmt_mgr->PixelDiskNumSupports(); ii++) {
28  double rmin = m_gmt_mgr->PixelDiskSupportRMin(ii);
29  double rmax = m_gmt_mgr->PixelDiskSupportRMax(ii);
30  double halflength = m_gmt_mgr->PixelDiskSupportThickness(ii)/2.;
31  double zpos = 0.;
32  int matTypeNum = m_gmt_mgr->PixelDiskSupportMaterialTypeNum(ii);
33  m_rmin.push_back(rmin);
34  m_rmax.push_back(rmax);
35  m_zpos.push_back(zpos);
36  m_halflength.push_back(halflength);
37  m_typeNum.push_back(matTypeNum);
38  }
39  m_nframe = 0;
40 }
41 
42 
43 GeoVPhysVol* GeoPixelDiskSupports::Build( ) {
44  //
45  // Dimensions: (_nframe set with the SetCylinder method)
46  //
47  double rmin = m_rmin[m_nframe];
48  double rmax = m_rmax[m_nframe];
49  double halflength = m_halflength[m_nframe];
50  int typeNum = m_typeNum[m_nframe];
51 
52  const GeoTube* supportTube = new GeoTube(rmin,rmax,halflength);
53  std::string matName = m_gmt_mgr->getMaterialName("DiskSupport", m_gmt_mgr->GetLD(), typeNum);
54  const GeoMaterial* supportMat = m_mat_mgr->getMaterialForVolume(matName, supportTube->volume());
55  std::string logName = "DiskSup";
56  std::ostringstream o;
57  o << m_nframe;
58  logName = logName+o.str();
59  GeoLogVol* theSupport = new GeoLogVol(logName,supportTube,supportMat);
60  GeoPhysVol* supportPhys = new GeoPhysVol(theSupport);
61  return supportPhys;
62 }
63 
GeoPixelDiskSupports::m_zpos
std::vector< double > m_zpos
Definition: GeoPixelDiskSupports.h:26
PixelGeometryManager
Definition: PixelGeometryManager.h:28
GeoPixelDiskSupports::m_rmin
std::vector< double > m_rmin
Definition: GeoPixelDiskSupports.h:26
PixelGeometryManager::PixelDiskSupportMaterialTypeNum
virtual int PixelDiskSupportMaterialTypeNum(int isup)=0
GeoPixelDiskSupports::m_nframe
int m_nframe
Definition: GeoPixelDiskSupports.h:28
GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: GeoVPixelFactory.h:43
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
PixelGeometryManager::PixelDiskSupportThickness
virtual double PixelDiskSupportThickness(int isup)=0
PixelGeometryManager::PixelDiskSupportRMax
virtual double PixelDiskSupportRMax(int isup)=0
InDetMaterialManager::getMaterialForVolume
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume, const std::string &newName="")
Create and get material with a density calculated to give weight in predefined weight table.
Definition: InDetMaterialManager.cxx:460
GeoPixelDiskSupports::m_rmax
std::vector< double > m_rmax
Definition: GeoPixelDiskSupports.h:26
GeoPixelDiskSupports::m_halflength
std::vector< double > m_halflength
Definition: GeoPixelDiskSupports.h:26
GeoPixelDiskSupports.h
RCU::Check::typeNum
const int typeNum
Definition: Assert.h:75
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
GeoPixelDiskSupports::m_typeNum
std::vector< int > m_typeNum
Definition: GeoPixelDiskSupports.h:27
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
GeoPixelDiskSupports::Build
virtual GeoVPhysVol * Build() override
Definition: GeoPixelDiskSupports.cxx:43
PixelGeometryManager::PixelDiskNumSupports
virtual int PixelDiskNumSupports()=0
PixelGeometryManager::PixelDiskSupportRMin
virtual double PixelDiskSupportRMin(int isup)=0
GeoVPixelFactory
This is the base class for all the pieces of the Pixel detector.
Definition: GeoVPixelFactory.h:31
PixelGeometryManager::getMaterialName
virtual std::string getMaterialName(const std::string &volumeName, int layerdisk=0, int typenum=0)=0
GeoPixelDiskSupports::GeoPixelDiskSupports
GeoPixelDiskSupports(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: GeoPixelDiskSupports.cxx:14
PixelGeometryManager::GetLD
virtual int GetLD()=0