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.
209 G4bool processed = G4tgrLineProcessor::ProcessLine(words);
210 if (processed)
return true;
213 G4String tag = words[0]; G4StrUtil::to_lower(tag);
214 if (tag.substr(0,5)==
":prop") {
215 G4NistManager *mgr = G4NistManager::Instance(); mgr->SetVerbose(2);
216 G4Material *m = mgr->FindOrBuildMaterial(words[1]);
218 m=G4tgbMaterialMgr::GetInstance()->FindOrBuildG4Material(words[1]);
219 G4cout<<
"GEARS: Set optical properties of "<<words[1]<<
":"<<G4endl;
220 m->SetMaterialPropertiesTable(CreateMaterialPropertiesTable(words,2));
222 }
else if (tag.substr(0,5)==
":surf") {
229 bdr->optic =
new G4OpticalSurface(words[1]);
232 while (i<words.size()) {
233 G4String setting = words[i], value = words[i+1];
234 G4StrUtil::to_lower(setting); G4StrUtil::to_lower(value);
235 if (setting==
"property") {
237 }
else if (setting==
"type") {
238 if (value==
"dielectric_metal") bdr->optic->SetType(dielectric_metal);
239 else if (value==
"dielectric_dielectric")
240 bdr->optic->SetType(dielectric_dielectric);
241 else if (value==
"firsov") bdr->optic->SetType(firsov);
242 else if (value==
"x_ray") bdr->optic->SetType(x_ray);
243 else G4cout<<
"GERAS: Ignore unknown surface type "<<value<<G4endl;
244 }
else if (setting==
"model") {
245 if (value==
"glisur") bdr->optic->SetModel(glisur);
246 else if (value==
"unified") bdr->optic->SetModel(unified);
247 else G4cout<<
"GERAS: Ignore unknown surface model "<<value<<G4endl;
248 }
else if (setting==
"finish") {
249 G4cout<<
"GERAS: Set surface finish to be "<<value<<G4endl;
250 if (value==
"polished") bdr->optic->SetFinish(polished);
251 else if (value==
"polishedfrontpainted")
252 bdr->optic->SetFinish(polishedfrontpainted);
253 else if (value==
"polishedbackpainted")
254 bdr->optic->SetFinish(polishedbackpainted);
255 else if (value==
"ground") bdr->optic->SetFinish(ground);
256 else if (value==
"groundfrontpainted")
257 bdr->optic->SetFinish(groundfrontpainted);
258 else if (value==
"groundbackpainted")
259 bdr->optic->SetFinish(groundbackpainted);
261 G4cout<<
"GERAS: Unknown surface finish: "<<value<<
"!"<<G4endl;
264 }
else if (setting==
"sigma_alpha") {
265 bdr->optic->SetSigmaAlpha(G4UIcommand::ConvertToInt(value));
267 G4cout<<
"GERAS: Ignore unknown surface setting "<<value<<G4endl;
270 if (i<words.size()) {
271 G4cout<<
"GEARS: Set optical properties of "<<bdr->name<<
":"<<G4endl;
272 bdr->optic->SetMaterialPropertiesTable(
273 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