11 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
14 gSystem->Load(
"libGeoBase");
15 gSystem->Load(
"libParBase");
16 gSystem->Load(
"libBase");
17 gSystem->Load(
"libPndData");
18 gSystem->Load(
"libPassive");
22 TFile*
fi =
new TFile(outfile,
"RECREATE");
24 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
25 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
26 geoFace->setMediaFile(
"../../../geometry/media_pnd.geo");
30 FairGeoMedia *
Media = geoFace->getMedia();
31 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
33 FairGeoMedium *MediumSci = Media->getMedium(
"polyvinyltoluene");
34 FairGeoMedium *MediumSiPm = Media->getMedium(
"silicon");
35 FairGeoMedium *MediumCard = Media->getMedium(
"pcbmvd");
38 Int_t
nmed=geobuild->createMedium(MediumSci);
39 nmed=geobuild->createMedium(MediumSiPm);
40 nmed=geobuild->createMedium(MediumCard);
42 TGeoManager*
gGeoMan = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
43 TGeoVolume *
top =
new TGeoVolumeAssembly(
"SciT");
46 gGeoMan->SetTopVolume(top);
55 TileShape =
new TGeoBBox(
"SciTil_logicTile", 4.3475, 0.25, 1.47);
58 TileVol =
new TGeoVolume(
"SciTil_SENSOR",TileShape, gGeoMan->GetMedium(
"polyvinyltoluene"));
59 TileVol->SetLineColor(kBlue);
61 TGeoBBox* SiPmShape=
new TGeoBBox(
"SiPm_logicSiPm",0.215,0.1925,0.0725);
62 TGeoVolume* SiPmVol=
new TGeoVolume(
"SiPm",SiPmShape, gGeoMan->GetMedium(
"silicon"));
63 SiPmVol->SetLineColor(kRed);
65 TGeoBBox* CardShape=
new TGeoBBox(
"Card_logicCard",0.005,0.25,1.4);
66 TGeoVolume* CardVol=
new TGeoVolume(
"SciTil_Card",CardShape, gGeoMan->GetMedium(
"pcbmvd"));
67 CardVol->SetLineColor(kYellow);
69 TGeoBBox* CardOutShape=
new TGeoBBox(
"CardOut_logicCard",0.5,0.075,90.);
70 TGeoVolume* CardOutVol=
new TGeoVolume(
"SciTil_CardOut",CardOutShape, gGeoMan->GetMedium(
"pcbmvd"));
71 CardOutVol->SetLineColor(kGreen);
76 TGeoVolumeAssembly* LineAssVol =
new TGeoVolumeAssembly(
"SciTil_Line");
78 TGeoRotation* rot_SiPm =
new TGeoRotation;
79 LineAssVol->AddNode(TileVol,0,
new TGeoCombiTrans(4.4975, 0., 0.,
new TGeoRotation (0)));
80 LineAssVol->AddNode(TileVol,1,
new TGeoCombiTrans(-4.4975, 0., 0.,
new TGeoRotation (0)));
82 rot_SiPm.SetAngles(90.,90.,90.);
83 LineAssVol->AddNode(SiPmVol,0,
new TGeoCombiTrans(8.9175, 0., 1.06875, rot_SiPm));
84 LineAssVol->AddNode(SiPmVol,1,
new TGeoCombiTrans(8.9175, 0., 0.35625, rot_SiPm));
85 LineAssVol->AddNode(SiPmVol,2,
new TGeoCombiTrans(8.9175, 0., -0.35625, rot_SiPm));
86 LineAssVol->AddNode(SiPmVol,3,
new TGeoCombiTrans(8.9175, 0., -1.06875, rot_SiPm));
88 LineAssVol->AddNode(SiPmVol,4,
new TGeoCombiTrans(0.0775, 0., 1.06875, rot_SiPm));
89 LineAssVol->AddNode(SiPmVol,5,
new TGeoCombiTrans(0.0775, 0., 0.35625, rot_SiPm));
90 LineAssVol->AddNode(SiPmVol,6,
new TGeoCombiTrans(0.0775, 0., -0.35625, rot_SiPm));
91 LineAssVol->AddNode(SiPmVol,7,
new TGeoCombiTrans(0.0775, 0., -1.06875, rot_SiPm));
93 LineAssVol->AddNode(SiPmVol,8,
new TGeoCombiTrans(-0.0775, 0., 1.06875, rot_SiPm));
94 LineAssVol->AddNode(SiPmVol,9,
new TGeoCombiTrans(-0.0775, 0., 0.35625, rot_SiPm));
95 LineAssVol->AddNode(SiPmVol,10,
new TGeoCombiTrans(-0.0775, 0., -0.35625, rot_SiPm));
96 LineAssVol->AddNode(SiPmVol,11,
new TGeoCombiTrans(-0.0775, 0., -1.06875, rot_SiPm));
98 LineAssVol->AddNode(SiPmVol,12,
new TGeoCombiTrans(-8.9175, 0., 1.06875, rot_SiPm));
99 LineAssVol->AddNode(SiPmVol,13,
new TGeoCombiTrans(-8.9175, 0., 0.35625, rot_SiPm));
100 LineAssVol->AddNode(SiPmVol,14,
new TGeoCombiTrans(-8.9175, 0., -0.35625, rot_SiPm));
101 LineAssVol->AddNode(SiPmVol,15,
new TGeoCombiTrans(-8.9175, 0., -1.06875, rot_SiPm));
103 LineAssVol->AddNode(CardVol,0,
new TGeoCombiTrans(8.995, 0., 0.,
new TGeoRotation (0)));
104 LineAssVol->AddNode(CardVol,1,
new TGeoCombiTrans(0., 0., 0.,
new TGeoRotation (0)));
105 LineAssVol->AddNode(CardVol,2,
new TGeoCombiTrans(-8.995, 0., 0.,
new TGeoRotation (0)));
109 TGeoVolumeAssembly* SModAssVol =
new TGeoVolumeAssembly(
"SciTil_Mod");
112 for(
int j=0;j<60;j++){
114 SModAssVol->AddNode(LineAssVol, j,
new TGeoCombiTrans(0., 0., dz,
new TGeoRotation (0)));
116 SModAssVol->AddNode(CardOutVol, 0,
new TGeoCombiTrans(8.995, 0.325, 0.,
new TGeoRotation (0)));
117 SModAssVol->AddNode(CardOutVol, 1,
new TGeoCombiTrans(0., 0.325, 0.,
new TGeoRotation (0)));
118 SModAssVol->AddNode(CardOutVol, 2,
new TGeoCombiTrans(-8.995, 0.325, 0.,
new TGeoRotation (0)));
122 TGeoVolumeAssembly* BarrelAssVol =
new TGeoVolumeAssembly(
"SciTil_barrel");
133 Double_t phi0 = (180.-2.*pipehAngle)/bbnum + pipehAngle;
134 Double_t dphi = (180.-2.*pipehAngle)/bbnum*2.;
137 Double_t dx_bbox, dy_bbox, dz_bbox, phi_curr;
139 for(Int_t
m = 0;
m < bbnum;
m ++){
140 phi_curr = (90. - phi0 - dphi*
m)/180.*pi;
141 if(
m > bbnum/2-1){ phi_curr = (90. - phi0 - dphi*
m - 2.*pipehAngle)/180.*pi; }
142 dx_bbox = radius *
cos(phi_curr);
143 dy_bbox = radius *
sin(phi_curr);
145 TGeoRotation rot_bbox;
146 rot_bbox.RotateZ( -phi0 -
m*dphi - (TMath::Floor(2.*
m/bbnum))*(2.*pipehAngle));
147 BarrelAssVol->AddNode(SModAssVol,
m,
new TGeoCombiTrans(dx_bbox, dy_bbox, 0,
new TGeoRotation(rot_bbox)));
151 top->AddNode(BarrelAssVol,0,
new TGeoCombiTrans(0.,0.,32.,
new TGeoRotation()));
155 gGeoMan->SetVisLevel(5);
156 gGeoMan->CloseGeometry();
friend F32vec4 cos(const F32vec4 &a)
int create_scit_rootgeo_201601(Double_t distance=750)
friend F32vec4 sin(const F32vec4 &a)
FairGeoBuilder * geobuild
FairGeoInterface * geoFace