225{
226 TGeoVolume *
top = gGeoManager->GetTopVolume();
227 TGeoVolumeAssembly *tTauNuDet = new TGeoVolumeAssembly("tTauNuDet");
228 top->AddNode(tTauNuDet, 1,
new TGeoTranslation(0, 0, 0));
229
231 TGeoMedium *RPCmat =gGeoManager->GetMedium("RPCgas");
232
234 TGeoMedium *vacuum =gGeoManager->GetMedium("vacuum");
235
237 TGeoMedium *bakelite =gGeoManager->GetMedium("Bakelite");
238
240 TGeoMedium *Iron =gGeoManager->GetMedium("iron");
241
243 TGeoMedium *Steel =gGeoManager->GetMedium("steel");
244
246 TGeoMedium *Cu =gGeoManager->GetMedium("copper");
247
249 TGeoMedium *Conc =gGeoManager->GetMedium("Concrete");
250
251 TGeoUniformMagField *retFieldU =
new TGeoUniformMagField(0.,0.,-
fField);
252 TGeoUniformMagField *retFieldL =
new TGeoUniformMagField(0.,0.,
fField);
253
255
257 {
258 TGeoBBox *MSBox =
new TGeoBBox(
"MagneticSpectrometerBox",
fXRyoke/2,
fYtot/2,
fZtot/2);
259 TGeoVolume *volMSBox = new TGeoVolume("volMagneticSpectrometer", MSBox, vacuum);
260 tTauNuDet->AddNode(volMSBox, 1,
new TGeoTranslation(0,10*
cm,
fZcenter));
261
262
264 TGeoVolume *volUpYoke = new TGeoVolume("volUpYoke",UpYokeBox,vacuum);
265 volMSBox->AddNode(volUpYoke,1,
new TGeoTranslation(0,
fYtot/2 -
fYRyoke/2,0));
266 volUpYoke->SetField(retFieldU);
267
268
270 TGeoVolume *volFeYoke = new TGeoVolume("volFeYoke",FeYoke,Iron);
271 volFeYoke->SetLineColor(kGray+1);
272
274 TGeoVolume *volFeYoke1 = new TGeoVolume("volFeYoke1",FeYoke1,Iron);
275 volFeYoke1->SetLineColor(kGray+1);
276
277 TGeoBBox *CoilContainer =
new TGeoBBox(
"CoilContainer",
fXtot/2,
fCoilH/2, 40*
cm);
278 TGeoVolume *volCoilContainer = new TGeoVolume("volCoilContainer",CoilContainer,vacuum);
279
281 TGeoVolume *volCoil = new TGeoVolume("volCoil",Coil,Cu);
282 volCoil->SetLineColor(kOrange -5);
284 {
285 volCoilContainer->AddNode(volCoil, i,
new TGeoTranslation(0,0, -40*
cm +
fCoilW/2 + i*(
fCoilGap +
fCoilW)));
286 }
287
288
290 TGeoVolume *volCoilV = new TGeoVolume("volCoilV",CoilV,Cu);
291 volCoilV->SetLineColor(kOrange -5);
293 {
295 }
297 {
299 }
300
301
302
303 volUpYoke->AddNode(volFeYoke,1,
new TGeoTranslation(0,0,- (
fZArm +
fGapMiddle)/2));
304 volUpYoke->AddNode(volFeYoke,2,
new TGeoTranslation(0,0,(
fZArm +
fGapMiddle)/2));
305 volUpYoke->AddNode(volFeYoke1,1,new TGeoTranslation(0,0,0));
306 volUpYoke->AddNode(volCoilContainer,1,
new TGeoTranslation(0,
fYRyoke/2 -
fCoilH/2,0));
307 volUpYoke->AddNode(volCoilContainer,2,
new TGeoTranslation(0,-
fYRyoke/2 +
fCoilH/2,0));
308
310 TGeoVolume *volLowYoke = new TGeoVolume("volLowYoke",LowYokeBox,vacuum);
311 volMSBox->AddNode(volLowYoke,1,
new TGeoTranslation(0,-
fYtot/2 +
fYRyoke/2,0));
312 volLowYoke->SetField(retFieldL);
313
314
316 {
318 }
320 {
322 }
323
324 volLowYoke->AddNode(volFeYoke,3,
new TGeoTranslation(0,0,- (
fZArm +
fGapMiddle)/2));
325 volLowYoke->AddNode(volFeYoke,4,
new TGeoTranslation(0,0,(
fZArm +
fGapMiddle)/2));
326 volLowYoke->AddNode(volFeYoke1,1,new TGeoTranslation(0,0,0));
327 volLowYoke->AddNode(volCoilContainer,3,
new TGeoTranslation(0,
fYRyoke/2-
fCoilH/2,0));
328 volLowYoke->AddNode(volCoilContainer,4,
new TGeoTranslation(0,-
fYRyoke/2 +
fCoilH/2,0));
329
330 Int_t ArmNumber = 1;
331 TGeoBBox *Arm1Box =
new TGeoBBox(
"Arm1MSBox",
fXFe/2,
fYFe/2,
fZArm/2);
332 TGeoVolume *volArm1 = new TGeoVolume("volArm1MS", Arm1Box,vacuum);
333 TGeoUniformMagField *magField1 =
new TGeoUniformMagField(0.,-
fField,0.);
334 volArm1->SetField(magField1);
335 volMSBox ->AddNode(volArm1,ArmNumber,
new TGeoTranslation(0,0,-(
fGapMiddle+
fZArm)/2));
336
337 Int_t
nr = ArmNumber*1E4;
338
339 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
340 TGeoVolume *volIron = new TGeoVolume("volIron",IronLayer,Iron);
341
342
343 for(Int_t i = 0;
i <
fNFe;
i++)
344 {
345 volArm1->AddNode(volIron,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
346 }
347
348 TGeoBBox *RpcContainer =
new TGeoBBox(
"RpcContainer",
fXRpc/2,
fYRpc/2,
fZRpc/2);
349 TGeoVolume *volRpcContainer = new TGeoVolume("volRpcContainer",RpcContainer,vacuum);
350
352 TGeoVolume *volStrip = new TGeoVolume("volStrip",Strip,Cu);
353 volStrip->SetLineColor(kRed);
354 volRpcContainer->AddNode(volStrip,1,
new TGeoTranslation (0,0,-3.25*
mm));
355 volRpcContainer->AddNode(volStrip,2,
new TGeoTranslation (0,0,3.25*
mm));
356 TGeoBBox *PETinsulator =
new TGeoBBox(
"PETinsulator",
fXPet/2,
fYPet/2,
fZPet/2);
357 TGeoVolume *volPETinsulator = new TGeoVolume("volPETinsulator", PETinsulator, bakelite);
358 volPETinsulator->SetLineColor(kYellow);
359 volRpcContainer->AddNode(volPETinsulator,1,
new TGeoTranslation(0,0,-3.1*
mm));
360 volRpcContainer->AddNode(volPETinsulator,2,
new TGeoTranslation(0,0, 3.1*
mm));
361 TGeoBBox *Electrode =
new TGeoBBox(
"Electrode",
fXEle/2,
fYEle/2,
fZEle/2);
362 TGeoVolume *volElectrode = new TGeoVolume("volElectrode",Electrode,bakelite);
363 volElectrode->SetLineColor(kGreen);
364 volRpcContainer->AddNode(volElectrode,1,
new TGeoTranslation(0,0,-2*
mm));
365 volRpcContainer->AddNode(volElectrode,2,
new TGeoTranslation(0,0, 2*
mm));
367 TGeoVolume *volRpc = new TGeoVolume("volRpc",RpcGas,RPCmat);
368 volRpc->SetLineColor(kCyan);
369 volRpcContainer->AddNode(volRpc,1,new TGeoTranslation(0,0,0));
370
371 AddSensitiveVolume(volRpc);
372
373 for(Int_t i = 0;
i <
fNRpc;
i++)
374 {
376 }
377
378 ArmNumber = 2;
380
381 TGeoBBox *Arm2Box =
new TGeoBBox(
"Arm2MSBox",
fXFe/2,
fYFe/2,
fZArm/2);
382 TGeoVolume *volArm2 = new TGeoVolume("volArm2MS", Arm2Box,vacuum);
383 TGeoUniformMagField *magField2 =
new TGeoUniformMagField(0.,
fField,0.);
384 volArm2->SetField(magField2);
385 volMSBox ->AddNode(volArm2,1,
new TGeoTranslation(0,0,(
fGapMiddle+
fZArm)/2));
386 TGeoVolume *volIron2 = new TGeoVolume("volIron2",IronLayer,Iron);
387
388
389
390 TGeoVolume *volRpcContainer2 = new TGeoVolume("volRpcContainer2",RpcContainer,vacuum);
391 TGeoVolume *volStrip2 = new TGeoVolume("volStrip2",Strip,Cu);
392
393 volStrip2->SetLineColor(kRed);
394 volRpcContainer2->AddNode(volStrip2,1,
new TGeoTranslation (0,0,-3.25*
mm));
395 volRpcContainer2->AddNode(volStrip2,2,
new TGeoTranslation (0,0,3.25*
mm));
396
397 TGeoVolume *volPETinsulator2 = new TGeoVolume("volPETinsulator2", PETinsulator, bakelite);
398 volPETinsulator2->SetLineColor(kYellow);
399 volRpcContainer2->AddNode(volPETinsulator2,1,
new TGeoTranslation(0,0,-3.1*
mm));
400 volRpcContainer2->AddNode(volPETinsulator2,2,
new TGeoTranslation(0,0, 3.1*
mm));
401
402 TGeoVolume *volElectrode2 = new TGeoVolume("volElectrode2",Electrode,bakelite);
403 volElectrode2->SetLineColor(kGreen);
404 volRpcContainer2->AddNode(volElectrode2,1,
new TGeoTranslation(0,0,-2*
mm));
405 volRpcContainer2->AddNode(volElectrode2,2,
new TGeoTranslation(0,0, 2*
mm));
406
407 TGeoVolume *volRpc2 = new TGeoVolume("volRpc2",RpcGas,RPCmat);
408 volRpc2->SetLineColor(kCyan);
409 volRpcContainer2->AddNode(volRpc2,1,new TGeoTranslation(0,0,0));
410 AddSensitiveVolume(volRpc2);
411
412 for(Int_t i = 0;
i <
fNFe;
i++)
413 {
414 volArm2->AddNode(volIron2,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
415 }
416
417 for(Int_t i = 0;
i <
fNRpc;
i++)
418 {
420 }
421
422
423 TGeoBBox *Base =
new TGeoBBox(
"Base",
fXtot/2, 10*
cm/2,
fZtot/2);
424 TGeoVolume *volBase = new TGeoVolume("volBase",Base,Conc);
425 volBase->SetLineColor(kYellow-3);
426
427 tTauNuDet->AddNode(volBase,1,
new TGeoTranslation(0,-
fYtot/2 + 10*
cm/2,
fZcenter));
428
429
431 TGeoVolume *Pillar1Vol = new TGeoVolume("Pillar1Vol",Pillar1Box,Steel);
432 Pillar1Vol->SetLineColor(kGreen+3);
433
438 }
440 {
442
443 TGeoBBox *MSBox =
new TGeoBBox(
"MagneticSpectrometerBox",
fXtot/2,
fYtot/2,
fZtot/2);
444 TGeoVolume *volMSBox = new TGeoVolume("volMagneticSpectrometer", MSBox, vacuum);
445 tTauNuDet->AddNode(volMSBox, 1,
new TGeoTranslation(0,0,
fZcenter));
446
447 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
448 TGeoVolume *volIron = new TGeoVolume("volIron",IronLayer,Iron);
449
450
451 for(Int_t i = 0;
i <
fNFe;
i++)
452 {
453 volMSBox->AddNode(volIron,nr + 100 + i,
new TGeoTranslation(0, 0,-
fZtot/2+i*
fZFe+
fZFe/2+i*
fZRpc));
454 }
455
456 TGeoBBox *RpcContainer =
new TGeoBBox(
"RpcContainer",
fXRpc/2,
fYRpc/2,
fZRpc/2);
457 TGeoVolume *volRpcContainer = new TGeoVolume("volRpcContainer",RpcContainer,vacuum);
458
460 TGeoVolume *volStrip = new TGeoVolume("volStrip",Strip,Cu);
461 volStrip->SetLineColor(kRed);
462 volRpcContainer->AddNode(volStrip,1,
new TGeoTranslation (0,0,-3.25*
mm));
463 volRpcContainer->AddNode(volStrip,2,
new TGeoTranslation (0,0,3.25*
mm));
464 TGeoBBox *PETinsulator =
new TGeoBBox(
"PETinsulator",
fXPet/2,
fYPet/2,
fZPet/2);
465 TGeoVolume *volPETinsulator = new TGeoVolume("volPETinsulator", PETinsulator, bakelite);
466 volPETinsulator->SetLineColor(kYellow);
467 volRpcContainer->AddNode(volPETinsulator,1,
new TGeoTranslation(0,0,-3.1*
mm));
468 volRpcContainer->AddNode(volPETinsulator,2,
new TGeoTranslation(0,0, 3.1*
mm));
469 TGeoBBox *Electrode =
new TGeoBBox(
"Electrode",
fXEle/2,
fYEle/2,
fZEle/2);
470 TGeoVolume *volElectrode = new TGeoVolume("volElectrode",Electrode,bakelite);
471 volElectrode->SetLineColor(kGreen);
472 volRpcContainer->AddNode(volElectrode,1,
new TGeoTranslation(0,0,-2*
mm));
473 volRpcContainer->AddNode(volElectrode,2,
new TGeoTranslation(0,0, 2*
mm));
475 TGeoVolume *volRpc = new TGeoVolume("volRpc",RpcGas,RPCmat);
476 volRpc->SetLineColor(kCyan);
477 volRpcContainer->AddNode(volRpc,1,new TGeoTranslation(0,0,0));
478
479 AddSensitiveVolume(volRpc);
480
481 for(Int_t i = 0;
i <
fNRpc;
i++)
482 {
483 volMSBox->AddNode(volRpcContainer,nr + i,
new TGeoTranslation(0, 0, -
fZtot/2+(i+1)*
fZFe + i*
fZRpc +
fZRpc/2));
484 }
485
487 TGeoVolume *Pillar1Vol = new TGeoVolume("Pillar1Vol",Pillar1Box,Steel);
488 Pillar1Vol->SetLineColor(kGreen+3);
489
492
493
494 }
495
496}
Int_t InitMedium(const char *name)