287 TGeoVolume *top = gGeoManager->GetTopVolume();
288 TGeoVolumeAssembly *tTauNuDet =
new TGeoVolumeAssembly(
"tTauNuDet");
289 top->AddNode(tTauNuDet, 1,
new TGeoTranslation(0, 0, 0));
292 TGeoMedium *RPCmat =gGeoManager->GetMedium(
"RPCgas");
295 TGeoMedium *bakelite =gGeoManager->GetMedium(
"Bakelite");
298 TGeoMedium *Iron =gGeoManager->GetMedium(
"iron");
301 TGeoMedium *Steel =gGeoManager->GetMedium(
"steel");
304 TGeoMedium *Cu =gGeoManager->GetMedium(
"copper");
307 TGeoMedium *Conc =gGeoManager->GetMedium(
"Concrete");
310 TGeoMedium *air =gGeoManager->GetMedium(
"air");
313 TGeoMedium *Al =gGeoManager->GetMedium(
"Aluminum");
315 TGeoUniformMagField *retFieldU =
new TGeoUniformMagField(0.,0.,-
fField);
316 TGeoUniformMagField *retFieldL =
new TGeoUniformMagField(0.,0.,
fField);
322 TGeoVolumeAssembly *volMudetBox =
new TGeoVolumeAssembly(
"volNuTauMudet");
323 tTauNuDet->AddNode(volMudetBox, 1,
new TGeoTranslation(0,10*
cm,
fZcenter));
326 TGeoVolume *volUpYoke =
new TGeoVolume(
"volUpYoke",UpYokeBox,air);
327 volMudetBox->AddNode(volUpYoke,1,
new TGeoTranslation(0,
fYtot/2 -
fYRyoke/2,0));
328 volUpYoke->SetField(retFieldU);
332 TGeoVolume *volFeYoke =
new TGeoVolume(
"volFeYoke",FeYoke,Iron);
333 volFeYoke->SetLineColor(kGray+1);
336 TGeoVolume *volFeYoke1 =
new TGeoVolume(
"volFeYoke1",FeYoke1,Iron);
337 volFeYoke1->SetLineColor(kGray+1);
339 TGeoBBox *CoilContainer =
new TGeoBBox(
"CoilContainer",
fXtot/2,
fCoilH/2, 40*
cm);
340 TGeoVolume *volCoilContainer =
new TGeoVolume(
"volCoilContainer",CoilContainer,air);
343 TGeoVolume *volCoil =
new TGeoVolume(
"volCoil",Coil,Cu);
344 volCoil->SetLineColor(kOrange -5);
345 for(
int i = 0; i <
fNCoil; i++)
347 volCoilContainer->AddNode(volCoil, i,
new TGeoTranslation(0,0, -40*
cm +
fCoilW/2 + i*(
fCoilGap +
fCoilW)));
352 TGeoVolume *volCoilV =
new TGeoVolume(
"volCoilV",CoilV,Cu);
353 volCoilV->SetLineColor(kOrange -5);
354 for(
int i = 0; i <
fNCoil; i++)
358 for(
int i = 0; i <
fNCoil; i++)
365 volUpYoke->AddNode(volFeYoke,1,
new TGeoTranslation(0,0,- (
fZArm +
fGapMiddle)/2));
366 volUpYoke->AddNode(volFeYoke,2,
new TGeoTranslation(0,0,(
fZArm +
fGapMiddle)/2));
367 volUpYoke->AddNode(volFeYoke1,1,
new TGeoTranslation(0,0,0));
368 volUpYoke->AddNode(volCoilContainer,1,
new TGeoTranslation(0,
fYRyoke/2 -
fCoilH/2,0));
369 volUpYoke->AddNode(volCoilContainer,2,
new TGeoTranslation(0,-
fYRyoke/2 +
fCoilH/2,0));
372 TGeoVolume *volLowYoke =
new TGeoVolume(
"volLowYoke",LowYokeBox,air);
373 volMudetBox->AddNode(volLowYoke,1,
new TGeoTranslation(0,-
fYtot/2 +
fYRyoke/2,0));
374 volLowYoke->SetField(retFieldL);
377 for(
int i = 0; i <
fNCoil; i++)
381 for(
int i = 0; i <
fNCoil; i++)
386 volLowYoke->AddNode(volFeYoke,3,
new TGeoTranslation(0,0,- (
fZArm +
fGapMiddle)/2));
387 volLowYoke->AddNode(volFeYoke,4,
new TGeoTranslation(0,0,(
fZArm +
fGapMiddle)/2));
388 volLowYoke->AddNode(volFeYoke1,1,
new TGeoTranslation(0,0,0));
389 volLowYoke->AddNode(volCoilContainer,3,
new TGeoTranslation(0,
fYRyoke/2-
fCoilH/2,0));
390 volLowYoke->AddNode(volCoilContainer,4,
new TGeoTranslation(0,-
fYRyoke/2 +
fCoilH/2,0));
393 TGeoBBox *Arm1Box =
new TGeoBBox(
"Arm1MudetBox",
fXFe/2,
fYFe/2,
fZArm/2);
394 TGeoVolume *volArm1 =
new TGeoVolume(
"volArm1Mudet", Arm1Box,air);
395 TGeoUniformMagField *magField1 =
new TGeoUniformMagField(0.,-
fField,0.);
396 volArm1->SetField(magField1);
397 volMudetBox ->AddNode(volArm1,ArmNumber,
new TGeoTranslation(0,0,-(
fGapMiddle+
fZArm)/2));
399 Int_t nr = ArmNumber*1E4;
401 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
402 TGeoVolume *volIron =
new TGeoVolume(
"volIron",IronLayer,Iron);
405 for(Int_t i = 0; i <
fNFe; i++)
407 volArm1->AddNode(volIron,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
411 TGeoBBox *RpcContainer =
new TGeoBBox(
"RpcContainer",
fXRpc/2,
fYRpc/2,
fZRpc/2);
412 TGeoVolume *volRpcContainer =
new TGeoVolume(
"volRpcContainer",RpcContainer,air);
415 TGeoVolume *volStrip =
new TGeoVolume(
"volStrip",Strip,Cu);
416 volStrip->SetLineColor(kRed);
417 volRpcContainer->AddNode(volStrip,1,
new TGeoTranslation (0,0,-3.25*
mm));
418 volRpcContainer->AddNode(volStrip,2,
new TGeoTranslation (0,0,3.25*
mm));
419 TGeoBBox *PETinsulator =
new TGeoBBox(
"PETinsulator",
fXPet/2,
fYPet/2,
fZPet/2);
420 TGeoVolume *volPETinsulator =
new TGeoVolume(
"volPETinsulator", PETinsulator, bakelite);
421 volPETinsulator->SetLineColor(kYellow);
422 volRpcContainer->AddNode(volPETinsulator,1,
new TGeoTranslation(0,0,-3.1*
mm));
423 volRpcContainer->AddNode(volPETinsulator,2,
new TGeoTranslation(0,0, 3.1*
mm));
424 TGeoBBox *Electrode =
new TGeoBBox(
"Electrode",
fXEle/2,
fYEle/2,
fZEle/2);
425 TGeoVolume *volElectrode =
new TGeoVolume(
"volElectrode",Electrode,bakelite);
426 volElectrode->SetLineColor(kGreen);
427 volRpcContainer->AddNode(volElectrode,1,
new TGeoTranslation(0,0,-2*
mm));
428 volRpcContainer->AddNode(volElectrode,2,
new TGeoTranslation(0,0, 2*
mm));
430 TGeoVolume *volRpc =
new TGeoVolume(
"volRpc",RpcGas,RPCmat);
431 volRpc->SetLineColor(kCyan);
432 volRpcContainer->AddNode(volRpc,1,
new TGeoTranslation(0,0,0));
434 AddSensitiveVolume(volRpc);
436 for(Int_t i = 0; i <
fNRpc; i++)
444 TGeoBBox *Arm2Box =
new TGeoBBox(
"Arm2MudetBox",
fXFe/2,
fYFe/2,
fZArm/2);
445 TGeoVolume *volArm2 =
new TGeoVolume(
"volArm2Mudet", Arm2Box,air);
446 TGeoUniformMagField *magField2 =
new TGeoUniformMagField(0.,
fField,0.);
447 volArm2->SetField(magField2);
448 volMudetBox ->AddNode(volArm2,1,
new TGeoTranslation(0,0,(
fGapMiddle+
fZArm)/2));
449 TGeoVolume *volIron2 =
new TGeoVolume(
"volIron2",IronLayer,Iron);
453 TGeoVolume *volRpcContainer2 =
new TGeoVolume(
"volRpcContainer2",RpcContainer,air);
454 TGeoVolume *volStrip2 =
new TGeoVolume(
"volStrip2",Strip,Cu);
456 volStrip2->SetLineColor(kRed);
457 volRpcContainer2->AddNode(volStrip2,1,
new TGeoTranslation (0,0,-3.25*
mm));
458 volRpcContainer2->AddNode(volStrip2,2,
new TGeoTranslation (0,0,3.25*
mm));
460 TGeoVolume *volPETinsulator2 =
new TGeoVolume(
"volPETinsulator2", PETinsulator, bakelite);
461 volPETinsulator2->SetLineColor(kYellow);
462 volRpcContainer2->AddNode(volPETinsulator2,1,
new TGeoTranslation(0,0,-3.1*
mm));
463 volRpcContainer2->AddNode(volPETinsulator2,2,
new TGeoTranslation(0,0, 3.1*
mm));
465 TGeoVolume *volElectrode2 =
new TGeoVolume(
"volElectrode2",Electrode,bakelite);
466 volElectrode2->SetLineColor(kGreen);
467 volRpcContainer2->AddNode(volElectrode2,1,
new TGeoTranslation(0,0,-2*
mm));
468 volRpcContainer2->AddNode(volElectrode2,2,
new TGeoTranslation(0,0, 2*
mm));
470 TGeoVolume *volRpc2 =
new TGeoVolume(
"volRpc2",RpcGas,RPCmat);
471 volRpc2->SetLineColor(kCyan);
472 volRpcContainer2->AddNode(volRpc2,1,
new TGeoTranslation(0,0,0));
473 AddSensitiveVolume(volRpc2);
475 for(Int_t i = 0; i <
fNFe; i++)
477 volArm2->AddNode(volIron2,nr + 100 + i,
new TGeoTranslation(0, 0, -
fZArm/2+i*(
fZFe +
fZRpc) +
fZFe/2));
480 for(Int_t i = 0; i <
fNRpc; i++)
486 TGeoBBox *Base =
new TGeoBBox(
"Base",
fXtot/2, 10*
cm/2,
fZtot/2);
487 TGeoVolume *volBase =
new TGeoVolume(
"volBase",Base,Conc);
488 volBase->SetLineColor(kYellow-3);
490 tTauNuDet->AddNode(volBase,1,
new TGeoTranslation(0,-
fYtot/2 + 10*
cm/2,
fZcenter));
494 TGeoVolume *Pillar1Vol =
new TGeoVolume(
"Pillar1Vol",Pillar1Box,Steel);
495 Pillar1Vol->SetLineColor(kGreen+3);
507 TGeoVolumeAssembly *volMudetBox =
new TGeoVolumeAssembly(
"volTauNuMudet");
508 tTauNuDet->AddNode(volMudetBox, 1,
new TGeoTranslation(0,0,
fZcenter));
510 TGeoBBox *IronLayer =
new TGeoBBox(
"Iron",
fXFe/2,
fYFe/2,
fZFe/2);
511 TGeoVolume *volIron =
new TGeoVolume(
"volIron",IronLayer,Iron);
512 volIron->SetLineColor(kGray);
515 TGeoVolume *volIron1 =
new TGeoVolume(
"volIron1",IronLayer1,Iron);
520 TGeoBBox *UpperCover =
new TGeoBBox(
"UpperCover",
fXCov/2,
fYCov/2,
fZCov/2);
521 TGeoVolume *volUpperCover =
new TGeoVolume(
"volUpperCover",UpperCover, Al);
522 volUpperCover->SetLineColor(kYellow-7);
528 TGeoVolume *volLateralCover =
new TGeoVolume(
"volLateralCover",LateralCover, Al);
529 volLateralCover->SetLineColor(kYellow-7);
538 TGeoRotation *Crossrot1 =
new TGeoRotation(
"Crossrot1", 0., 0.,0.); TGeoRotation *Crossrot2 =
new TGeoRotation(
"Crossrot2", 0., 0.,0.);
539 Crossrot1->RotateY(-90); Crossrot2->RotateY(90);
540 Crossrot1->SetName(
"NegativeRot"); Crossrot2->SetName(
"PositiveRot");
541 Crossrot1->RegisterYourself(); Crossrot2->RegisterYourself();
543 TGeoPara *ArmCross1 =
new TGeoPara (
"ArmCross1",
fWidthArm/2.,
fYCross/2,
fXCross/2., TMath::RadToDeg()*Inclination, 0., 0.);
544 ArmCross1->SetName(
"ARMCROSS1");
545 TGeoPara *ArmCross2 =
new TGeoPara (
"ArmCross2",
fWidthArm/2.,
fYCross/2,
fXCross/2., TMath::RadToDeg()*Inclination, 0., 0.);
546 ArmCross2->SetName(
"ARMCROSS2");
547 TGeoCompositeShape *MuCross =
new TGeoCompositeShape(
"MUFILTERCROSS",
"ARMCROSS1:NegativeRot+ARMCROSS2:PositiveRot");
548 TGeoVolume *volMuDetCross =
new TGeoVolume(
"volMuDetCross",MuCross, Al);
549 volMuDetCross->SetLineColor(kYellow-7);
554 IronLayer->SetName(
"MUDETIRON");
555 IronLayer1->SetName(
"MUDETIRON1");
557 Double_t delta = 0.1;
559 Model->SetName(
"MUDETTRIANGLE");
561 TGeoRotation rot(
"rot",90,90,0);
562 TGeoRotation rot1(
"rot1",-90,90,0);
564 const TGeoTranslation transright(
"trans",-
fXFe/2.+
fCutLength/2,0,0);
565 TGeoCombiTrans* combright =
new TGeoCombiTrans(transright,rot);
566 combright->SetName(
"MuDetcombright");
567 combright->RegisterYourself();
569 const TGeoTranslation transleft(
"transleft",+
fXFe/2.-
fCutLength/2,0,0);
570 TGeoCombiTrans* combleft =
new TGeoCombiTrans(transleft,rot1);
571 combleft->SetName(
"MuDetcombleft");
572 combleft->RegisterYourself();
574 TGeoCompositeShape *mudetcut =
new TGeoCompositeShape(
"MUDETCUT",
"(MUDETIRON-MUDETTRIANGLE:MuDetcombright)-MUDETTRIANGLE:MuDetcombleft");
575 mudetcut->SetName(
"MUDETTRIANGCUT");
577 TGeoCompositeShape *mudetcut1 =
new TGeoCompositeShape(
"MUDETCUT1",
"(MUDETIRON1-MUDETTRIANGLE:MuDetcombright)-MUDETTRIANGLE:MuDetcombleft");
578 mudetcut1->SetName(
"MUDETTRIANGCUT1");
582 UpperSupport->SetName(
"MUDETUPSUPPORT");
584 LowerSupport->SetName(
"MUDETLOWSUPPORT");
586 LateralSupport->SetName(
"MUDETLATERALSUPPORT");
589 UpperSupport1->SetName(
"MUDETUPSUPPORT1");
591 LowerSupport1->SetName(
"MUDETLOWSUPPORT1");
593 LateralSupport1->SetName(
"MUDETLATERALSUPPORT1");
605 upright->SetName(
"MuDetupright");
606 upright->RegisterYourself();
607 upleft->SetName(
"MuDetupleft");
608 upleft->RegisterYourself();
609 lowright->SetName(
"MuDetlowright");
610 lowright->RegisterYourself();
611 lowleft->SetName(
"MuDetlowleft");
612 lowleft->RegisterYourself();
614 lateralupleft->SetName(
"MuDetlateralupleft");
615 lateralupleft->RegisterYourself();
616 lateralupright->SetName(
"MuDetlateralupright");
617 lateralupright->RegisterYourself();
618 laterallowleft->SetName(
"MuDetlaterallowleft");
619 laterallowleft->RegisterYourself();
620 laterallowright->SetName(
"MuDetlaterallowright");
621 laterallowright->RegisterYourself();
623 TString *supportaddition =
new TString(
"MUDETTRIANGCUT+MUDETUPSUPPORT:MuDetupright+MUDETUPSUPPORT:MuDetupleft+MUDETLOWSUPPORT:MuDetlowright+MUDETLOWSUPPORT:MuDetlowleft+MUDETLATERALSUPPORT:MuDetlateralupleft+MUDETLATERALSUPPORT:MuDetlateralupright+MUDETLATERALSUPPORT:MuDetlaterallowleft+MUDETLATERALSUPPORT:MuDetlaterallowright");
624 TString *supportaddition1 =
new TString(
"MUDETTRIANGCUT1+MUDETUPSUPPORT1:MuDetupright+MUDETUPSUPPORT1:MuDetupleft+MUDETLOWSUPPORT1:MuDetlowright+MUDETLOWSUPPORT1:MuDetlowleft+MUDETLOWSUPPORT1:MuDetlowleft+MUDETLATERALSUPPORT1:MuDetlateralupleft+MUDETLATERALSUPPORT1:MuDetlateralupright+MUDETLATERALSUPPORT1:MuDetlaterallowleft+MUDETLATERALSUPPORT1:MuDetlaterallowright");
625 TGeoCompositeShape * SupportedIronLayer =
new TGeoCompositeShape(
"SupportedIronLayer",supportaddition->Data());
626 TGeoCompositeShape * SupportedIronLayer1 =
new TGeoCompositeShape(
"SupportedIronLayer1",supportaddition1->Data());
628 TGeoVolume *MudetIronLayer =
new TGeoVolume(
"MudetIronLayer", SupportedIronLayer, Iron);
629 MudetIronLayer->SetLineColor(kRed+2);
630 TGeoVolume *MudetIronLayer1 =
new TGeoVolume(
"MudetIronLayer1", SupportedIronLayer1, Iron);
631 MudetIronLayer1->SetLineColor(kRed+2);
633 for(Int_t i = 0; i <
fNFe; i++)
636 volMudetBox->AddNode(MudetIronLayer,nr + 100 + i,
new TGeoTranslation(0, 0, dz));
641 volMudetBox->AddNode(MudetIronLayer1,nr + 100 +
fNFe + i,
new TGeoTranslation(0, 0,dz));
646 RpcContainer_0->SetName(
"RPCCOINTAINER_0");
671 RpcOuter->SetName(
"RPCOUTER");
673 Indentation->SetName(
"INDENTATION");
674 const TGeoTranslation leftindent(
"leftindent", (
fXRpc_outer-15.*
cm)/2, 0, 0);
675 TGeoCombiTrans* left_ind =
new TGeoCombiTrans(leftindent, rot);
676 left_ind->SetName(
"LEFTINDENT");
677 left_ind->RegisterYourself();
678 const TGeoTranslation rightindent(
"rightindent", (-
fXRpc_outer+15.*
cm)/2, 0, 0);
679 TGeoCombiTrans* right_ind =
new TGeoCombiTrans(rightindent, rot1);
680 right_ind->SetName(
"RIGHTINDENT");
681 right_ind->RegisterYourself();
683 RpcInner->SetName(
"RPCINNER");
684 TGeoTranslation *exclusion =
new TGeoTranslation(0, 0, (-
fZRpc_inner/2) -0.6*
cm);
685 exclusion->SetName(
"EXCLUSION");
686 exclusion->RegisterYourself();
687 TGeoCompositeShape *RpcShell =
new TGeoCompositeShape(
"RpcShell",
"RPCOUTER-INDENTATION:RIGHTINDENT-INDENTATION:LEFTINDENT-RPCINNER:EXCLUSION");
688 TGeoVolume *volRpcShell =
new TGeoVolume(
"volRpcShell", RpcShell, Al);
689 volRpcShell->SetLineColor(kGray);
692 GasShape->SetName(
"RPCGAS");
693 TGeoBBox *GapSpacing =
new TGeoBBox(
"GapSpacing",
fXRpcGap/2, 6./2*
cm, (
fZGas+0.01*
cm)/2 );
694 GapSpacing->SetName(
"GAPSPACE");
695 TGeoTranslation *mdown =
new TGeoTranslation(
"mdown", 0., -(
fYRpcGap+6*
cm)/2, 0.);
696 mdown->SetName(
"MDOWN");
697 mdown->RegisterYourself();
698 TGeoTranslation *mup =
new TGeoTranslation(
"mup",0., (
fYRpcGap+6*
cm)/2, 0.);
700 mup->RegisterYourself();
701 TGeoCompositeShape *RpcGas =
new TGeoCompositeShape(
"RpcGas",
"RPCGAS-GAPSPACE:MUP-GAPSPACE:MDOWN");
702 TGeoVolume *volRpc =
new TGeoVolume(
"volRpc",RpcGas, RPCmat);
703 volRpc->SetLineColor(kCyan);
707 Indentation_0->SetName(
"INDENTATION_0");
708 TGeoCompositeShape *RpcContainer =
new TGeoCompositeShape(
"RpcContainer",
"RPCCOINTAINER_0-INDENTATION_0:RIGHTINDENT-INDENTATION_0:LEFTINDENT");
709 TGeoVolume *volRpcContainer =
new TGeoVolume(
"volRpcContainer",RpcContainer,air);
713 GapShape->SetName(
"RPCGAP");
715 GapSpacing1->SetName(
"GAPSPACE1");
716 TGeoCompositeShape *RpcGap =
new TGeoCompositeShape(
"RpcGap",
"RPCGAP-GAPSPACE1:MUP-GAPSPACE1:MDOWN");
717 TGeoVolume *volRpcGap =
new TGeoVolume(
"volRpcGap",RpcGap, bakelite);
718 volRpcGap->SetLineColor(kOrange);
721 TGeoVolume *volStrip=
new TGeoVolume(
"volStrip", Strip, Cu);
722 volStrip->SetLineColor(kOrange+5);
723 TGeoRotation rot2(
"rot2", 0., 0.,0.);
726 TGeoCombiTrans *comb_1 =
new TGeoCombiTrans(trans_rot, rot2);
729 volRpcContainer->AddNode(volRpcShell,2, comb_1);
731 volRpcContainer->AddNode(volStrip, 2,
new TGeoTranslation(0., 0., -
fZGas/2-
fZRpcGap-
fZStrip/2));
732 volRpcContainer->AddNode(volRpcGap, 1,
new TGeoTranslation(0., 0., (
fZGas+
fZRpcGap)/2));
733 volRpcContainer->AddNode(volRpcGap, 2,
new TGeoTranslation(0., 0., -(
fZGas+
fZRpcGap)/2));
734 volRpcContainer->AddNode(volRpc, 1,
new TGeoTranslation(0., 0., 0.));
736 AddSensitiveVolume(volRpc);
738 for(Int_t i = 0; i <
fNRpc; i++)
743 if(i%2)volMudetBox->AddNode(volRpcContainer,nr + i,
new TGeoTranslation(0, -dy, dz));
744 else{volMudetBox->AddNode(volRpcContainer,nr + i,
new TGeoTranslation(0, dy, dz));}
748 TGeoVolume *Pillar1Vol =
new TGeoVolume(
"Pillar1Vol",Pillar1Box,Steel);
749 Pillar1Vol->SetLineColor(kGreen+3);