ATLAS Offline Software
Loading...
Searching...
No Matches
CscMultilayer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9#include "GeoModelKernel/GeoDefinitions.h"
10#include "GeoModelKernel/GeoIdentifierTag.h"
11#include "GeoModelKernel/GeoNameTag.h"
12#include "GeoModelKernel/GeoPhysVol.h"
13#include "GeoModelKernel/GeoShapeShift.h"
14#include "GeoModelKernel/GeoShapeUnion.h"
15#include "GeoModelKernel/GeoTransform.h"
16#include "GeoModelKernel/GeoTrd.h"
19#include "MuonGeoModel/MYSQL.h"
20
21#include <GaudiKernel/IMessageSvc.h>
22#include <GaudiKernel/MsgStream.h>
23#include <GeoModelKernel/GeoLogVol.h>
24#include <GeoModelKernel/GeoShape.h>
25#include <cmath>
26#include <cstddef>
27#include <string>
28#include <utility>
29#include <vector>
30
31class GeoMaterial;
32class GeoVPhysVol;
33namespace MuonGM {
34 class Cutout;
35}
36
37namespace MuonGM {
38
39 CscMultiLayer::CscMultiLayer(const MYSQL& mysql, const std::string& n) : DetectorElement(n) {
40 const CSC *md = dynamic_cast<const CSC*>(mysql.GetTechnology(name));
44 }
45
47 const MYSQL& mysql) {
48 std::vector<Cutout *> vcutdef;
49 int cutoutson = 0;
50 return build(matManager, mysql, cutoutson, vcutdef);
51 }
52
54 const MYSQL& mysql,
55 int /*cutoutson*/,
56 const std::vector<Cutout *>& /*vcutdef*/) {
57 const CSC *md = dynamic_cast<const CSC*>(mysql.GetTechnology(name));
58
59 // define the chamber volumes --- for CSS and CSL
60
61 //-------------internal CSC layer structure-------------4 layers ------
62
63 // The dimensions of the panel
64 double hon_thick = md->honeycombthick;
65 double gasThickness = 2.0 * md->anocathodist;
66 double newpos = cscthickness / 2.;
67 double g10thi = (2. * md->g10thick + md->honeycombthick);
68
69 // define the volumes
70 // g10, honeycomb, and the gas
71 // gas mixture: 80% Ar + 20% CO2:
72 // at 1 atmosphere, 20 deg. Celcius:
73 // density Ar = 1.699 g cm-3
74 // density CO2 = 1.902 g cm-3
75 // density of mixture = 0.8 d1 + 0.2 d2 = 1.740 gcm-3
76
77 // Create CSC layer envelope made of air
78 const GeoShape *sml = new GeoTrd(thickness / 2., thickness / 2., width / 2., longWidth / 2., maxwLength / 2.);
79 if (excent != length) {
80 const GeoShape *smlt = new GeoTrd(thickness / 2., thickness / 2., longWidth / 2., upWidth / 2., (physicalLength - maxwLength) / 2.);
81 sml = &((sml->add((*smlt) << GeoTrf::TranslateZ3D(physicalLength / 2.))) << GeoTrf::TranslateZ3D((maxwLength - physicalLength) / 2.));
82 }
83
84 const GeoMaterial *mhon = matManager.getMaterial("muo::Honeycomb");
85 const GeoLogVol *lml = new GeoLogVol("CscMultilayer", sml, mhon);
86 GeoPhysVol *pml = new GeoPhysVol(lml);
87
88 // Create G10 and honeycomb volumes
89 const GeoShape *shon = new GeoTrd(hon_thick / 2., hon_thick / 2., width / 2., longWidth / 2., maxwLength / 2.);
90 const GeoShape *sg10hon = new GeoTrd(g10thi / 2., g10thi / 2., width / 2., longWidth / 2., maxwLength / 2.);
91 if (excent != length) {
92 const GeoShape *shont = new GeoTrd(hon_thick / 2., hon_thick / 2., longWidth / 2., upWidth / 2., (physicalLength - maxwLength) / 2.);
93 shon = &((shon->add((*shont) << GeoTrf::TranslateZ3D(physicalLength / 2.))) << GeoTrf::TranslateZ3D((maxwLength - physicalLength) / 2.));
94 const GeoShape *sg10hont = new GeoTrd(g10thi / 2., g10thi / 2., longWidth / 2., upWidth / 2., (physicalLength - maxwLength) / 2.);
95 sg10hon = &((sg10hon->add((*sg10hont) << GeoTrf::TranslateZ3D(physicalLength / 2.))) << GeoTrf::TranslateZ3D((maxwLength - physicalLength) / 2.));
96 }
97
98 const GeoLogVol *lhon = new GeoLogVol("Honeycomb", shon, mhon);
99 GeoPhysVol *phon = new GeoPhysVol(lhon);
100
101 const GeoMaterial *mg10 = matManager.getMaterial("std::G10");
102 const GeoLogVol *lg10hon = new GeoLogVol("G10", sg10hon, mg10);
103 GeoPhysVol *pg10hon = new GeoPhysVol(lg10hon);
104 // Put honeycomb inside G10
105 pg10hon->add(phon);
106
107 // Create gas volume
108 const GeoShape *sgas = nullptr;
109 double beta = atan((longWidth - width) / (2. * maxwLength));
110 double gShortWidth = width - 2 * md->fullwirefixbarwidth * (1 - sin(beta)) / cos(beta);
111 double gLongWidth = longWidth - 2 * md->fullwirefixbarwidth * (1 + sin(beta)) / cos(beta);
112 if (excent == length) {
113 double gLength = maxwLength - 2 * md->fullwirefixbarwidth;
114 sgas = new GeoTrd(gasThickness / 2., gasThickness / 2., gShortWidth / 2., gLongWidth / 2., gLength / 2.);
115 } else {
116 double alpha = atan((excent - maxwLength) / (longWidth / 2.));
117 double gmaxwLength = maxwLength - md->fullwirefixbarwidth;
118 double gLength = length - 2. * md->fullwirefixbarwidth;
119 double gupWidth = upWidth - 2 * md->fullwirefixbarwidth * (1 - cos(alpha)) / sin(alpha);
120
121 sgas = new GeoTrd(gasThickness / 2., gasThickness / 2., gShortWidth / 2., gLongWidth / 2., gmaxwLength / 2.);
122 const GeoShape *sgast = new GeoTrd(gasThickness / 2., gasThickness / 2., gLongWidth / 2., gupWidth / 2., (gLength - gmaxwLength) / 2.);
123 sgas = &((sgas->add((*sgast) << GeoTrf::TranslateZ3D(gLength / 2.))) << GeoTrf::TranslateZ3D((gmaxwLength - gLength) / 2.));
124 }
125 const GeoMaterial *mgas = matManager.getMaterial("muo::CscArCO2");
126 const GeoLogVol *lgas = nullptr;
127
128 // Place G10/honeycomb and gas volumes in CSC envelop, starting at top
129 // G10 - gas - G10 - gas - G10 - gas - G10 - gas - G10
130 for (int i = 0; i < nrOfLayers + 1; i++) {
131 GeoNameTag *np = new GeoNameTag("panel");
132 GeoTransform *xp = new GeoTransform(GeoTrf::TranslateX3D(newpos - g10thi / 2.));
133 pml->add(new GeoIdentifierTag(i));
134 pml->add(np);
135 pml->add(xp);
136 pml->add(pg10hon);
137 newpos -= g10thi;
138
139 if (i < nrOfLayers) {
140 lgas = new GeoLogVol("CscArCO2", sgas, mgas);
141 GeoPhysVol *pgas = new GeoPhysVol(lgas);
142 // the gas Gap
143 // correct the position within the chamber
144 GeoNameTag *ng = new GeoNameTag("CscArCO2");
145 GeoTransform *xg = new GeoTransform(GeoTrf::TranslateX3D(newpos - gasThickness / 2.));
146 pml->add(new GeoIdentifierTag(i));
147 pml->add(ng);
148 pml->add(xg);
149 pml->add(pgas);
150 newpos -= gasThickness;
151 }
152 }
153
154 return pml;
155 }
156
157 void CscMultiLayer::print() const {
158 MsgStream log(Athena::getMessageSvc(), "MuonGM::CscMultiLayer");
159 log << MSG::INFO << "CscMulti Layer:: CscMulti Layer " << name << " :" << endmsg;
160 }
161
162} // namespace MuonGM
#define endmsg
double totalThickness
double honeycombthick
double anocathodist
double fullwirefixbarwidth
virtual void print() const override
CscMultiLayer(const MYSQL &mysql, const std::string &n)
GeoVPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql)
DetectorElement(const std::string &n)
Technology * GetTechnology(const std::string &name)
Definition MYSQL.cxx:105
This class holds one or more material managers and makes them storeable, under StoreGate.
virtual const GeoMaterial * getMaterial(const std::string &name)=0
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27