163{
164
195
196 int NTungstenPlatesTB24 =
conf_ints[
"EmulsionDet/n_tungsten_plates_tb24"];
197 bool testbeam_2024_setup = false;
198
199 TGeoVolume *
top=gGeoManager->FindVolumeFast(
"Detector");
200 if(!top) LOG(ERROR) << "no Detector volume found " ;
201 gGeoManager->SetVisLevel(10);
202
205
207 TGeoMedium *vacuum =gGeoManager->GetMedium("vacuum");
208
210 TGeoMedium *air =gGeoManager->GetMedium("air");
211
213 TGeoMedium *Al = gGeoManager->GetMedium("Aluminum");
214
216 TGeoMedium *PBase =gGeoManager->GetMedium("PlasticBase");
217
219 TGeoMedium *NEmu =gGeoManager->GetMedium("NuclearEmulsion");
220
221 TGeoMaterial *NEmuMat = NEmu->GetMaterial();
222 TGeoMaterial *PBaseMat = PBase->GetMaterial();
223
224 TGeoMixture * emufilmmixture = new TGeoMixture("EmulsionFilmMixture", 2.00);
226
227 emufilmmixture->AddElement(NEmuMat,frac_emu);
228 emufilmmixture->AddElement(PBaseMat,1. - frac_emu);
229
230 TGeoMedium *Emufilm = new TGeoMedium("EmulsionFilm",100,emufilmmixture);
231
233 TGeoMedium *tungsten = gGeoManager->GetMedium("tungstensifon");
234
235
237
238
239
240
241
242
243 TGeoVolumeAssembly *volTarget = new TGeoVolumeAssembly("volTarget");
244
245
246
247
248
249
250
251
252
253
254
255
256
259
260 TGeoTranslation * Wallborderpos =
new TGeoTranslation(
"Walborderpos",0,0,
WallZBorder_offset);
261 Wallborderpos->RegisterYourself();
262
263 TGeoCompositeShape *Wallborder = new TGeoCompositeShape("wallborder","walltot - (wallint:Walborderpos)");
264 TGeoVolume *volWallborder = new TGeoVolume("volWallborder", Wallborder, Al);
265 volWallborder->SetLineColor(kGray);
266
267 TGeoVolume *volWall = new TGeoVolume("Wall",Wallint,air);
268 TGeoVolume *volWall_2 = new TGeoVolume("Wall_2",Wallint,air);
269
270
272 TGeoVolume *volRow = new TGeoVolume("Row",Row,air);
274 TGeoVolume *volRow_W2 = new TGeoVolume("Row_W2",Row_W2,air);
275
276
278 TGeoVolume *volBrick = new TGeoVolume("Brick",Brick,air);
279 volBrick->SetLineColor(kCyan);
280 volBrick->SetTransparency(1);
281
283 TGeoVolume *volBrick_W2 = new TGeoVolume("Brick_W2",Brick_W2,air);
284 volBrick_W2->SetLineColor(kOrange);
285 volBrick_W2->SetTransparency(1);
286
288 TGeoVolume *volPassive = new TGeoVolume("volPassive",Passive,tungsten);
289 volPassive->SetTransparency(1);
290 volPassive->SetLineColor(kGray);
291
292
293 float UpstreamPlasticThickness = (NPlates-NTungstenPlatesTB24)*
AllPlateWidth;
294
296 float UpstreamPlasticThickness_W2 = UpstreamPlasticThickness - correction_W2;
297 TGeoBBox *Passive_plastic =
new TGeoBBox(
"Passive_plastic", (
EmulsionX-2.)/2, (
EmulsionY-2.)/2, UpstreamPlasticThickness/2);
298 TGeoVolume *volPassive_plastic = new TGeoVolume("volPassive_plastic",Passive_plastic,PBase);
299 volPassive_plastic->SetLineColor(kMagenta);
300 volPassive_plastic->SetVisibility(kTRUE);
301
302 TGeoBBox *Passive_plastic_W2 =
new TGeoBBox(
"Passive_plastic_W2", (
EmulsionX-2.)/2, (
EmulsionY-2.)/2, UpstreamPlasticThickness_W2/2);
303 TGeoVolume *volPassive_plastic_W2 = new TGeoVolume("volPassive_plastic_W2",Passive_plastic_W2,PBase);
304 volPassive_plastic_W2->SetLineColor(kMagenta+2);
305 volPassive_plastic_W2->SetVisibility(kTRUE);
306
307 float accumulatve_width = UpstreamPlasticThickness_W2;
308
309 for(Int_t n=0;
n<NPlates;
n++)
310 {
311 if (n==0 && testbeam_2024_setup){
312 volBrick->AddNode(volPassive_plastic, n,
313 new TGeoTranslation(0,0,-
BrickZ/2 + UpstreamPlasticThickness/2));
314 volBrick_W2->AddNode(volPassive_plastic_W2, n,
new TGeoTranslation(0,0,-
BrickZ/2 + UpstreamPlasticThickness_W2/2));
315 }
316 if (n>=(NPlates-NTungstenPlatesTB24) || !testbeam_2024_setup) {
317 volBrick->AddNode(volPassive, n,
319 if (testbeam_2024_setup){
320
321 volBrick_W2->AddNode(volPassive, n,
324 }
325 }
326 }
327
329 TGeoVolume *volEmulsionFilm = new TGeoVolume("Emulsion",EmulsionFilm,Emufilm);
330 volEmulsionFilm->SetLineColor(kBlue);
331 LOG(INFO) <<
"EmulsionDet : Passive option (0: all active, 1: all passive) set to " <<
fPassiveOption ;
333 if (!testbeam_2024_setup){
334 for(Int_t n=0;
n<NPlates+1;
n++)
335 {
337 }
338 }
339
340 volBrick->SetVisibility(kTRUE);
341 if (testbeam_2024_setup) {
342 volBrick_W2->SetVisibility(kTRUE);
343 }
344
345
349
350 top->AddNode(volTarget,1,
new TGeoTranslation(0,0,0));
351
352
353
355
356 if (!testbeam_2024_setup){
361 }
362 }
363 else {
370 }
371
372
374
376 {
377 volWall->AddNode(volRow,k,
new TGeoTranslation(0, d_cl_y +
BrickY/2,0));
378 if (testbeam_2024_setup){
379 volWall_2->AddNode(volRow_W2,k,
new TGeoTranslation(0, d_cl_y +
BrickY/2,0));
380 }
381
382
384 }
385
386
389 {
390 volRow->AddNode(volBrick,j,
new TGeoTranslation(d_cl_x+
BrickX/2, 0, 0));
391 if (testbeam_2024_setup){
392 volRow_W2->AddNode(volBrick_W2,j,
new TGeoTranslation(d_cl_x+
BrickX/2, 0, 0));
393 }
395 }
396}
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