ATLAS Offline Software
Loading...
Searching...
No Matches
sTGC_TechHandler.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
9#include <iostream>
10
11
14 : XMLHandler(s, c)
15{
16}
17
19 xercesc::DOMNode *t)
20{
21
22// std::cout<<" this is sTGC_TechHandler::Handle"<<std::endl;
23
24 bool ret=true;
25 std::string name=getAttributeAsString(c, t, "type",ret);
26
27 MuonGM::sTGC_Technology *tech=new MuonGM::sTGC_Technology(name, c.GetDetectorStore());
28
29 tech->nlayers=getAttributeAsInt(c, t, "nLayers",ret);
30 tech->thickness=getAttributeAsDouble(c, t, "Tck",ret);
31 tech->gasThickness=getAttributeAsDouble(c, t, "gasTck",ret);
32 tech->pcbThickness=getAttributeAsDouble(c, t, "pcbTck",ret);
33 tech->pcbThickness150=getAttributeAsDouble(c, t, "pcbTck150",ret);
34 tech->pcbThickness200=getAttributeAsDouble(c, t, "pcbTck200",ret);
35 tech->coverThickness=getAttributeAsDouble(c, t, "coverTck",ret);
36
37 tech->f4Thickness=getAttributeAsDouble(c, t, "f4",ret);
38 tech->f5Thickness=getAttributeAsDouble(c, t, "f5",ret);
39 tech->f6Thickness=getAttributeAsDouble(c, t, "f6",ret);
40
41 // std::cout<<" sTGC_Tech "<<name<<tech->nlayers<<" "<<tech->thickness<<" "<<tech->gasThickness<<" "<<tech->pcbThickness<<std::endl;
42
43
44 tech->geoLevel=getAttributeAsInt(c, t, "geometryLevel",ret);
45
46 AGDDParameterStore& prs = c.GetParameterStore();
47 if(prs.Exist(name)) {
48 std::cout << " parameters for technology " << name << " already registered" << std::endl;
49 }
50 else {
52 paraBag->thickness = tech->gasThickness=getAttributeAsDouble(c, t, "gasTck",ret);
53 paraBag->stripPitch = 3.2; //eta
54 paraBag->wirePitch = 1.8; //phi
55 paraBag->stripWidth = 2.7; //eta
56 paraBag->wireWidth = 0.015; //phi
57 prs.RegisterParameterBag(name, paraBag);
58 }
59}
bool Exist(const std::string &volName) const
void RegisterParameterBag(const std::string &volName, AGDDParameterBag *paraBag)
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
XMLHandler(const std::string &n, AGDDController &c)
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
sTGC_TechHandler(const std::string &, AGDDController &c)