Overwrite G4tgrLineProcessor::ProcessLine to add new tags.
The function is called for each new line. Be sure to insert an end-of-line character by typing <Enter> at the end of the last line, otherwise, the last line will not be processed.
237 G4bool processed = G4tgrLineProcessor::ProcessLine(words);
242 G4String tag = words[0];
243 G4StrUtil::to_lower(tag);
244 if (tag.substr(0, 5) ==
":prop") {
245 G4NistManager *mgr = G4NistManager::Instance();
247 G4Material *m = mgr->FindOrBuildMaterial(words[1]);
249 m = G4tgbMaterialMgr::GetInstance()->FindOrBuildG4Material(words[1]);
250 G4cout <<
"GEARS: Set optical properties of " << words[1] <<
":" << G4endl;
251 m->SetMaterialPropertiesTable(CreateMaterialPropertiesTable(words, 2));
253 }
else if (tag.substr(0, 5) ==
":surf") {
257 bdr->
name = words[1];
260 bdr->optic =
new G4OpticalSurface(words[1]);
262 G4cout <<
"GEARS: Set optical properties of " << bdr->name <<
":"<< G4endl;
264 while (i < words.size()) {
265 G4String setting = words[i], value = words[i + 1];
266 G4StrUtil::to_lower(setting); G4StrUtil::to_lower(value);
267 if (setting ==
"property") {
270 }
else if (setting ==
"type") {
271 if (value ==
"dielectric_metal")
272 bdr->optic->SetType(dielectric_metal);
273 else if (value ==
"dielectric_dielectric")
274 bdr->optic->SetType(dielectric_dielectric);
275 else if (value ==
"dielectric_lut")
276 bdr->optic->SetType(dielectric_LUT);
277 else if (value ==
"dielectric_lutdavis")
278 bdr->optic->SetType(dielectric_LUTDAVIS);
279 else if (value ==
"dielectric_dichroic")
280 bdr->optic->SetType(dielectric_dichroic);
281 else if (value ==
"firsov")
282 bdr->optic->SetType(firsov);
283 else if (value ==
"x_ray")
284 bdr->optic->SetType(x_ray);
285 else if (value ==
"coated")
286 bdr->optic->SetType(coated);
288 G4cout <<
"GEARS: Ignore unknown surface type " << value << G4endl;
289 G4cout <<
"GEARS: type = " << value << G4endl;
290 }
else if (setting ==
"model") {
291 if (value ==
"glisur")
292 bdr->optic->SetModel(glisur);
293 else if (value ==
"unified")
294 bdr->optic->SetModel(unified);
295 else if (value ==
"lut")
296 bdr->optic->SetModel(LUT);
297 else if (value ==
"davis")
298 bdr->optic->SetModel(DAVIS);
299 else if (value ==
"dichroic")
300 bdr->optic->SetModel(dichroic);
302 G4cout <<
"GEARS: Ignore unknown surface model " << value << G4endl;
303 G4cout <<
"GEARS: model = " << value << G4endl;
304 }
else if (setting ==
"finish") {
305 if (value ==
"polished") bdr->optic->SetFinish(polished);
306 else if (value ==
"polishedfrontpainted") bdr->optic->SetFinish(polishedfrontpainted);
307 else if (value ==
"polishedbackpainted") bdr->optic->SetFinish(polishedbackpainted);
308 else if (value ==
"ground") bdr->optic->SetFinish(ground);
309 else if (value ==
"groundfrontpainted") bdr->optic->SetFinish(groundfrontpainted);
310 else if (value ==
"groundbackpainted") bdr->optic->SetFinish(groundbackpainted);
312 else if (value ==
"polishedlumirrorair") bdr->optic->SetFinish(polishedlumirrorair);
313 else if (value ==
"polishedlumirrorglue") bdr->optic->SetFinish(polishedlumirrorglue);
314 else if (value ==
"polishedair") bdr->optic->SetFinish(polishedair);
315 else if (value ==
"polishedteflonair") bdr->optic->SetFinish(polishedteflonair);
316 else if (value ==
"polishedtioair") bdr->optic->SetFinish(polishedtioair);
317 else if (value ==
"polishedtyvekair") bdr->optic->SetFinish(polishedtyvekair);
318 else if (value ==
"polishedvm2000air") bdr->optic->SetFinish(polishedvm2000air);
319 else if (value ==
"polishedvm2000glue") bdr->optic->SetFinish(polishedvm2000glue);
321 else if (value ==
"etchedlumirrorair") bdr->optic->SetFinish(etchedlumirrorair);
322 else if (value ==
"etchedlumirrorglue") bdr->optic->SetFinish(etchedlumirrorglue);
323 else if (value ==
"etchedair") bdr->optic->SetFinish(etchedair);
324 else if (value ==
"etchedteflonair") bdr->optic->SetFinish(etchedteflonair);
325 else if (value ==
"etchedtioair") bdr->optic->SetFinish(etchedtioair);
326 else if (value ==
"etchedtyvekair") bdr->optic->SetFinish(etchedtyvekair);
327 else if (value ==
"etchedvm2000air") bdr->optic->SetFinish(etchedvm2000air);
328 else if (value ==
"etchedvm2000glue") bdr->optic->SetFinish(etchedvm2000glue);
330 else if (value ==
"groundlumirrorair") bdr->optic->SetFinish(groundlumirrorair);
331 else if (value ==
"groundlumirrorglue") bdr->optic->SetFinish(groundlumirrorglue);
332 else if (value ==
"groundair") bdr->optic->SetFinish(groundair);
333 else if (value ==
"groundteflonair") bdr->optic->SetFinish(groundteflonair);
334 else if (value ==
"groundtioair") bdr->optic->SetFinish(groundtioair);
335 else if (value ==
"groundtyvekair") bdr->optic->SetFinish(groundtyvekair);
336 else if (value ==
"groundvm2000air") bdr->optic->SetFinish(groundvm2000air);
337 else if (value ==
"groundvm2000glue") bdr->optic->SetFinish(groundvm2000glue);
339 else if (value ==
"rough_lut") bdr->optic->SetFinish(Rough_LUT);
340 else if (value ==
"roughteflon_lut") bdr->optic->SetFinish(RoughTeflon_LUT);
341 else if (value ==
"roughesr_lut") bdr->optic->SetFinish(RoughESR_LUT);
342 else if (value ==
"roughesrgrease_lut") bdr->optic->SetFinish(RoughESRGrease_LUT);
343 else if (value ==
"polished_lut") bdr->optic->SetFinish(Polished_LUT);
344 else if (value ==
"polishedteflon_lut") bdr->optic->SetFinish(PolishedTeflon_LUT);
345 else if (value ==
"polishedesr_lut") bdr->optic->SetFinish(PolishedESR_LUT);
346 else if (value ==
"polishedesrgrease_lut") bdr->optic->SetFinish(PolishedESRGrease_LUT);
347 else if (value ==
"detector_lut") bdr->optic->SetFinish(Detector_LUT);
350 G4cout <<
"GEARS: Unknown surface finish: " << value <<
"!" << G4endl;
353 G4cout <<
"GEARS: finish = " << value << G4endl;
354 }
else if (setting ==
"sigma_alpha") {
355 bdr->optic->SetSigmaAlpha(G4UIcommand::ConvertToDouble(value));
356 G4cout<<
"GEARS: sigma_alpha = "<<bdr->optic->GetSigmaAlpha()<<G4endl;
358 G4cout <<
"GEARS: Ignore unknown surface setting " << value << G4endl;
361 if (i < words.size())
362 bdr->optic->SetMaterialPropertiesTable(
363 CreateMaterialPropertiesTable(words, i));
BorderSurface * Border
pointer to a BorderSurface object
A link list of G4LogicalBorderSurface.
G4String name
name of the surface
BorderSurface * next
link to next border surface