133{
136 Double_t
mm = 0.1*
cm;
137
138 TGeoVolume *
top=gGeoManager->FindVolumeFast(
"Detector");
139 if(!top) LOG(ERROR) << "no Detector volume found " ;
140
144 TGeoMedium *vac = gGeoManager->GetMedium("vacuums");
146 TGeoMedium *concrete = gGeoManager->GetMedium("Concrete");
148
149 TGeoVolume*
target = gGeoManager->MakeBox(
"Target",TargetMaterial,199.*cm,199.*cm,(
fTargetL/2)*cm);
150 top->AddNode(target, 1,
new TGeoTranslation(0, 0, (
fTargetL/2)*cm));
151
152 TGeoVolume *
sensPlane = gGeoManager->MakeBox(
"sensPlane",vac,199.*cm,199.*cm,1.*
mm);
154 top->AddNode(sensPlane, 13,
new TGeoTranslation(0, 0, (
fTargetL+ 0.11)*cm));
155 AddSensitiveVolume(sensPlane);
156 AddSensitiveVolume(target);
157 }else{
158
159
160
161
162
163
164 float x1=-1140;
165 float x2= 400;
166 float y1=100;
167 float y2=1114;
168 float z1=50;
169 float z2=1500;
170 float dx = (x2-x1)/10./2.;
171 float dy = (y2-y1)/10./2.;
172 float dz = (z2-z1)/10./2.;
174 float rAir = 10.;
175 float cablesDx = 10;
176 float cablesDy = 1;
177
178 TGeoBBox* box_I = new TGeoBBox("box_I",dx,dy,dz);
180 TGeoBBox* box_O = new TGeoBBox("box_O",dx+d,dy+d/2.,dz+d,origin);
181 TGeoTube* hole_air = new TGeoTube("hole_air",0.,rAir,dx);
182 TGeoRotation* RF = new TGeoRotation("R_airTube");
183 RF->SetAngles(0.,0.,90.);
184 TGeoCombiTrans* CombiTrans1 = new TGeoCombiTrans("T_AirTube",-dx/2,0,10.,RF);
185 CombiTrans1->RegisterYourself();
186 TGeoCombiTrans* CombiTrans2 = new TGeoCombiTrans("T_CablesDuct",dx/2,0,10.,RF);
187 CombiTrans2->RegisterYourself();
188 TGeoBBox* hole_cables = new TGeoBBox("hole_cables",cablesDx,cablesDy,dx);
189 double floor_thickness = 25.;
190 double originF[3] = {0,-
dy-floor_thickness,0};
191 TGeoBBox* floor = new TGeoBBox("floor",1.5*dx,floor_thickness,1.5*dz,originF);
192 TGeoCompositeShape* box = new TGeoCompositeShape("box","box_O-box_I-hole_air:T_AirTube-hole_cables:T_CablesDuct");
193 TGeoVolume *volBox = new TGeoVolume("vbox",box,TargetMaterial);
194 TGeoVolume *volFloor = new TGeoVolume("vfloor",floor,concrete);
195 TGeoVolume *sensBox = new TGeoVolume("sensBox",box_I,vac);
196 sensBox->SetLineColor(kGreen);
197 top->AddNode(sensBox, 13);
198 AddSensitiveVolume(sensBox);
199 top->AddNode(volBox, 1);
200 AddSensitiveVolume(volBox);
201 top->AddNode(volFloor, 2);
202 }
203
204}
Int_t InitMedium(TString name)