ATLAS Offline Software
Loading...
Searching...
No Matches
mm_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
12
13mm_TechHandler::mm_TechHandler(const std::string& s,
15 : XMLHandler(s, c)
16{
17}
18
20 xercesc::DOMNode *t)
21{
22
23// std::cout<<" this is mm_TechHandler::Handle"<<std::endl;
24
25 bool ret=true;
26 std::string name=getAttributeAsString(c, t, "type",ret);
27
28 MuonGM::MM_Technology *tech=new MuonGM::MM_Technology(name, c.GetDetectorStore());
29
30 tech->nlayers=getAttributeAsInt(c, t, "nLayers",ret);
31 tech->thickness=getAttributeAsDouble(c, t, "Tck",ret);
32 tech->gasThickness=getAttributeAsDouble(c, t, "gasTck",ret);
33 tech->pcbThickness=getAttributeAsDouble(c, t, "driftPcbTck",ret);
34 tech->roThickness=getAttributeAsDouble(c, t, "ROPcbTck",ret);
35
36 tech->f1Thickness=getAttributeAsDouble(c, t, "f1",ret);
37 tech->f2Thickness=getAttributeAsDouble(c, t, "f2",ret);
38 tech->f3Thickness=getAttributeAsDouble(c, t, "f3",ret);
39
40
41
42 tech->geoLevel=getAttributeAsInt(c, t, "geometryLevel",ret);
43
44 AGDDParameterStore& prs = c.GetParameterStore();
45 if(prs.Exist(name)) {
46 std::cout << " parameters for technology " << name << " already registered" << std::endl;
47 }
48 else {
50 paraBag->thickness = tech->gasThickness=getAttributeAsDouble(c, t, "gasTck",ret);
51 paraBag->pitchSS = 0.425; //small sector
52 paraBag->pitchLS = 0.445; //large sector
53 prs.RegisterParameterBag(name, paraBag);
54 }
55}
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
mm_TechHandler(const std::string &, AGDDController &c)