ATLAS Offline Software
GeoPixelFluid.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 //
6 // This class builds one trapezoid
7 //
8 //
9 #include "GeoPixelFluid.h"
10 #include "GeoModelKernel/GeoTrd.h"
11 #include "GeoModelKernel/GeoLogVol.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoMaterial.h"
14 
15 #include<cmath>
16 #include <sstream>
17 
20  GeoModelIO::ReadGeoModel* sqliteReader,
21  std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
22  std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX,
23  int type)
24  : GeoVPixelFactory (ddmgr, mgr, sqliteReader, mapFPV, mapAX)
25 {
27  double z1 = m_gmt_mgr->PixelFluidZ1(m_index);
28  double z2 = m_gmt_mgr->PixelFluidZ2(m_index);
31  m_posZ = 0.5*(z1+z2);
32 }
33 
34 GeoVPhysVol* GeoPixelFluid::Build()
35 {
36  //
37  // Dimensions
38  //
39  double z1 = m_gmt_mgr->PixelFluidZ1(m_index);
40  double z2 = m_gmt_mgr->PixelFluidZ2(m_index);
41  double thick1 = m_gmt_mgr->PixelFluidThick1(m_index);
42  double thick2 = m_gmt_mgr->PixelFluidThick2(m_index);
44 
45  double length = std::abs(z2 - z1);
46  double thickAtZmin = thick1;
47  // double thickAtZmax = thick2;
48  if (z1 > z2) {
49  thickAtZmin = thick2;
50  // thickAtZmax = thick1;
51  }
52 
53  std::ostringstream o;
54  o << "Fluid" << m_gmt_mgr->PixelFluidType(m_index);
55  std::string logName = o.str();
56 
57  const GeoMaterial* fluidMat = m_mat_mgr->getMaterial(m_gmt_mgr->PixelFluidMat(m_index));
58  const GeoTrd* fluidShape = new GeoTrd(0.5*thickAtZmin, 0.5*thickAtZmin, 0.5*width, 0.5*width, 0.5*length);
59  GeoLogVol * fluidLV = new GeoLogVol(logName, fluidShape, fluidMat);
60  GeoPhysVol * fluidPhys = new GeoPhysVol(fluidLV);
61 
62  return fluidPhys;
63 }
GeoPixelFluid::m_posX
double m_posX
Definition: GeoPixelFluid.h:28
PixelGeometryManager::PixelFluidWidth
virtual double PixelFluidWidth(int index)=0
PixelGeometryManager
Definition: PixelGeometryManager.h:28
PixelGeometryManager::PixelFluidType
virtual int PixelFluidType(int index)=0
GeoPixelFluid::Build
virtual GeoVPhysVol * Build() override
Definition: GeoPixelFluid.cxx:34
GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: GeoVPixelFactory.h:43
PixelGeometryManager::PixelFluidZ1
virtual double PixelFluidZ1(int index)=0
PixelGeometryManager::PixelFluidThick2
virtual double PixelFluidThick2(int index)=0
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
PixelGeometryManager::PixelFluidThick1
virtual double PixelFluidThick1(int index)=0
GeoPixelFluid::m_posZ
double m_posZ
Definition: GeoPixelFluid.h:30
PixelGeometryManager::PixelFluidY
virtual double PixelFluidY(int index)=0
GeoPixelFluid::m_index
int m_index
Definition: GeoPixelFluid.h:27
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
PixelGeometryManager::PixelFluidIndex
virtual int PixelFluidIndex(int type)=0
PixelGeometryManager::PixelFluidX
virtual double PixelFluidX(int index)=0
GeoPixelFluid.h
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PixelGeometryManager::PixelFluidMat
virtual std::string PixelFluidMat(int index)=0
GeoVPixelFactory
This is the base class for all the pieces of the Pixel detector.
Definition: GeoVPixelFactory.h:31
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
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
GeoPixelFluid::m_posY
double m_posY
Definition: GeoPixelFluid.h:29
PixelGeometryManager::PixelFluidZ2
virtual double PixelFluidZ2(int index)=0
GeoPixelFluid::GeoPixelFluid
GeoPixelFluid(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, int type)
Definition: GeoPixelFluid.cxx:18