ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonAGDDDescription
src
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
5
#include "
MuonAGDDDescription/MMDetectorDescription.h
"
6
#include "
AGDDModel/AGDDParameterStore.h
"
7
#include "
AGDDKernel/AGDDDetectorStore.h
"
8
9
#include <sstream>
10
11
12
extern
int
myatoi
(std::string_view
str
);
13
14
MMDetectorDescription::MMDetectorDescription
(
const
std::string& s,
15
AGDDDetectorStore
& ds):
16
AGDDDetector
(s,
"Micromegas"
),
17
m_ds
(ds)
18
{
19
}
20
21
void
MMDetectorDescription::Register
()
22
{
23
m_ds
.RegisterDetector(
this
);
24
}
25
26
27
void
MMDetectorDescription::SetDetectorAddress
(
AGDDDetectorPositioner
* p)
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
47
MuonGM::MM_Technology
*
MMDetectorDescription::GetTechnology
()
48
{
49
MuonGM::MM_Technology
* t =
50
dynamic_cast<
MuonGM::MM_Technology
*
>
(
m_ds
.GetTechnology(
GetName
()));
51
return
t;
52
}
AGDDDetectorStore.h
AGDDParameterStore.h
myatoi
int myatoi(std::string_view str)
Definition
MMDetectorHelper.cxx:34
MMDetectorDescription.h
AGDDDetectorPositioner
Definition
AGDDDetectorPositioner.h:39
AGDDDetectorStore
Definition
AGDDDetectorStore.h:18
AGDDDetector::GetName
const std::string & GetName() const
Definition
AGDDDetector.h:40
AGDDDetector::AGDDDetector
AGDDDetector(const std::string &s)
Definition
AGDDDetector.h:17
AGDDDetector::subType
const std::string & subType() const
Definition
AGDDDetector.h:37
MMDetectorDescription::SetDetectorAddress
void SetDetectorAddress(AGDDDetectorPositioner *)
Definition
MMDetectorDescription.cxx:27
MMDetectorDescription::m_ds
AGDDDetectorStore & m_ds
Definition
MMDetectorDescription.h:76
MMDetectorDescription::GetTechnology
MuonGM::MM_Technology * GetTechnology()
Definition
MMDetectorDescription.cxx:47
MMDetectorDescription::MMDetectorDescription
MMDetectorDescription(const std::string &s, AGDDDetectorStore &ds)
Definition
MMDetectorDescription.cxx:14
MMDetectorDescription::Register
void Register()
Definition
MMDetectorDescription.cxx:21
MuonGM::MM_Technology
Definition
MuonAGDDDescription/MuonAGDDDescription/MM_Technology.h:16
str
Definition
BTagTrackIpAccessor.cxx:11
Generated on
for ATLAS Offline Software by
1.17.0