ATLAS Offline Software
Loading...
Searching...
No Matches
MMDetectorDescription.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#include <sstream>
10
11
12extern int myatoi(std::string_view str);
13
16 AGDDDetector(s,"Micromegas"),
17 m_ds (ds)
18{
19}
20
22{
23 m_ds.RegisterDetector(this);
24}
25
26
28{
29 //std::cout<<"This is AGDDMicromegas::SetDetectorAddress "<<GetName()<<" "<<
30 //m_sType;
31 p->ID.detectorType="Micromegas";
32 p->theDetector=this;
33 std::stringstream stringone;
34 char side='A';
35 if (p->ID.sideIndex<0) side='C';
36 int ctype=0;
37 std::string_view subt = subType();
38 int ml=myatoi(subt.substr(3,1));
39 if (subt[2]=='L') ctype=1;
40 else if (subt[2]=='S') ctype=3;
41 int etaIndex=myatoi(subt.substr(1,1));
42 stringone<<"sMD"<<ctype<<'-'<<etaIndex<<'-'<<ml<<"-phi"<<p->ID.phiIndex+1<<side<<std::endl;
43 //std::cout<<" stringone "<<stringone.str()<<std::endl;
44 p->ID.detectorAddress=stringone.str();
45}
46
int myatoi(std::string_view str)
const std::string & GetName() const
AGDDDetector(const std::string &s)
const std::string & subType() const
void SetDetectorAddress(AGDDDetectorPositioner *)
MuonGM::MM_Technology * GetTechnology()
MMDetectorDescription(const std::string &s, AGDDDetectorStore &ds)