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.
199 G4bool processed = G4tgrLineProcessor::ProcessLine(words);
200 if (processed)
return true;
203 G4String tag = words[0]; G4StrUtil::to_lower(tag);
204 if (tag.substr(0,5)==
":prop") {
205 G4NistManager *mgr = G4NistManager::Instance(); mgr->SetVerbose(2);
206 G4Material *m = mgr->FindOrBuildMaterial(words[1]);
208 m=G4tgbMaterialMgr::GetInstance()->FindOrBuildG4Material(words[1]);
209 G4cout<<
"GEARS: Set optical properties of "<<words[1]<<
":"<<G4endl;
210 m->SetMaterialPropertiesTable(CreateMaterialPropertiesTable(words,2));
212 }
else if (tag.substr(0,5)==
":surf") {
219 bdr->optic =
new G4OpticalSurface(words[1]);
222 while (i<words.size()) {
223 G4String setting = words[i], value = words[i+1];
224 G4StrUtil::to_lower(setting); G4StrUtil::to_lower(value);
225 if (setting==
"property") {
227 }
else if (setting==
"type") {
228 if (value==
"dielectric_metal") bdr->optic->SetType(dielectric_metal);
229 else if (value==
"dielectric_dielectric")
230 bdr->optic->SetType(dielectric_dielectric);
231 else if (value==
"firsov") bdr->optic->SetType(firsov);
232 else if (value==
"x_ray") bdr->optic->SetType(x_ray);
233 else G4cout<<
"GERAS: Ignore unknown surface type "<<value<<G4endl;
234 }
else if (setting==
"model") {
235 if (value==
"glisur") bdr->optic->SetModel(glisur);
236 else if (value==
"unified") bdr->optic->SetModel(unified);
237 else G4cout<<
"GERAS: Ignore unknown surface model "<<value<<G4endl;
238 }
else if (setting==
"finish") {
239 if (value==
"polished") bdr->optic->SetFinish(polished);
240 else if (value==
"polishedfrontpainted")
241 bdr->optic->SetFinish(polishedfrontpainted);
242 else if (value==
"polishedbackpainted")
243 bdr->optic->SetFinish(polishedbackpainted);
244 else if (value==
"ground") bdr->optic->SetFinish(ground);
245 else if (value==
"groundfrontpainted")
246 bdr->optic->SetFinish(groundfrontpainted);
247 else if (value==
"groundbackpainted")
248 bdr->optic->SetFinish(groundbackpainted);
249 else G4cout<<
"GERAS: Ignore unknown surface finish "<<value<<G4endl;
250 }
else if (setting==
"sigma_alpha") {
251 bdr->optic->SetSigmaAlpha(G4UIcommand::ConvertToInt(value));
253 G4cout<<
"GERAS: Ignore unknown surface setting "<<value<<G4endl;
256 if (i<words.size()) {
257 G4cout<<
"GEARS: Set optical properties of "<<bdr->name<<
":"<<G4endl;
258 bdr->optic->SetMaterialPropertiesTable(
259 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