ATLAS Offline Software
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 
12 extern 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 
48 {
51  return t;
52 }
AGDDDetectorStore.h
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MMDetectorDescription.h
myatoi
int myatoi(std::string_view str)
Definition: MMDetectorHelper.cxx:34
MuonGM::MM_Technology
Definition: MuonAGDDDescription/MuonAGDDDescription/MM_Technology.h:16
AGDDDetectorPositioner
Definition: AGDDDetectorPositioner.h:39
AGDDDetectorStore::RegisterDetector
void RegisterDetector(AGDDDetector *)
Definition: AGDDDetectorStore.cxx:17
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AGDDParameterStore.h
AGDDDetector::GetName
const std::string & GetName() const
Definition: AGDDDetector.h:40
TRT::Hit::side
@ side
Definition: HitInfo.h:83
AGDDDetector
Definition: AGDDDetector.h:15
MMDetectorDescription::MMDetectorDescription
MMDetectorDescription(const std::string &s, AGDDDetectorStore &ds)
Definition: MMDetectorDescription.cxx:14
AGDDDetector::subType
const std::string & subType() const
Definition: AGDDDetector.h:37
AGDDDetectorStore
Definition: AGDDDetectorStore.h:18
AGDDDetectorStore::GetTechnology
AGDDTechnology * GetTechnology(const std::string &s)
Definition: AGDDDetectorStore.h:22
MMDetectorDescription::SetDetectorAddress
void SetDetectorAddress(AGDDDetectorPositioner *)
Definition: MMDetectorDescription.cxx:27
str
Definition: BTagTrackIpAccessor.cxx:11
MMDetectorDescription::GetTechnology
MuonGM::MM_Technology * GetTechnology()
Definition: MMDetectorDescription.cxx:47
MMDetectorDescription::Register
void Register()
Definition: MMDetectorDescription.cxx:21
MMDetectorDescription::m_ds
AGDDDetectorStore & m_ds
Definition: MMDetectorDescription.h:76