73 G4cout <<
"BesMucConstruction::Construct() 1, logicalMuc not found!" << G4endl;
77 physicalMuc =
new G4PVPlacement(0,
84 logicalMuc->SetVisAttributes (G4VisAttributes::Invisible);
88 G4SDManager* aSDman = G4SDManager::GetSDMpointer();
90 aSDman->AddNewDetector(aMucSD);
92 G4LogicalVolume* lv = 0;
96 G4int stripMax = 96, bakeliteMax = 4, gasChamberMax = 2;
97 G4int segOnPart[3] = {4, 8, 4};
98 G4int absorberOnPart[3] = {9, 9, 9};
99 G4int gapOnPart[3] = {8, 9, 8};
100 G4int panelOnPart[3] = {3, 4, 3};
101 G4int part, seg, absorber, panel, gap, bakelite, gasChamber, strip;
103 for(part = 0; part < partMax; part++) {
105 for(seg = 0; seg < segOnPart[part]; seg++) {
106 if(seg==0||part==1&&seg==2){
107 for(gap = 0; gap < gapOnPart[part]; gap++) {
108 for(gasChamber = 0; gasChamber < gasChamberMax; gasChamber++) {
109 int seg_shift = 0;
if(part==1&&seg==2) seg_shift = 1;
110 for(panel = 0; panel < panelOnPart[part] + seg_shift; panel++) {
132 G4cout <<
"BesMucConstruction::Construct(), " << sf.str() <<
" not found!" << G4endl;
135 lv->SetSensitiveDetector(aMucSD);
145 G4VisAttributes* mucVisAtt =
new G4VisAttributes(G4Colour(1.0, 0.0, 1.0, 0.05));
146 G4VisAttributes* absorberVisAtt =
new G4VisAttributes(G4Colour(1.0, 0.3, 0.0, 1.0));
147 G4VisAttributes* gapVisAtt =
new G4VisAttributes(G4Colour(0.5, 0.5, 0.5, 1.0));
148 G4VisAttributes* stripVisAtt =
new G4VisAttributes(G4Colour(1.0, 0.0, 1.0, 1.0));
149 G4VisAttributes* bakeliteVisAtt =
new G4VisAttributes(G4Colour(1.0, 1.0, 0.0, 1.0));
150 G4VisAttributes* gasChamberVisAtt =
new G4VisAttributes(G4Colour(0.6, 0.8, 1.0, 1.0));
154 G4cout <<
"BesMucConstruction::Construct() 2, logicMuc not found!" << G4endl;
157 lv->SetVisAttributes(mucVisAtt);
158 lv->SetVisAttributes (G4VisAttributes::Invisible);
161 for(part = 0; part < partMax; part++) {
162 for(seg = 0; seg < segOnPart[part]; seg++) {
163 for(absorber = 0; absorber < absorberOnPart[part]; absorber++) {
165 sf <<
"logical" <<
"Muc"
168 <<
"Absorber" << absorber
173 lv->SetVisAttributes(absorberVisAtt);
176 lv->SetVisAttributes (G4VisAttributes::Invisible);
208 for(part = 0; part < partMax; part++) {
209 for(seg = 0; seg < segOnPart[part]; seg++) {
210 for(gap = 0; gap < gapOnPart[part]; gap++) {
212 sf <<
"logical" <<
"Muc"
220 lv->SetVisAttributes(gapVisAtt);
221 lv->SetVisAttributes(G4VisAttributes::Invisible);
227 for(part = 0; part < partMax; part++) {
228 for(seg = 0; seg < 1; seg++) {
230 for(gap = 0; gap < gapOnPart[part]; gap++) {
232 sf <<
"logical" <<
"Muc"
241 lv->SetVisAttributes(gapVisAtt);
242 lv->SetVisAttributes(G4VisAttributes::Invisible);
248 for(part = 0; part < partMax; part++) {
249 for(seg = 0; seg < 1; seg++) {
251 for(gap = 0; gap < gapOnPart[part]; gap++) {
252 for(strip = 0; strip < stripMax; strip++) {
254 if(strip >= 0 && strip < 10) {
255 sf <<
"logical" <<
"Muc"
262 else if(strip >= 10 && strip < 100) {
263 sf <<
"logical" <<
"Muc"
271 G4cout <<
"BesMucConstruction::Construct(), strip=" << strip <<
" error!" << G4endl;
276 lv->SetVisAttributes(stripVisAtt);
277 lv->SetVisAttributes(G4VisAttributes::Invisible);
284 for(part = 0; part < partMax; part++) {
285 for(seg = 0; seg < 1; seg++) {
287 for(gap = 0; gap < gapOnPart[part]; gap++) {
288 for(panel = 0; panel < panelOnPart[part]; panel++) {
289 for(bakelite = 0; bakelite < bakeliteMax; bakelite++) {
291 sf <<
"logical" <<
"Muc"
296 <<
"Bakelite" << bakelite
301 lv->SetVisAttributes(bakeliteVisAtt);
302 lv->SetVisAttributes(G4VisAttributes::Invisible);
311 for(part = 0; part < partMax; part++) {
312 for(seg = 0; seg < 1; seg++) {
314 for(gap = 0; gap < gapOnPart[part]; gap++) {
315 for(panel = 0; panel < panelOnPart[part]; panel++) {
316 for(gasChamber = 0; gasChamber < gasChamberMax; gasChamber++) {
318 sf <<
"logical" <<
"Muc"
323 <<
"GasChamber" << gasChamber
328 lv->SetVisAttributes(gasChamberVisAtt);
334 lv->SetVisAttributes(G4VisAttributes::Invisible);