69 { G4cout <<
"BesMucConstruction::Construct() 1, logicalMuc not found!" << G4endl; }
73 physicalMuc =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalMuc,
"PhysicalMuc",
75 logicalMuc->SetVisAttributes( G4VisAttributes::Invisible );
79 G4SDManager* aSDman = G4SDManager::GetSDMpointer();
81 aSDman->AddNewDetector( aMucSD );
83 G4LogicalVolume* lv = 0;
87 G4int stripMax = 96, bakeliteMax = 4, gasChamberMax = 2;
88 G4int segOnPart[3] = { 4, 8, 4 };
89 G4int absorberOnPart[3] = { 9, 9, 9 };
90 G4int gapOnPart[3] = { 8, 9, 8 };
91 G4int panelOnPart[3] = { 3, 4, 3 };
92 G4int part, seg, absorber, panel, gap, bakelite, gasChamber, strip;
94 for ( part = 0; part < partMax; part++ )
97 for ( seg = 0; seg < segOnPart[part]; seg++ )
99 if ( seg == 0 || part == 1 && seg == 2 )
101 for ( gap = 0; gap < gapOnPart[part]; gap++ )
103 for ( gasChamber = 0; gasChamber < gasChamberMax; gasChamber++ )
106 if ( part == 1 && seg == 2 ) seg_shift = 1;
107 for ( panel = 0; panel < panelOnPart[part] + seg_shift; panel++ )
112 <<
"P" << part <<
"S" << seg <<
"G" << gap <<
"R" << gasChamber <<
"Pn"
113 << panel <<
"C" << std::ends;
127 G4cout <<
"BesMucConstruction::Construct(), " << sf.str() <<
" not found!"
130 else { lv->SetSensitiveDetector( aMucSD ); }
139 G4VisAttributes* mucVisAtt =
new G4VisAttributes( G4Colour( 1.0, 0.0, 1.0, 0.05 ) );
140 G4VisAttributes* absorberVisAtt =
new G4VisAttributes( G4Colour( 1.0, 0.3, 0.0, 1.0 ) );
141 G4VisAttributes* gapVisAtt =
new G4VisAttributes( G4Colour( 0.5, 0.5, 0.5, 1.0 ) );
142 G4VisAttributes* stripVisAtt =
new G4VisAttributes( G4Colour( 1.0, 0.0, 1.0, 1.0 ) );
143 G4VisAttributes* bakeliteVisAtt =
new G4VisAttributes( G4Colour( 1.0, 1.0, 0.0, 1.0 ) );
144 G4VisAttributes* gasChamberVisAtt =
new G4VisAttributes( G4Colour( 0.6, 0.8, 1.0, 1.0 ) );
147 if ( !lv ) { G4cout <<
"BesMucConstruction::Construct() 2, logicMuc not found!" << G4endl; }
150 lv->SetVisAttributes( mucVisAtt );
151 lv->SetVisAttributes( G4VisAttributes::Invisible );
154 for ( part = 0; part < partMax; part++ )
156 for ( seg = 0; seg < segOnPart[part]; seg++ )
158 for ( absorber = 0; absorber < absorberOnPart[part]; absorber++ )
163 <<
"Part" << part <<
"Seg" << seg <<
"Absorber" << absorber << std::ends;
168 lv->SetVisAttributes( absorberVisAtt );
170 if ( part != 1 ) { lv->SetVisAttributes( G4VisAttributes::Invisible ); }
201 for ( part = 0; part < partMax; part++ )
203 for ( seg = 0; seg < segOnPart[part]; seg++ )
205 for ( gap = 0; gap < gapOnPart[part]; gap++ )
210 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap << std::ends;
215 lv->SetVisAttributes( gapVisAtt );
216 lv->SetVisAttributes( G4VisAttributes::Invisible );
222 for ( part = 0; part < partMax; part++ )
224 for ( seg = 0; seg < 1; seg++ )
227 for ( gap = 0; gap < gapOnPart[part]; gap++ )
232 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap <<
"StripPlane" << std::ends;
237 lv->SetVisAttributes( gapVisAtt );
238 lv->SetVisAttributes( G4VisAttributes::Invisible );
244 for ( part = 0; part < partMax; part++ )
246 for ( seg = 0; seg < 1; seg++ )
249 for ( gap = 0; gap < gapOnPart[part]; gap++ )
251 for ( strip = 0; strip < stripMax; strip++ )
254 if ( strip >= 0 && strip < 10 )
258 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap <<
"Strip0" << strip
261 else if ( strip >= 10 && strip < 100 )
265 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap <<
"Strip" << strip
270 G4cout <<
"BesMucConstruction::Construct(), strip=" << strip <<
" error!"
277 lv->SetVisAttributes( stripVisAtt );
278 lv->SetVisAttributes( G4VisAttributes::Invisible );
285 for ( part = 0; part < partMax; part++ )
287 for ( seg = 0; seg < 1; seg++ )
290 for ( gap = 0; gap < gapOnPart[part]; gap++ )
292 for ( panel = 0; panel < panelOnPart[part]; panel++ )
294 for ( bakelite = 0; bakelite < bakeliteMax; bakelite++ )
299 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap <<
"Panel" << panel
300 <<
"Bakelite" << bakelite << std::ends;
305 lv->SetVisAttributes( bakeliteVisAtt );
306 lv->SetVisAttributes( G4VisAttributes::Invisible );
314 for ( part = 0; part < partMax; part++ )
316 for ( seg = 0; seg < 1; seg++ )
319 for ( gap = 0; gap < gapOnPart[part]; gap++ )
321 for ( panel = 0; panel < panelOnPart[part]; panel++ )
323 for ( gasChamber = 0; gasChamber < gasChamberMax; gasChamber++ )
328 <<
"Part" << part <<
"Seg" << seg <<
"Gap" << gap <<
"Panel" << panel
329 <<
"GasChamber" << gasChamber << std::ends;
334 lv->SetVisAttributes( gasChamberVisAtt );
339 if ( part != 1 ) { lv->SetVisAttributes( G4VisAttributes::Invisible ); }