226 TGeoVolume *top = gGeoManager->GetTopVolume();
227 TGeoVolumeAssembly *tTauNuDet =
new TGeoVolumeAssembly(
"tTauNuDet");
228 top->AddNode(tTauNuDet, 1,
new TGeoTranslation(0, 0, 0));
231 TGeoMedium *RPCmat =gGeoManager->GetMedium(
"RPCgas");
234 TGeoMedium *vacuum =gGeoManager->GetMedium(
"vacuum");
237 TGeoMedium *bakelite =gGeoManager->GetMedium(
"Bakelite");
240 TGeoMedium *Iron =gGeoManager->GetMedium(
"iron");
243 TGeoMedium *Steel =gGeoManager->GetMedium(
"steel");
246 TGeoMedium *Cu =gGeoManager->GetMedium(
"copper");
249 TGeoMedium *Conc =gGeoManager->GetMedium(
"Concrete");
251 TGeoUniformMagField *retFieldU =
new TGeoUniformMagField(0.,0.,-
fField);
252 TGeoUniformMagField *retFieldL =
new TGeoUniformMagField(0.,0.,
fField);
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));
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);
270 TGeoVolume *volFeYoke =
new TGeoVolume(
"volFeYoke",FeYoke,Iron);
271 volFeYoke->SetLineColor(kGray+1);
274 TGeoVolume *volFeYoke1 =
new TGeoVolume(
"volFeYoke1",FeYoke1,Iron);
275 volFeYoke1->SetLineColor(kGray+1);
277 TGeoBBox *CoilContainer =
new TGeoBBox(
"CoilContainer",
fXtot/2,
fCoilH/2, 40*
cm);
278 TGeoVolume *volCoilContainer =
new TGeoVolume(
"volCoilContainer",CoilContainer,vacuum);
281 TGeoVolume *volCoil =
new TGeoVolume(
"volCoil",Coil,Cu);
282 volCoil->SetLineColor(kOrange -5);
283 for(
int i = 0; i <
fNCoil; i++)
285 volCoilContainer->AddNode(volCoil, i,
new TGeoTranslation(0,0, -40*
cm +
fCoilW/2 + i*(
fCoilGap +
fCoilW)));
290 TGeoVolume *volCoilV =
new TGeoVolume(
"volCoilV",CoilV,Cu);
291 volCoilV->SetLineColor(kOrange -5);
292 for(
int i = 0; i <
fNCoil; i++)
296 for(
int i = 0; i <
fNCoil; i++)
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));
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);
315 for(
int i = 0; i <
fNCoil; i++)
319 for(
int i = 0; i <
fNCoil; i++)
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));
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));
337 Int_t nr = ArmNumber*1E4;
339 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
340 TGeoVolume *volIron =
new TGeoVolume(
"volIron",IronLayer,Iron);
343 for(Int_t i = 0; i <
fNFe; i++)
345 volArm1->AddNode(volIron,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
348 TGeoBBox *RpcContainer =
new TGeoBBox(
"RpcContainer",
fXRpc/2,
fYRpc/2,
fZRpc/2);
349 TGeoVolume *volRpcContainer =
new TGeoVolume(
"volRpcContainer",RpcContainer,vacuum);
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));
371 AddSensitiveVolume(volRpc);
373 for(Int_t i = 0; i <
fNRpc; i++)
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);
390 TGeoVolume *volRpcContainer2 =
new TGeoVolume(
"volRpcContainer2",RpcContainer,vacuum);
391 TGeoVolume *volStrip2 =
new TGeoVolume(
"volStrip2",Strip,Cu);
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));
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));
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));
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);
412 for(Int_t i = 0; i <
fNFe; i++)
414 volArm2->AddNode(volIron2,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
417 for(Int_t i = 0; i <
fNRpc; i++)
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);
427 tTauNuDet->AddNode(volBase,1,
new TGeoTranslation(0,-
fYtot/2 + 10*
cm/2,
fZcenter));
431 TGeoVolume *Pillar1Vol =
new TGeoVolume(
"Pillar1Vol",Pillar1Box,Steel);
432 Pillar1Vol->SetLineColor(kGreen+3);
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));
447 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
448 TGeoVolume *volIron =
new TGeoVolume(
"volIron",IronLayer,Iron);
451 for(Int_t i = 0; i <
fNFe; i++)
453 volMSBox->AddNode(volIron,nr + 100 + i,
new TGeoTranslation(0, 0,-
fZtot/2+i*
fZFe+
fZFe/2+i*
fZRpc));
456 TGeoBBox *RpcContainer =
new TGeoBBox(
"RpcContainer",
fXRpc/2,
fYRpc/2,
fZRpc/2);
457 TGeoVolume *volRpcContainer =
new TGeoVolume(
"volRpcContainer",RpcContainer,vacuum);
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));
479 AddSensitiveVolume(volRpc);
481 for(Int_t i = 0; i <
fNRpc; i++)
483 volMSBox->AddNode(volRpcContainer,nr + i,
new TGeoTranslation(0, 0, -
fZtot/2+(i+1)*
fZFe + i*
fZRpc +
fZRpc/2));
487 TGeoVolume *Pillar1Vol =
new TGeoVolume(
"Pillar1Vol",Pillar1Box,Steel);
488 Pillar1Vol->SetLineColor(kGreen+3);