BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
create_rootgeom_zdc_oldnames_NICA_36mods_no_hole_v1.C
Go to the documentation of this file.
1//---------------------------
2// M.Golubeva (INR RAS), December 2016
3//---------------------------
4
5// create_rootgeom_zdc_oldnames_NICA_36mods_no_hole_v1(Double_t ZDC_Xpos=0,Double_t ZDC_Ypos=0,Double_t
6// ZDC_Zpos=900,Double_t rotY=0) ZDC_Xpos - X coordinate of front surface center [cm] ZDC_Ypos - Y coordinate of front
7// surface center [cm] ZDC_Zpos - Z coordinate of front surface center [cm] rotY - rotation around Y axis [deg.]
8
9// Example of root file creation
10// root -l "create_rootgeom_zdc_oldnames_NICA_36mods_no_hole_v1.C(-20,0,878,0)"
11
12#include "../run/bmnloadlibs.C"
13#include "TFile.h"
14#include "TGeoManager.h"
15#include "TGeoMedium.h"
16#include "TGeoVolume.h"
17
18// Detector's construct parameters ===================
19
20// Global dimensions for ZDC in cm
21Double_t Zdc_X_size = 45.; // 90./2.
22Double_t Zdc_Y_size = 45.; // 90./2.
23Double_t Zdc_Z_size = 44.04; // 7 sect
24
25Double_t Zdc_X_size_NICA = 45.; // 90./2.
27
28// Modules NICA
34
35// media ============================================
43
44class FairGeoMedia;
45class FairGeoBuilder;
46
47void DefineRequiredMedia(FairGeoMedia* geoMedia, FairGeoBuilder* geoBuild)
48{
49 // vacuum medium
50 FairGeoMedium* mVacuum = geoMedia->getMedium("vacuum");
51 if (!mVacuum)
52 Fatal("Main", "FairMedium vacuum not found");
53 geoBuild->createMedium(mVacuum);
54 pMedVacuum = gGeoManager->GetMedium("vacuum");
55 if (!pMedVacuum)
56 Fatal("Main", "Medium vacuum not found");
57
58 // air medium
59 FairGeoMedium* mAir = geoMedia->getMedium("air");
60 if (!mAir)
61 Fatal("Main", "FairMedium air not found");
62 geoBuild->createMedium(mAir);
63 pMedAir = gGeoManager->GetMedium("air");
64 if (!pMedAir)
65 Fatal("Main", "Medium air not found");
66
67 // iron medium
68 FairGeoMedium* mIron = geoMedia->getMedium("iron");
69 if (!mIron)
70 Fatal("Main", "FairMedium iron not found");
71 geoBuild->createMedium(mIron);
72 pMedIron = gGeoManager->GetMedium("iron");
73 if (!pMedIron)
74 Fatal("Main", "Medium iron not found");
75
76 // tyvec medium
77 FairGeoMedium* mTyvec = geoMedia->getMedium("tyvec_ZDC");
78 if (!mTyvec)
79 Fatal("Main", "FairMedium tyvec not found");
80 geoBuild->createMedium(mTyvec);
81 pMedTyvec = gGeoManager->GetMedium("tyvec_ZDC");
82 if (!pMedTyvec)
83 Fatal("Main", "Medium tyvec not found");
84
85 // lead medium
86 FairGeoMedium* mLead = geoMedia->getMedium("lead");
87 if (!mLead)
88 Fatal("Main", "FairMedium lead not found");
89 geoBuild->createMedium(mLead);
90 pMedLead = gGeoManager->GetMedium("lead");
91 if (!pMedLead)
92 Fatal("Main", "Medium lead not found");
93
94 // medium polystyrene (Scint.)
95 FairGeoMedium* mPolystyrene = geoMedia->getMedium("polystyrene");
96 if (!mPolystyrene)
97 Fatal("Main", "FairMedium polystyrene not found");
98 geoBuild->createMedium(mPolystyrene);
99 pMedScint = gGeoManager->GetMedium("polystyrene");
100 if (!pMedScint)
101 Fatal("Main", "Medium polystyrene not found");
102
103 // medium plastic (slot)
104 FairGeoMedium* mPlastic = geoMedia->getMedium("plasticWLS_ZDC");
105 if (!mPlastic)
106 Fatal("Main", "FairMedium plastic not found");
107 geoBuild->createMedium(mPlastic);
108 pMedSlot = gGeoManager->GetMedium("plasticWLS_ZDC");
109 if (!pMedSlot)
110 Fatal("Main", "Medium plastic not found");
111
112} // DefineRequiredMedia
113
114void FillModule_NICA(TGeoVolume* zdcModuleV_NICA);
115
117 Double_t ZDC_Ypos = 0,
118 Double_t ZDC_Zpos = 900,
119 Double_t rotY = 0)
120{
121
122 bmnloadlibs(); // load libraries
123
124 // ---- set working directory -------------------------------------------
125 TString gPath = gSystem->Getenv("VMCWORKDIR");
126
127 // ------- Geometry file name (output) --------------------------------
128 const TString geoDetectorName = "zdc_oldnames_NICA_36mods_no_hole";
129 const TString geoDetectorVersion = "v1";
130 Double_t ZDC_center_Zpos = ZDC_Zpos + Zdc_Z_size * TMath::Cos(rotY * TMath::DegToRad());
131 Double_t ZDC_center_Xpos = ZDC_Xpos + Zdc_Z_size * TMath::Sin(rotY * TMath::DegToRad());
132
133 TString sXshift_1 = "";
134 TString sXshift_2 = "";
135
136 TString sYshift_1 = "";
137 TString sYshift_2 = "";
138
139 TString sZshift_1 = "";
140 TString sZshift_2 = "";
141
142 TString sRotY_1 = "";
143 TString sRotY_2 = "";
144
145 Int_t Xshift_1 = Int_t(ZDC_Xpos); // cm
146 Int_t Xshift_2 = Int_t(0.5 + 100 * (ZDC_Xpos - Int_t(ZDC_Xpos))); // cm
147
148 Int_t Yshift_1 = Int_t(ZDC_Ypos); // cm
149 Int_t Yshift_2 = Int_t(100 * (ZDC_Ypos - Int_t(ZDC_Ypos))); // cm
150
151 Int_t Zshift_1 = Int_t(ZDC_Zpos); // cm
152 Int_t Zshift_2 = Int_t(10 * (ZDC_Zpos - Int_t(ZDC_Zpos))); // cm
153
154 Int_t rotY_1 = Int_t(rotY); // 2
155 Int_t rotY_2 = Int_t(100 * (rotY - Int_t(rotY))); // 9
156
157 sXshift_1 += Xshift_1;
158 sXshift_2 += Xshift_2;
159 sYshift_1 += Yshift_1;
160 sYshift_2 += Yshift_2;
161 sZshift_1 += Zshift_1;
162 sZshift_2 += Zshift_2;
163
164 sRotY_1 += rotY_1;
165 sRotY_2 += rotY_2;
166
167 TString geoFileName = gPath + "/geometry/" + geoDetectorName + "_" + "Zpos_" + sZshift_1 + "." + sZshift_2 + "cm"
168 + "_" + "Xshift_" + sXshift_1 + "." + sXshift_2 + "cm" + "_" + "Yshift_" + sYshift_1 + "."
169 + sYshift_2 + "cm" + "_" + "rotationY_" + sRotY_1 + "." + sRotY_2 + "deg_"
170 + geoDetectorVersion + ".root";
171
172 // ---- global geometry parameters ---------------------------------------
173 FairGeoLoader* geoLoad = new FairGeoLoader("TGeo", "FairGeoLoader");
174 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
175
176 // ------- Load media from media file ----------------------------------
177 TString medFile = gPath + "/geometry/media.geo";
178 geoFace->setMediaFile(medFile);
179 geoFace->readMedia();
180 FairGeoMedia* geoMedia = geoFace->getMedia();
181 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
182 geoMedia->list();
183 geoMedia->print();
184 DefineRequiredMedia(geoMedia, geoBuild);
185
186 // -------------- Create geometry and global top volume --------------------
187 gGeoManager = (TGeoManager*)gROOT->FindObject("FAIRGeom");
188 gGeoManager->SetName(geoDetectorName + "_geom");
189 TGeoVolume* top = new TGeoVolumeAssembly("TOP");
190 top->SetMedium(pMedAir);
191 gGeoManager->SetTopVolume(top);
192 // gGeoMan->SetTopVisible(1);
193
194 // Define ZDC Geometry
195 TString zdc_common_name = "ZDC_common";
196 TGeoVolume* ZDC_common = new TGeoVolumeAssembly(zdc_common_name);
197 ZDC_common->SetMedium(pMedAir);
198 // ZDC_common->SetMedium(pMedVacuum);
199
200 TString zdc_name = "zdc01";
201 TGeoBBox* ZDCS = new TGeoBBox(zdc_name, Zdc_X_size, Zdc_Y_size, Zdc_Z_size);
202 TGeoVolume* ZDCV = new TGeoVolume(zdc_name, ZDCS);
203 ZDCV->SetMedium(pMedAir);
204
205 TString zdcModule_name_NICA = "zdc01m_NICA";
206
207 TGeoBBox* zdcModuleS_NICA =
209 TGeoVolume* zdcModuleV_NICA = new TGeoVolume(zdcModule_name_NICA, zdcModuleS_NICA);
210
211 zdcModuleV_NICA->SetMedium(pMedIron);
212
213 // Fill ZDC with NICA modules
214 Float_t xCur = Zdc_X_size_NICA + Zdc_module_X_size_NICA; // 45+7.5=52.5 cm
215 Float_t yCur = Zdc_Y_size_NICA + Zdc_module_Y_size_NICA; // 45+7.5=52.5 cm
216
217 Int_t iMod = -1, modNb = -1;
218 for (Int_t iy = 0; iy < Zdc_NRows_NICA; iy++) { // 6
219 yCur = yCur - 2. * Zdc_module_Y_size_NICA;
220 for (Int_t ix = 0; ix < Zdc_NColumns_NICA; ix++) { // 6
221 xCur = xCur - 2. * Zdc_module_X_size_NICA;
222
223 TGeoTranslation* zdcModuleV_position_NICA = new TGeoTranslation(xCur, yCur, 0);
224 iMod = iy * Zdc_NColumns_NICA + ix;
225
226 modNb = iMod + 1;
227 ZDCV->AddNode(zdcModuleV_NICA, modNb, zdcModuleV_position_NICA);
228 cout << "NICA modNb,xxxx,yyyy " << modNb << " " << xCur << " " << yCur << endl;
229 if (ix == Zdc_NColumns_NICA - 1)
231 } // for(Int_t ix==0; ix<7; ix++)
232 } // for(Int_t iy==0; iy<7; iy++)
233
234 // return;
235
236 FillModule_NICA(zdcModuleV_NICA);
237
238 // Adding the zdc mother volume to the global TOP Volume
239 TGeoRotation* rot = new TGeoRotation("rot");
240 rot->RotateY(rotY); // in deg.
241 TGeoCombiTrans* zdcZDC = new TGeoCombiTrans("zdcZDC", ZDC_center_Xpos, ZDC_Ypos, ZDC_center_Zpos, rot);
242 ZDC_common->AddNode(ZDCV, 1, zdcZDC); // ZDC right
243
244 top->AddNode(ZDC_common, 0);
246
247 // --------------- Finish ----------------------------------------------
248 gGeoManager->CloseGeometry();
249 gGeoManager->CheckOverlaps(0.001);
250 gGeoManager->PrintOverlaps();
251
252 gGeoManager->Test();
253
254 TFile* geoFile = new TFile(geoFileName, "RECREATE");
255 top->Write();
256 geoFile->Close();
257
258 // TString gdmlname = gPath + "/geometry/tpc_v7.gdml";
259 // gGeoManager->Export(gdmlname);
260
261 // top->Draw("ogl");
262 // TGLViewer *v = (TGLViewer*)gPad->GetViewer3D();
263 // v->SetStyle(TGLRnrCtx::kOutline);
264 // top->Draw("");
265
266} // create_rootgeom_zdc_v1
267
268void FillModule_NICA(TGeoVolume* mother_volume_NICA)
269{
270
271 // Detector's construct parameters ===================
272
273 // Global dimensions for ZDC in cm
274 Double_t Zdc_X_size = 45.; // 90./2.
275 Double_t Zdc_Y_size = 45.; // 90./2.
276 Double_t Zdc_Z_size = 44.04; // 7 sect
277
278 // Modules
279 Double_t Zdc_module_X_size = 7.5; // 15./2.
280 Double_t Zdc_module_Y_size = 7.5; // 15./2.
281 Double_t Zdc_module_Z_size = 44.04; // 7 sect
282
283 // Fe slices
284 Double_t Zdc_Fe_X_size = 7.4; //(15.-2.*0.1)/2.
285 Double_t Zdc_Fe_Y_size = 7.35; //(15.-2.*0.15)/2.
286 Double_t Zdc_Fe_Z_size = 1.; // 2./2.
287
288 // Pb slices
289 Double_t Zdc_NPb_in_module = 41; // 7sect
290 Double_t Zdc_Pb_X_size = 7.4; //(15.-2.*0.1)/2.
291 Double_t Zdc_Pb_Y_size = 7.35; //(15.-2.*0.15)/2.
292 Double_t Zdc_Pb_Z_size = 0.8; // 1.6/2.
293
294 // Scin. slices
295 Double_t Zdc_Sc_X_size = 7.38; //(15.-2.*0.1-2.*0.02)/2.
296 Double_t Zdc_Sc_Y_size = 7.33; //(15.-2.*0.15-2.*0.02)/2.
297 Double_t Zdc_Sc_Z_size = 0.2; // 0.4/2.
298
299 // Tyvec slices
300 Double_t Zdc_NTyvec_in_module = 42; // 7sect
301 Double_t Zdc_Tyvec_X_size = 7.4; //(15.-2.*0.1)/2.
302 Double_t Zdc_Tyvec_Y_size = 7.35; //(15.-2.*0.15)/2.
303 Double_t Zdc_Tyvec_Z_size = 0.22; // 0.44/2.
304
305 // Slot slices (divided by 2)
306 Double_t Zdc_Y_slot_position = 0.75;
307
308 Double_t Zdc_VRFM_X_size = 0.1; // Fe
309 Double_t Zdc_VRFM_Y_size = 6.1;
310 Double_t Zdc_VRFM_Z_size = 1.;
311
312 Double_t Zdc_VRPM_X_size = 0.1; // Pb
313 Double_t Zdc_VRPM_Y_size = 6.1;
314 Double_t Zdc_VRPM_Z_size = 0.8;
315
316 Double_t Zdc_VRYM_X_size = 0.01; // Tyvec_Y
317 Double_t Zdc_VRYM_Y_size = 6.1;
318 Double_t Zdc_VRYM_Z_size = 0.22;
319
320 Double_t Zdc_VRAM_X_size = 0.09; // Tyvec_A
321 Double_t Zdc_VRAM_Y_size = 6.1;
322 Double_t Zdc_VRAM_Z_size = 0.01;
323
324 Double_t Zdc_VRSM_X_size = 0.09; // Scint
325 Double_t Zdc_VRSM_Y_size = 6.1;
326 Double_t Zdc_VRSM_Z_size = 0.2;
327
328 TString Fe_name_NICA = "Fe_NICA";
329 TString slot_Fe_name = "Fe_slot";
330 TString Pb_name_NICA = "zdc01a_NICA";
331 TString slot_Pb_name = "Pb_slot";
332 TString SensitiveVolume_name_NICA = "zdc01s_NICA";
333 TString slot_Sc_name = "Sc_slot";
334 TString Tyvec_name_NICA = "Tyvec_NICA";
335 TString slot_Tyvec_Y_name = "Tyvec_slot_Y";
336 TString slot_Tyvec_A_name = "Tyvec_slot_A";
337
338 // Shapes
339 TGeoShape* FeS_NICA = new TGeoBBox(Fe_name_NICA, Zdc_Fe_X_size, Zdc_Fe_Y_size, Zdc_Fe_Z_size);
340 TGeoVolume* FeV_NICA = new TGeoVolume(Fe_name_NICA, FeS_NICA);
341 TGeoMedium* Fe_medium_NICA = pMedIron; // set medium
342 if (Fe_medium_NICA)
343 FeV_NICA->SetMedium(Fe_medium_NICA);
344 else
345 Fatal("Main", "Invalid medium for Fe_NICA!");
346
347 TGeoShape* PbS_NICA = new TGeoBBox(Pb_name_NICA, Zdc_Pb_X_size, Zdc_Pb_Y_size, Zdc_Pb_Z_size);
348 TGeoVolume* PbV_NICA = new TGeoVolume(Pb_name_NICA, PbS_NICA);
349 TGeoMedium* Pb_medium_NICA = pMedLead; // set medium
350 if (Pb_medium_NICA)
351 PbV_NICA->SetMedium(Pb_medium_NICA);
352 else
353 Fatal("Main", "Invalid medium for Pb_NICA!");
354
355 TGeoShape* zdcSensitiveVolumeS_NICA =
356 new TGeoBBox(SensitiveVolume_name_NICA, Zdc_Sc_X_size, Zdc_Sc_Y_size, Zdc_Sc_Z_size);
357 TGeoVolume* zdcSensitiveVolumeV_NICA = new TGeoVolume(SensitiveVolume_name_NICA, zdcSensitiveVolumeS_NICA);
358 TGeoMedium* Sc_medium_NICA = pMedScint; // set medium
359 if (Sc_medium_NICA)
360 zdcSensitiveVolumeV_NICA->SetMedium(Sc_medium_NICA);
361 else
362 Fatal("Main", "Invalid medium for Sc_NICA!");
363
364 TGeoShape* TyvecS_NICA = new TGeoBBox(Tyvec_name_NICA, Zdc_Tyvec_X_size, Zdc_Tyvec_Y_size, Zdc_Tyvec_Z_size);
365 TGeoVolume* TyvecV_NICA = new TGeoVolume(Tyvec_name_NICA, TyvecS_NICA);
366 TGeoMedium* Tyvec_medium_NICA = pMedTyvec; // set medium
367 if (Tyvec_medium_NICA)
368 TyvecV_NICA->SetMedium(Tyvec_medium_NICA);
369 else
370 Fatal("Main", "Invalid medium for Tyvec_NICA!");
371
372 // Slot's shapes
373 TGeoShape* slot_FeS = new TGeoBBox(slot_Fe_name, Zdc_VRFM_X_size, Zdc_VRFM_Y_size, Zdc_VRFM_Z_size);
374 TGeoVolume* slot_FeV = new TGeoVolume(slot_Fe_name, slot_FeS);
375 TGeoMedium* slot_Fe_medium = pMedSlot; // set medium
376 if (slot_Fe_medium)
377 slot_FeV->SetMedium(slot_Fe_medium);
378 else
379 Fatal("Main", "Invalid medium for slot_Fe!");
380
381 TGeoShape* slot_PbS = new TGeoBBox(slot_Pb_name, Zdc_VRPM_X_size, Zdc_VRPM_Y_size, Zdc_VRPM_Z_size);
382 TGeoVolume* slot_PbV = new TGeoVolume(slot_Pb_name, slot_PbS);
383 TGeoMedium* slot_Pb_medium = pMedSlot; // set medium
384 if (slot_Pb_medium)
385 slot_PbV->SetMedium(slot_Pb_medium);
386 else
387 Fatal("Main", "Invalid medium for slot_Pb!");
388
389 TGeoShape* slot_ScS = new TGeoBBox(slot_Sc_name, Zdc_VRSM_X_size, Zdc_VRSM_Y_size, Zdc_VRSM_Z_size);
390 TGeoVolume* slot_ScV = new TGeoVolume(slot_Sc_name, slot_ScS);
391 TGeoMedium* slot_Sc_medium = pMedSlot; // set medium
392 if (slot_Sc_medium)
393 slot_ScV->SetMedium(slot_Sc_medium);
394 else
395 Fatal("Main", "Invalid medium for slot_Sc!");
396
397 TGeoShape* slot_Tyvec_YS = new TGeoBBox(slot_Tyvec_Y_name, Zdc_VRYM_X_size, Zdc_VRYM_Y_size, Zdc_VRYM_Z_size);
398 TGeoVolume* slot_Tyvec_YV = new TGeoVolume(slot_Tyvec_Y_name, slot_Tyvec_YS);
399 TGeoMedium* slot_Tyvec_Y_medium = pMedSlot; // set medium
400 if (slot_Tyvec_Y_medium)
401 slot_Tyvec_YV->SetMedium(slot_Tyvec_Y_medium);
402 else
403 Fatal("Main", "Invalid medium for slot_Tyvec_Y!");
404
405 TGeoShape* slot_Tyvec_AS = new TGeoBBox(slot_Tyvec_A_name, Zdc_VRAM_X_size, Zdc_VRAM_Y_size, Zdc_VRAM_Z_size);
406 TGeoVolume* slot_Tyvec_AV = new TGeoVolume(slot_Tyvec_A_name, slot_Tyvec_AS);
407 TGeoMedium* slot_Tyvec_A_medium = pMedSlot; // set medium
408 if (slot_Tyvec_A_medium)
409 slot_Tyvec_AV->SetMedium(slot_Tyvec_A_medium);
410 else
411 Fatal("Main", "Invalid medium for slot_Tyvec_A!");
412
413 // insert Fe
414 mother_volume_NICA->AddNode(FeV_NICA, 1, new TGeoTranslation(0, 0, -(Zdc_module_Z_size - Zdc_Fe_Z_size)));
415 FeV_NICA->AddNode(slot_FeV, 1, new TGeoTranslation(Zdc_Fe_X_size - Zdc_VRFM_X_size, Zdc_Y_slot_position, 0.));
416 mother_volume_NICA->AddNode(FeV_NICA, 2, new TGeoTranslation(0, 0, (Zdc_module_Z_size - Zdc_Fe_Z_size)));
417
418 // insert Tyvec
419 mother_volume_NICA->AddNode(
420 TyvecV_NICA, 1, new TGeoTranslation(0, 0, -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - Zdc_Tyvec_Z_size)));
421 cout << "NICA tyvec 1 " << -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - Zdc_Tyvec_Z_size) << endl;
422 TyvecV_NICA->AddNode(slot_Tyvec_YV, 1,
423 new TGeoTranslation((Zdc_Tyvec_X_size - Zdc_VRYM_X_size), Zdc_Y_slot_position, 0));
424 TyvecV_NICA->AddNode(slot_Tyvec_AV, 1,
425 new TGeoTranslation((Zdc_Tyvec_X_size - Zdc_VRAM_X_size - 2. * Zdc_VRYM_X_size),
426 Zdc_Y_slot_position, -(Zdc_Tyvec_Z_size - Zdc_VRAM_Z_size)));
427 TyvecV_NICA->AddNode(slot_Tyvec_AV, 2,
428 new TGeoTranslation((Zdc_Tyvec_X_size - Zdc_VRAM_X_size - 2. * Zdc_VRYM_X_size),
429 Zdc_Y_slot_position, (Zdc_Tyvec_Z_size - Zdc_VRAM_Z_size)));
430
431 // insert Scint into Tyvec
432 TyvecV_NICA->AddNode(zdcSensitiveVolumeV_NICA, 1, new TGeoTranslation(0., 0., 0.));
433 zdcSensitiveVolumeV_NICA->AddNode(
434 slot_ScV, 1,
435 new TGeoTranslation((Zdc_Tyvec_X_size - Zdc_VRAM_X_size - 2. * Zdc_VRYM_X_size), Zdc_Y_slot_position, 0));
436
437 // insert Pb
438 mother_volume_NICA->AddNode(
439 PbV_NICA, 2,
440 new TGeoTranslation(0, 0, -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - 2. * Zdc_Tyvec_Z_size - Zdc_Pb_Z_size)));
441 cout << "NICA Pb 2 " << -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - 2. * Zdc_Tyvec_Z_size - Zdc_Pb_Z_size) << endl;
442 PbV_NICA->AddNode(slot_PbV, 1, new TGeoTranslation((Zdc_Pb_X_size - Zdc_VRPM_X_size), Zdc_Y_slot_position, 0));
443 slot_PbV->SetLineColor(kBlue);
444
445 // insert Tyvec slices
446 Double_t itInit = -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - Zdc_Tyvec_Z_size);
447 Double_t itCur = 0, itDelta = 2. * (Zdc_Pb_Z_size + Zdc_Tyvec_Z_size);
448 for (Int_t it = 1 + 1; it < Zdc_NTyvec_in_module + 1; it++)
449 { // 60 slices (1-60), the first slice is already inserted
450 itCur = itInit + (it - 1) * itDelta;
451 mother_volume_NICA->AddNode(TyvecV_NICA, it, new TGeoTranslation(0, 0, itCur));
452 cout << "NICA it,itCur Ty " << it << " " << itCur << endl;
453 }
454
455 // insert Pb slices
456 itInit = -(Zdc_module_Z_size - 2. * Zdc_Fe_Z_size - 2. * Zdc_Tyvec_Z_size - Zdc_Pb_Z_size);
457 itCur = 0;
458 itDelta = 2. * (Zdc_Pb_Z_size + Zdc_Tyvec_Z_size);
459 for (Int_t it = 1 + 2; it < Zdc_NPb_in_module + 2; it++) { // 59 slices (2-60), the first slice is already
460 // inserted
461 itCur = itInit + (it - 2) * itDelta;
462 mother_volume_NICA->AddNode(PbV_NICA, it, new TGeoTranslation(0, 0, itCur));
463 cout << "NICA it,itCur Pb " << it << " " << itCur << endl;
464 }
465
466 cout << "Zdc_module_Z_size " << Zdc_module_Z_size << endl;
467
468} // FillModule_NICA
int Int_t
float Float_t
double Double_t
constexpr Bool_t kTRUE
kBlue
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TGeoManager * gGeoManager
#define gROOT
R__EXTERN TSystem * gSystem
void Close(Option_t *option="") override
void RotateY(Double_t angle) override
void SetVisContainers(Bool_t flag=kTRUE) override
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
virtual void SetMedium(TGeoMedium *medium)
void SetLineColor(Color_t lcolor) override
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
void create_rootgeom_zdc_oldnames_NICA_36mods_no_hole_v1(Double_t ZDC_Xpos=0, Double_t ZDC_Ypos=0, Double_t ZDC_Zpos=900, Double_t rotY=0)
void DefineRequiredMedia(FairGeoMedia *geoMedia, FairGeoBuilder *geoBuild)
void FillModule_NICA(TGeoVolume *zdcModuleV_NICA)
constexpr Double_t DegToRad()
Double_t Cos(Double_t)
Double_t Sin(Double_t)