#include <MMDetectorHelper.h>
Definition at line 24 of file MMDetectorHelper.h.
◆ MMDetectorHelper()
| MMDetectorHelper::MMDetectorHelper |
( |
| ) |
|
Definition at line 15 of file MMDetectorHelper.cxx.
16{
17 if (
m_svc.retrieve().isFailure()) {
18 std::abort();
19 }
22
23 for ( const auto& vl_iter: vl)
24 {
25 MMDetectorDescription*
st=
dynamic_cast<MMDetectorDescription*
>(vl_iter.second);
26 if (st) {
29 }
30 }
31
32}
std::map< std::string, AGDDDetector * > detectorList
CxxUtils::LockedPointer< AGDDController > LockedController
ServiceHandle< IAGDDtoGeoSvc > m_svc
MicromegasMap m_MicromegasList
MicromegasMapSubType m_MicromegasListSubType
◆ Get_Controller()
◆ Get_MMDetector()
| MMDetectorDescription * MMDetectorHelper::Get_MMDetector |
( |
char | type, |
|
|
int | ieta, |
|
|
int | iphi, |
|
|
int | layer = 1, |
|
|
char | side = 'A' ) |
Definition at line 41 of file MMDetectorHelper.cxx.
42{
43 MMDetectorDescription*
mm=
nullptr;
44
46 AGDDPositionerStore&
ps =
c->GetPositionerStore();
47 for (
unsigned int i=0;
i<
ps.size();
i++)
48 {
49 AGDDDetectorPositioner*
dp=
dynamic_cast<AGDDDetectorPositioner*
>(
ps[
i]);
50 if (dp)
51 {
52 if (
dp->ID.detectorType !=
"Micromegas")
continue;
53 std::string_view dad=
dp->ID.detectorAddress;
54
56 char dctype='L';
57 if (dtype=='3') dctype='S';
58 if (dctype!=type) continue;
59 int deta=
myatoi(dad.substr(5,1));
60 if (deta!=ieta) continue;
61 int dphi=
myatoi(dad.substr(12,1));
62 if (dphi!=iphi) continue;
63 int dlayer=
myatoi(dad.substr(7,1));
64 if (dlayer!=layer) continue;
65 char dside=dad[13];
66 if (dside!=side) continue;
67
68 mm=
dynamic_cast<MMDetectorDescription*
>(
dp->theDetector);
69 }
70 if(mm) break;
71 }
72 if (!mm) std::cout<<" could not find a positioned Micromegas!!!! "<<std::endl;
74}
int myatoi(std::string_view str)
◆ Get_MMDetectorSubType()
◆ Get_MMDetectorType()
◆ Get_MMPositionedDetector()
| AGDDPositionedDetector MMDetectorHelper::Get_MMPositionedDetector |
( |
char | type, |
|
|
int | ieta, |
|
|
int | iphi, |
|
|
int | layer = 1, |
|
|
char | side = 'A' ) |
Definition at line 76 of file MMDetectorHelper.cxx.
77{
78 MMDetectorDescription*
mm=
nullptr;
79 AGDDDetectorPositioner*
dp=
nullptr;
80
82 AGDDPositionerStore&
ps =
c->GetPositionerStore();
83 for (
unsigned int i=0;
i<
ps.size();
i++)
84 {
85 dp=
dynamic_cast<AGDDDetectorPositioner*
>(
ps[
i]);
86 if (dp)
87 {
88 if (
dp->ID.detectorType !=
"Micromegas")
continue;
89 std::string_view dad=
dp->ID.detectorAddress;
90
92 char dctype='L';
93 if (dtype=='3') dctype='S';
94 if (dctype!=type) continue;
95 int deta=
myatoi(dad.substr(5,1));
96 if (deta!=ieta) continue;
97 int dphi=
myatoi(dad.substr(12,1));
98 if (dphi!=iphi) continue;
99 int dlayer=
myatoi(dad.substr(7,1));
100 if (dlayer!=layer) continue;
101 char dside=dad[13];
102 if (dside!=side) continue;
103
104 mm=
dynamic_cast<MMDetectorDescription*
>(
dp->theDetector);
105 }
106 if(mm) break;
107 }
108 if (!mm) std::cout<<" could not find a positioned Micromegas!!!! "<<std::endl;
110 return p_mm;
111}
std::pair< MMDetectorDescription *, AGDDDetectorPositioner * > AGDDPositionedDetector
◆ MM_begin()
◆ MM_end()
◆ m_MicromegasList
◆ m_MicromegasListSubType
◆ m_svc
The documentation for this class was generated from the following files: