src
SimG4Core
Geometry
src
DD4hep2DDDName.cc
Go to the documentation of this file.
1
#include "
SimG4Core/Geometry/interface/DD4hep2DDDName.h
"
2
3
std::string
DD4hep2DDDName::noNameSpace
(
const
std::string
&
name
) {
4
std::size_t
found
=
name
.find(
':'
);
5
std::string
nam = (
found
== std::string::npos) ?
name
:
name
.substr(
found
+ 1, (
name
.size() -
found
));
6
return
nam;
7
}
8
9
std::string
DD4hep2DDDName::nameMatterLV
(
const
std::string
&
name
,
bool
dd4hep
) {
10
return
(
dd4hep
? (
DD4hep2DDDName::noNameSpace
(
name
)) :
name
);
11
}
12
13
std::string
DD4hep2DDDName::nameSolid
(
const
std::string
&
name
,
bool
dd4hep
) {
14
if
(!
dd4hep
)
15
return
name
;
16
std::string
nam =
DD4hep2DDDName::noNameSpace
(
name
);
17
auto
n
= nam.find(
"_shape"
);
18
if
(
n
!= std::string::npos)
19
nam = nam.substr(0,
n
);
20
if
(
name
.find(
"_refl"
) != std::string::npos)
21
nam +=
"_refl"
;
22
return
nam;
23
}
24
25
std::string
DD4hep2DDDName::namePV
(
const
std::string
&
name
,
bool
dd4hep
) {
26
if
(!
dd4hep
)
27
return
name
;
28
std::string
nam =
DD4hep2DDDName::noNameSpace
(
name
);
29
auto
n
= nam.rfind(
'_'
);
30
return
((
n
!= std::string::npos) ? nam.substr(0,
n
) : nam);
31
}
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
dd4hep
Definition:
DDPlugins.h:8
DD4hep2DDDName::namePV
std::string namePV(const std::string &name, bool dd4hep)
Definition:
DD4hep2DDDName.cc:25
DD4hep2DDDName::nameSolid
std::string nameSolid(const std::string &name, bool dd4hep)
Definition:
DD4hep2DDDName.cc:13
DD4hep2DDDName::noNameSpace
std::string noNameSpace(const std::string &name)
Definition:
DD4hep2DDDName.cc:3
DD4hep2DDDName::nameMatterLV
std::string nameMatterLV(const std::string &name, bool dd4hep)
Definition:
DD4hep2DDDName.cc:9
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:117
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
DD4hep2DDDName.h
Generated for CMSSW Reference Manual by
1.8.14