7 #include "G4Electron.hh"
8 #include "G4Positron.hh"
10 #include "G4Neutron.hh"
11 #include "G4Proton.hh"
12 #include "G4PionPlus.hh"
13 #include "G4PionMinus.hh"
14 #include "G4PionZero.hh"
15 #include "G4Version.hh"
16 #include <string_view>
21 return s.find(
v) != std::string_view::npos;
27 else if (def == G4Positron::Positron())
35 else if (def == G4PionPlus::PionPlus() || def == G4PionMinus::PionMinus() || def == G4PionZero::PionZero())
41 if (
nom ==
"FCal1Absorber"
42 ||
nom ==
"LiquidArgon"
46 ||
nom ==
"FCal23Absorber"
50 ||
nom ==
"shieldIron"
51 ||
nom ==
"FCal23Slugs"
55 ||
nom ==
"ShieldSteel"
57 ||
nom ==
"ShieldBrass"
62 ||
nom ==
"BoratedPolyethelyne"
63 ||
nom ==
"FoilRadiatorB"
65 ||
nom ==
"FoilRadiatorAC"
69 else if (
nom.compare(0,12,
"pix::IBL_Fwd")==0)
75 std::string_view
nom(nomstr);
76 if (
nom.length() >= 17 &&
nom.substr(13, 4) ==
"EMEC" ) {
79 else if (
nom.length() >= 16 &&
nom.substr(13, 3) ==
"EMB" ) {
82 else if (
nom.length() >= 25 &&
nom.substr(21, 4) ==
"Cryo" ) {
85 else if (
nom.length() >= 26 &&
nom.substr(13, 13) ==
"FCAL::Module1" ) {
88 else if (
nom.length() >= 25 &&
nom.substr(13, 12) ==
"FCAL::Module" ) {
91 else if (
nom.length() >= 17 &&
nom.substr(13, 4) ==
"FCAL" ) {
94 else if (
nom.length() >= 16 &&
nom.substr(13, 3) ==
"HEC" ) {
97 else if (
nom.length() >= 31 &&
nom.substr(21, 10) ==
"Presampler" ) {
100 else if (
nom.length() >= 3 &&
nom.substr(0, 3) ==
"LAr" ) {
103 else if ( (
nom.substr(0, 4) ==
"MUON" )
104 || (
nom.length() >= 4 &&
nom.substr(0, 4) ==
"Muon" )
105 || (
nom.length() >= 9 &&
nom.substr(0, 9) ==
"DriftTube" )
106 || (
nom.length() >= 12 &&
nom.substr(0, 12) ==
"SensitiveGas" )
107 #
if G4VERSION_NUMBER < 1100
108 || nomstr.contains(
"MDT")
109 || nomstr.contains(
"station") ) {
116 else if (
nom.length() >= 8 &&
nom.substr(0, 8) ==
"ITkPixel" ) {
119 else if (
nom.length() >= 8 &&
nom.substr(0, 8) ==
"ITkStrip" ) {
122 else if ( (
nom.length() >= 5 &&
nom.substr(0, 5) ==
"Pixel" )
123 ||
nom ==
"Outside Barrel Service") {
126 else if (
nom.length() >= 3 &&
nom.substr(0, 3) ==
"SCT" ) {
129 else if ( (
nom.length() >= 3 &&
nom.substr(0, 3) ==
"TRT" )
130 ||
nom ==
"GasMANeg" ) {
133 else if (
nom.length() >= 4 &&
nom.substr(0, 4) ==
"Tile" ) {
136 else if (
nom.length() >= 7 &&
nom.substr(0, 7) ==
"Section" )
138 else if ( (
nom.length() >= 12 &&
nom.substr(0, 12) ==
"InDetServMat" )
139 || (
nom.length() >= 4 &&
nom.substr(0, 4) ==
"IDET" )
140 || (
nom.length() >= 3 &&
nom.substr(0, 3) ==
"ITK" )
141 || (
nom.length() >= 8 &&
nom.substr(0, 8) ==
"BeamPipe" )
142 || (
nom.length() >= 3 &&
143 (
nom.substr(0, 3) ==
"BLM" ||
nom.substr(0, 3) ==
"BCM" ||
nom.substr(0, 3) ==
"PLR" ) )
144 || (
nom.length() >= 8 &&
nom.substr(0, 8) ==
"BCMPrime") ) {