ATLAS Offline Software
BCM_Wall.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 #include "GeoModelKernel/GeoBox.h"
10 #include "GeoModelKernel/GeoLogVol.h"
11 #include "GeoModelKernel/GeoNameTag.h"
12 #include "GeoModelKernel/GeoIdentifierTag.h"
13 #include "GeoModelKernel/GeoTransform.h"
14 
15 GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick, const std::string& logname,const GeoMaterial* material)
16 {
17  const GeoBox* bcmWallBox = new GeoBox(halfX, halfY, thick/2);
18  const GeoLogVol* bcmWallLog = new GeoLogVol(logname, bcmWallBox, material);
19  GeoPhysVol* bcmWallPhys = new GeoPhysVol(bcmWallLog);
20 
21  return bcmWallPhys;
22 }
23 
24 GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double thick_two, const GeoMaterial* material_one, const GeoMaterial* material_two, StoredMaterialManager* mat_mgr)
25 {
26  double wallthick = thick_one + thick_two;
27 
28  //outside box
29  const GeoMaterial* air = mat_mgr->getMaterial("std::Air");
30  const GeoBox* bcmWallBox = new GeoBox(halfX, halfY, wallthick/2);
31  const GeoLogVol* bcmWallLog=new GeoLogVol("bcmWallLog", bcmWallBox, air);
32  GeoPhysVol* bcmWallPhys = new GeoPhysVol(bcmWallLog);
33 
34  //adding first layer (material one)
35 
36  const GeoBox* bcmWallOneBox = new GeoBox(halfX, halfY, thick_one/2);
37  const GeoLogVol* bcmWallOneLog = new GeoLogVol("bcmWallLog", bcmWallOneBox, material_one);
38  GeoPhysVol* bcmWallOnePhys = new GeoPhysVol(bcmWallOneLog);
39 
40  GeoTrf::Translate3D WallOnePos(0,0,thick_one/2 - wallthick/2);
41  GeoTransform* xform = new GeoTransform(WallOnePos);
42  bcmWallPhys->add(xform);
43  bcmWallPhys->add(bcmWallOnePhys);
44 
45  //adding second layer (material two)
46 
47  const GeoBox* bcmWallTwoBox = new GeoBox(halfX, halfY, thick_two/2);
48  const GeoLogVol* bcmWallTwoLog = new GeoLogVol("bcmWallLog", bcmWallTwoBox, material_two);
49  GeoPhysVol* bcmWallTwoPhys = new GeoPhysVol(bcmWallTwoLog);
50 
51  GeoTrf::Translate3D WallTwoPos(0,0,wallthick/2 - thick_two/2);
52  xform = new GeoTransform(WallTwoPos);
53  bcmWallPhys->add(xform);
54  bcmWallPhys->add(bcmWallTwoPhys);
55 
56  return bcmWallPhys;
57 }
58 
59 GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double thick_two, double thick_three, const GeoMaterial* material_one, const GeoMaterial* material_two, const GeoMaterial* material_three, StoredMaterialManager* mat_mgr)
60 {
61  double wallthick = thick_one + thick_two + thick_three;
62 
63  //outside box
64  const GeoMaterial* air = mat_mgr->getMaterial("std::Air");
65  const GeoBox* bcmWallBox = new GeoBox(halfX, halfY, wallthick/2);
66  const GeoLogVol* bcmWallLog=new GeoLogVol("bcmWallLog", bcmWallBox, air);
67  GeoPhysVol* bcmWallPhys = new GeoPhysVol(bcmWallLog);
68 
69  //adding first layer (material one)
70 
71  const GeoBox* bcmWallOneBox = new GeoBox(halfX, halfY, thick_one/2);
72  const GeoLogVol* bcmWallOneLog = new GeoLogVol("bcmWallLog", bcmWallOneBox, material_one);
73  GeoPhysVol* bcmWallOnePhys = new GeoPhysVol(bcmWallOneLog);
74 
75  GeoTrf::Translate3D WallOnePos(0,0,thick_one/2 - wallthick/2);
76  GeoTransform* xform = new GeoTransform(WallOnePos);
77  bcmWallPhys->add(xform);
78  bcmWallPhys->add(bcmWallOnePhys);
79 
80  //adding second layer (material two)
81 
82  const GeoBox* bcmWallTwoBox = new GeoBox(halfX, halfY, thick_two/2);
83  const GeoLogVol* bcmWallTwoLog = new GeoLogVol("bcmWallLog", bcmWallTwoBox, material_two);
84  GeoPhysVol* bcmWallTwoPhys = new GeoPhysVol(bcmWallTwoLog);
85 
86  GeoTrf::Translate3D WallTwoPos(0,0,thick_one -wallthick/2 + thick_two/2);
87  xform = new GeoTransform(WallTwoPos);
88  bcmWallPhys->add(xform);
89  bcmWallPhys->add(bcmWallTwoPhys);
90 
91  //adding third layer (material three)
92 
93  const GeoBox* bcmWallThreeBox = new GeoBox(halfX, halfY, thick_three/2);
94  const GeoLogVol* bcmWallThreeLog = new GeoLogVol("bcmWallLog", bcmWallThreeBox, material_three);
95  GeoPhysVol* bcmWallThreePhys = new GeoPhysVol(bcmWallThreeLog);
96 
97  GeoTrf::Translate3D WallThreePos(0,0,wallthick/2 - thick_three/2);
98  xform = new GeoTransform(WallThreePos);
99  bcmWallPhys->add(xform);
100  bcmWallPhys->add(bcmWallThreePhys);
101 
102  return bcmWallPhys;
103 }
BCM_Wall::Build
GeoPhysVol * Build(double halfX, double halfY, double thick, const std::string &logname, const GeoMaterial *material)
Definition: BCM_Wall.cxx:15
BCM_Wall.h
StoredMaterialManager.h
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
MakeSliceSet.logname
logname
Definition: MakeSliceSet.py:34