163{
164
195
196 int NTungstenPlatesTB24 =
conf_ints[
"EmulsionDet/n_tungsten_plates_tb24"];
197 bool testbeam_2024_setup = false;
198 if (NTungstenPlatesTB24 > 0) {
199 testbeam_2024_setup = true;
200 }
201
202 TGeoVolume *
top=gGeoManager->FindVolumeFast(
"Detector");
203 if(!top) LOG(ERROR) << "no Detector volume found " ;
204 gGeoManager->SetVisLevel(10);
205
208
210 TGeoMedium *vacuum =gGeoManager->GetMedium("vacuum");
211
213 TGeoMedium *air =gGeoManager->GetMedium("air");
214
216 TGeoMedium *Al = gGeoManager->GetMedium("Aluminum");
217
219 TGeoMedium *PBase =gGeoManager->GetMedium("PlasticBase");
220
222 TGeoMedium *NEmu =gGeoManager->GetMedium("NuclearEmulsion");
223
224 TGeoMaterial *NEmuMat = NEmu->GetMaterial();
225 TGeoMaterial *PBaseMat = PBase->GetMaterial();
226
227 TGeoMixture * emufilmmixture = new TGeoMixture("EmulsionFilmMixture", 2.00);
229
230 emufilmmixture->AddElement(NEmuMat,frac_emu);
231 emufilmmixture->AddElement(PBaseMat,1. - frac_emu);
232
233 TGeoMedium *Emufilm = new TGeoMedium("EmulsionFilm",100,emufilmmixture);
234
236 TGeoMedium *tungsten = gGeoManager->GetMedium("tungstensifon");
237
238
240
241
242
243
244
245
246 TGeoVolumeAssembly *volTarget = new TGeoVolumeAssembly("volTarget");
247
248
249
250
251
252
253
254
255
256
257
258
259
262
263 TGeoTranslation * Wallborderpos =
new TGeoTranslation(
"Walborderpos",0,0,
WallZBorder_offset);
264 Wallborderpos->RegisterYourself();
265
266 TGeoCompositeShape *Wallborder = new TGeoCompositeShape("wallborder","walltot - (wallint:Walborderpos)");
267 TGeoVolume *volWallborder = new TGeoVolume("volWallborder", Wallborder, Al);
268 volWallborder->SetLineColor(kGray);
269
270 TGeoVolume *volWall = new TGeoVolume("Wall",Wallint,air);
271 TGeoVolume *volWall_2 = new TGeoVolume("Wall_2",Wallint,air);
272
273
275 TGeoVolume *volRow = new TGeoVolume("Row",Row,air);
277 TGeoVolume *volRow_W2 = new TGeoVolume("Row_W2",Row_W2,air);
278
279
281 TGeoVolume *volBrick = new TGeoVolume("Brick",Brick,air);
282 volBrick->SetLineColor(kCyan);
283 volBrick->SetTransparency(1);
284
286 TGeoVolume *volBrick_W2 = new TGeoVolume("Brick_W2",Brick_W2,air);
287 volBrick_W2->SetLineColor(kOrange);
288 volBrick_W2->SetTransparency(1);
289
291 TGeoVolume *volPassive = new TGeoVolume("volPassive",Passive,tungsten);
292 volPassive->SetTransparency(1);
293 volPassive->SetLineColor(kGray);
294
295
296 float UpstreamPlasticThickness = (NPlates-NTungstenPlatesTB24)*
AllPlateWidth;
297
299 float UpstreamPlasticThickness_W2 = UpstreamPlasticThickness - correction_W2;
300 TGeoBBox *Passive_plastic =
new TGeoBBox(
"Passive_plastic", (
EmulsionX-2.)/2, (
EmulsionY-2.)/2, UpstreamPlasticThickness/2);
301 TGeoVolume *volPassive_plastic = new TGeoVolume("volPassive_plastic",Passive_plastic,PBase);
302 volPassive_plastic->SetLineColor(kMagenta);
303 volPassive_plastic->SetVisibility(kTRUE);
304
305 TGeoBBox *Passive_plastic_W2 =
new TGeoBBox(
"Passive_plastic_W2", (
EmulsionX-2.)/2, (
EmulsionY-2.)/2, UpstreamPlasticThickness_W2/2);
306 TGeoVolume *volPassive_plastic_W2 = new TGeoVolume("volPassive_plastic_W2",Passive_plastic_W2,PBase);
307 volPassive_plastic_W2->SetLineColor(kMagenta+2);
308 volPassive_plastic_W2->SetVisibility(kTRUE);
309
310 float accumulatve_width = UpstreamPlasticThickness_W2;
311
312 for(Int_t n=0;
n<NPlates;
n++)
313 {
314 if (n==0 && testbeam_2024_setup){
315 volBrick->AddNode(volPassive_plastic, n,
316 new TGeoTranslation(0,0,-
BrickZ/2 + UpstreamPlasticThickness/2));
317 volBrick_W2->AddNode(volPassive_plastic_W2, n,
new TGeoTranslation(0,0,-
BrickZ/2 + UpstreamPlasticThickness_W2/2));
318 }
319 if (n>=(NPlates-NTungstenPlatesTB24) || !testbeam_2024_setup) {
320 volBrick->AddNode(volPassive, n,
322 if (testbeam_2024_setup){
323
324 volBrick_W2->AddNode(volPassive, n,
327 }
328 }
329 }
330
332 TGeoVolume *volEmulsionFilm = new TGeoVolume("Emulsion",EmulsionFilm,Emufilm);
333 volEmulsionFilm->SetLineColor(kBlue);
334 LOG(INFO) <<
"EmulsionDet : Passive option (0: all active, 1: all passive) set to " <<
fPassiveOption ;
336 if (!testbeam_2024_setup){
337 for(Int_t n=0;
n<NPlates+1;
n++)
338 {
340 }
341 }
342
343 volBrick->SetVisibility(kTRUE);
344 if (testbeam_2024_setup) {
345 volBrick_W2->SetVisibility(kTRUE);
346 }
347
348
352
353 top->AddNode(volTarget,1,
new TGeoTranslation(0,0,0));
354
355
356
358
359 if (!testbeam_2024_setup){
364 }
365 }
366 else {
373 }
374
375
377
379 {
380 volWall->AddNode(volRow,k,
new TGeoTranslation(0, d_cl_y +
BrickY/2,0));
381 if (testbeam_2024_setup){
382 volWall_2->AddNode(volRow_W2,k,
new TGeoTranslation(0, d_cl_y +
BrickY/2,0));
383 }
384
385
387 }
388
389
392 {
393 volRow->AddNode(volBrick,j,
new TGeoTranslation(d_cl_x+
BrickX/2, 0, 0));
394 if (testbeam_2024_setup){
395 volRow_W2->AddNode(volBrick_W2,j,
new TGeoTranslation(d_cl_x+
BrickX/2, 0, 0));
396 }
398 }
399}
Double_t PassiveThickness
Double_t WallZBorder_offset
Double_t PlasticBaseThickness
Int_t InitMedium(const char *name)
Double_t EmulsionThickness
std::map< TString, Float_t > conf_floats
std::map< TString, Int_t > conf_ints