95{
98 for(auto iaux = auxInfoList->cbegin(); iaux != auxInfoList->cend(); ++iaux)
99 {
100 if(iaux->type != "Region")
101 continue;
102
105 {
107 }
109 continue;
110
111 if(!iaux->auxList)
112 {
114 "Invalid definition of geometrical region!");
115 }
116 else
117 {
121 for(auto raux = iaux->auxList->cbegin();
122 raux != iaux->auxList->cend(); ++raux)
123 {
126 {
129 {
131 }
133 auto pos = store->
GetMap().find(volname);
135 {
136
137
138
139
140
141 if (
pos->second.size()>1)
142 {
143 std::ostringstream message;
144 message << "There exists more than ONE logical volume "
145 <<
"in store named: " << volname <<
"." <<
G4endl
146 << "NOTE: assigning all such volumes as root logical "
147 <<
"volumes for region: " <<
name <<
"!";
150 }
151 for (
auto vpos =
pos->second.cbegin();
152 vpos !=
pos->second.cend(); ++vpos)
153 {
157 }
158 }
159 else
160 {
161 std::ostringstream message;
162 message <<
"Volume NOT found in store !" <<
G4endl
163 << " Volume " << volname << " NOT found in store !"
165 << " No region is being set.";
168 }
169 }
170 else if(
tag ==
"pcut")
171 {
172 const G4String& cvalue = raux->value;
175 {
176 G4Exception(
"G4GDMLParser::ImportRegions()",
"InvalidRead",
178 }
182 }
183 else if(
tag ==
"ecut")
184 {
185 const G4String& cvalue = raux->value;
188 {
189 G4Exception(
"G4GDMLParser::ImportRegions()",
"InvalidRead",
191 }
195 }
196 else if(
tag ==
"poscut")
197 {
198 const G4String& cvalue = raux->value;
201 {
202 G4Exception(
"G4GDMLParser::ImportRegions()",
"InvalidRead",
204 }
208 }
209 else if(
tag ==
"gamcut")
210 {
211 const G4String& cvalue = raux->value;
214 {
215 G4Exception(
"G4GDMLParser::ImportRegions()",
"InvalidRead",
217 }
221 }
222 else if(
tag ==
"ulimits")
223 {
225 G4double uekinMin = 0., urangMin = 0.;
226 const G4String& ulname = raux->value;
227 for(auto uaux = raux->auxList->cbegin();
228 uaux != raux->auxList->cend(); ++uaux)
229 {
231 const G4String& uvalue = uaux->value;
234 if(ultag == "ustepMax")
235 {
236 ustepMax = ulvalue;
237 }
238 else if(ultag == "utrakMax")
239 {
240 utrakMax = ulvalue;
241 }
242 else if(ultag == "utimeMax")
243 {
244 utimeMax = ulvalue;
245 }
246 else if(ultag == "uekinMin")
247 {
248 uekinMin = ulvalue;
249 }
250 else if(ultag == "urangMin")
251 {
252 urangMin = ulvalue;
253 }
254 else
255 {
256 G4Exception(
"G4GDMLParser::ImportRegions()",
"ReadError",
258 }
259 }
261 ulname, ustepMax, utrakMax, utimeMax, uekinMin, urangMin);
263 }
264 else
265 continue;
266 }
267 }
268 }
269}
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double Evaluate(const G4String &)
const G4GDMLAuxListType * GetAuxList() const
const std::map< G4String, std::vector< G4LogicalVolume * > > & GetMap() const
static G4LogicalVolumeStore * GetInstance()
void SetProductionCut(G4double cut, G4int index=-1)
G4LogicalVolume * GetReflectedLV(G4LogicalVolume *lv) const
G4bool IsConstituent(G4LogicalVolume *lv) const
void SetProductionCuts(G4ProductionCuts *cut)
void SetUserLimits(G4UserLimits *ul)
void AddRootLogicalVolume(G4LogicalVolume *lv, G4bool search=true)
static G4double GetValueOf(const G4String &)
static G4String GetCategory(const G4String &)
const char * name(G4int ptype)