FairRoot/PandaRoot
createRootGeoFileBwEnd_StraightGeo.C
Go to the documentation of this file.
1 {
2  // This macro creates the Backward EndCap (BwEndCap) geometry
3  // of the EMC detector for PANDA.
4  // The straight crystals with the size of 26x26x200 mm^3 are used
5  //
6  // Autor: Aleksandra Biegun, KVI (27.02.2009)
7 
8  //-----------------------------
9  const Double_t kSpaceInBox = 0.06; // Space in Box (cm)
10  const Double_t kSpaceInSub = 0.024; // Space in Subunit (cm)
11  const Double_t kSpaceSubGlue = 0.036; // Thickness of glued alveole
12  // between Boxes in Subunit (cm)
13  const Double_t kAlveoleThickness = 0.018;// Thickness of alveole between Subunits (cm)
14 
15  const Int_t kNumOfQuarters = 1; // Number of Quarter - only 1 is created, next 3 are copies at the end of the file
16  const Int_t kNumOfBoxes = 4; // Numbers of Boxes in one Subunit
17  const Int_t kNumOfCrystals = 4; // Numbers of Crystals in one Box
18 
19 
20  Double_t tr = 2.6; // Size of the Crystal in its center (cm)
21 
22  Double_t b1 = 2.6000-0.5*tr; // Back-tilted part (-Z direction) of the Crystal center (cm)
23  Double_t b2 = b1;//2.4375-0.5*tr; // Front-tilted part (+Z direction) of the Crystal center (cm)
24 
25  Double_t dz,vert[20]; // Parameters for TGeoArb8 shape of crystal (cm)
27 
28  // Parameters for crystal shape: front size: 26.0(mm) x 26.0(mm)
29  // back size: 26.0(mm) x 26.0(mm)
30 
31  dz = 10.000;
32  // first four vertices - in -Z direction
33  vert[0] = -0.5*tr;
34  vert[1] = -0.5*tr;
35  vert[2] = -0.5*tr;
36  vert[3] = +b1;
37  vert[4] = +b1;
38  vert[5] = +b1;
39  vert[6] = +b1;
40  vert[7] = -0.5*tr;
41 
42  // second four vertices - in +Z direction
43  vert[8] = -0.5*tr;
44  vert[9] = -0.5*tr;
45  vert[10] = -0.5*tr;
46  vert[11] = +b2;
47  vert[12] = +b2; // Tapered right side the front face
48  vert[13] = +b2; // of the crystal (upper corner)
49  vert[14] = +b2; // Tapered right side the front face
50  vert[15] = -0.5*tr; // of the crystal (lower corner)
51 
52 
53  // Box size (4 crystals) - creation a SIZE for BOX shape
54  for (Int_t i=0; i< 16; i++){
55  Double_t spaces = 0.5*kSpaceInBox + kSpaceInSub;
56  if (i==0 || i==1)
57  {
58  vertBox[i] = (-vert[3] - spaces); // lower-left corner back-side
59  }
60  else if (i==8 || i==9)
61  {
62  vertBox[i] = (-vert[11] - spaces); // lower-left corner front-side
63  }
64  else if (i==7 || i==15)
65  {
66  vertBox[i] = (-vert[i-1] - spaces); // lower-right points (front & back sides)
67  }
68  else if (i==2 || i==10) // upper-left points (front & back sides)
69  {
70  vertBox[i] = (-vert[i+1] - spaces);
71  }
72  else
73  {
74  vertBox[i] = (vert[i] + spaces); // rest of those points
75  }
76  }
77 
78  // Subunit size (16 crystals, 4 boxes) - creation a SIZE for SUBUNIT shape
79  for (Int_t i=0; i< 16; i++){
80  Double_t spacesSub = 0.5*kSpaceSubGlue + kAlveoleThickness;
81  if (i==0 || i==1)
82  {
83  vertSub[i] = (vertBox[i]*2 - spacesSub); // lower-left corner back-side
84  }
85  else if (i==8 || i==9)
86  {
87  vertSub[i] = (vertBox[i]*2 - spacesSub); // lower-left corner front-side
88  }
89  else if (i==7 || i==15)
90  {
91  vertSub[i] = (vertBox[i]*2 - spacesSub);
92  }
93  else if (i==2 || i==10)
94  {
95  vertSub[i] = (vertBox[i]*2 - spacesSub);
96  }
97  else
98  {
99  vertSub[i] = (vertBox[i]*2 + spacesSub);
100  }
101  }
102 
103  // Quarter size (Max is: 9X9 Subunits)
105  for (Int_t i=0; i< 16; i++){
106  if (i==0 || i==1)
107  {
108  vertQuar[i] = (vertSub[i]*9 - spacesQuar); // lower-left corner back-side
109  }
110  else if (i==8 || i==9)
111  {
112  vertQuar[i] = (vertSub[i]*9 - spacesQuar); // lower-left corner front-side
113  }
114  else if (i==7 || i==15)
115  {
116  vertQuar[i] = (vertSub[i]*9 - spacesSub);
117  }
118  else if (i==2 || i==10)
119  {
120  vertQuar[i] = (vertSub[i]*9 - spacesQuar);
121  }
122  else
123  {
124  vertQuar[i] = (vertSub[i]*9 + spacesQuar);
125  }
126  }
127 
128  //--------------------------------------------------------------------
129  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
130 
131  // Load this example libraries
132  gSystem->Load("libGeoBase");
133  gSystem->Load("libParBase");
134  gSystem->Load("libBase");
135  gSystem->Load("libPndData");
136  gSystem->Load("libPassive");
137 
138  TString outfile= "../../geometry/emc_module4_StraightGeo.root";
139  TFile* fi = new TFile(outfile,"RECREATE");
140 
141  FairGeoLoader* geoLoad = new FairGeoLoader("TGeo","FairGeoLoader");
142  FairGeoInterface *geoFace = geoLoad->getGeoInterface();
143  geoFace->setMediaFile("../../geometry/media_pnd.geo");
144  geoFace->readMedia();
145  geoFace->print();
146 
147  FairGeoMedia *Media = geoFace->getMedia();
148  FairGeoBuilder *geobuild=geoLoad->getGeoBuilder();
149 
150  FairGeoMedium *CbmMediumAir = Media->getMedium("air");
151  FairGeoMedium *CbmMediumPWO = Media->getMedium("PWO");
152  FairGeoMedium *CbmMediumCarbon = Media->getMedium("carbon");
153  FairGeoMedium *CbmMediumAluminium = Media->getMedium("aluminium");
154 
155  Int_t nmed=geobuild->createMedium(CbmMediumAir);
156  nmed=geobuild->createMedium(CbmMediumPWO);
157  nmed=geobuild->createMedium(CbmMediumCarbon);
158  nmed=geobuild->createMedium(CbmMediumAluminium);
159 
160  TGeoManager* gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom");
161 
162  //construct the overall box
163  Double_t sizeOfQuar = 42.752; // size of one Quarter (the same in X and Y direction)
164  // size of one Subunit (back side): 10.688*4 = 42.752 (cm)
165 
166  TGeoVolume *top = new TGeoVolumeAssembly("Emc4");
167 
168  gGeoMan->SetTopVolume(top);
169 
170  TGeoTranslation trQuar;
171  TGeoTranslation trSub;
172  TGeoTranslation trBox;
173  TGeoTranslation trCrystal;
174 
175  TGeoRotation rotQuar;
176  TGeoRotation rotSub;
177  TGeoRotation rotBox;
178  TGeoRotation rotCrystal;
179 
180  TGeoShape* QuarterShape;
181  TGeoShape* SubunitShape;
182  TGeoShape* BoxShape;
183  TGeoShape* CrystalShape;
184 
185  TGeoVolume* QuarterVol;
186  TGeoVolume* SubunitVol;
187  TGeoVolume* SubunitVol1;
188  TGeoVolume* SubunitVol2;
189  TGeoVolume* SubunitVol3;
190  TGeoVolume* SubunitVol4;
191  TGeoVolume* SubunitVol5;
192  TGeoVolume* SubunitVol6;
193  TGeoVolume* SubunitVol7;
194  TGeoVolume* SubunitVol8;
195  TGeoVolume* SubunitVol9;
196  TGeoVolume* BoxVol;
197  TGeoVolume* BoxVol1;
198  TGeoVolume* BoxVol2;
199  TGeoVolume* BoxVol3;
200  TGeoVolume* BoxVol4;
201  TGeoVolume* CrystalVol;
202 
204 
205  // ========== QUARTER (13 subunits) ===================
206  cout<< "-----------------------------------------------> Quarter VOLUME " <<endl;
207  name = "QuarterShape";
208  QuarterShape = new TGeoArb8(name,dz,vertQuar);
209 
210  name = "Quarter4Vol";
211  TString medium="air";
212 
213  QuarterVol = new TGeoVolumeAssembly(name);
214 
215  // ========== SUBUNIT (16 crystals) ===================
216  name = "SubunitShape";
217  SubunitShape = new TGeoArb8(name,dz,vertSub);
218 
219  TString medium="air";
220 
221  // SubunitVol = new TGeoVolume(name,SubunitShape,gGeoMan->GetMedium(medium));
222  name = "SubunitVol";
223  name1 = "SubunitVol1";
224  name2 = "SubunitVol2";
225  name3 = "SubunitVol3";
226  name4 = "SubunitVol4";
227  name5 = "SubunitVol5";
228  name6 = "SubunitVol6";
229  name7 = "SubunitVol7";
230  name8 = "SubunitVol8";
231  name9 = "SubunitVol9";
232  SubunitVol = new TGeoVolumeAssembly(name);
233  SubunitVol1 = new TGeoVolumeAssembly(name1);
234  SubunitVol2 = new TGeoVolumeAssembly(name2);
235  SubunitVol3 = new TGeoVolumeAssembly(name3);
236  SubunitVol4 = new TGeoVolumeAssembly(name4);
237  SubunitVol5 = new TGeoVolumeAssembly(name5);
238  SubunitVol6 = new TGeoVolumeAssembly(name6);
239  SubunitVol7 = new TGeoVolumeAssembly(name7);
240  SubunitVol8 = new TGeoVolumeAssembly(name8);
241  SubunitVol9 = new TGeoVolumeAssembly(name9);
242 
243  // ========== BOX (4 crystals) ========================
244  name = "BoxShape";
245  BoxShape = new TGeoArb8(name,dz,vertBox);
246 
247  TString medium="air";
248  name="BoxVol";
249  //BoxVol = new TGeoVolume(name,BoxShape,gGeoMan->GetMedium(medium));
250  BoxVol = new TGeoVolumeAssembly(name);
251 
252  // To avoid overlaps for Box Volumes use TGeoVolumeAssembly for your analysis
253  // Box Shapes have been changed and not corrected yet,
254  // nevertheless only Crystals are active volumes
255  name1="BoxVol1";
256  name2="BoxVol2";
257  name3="BoxVol3";
258  name4="BoxVol4";
259  //BoxVol1 = new TGeoVolume(name1,BoxShape,gGeoMan->GetMedium(medium));
260  //BoxVol2 = new TGeoVolume(name2,BoxShape,gGeoMan->GetMedium(medium));
261  //BoxVol3 = new TGeoVolume(name3,BoxShape,gGeoMan->GetMedium(medium));
262  //BoxVol4 = new TGeoVolume(name4,BoxShape,gGeoMan->GetMedium(medium));
263  BoxVol1 = new TGeoVolumeAssembly(name1);
264  BoxVol2 = new TGeoVolumeAssembly(name2);
265  BoxVol3 = new TGeoVolumeAssembly(name3);
266  BoxVol4 = new TGeoVolumeAssembly(name4);
267 
268  // Translations and Rotations for Boxes are according to the local
269  // co-ordinate system, which is in the center of the Subunit.
270  // For the straight geometry, both, front & back sides are 26mm x 26 mm,
271  // so, the angle = 0. (e.g. rotBox.RotateX(0.);)
272  for(Int_t b=0; b<kNumOfBoxes; b++){
273  cout << " " << endl;
274  cout << "----------------> BOX number: " << b <<endl;
275  if (b==0) {
276  trBox = new TGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox, 0.);
277  rotBox = new TGeoRotation();
278  rotBox.RotateX(0.); // rotation in "up" direction
279  rotBox.RotateY(0.); // rotation in "right" direction
280  }
281  if (b==1) {
282  trBox = new TGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox, 0.);
283  rotBox = new TGeoRotation();
284  rotBox.RotateX(0.); // rotation in "down" direction
285  rotBox.RotateY(0.); // rotation in "left" direction
286  }
287  if (b==2) {
288  trBox = new TGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox, 0.);
289  rotBox = new TGeoRotation();
290  rotBox.RotateX(0.); // rotation in "down" direction
291  rotBox.RotateY(0.); // rotation in "right" direction
292  }
293  if (b==3) {
294  trBox = new TGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox, 0.);
295  rotBox = new TGeoRotation();
296  rotBox.RotateX(0.); // rotation in "up" direction
297  rotBox.RotateY(0.); // rotation in "left" direction
298  }
299  TGeoCombiTrans* trrotBox= new TGeoCombiTrans(trBox,rotBox);
300 
301  name="BoxVol";
302 
303  name+=b;
304  trrotBox->SetName(name);
305  trrotBox->RegisterYourself();
306 
307  SubunitVol->AddNode(BoxVol,b,trrotBox);
308  //top->AddNode(BoxVol,b,trrotBox);
309 
310  //differentc conditions: depends on combination of crystals in Box
311  if (b==1){
312  name+=b;
313  trrotBox->SetName(name);
314  trrotBox->RegisterYourself();
315 
316  SubunitVol1->AddNode(BoxVol,b,trrotBox);
317  }
318  if (b==2){
319  name+=b;
320  trrotBox->SetName(name);
321  trrotBox->RegisterYourself();
322 
323  SubunitVol2->AddNode(BoxVol1,b,trrotBox);
324  }
325  if (b==0){
326  name+=b;
327  trrotBox->SetName(name);
328  trrotBox->RegisterYourself();
329 
330  SubunitVol3->AddNode(BoxVol3,b,trrotBox);
331  SubunitVol9->AddNode(BoxVol4,b,trrotBox);
332  }
333  if (b==1 || b==2){
334  name+=b;
335  trrotBox->SetName(name);
336  trrotBox->RegisterYourself();
337 
338  SubunitVol4->AddNode(BoxVol,b,trrotBox);
339  }
340  if (b==0 || b==3){
341  name+=b;
342  trrotBox->SetName(name);
343  trrotBox->RegisterYourself();
344 
345  SubunitVol5->AddNode(BoxVol1,b,trrotBox);
346  }
347  if (b==3){
348  name+=b;
349  trrotBox->SetName(name);
350  trrotBox->RegisterYourself();
351 
352  SubunitVol6->AddNode(BoxVol,b,trrotBox);
353  SubunitVol8->AddNode(BoxVol2,b,trrotBox);
354  }
355  if (b==0 || b==2){
356  name+=b;
357  trrotBox->SetName(name);
358  trrotBox->RegisterYourself();
359 
360  SubunitVol7->AddNode(BoxVol2,b,trrotBox);
361  }
362  }
363  // ========== CRYSTAL (TGeoArb8 shape)=================
364  name = "CrystalShape";
365  CrystalShape = new TGeoArb8(name,dz,vert);
366 
367  TString medium="PWO";
368  name = "CrystalVol";
369  CrystalVol = new TGeoVolume(name,CrystalShape,gGeoMan->GetMedium(medium));
370 
371  // Translation and Rotation for each Crystal are according to
372  // co-ordinate system in the center of the Box.
373  // Crystals arrangement: right angle of each Crystal is in the middle of the box.
374  CrystalVol->SetLineColor(5);
375  for(Int_t k=0; k<kNumOfCrystals; k++){
376  cout << " " << endl;
377  cout << " -----> CRYSTAL number: "<< k << endl;
378  if (k==0){
379  trCrystal = new TGeoTranslation(tr/2.+0.5*kSpaceInBox,tr/2.+0.5*kSpaceInBox,0.);
380  rotCrystal = new TGeoRotation() ; // "right-upper" Crystal
381  }else if (k==1){
382  trCrystal= new TGeoTranslation(-tr/2.-0.5*kSpaceInBox,-tr/2.-0.5*kSpaceInBox,0.);
383  rotCrystal = new TGeoRotation(); // "left-lower" Crystal
384  rotCrystal.RotateZ(180.);
385  }else if (k==2){
386  trCrystal= new TGeoTranslation(-tr/2.-0.5*kSpaceInBox,tr/2.+0.5*kSpaceInBox,0.);
387  rotCrystal = new TGeoRotation(); // "left-upper" Crystal
388  rotCrystal.RotateZ(90.);
389  }else if (k==3){
390  trCrystal= new TGeoTranslation(tr/2.+0.5*kSpaceInBox,-tr/2.-0.5*kSpaceInBox,0.);
391  rotCrystal = new TGeoRotation() ; // "right-lower" Crystal
392  rotCrystal.RotateZ(270.);
393  }
394 
395  TGeoCombiTrans* trrotCrystal= new TGeoCombiTrans(trCrystal,rotCrystal);
396 
397  name = "CrystalVol";
398  name+=k;
399  trrotCrystal->SetName(name);
400  trrotCrystal->RegisterYourself();
401 
402  BoxVol->AddNode(CrystalVol,k,trrotCrystal);
403 
404  if (k==1 || k==3) {
405  name+=k;
406  trrotCrystal->SetName(name);
407  trrotCrystal->RegisterYourself();
408 
409  BoxVol1->AddNode(CrystalVol,k,trrotCrystal);
410  }
411  if (k==1 || k==2) {
412  name+=k;
413  trrotCrystal->SetName(name);
414  trrotCrystal->RegisterYourself();
415 
416  BoxVol2->AddNode(CrystalVol,k,trrotCrystal);
417  }
418  if (k==1) {
419  name+=k;
420  trrotCrystal->SetName(name);
421  trrotCrystal->RegisterYourself();
422 
423  BoxVol3->AddNode(CrystalVol,k,trrotCrystal);
424  }
425  if (k==0 || k==2 || k==3) {
426  name+=k;
427  trrotCrystal->SetName(name);
428  trrotCrystal->RegisterYourself();
429 
430  BoxVol4->AddNode(CrystalVol,k,trrotCrystal);
431  }
432  }
433 
435  Double_t kSubShift=10.688; // size of 1 Subunit (cm) in its half Z-distance of crystals
436  //Double_t FrontFaceToOffPoint=295; // Off_point -> front_face_of_crystals distance (cm)
437  Double_t FrontFaceToOffPoint=305; // Off_point -> front_face_of_crystals distance (cm)
438 
439  Int_t jj=0;
440  for (Int_t row=0; row<4; row++){
441  for (Int_t col=0; col<4; col++){
442 
443  Int_t flag=1;
444 
445  // *** 3 Subunits are fully disables
446  //if (row==0 && col==0) flag=0; // middle subunit
447  if (row==3 && col==3) flag=0; // the most external corner's subunit
448  if (row==3 && col==2) flag=0; // here: row==column => 4th col, 3rd Subunit
449  if (row==2 && col==3) flag=0; // here: row==column => 3th col, 4th Subunit
450 
451  // *** Subunits with disabled crystals
452  if (row==0 && col==0) flag=10; // middle subunit
453  if (row==0 && col==3) flag=-1; // here: row==column => 1st col, 4th Subunit (top)
454  if (row==1 && col==3) flag=-2; // here: row==column => 2st col, 4th Subunit (top)
455  if (row==2 && col==2) flag=-3; // here: row==column => 3st col, 3rd Subunit
456  if (row==3 && col==0) flag=-4; // here: row==column => 4st col, 1st Subunit
457  if (row==3 && col==1) flag=-5; // here: row==column => 4st col, 2st Subunit
458 
459 
460  if (flag!=0){
461 
462  jj++;
463  cout<< "----------------------------> 16 CRYSTALS SUBUNIT No: " << jj <<endl;
464 
465  rotSub = new TGeoRotation();
466  Int_t n=2*row+1; // fixed angle for each Subunit
467  Int_t m=2*col+1;
468 
469  //Double_t RotToZeroSubX= 0.931*m; // 0.931 (deg) -> rotation along X and Y
470  //Double_t RotToZeroSubY= -0.931*n; // axis to have "right angle" between Quarters
471 
472  //rotSub.RotateX(RotToZeroSubX);
473  //rotSub.RotateY(RotToZeroSubY);
474  rotSub.RotateX(0.);
475  rotSub.RotateY(0.);
476 
477  Double_t tan_alpha1=tan(n*(TMath::Pi()/180.));
478  Double_t addShiftX=FrontFaceToOffPoint*tan_alpha1;
479 
480  Double_t tan_alpha2=tan(m*(TMath::Pi()/180.));
481  Double_t addShiftY=FrontFaceToOffPoint*tan_alpha2;
482 
483  Double_t ShiftX=(ShiftToZeroSub + addShiftX -0.5*sizeOfQuar);
484  Double_t ShiftY=(ShiftToZeroSub + addShiftY -0.5*sizeOfQuar);
485 
486  trSub = new TGeoTranslation(ShiftX, ShiftY, 0.);
487 
488  TGeoCombiTrans* thAngle= new TGeoCombiTrans(trSub,rotSub);
489 
490  name="SubunitVol";
491  name+=jj;
492  thAngle->SetName(name);
493  thAngle->RegisterYourself();
494 
495  if (flag==1)
496  {
497  QuarterVol->AddNode(SubunitVol,jj,thAngle);
498  }
499  else if (flag==10) // middle subunit
500  {
501  QuarterVol->AddNode(SubunitVol9,jj,thAngle);
502  }
503  else if (flag==-1)
504  {
505  QuarterVol->AddNode(SubunitVol4,jj,thAngle);
506  QuarterVol->AddNode(SubunitVol5,jj,thAngle);
507  }
508  else if (flag==-2)
509  {
510  QuarterVol->AddNode(SubunitVol1,jj,thAngle);
511  QuarterVol->AddNode(SubunitVol2,jj,thAngle);
512  }
513  else if (flag==-3)
514  {
515  QuarterVol->AddNode(SubunitVol4,jj,thAngle);
516  QuarterVol->AddNode(SubunitVol6,jj,thAngle);
517  QuarterVol->AddNode(SubunitVol3,jj,thAngle);
518  }
519  else if (flag==-4)
520  {
521  QuarterVol->AddNode(SubunitVol1,jj,thAngle);
522  QuarterVol->AddNode(SubunitVol6,jj,thAngle);
523  QuarterVol->AddNode(SubunitVol7,jj,thAngle);
524  }
525  else if (flag==-5)
526  {
527  QuarterVol->AddNode(SubunitVol1,jj,thAngle);
528  QuarterVol->AddNode(SubunitVol8,jj,thAngle);
529  }
530  }
531 
532  }
533  }
534 
535  trQuar = new TGeoTranslation(0.5*sizeOfQuar,0.5*sizeOfQuar,0.);
536  rotQuar = new TGeoRotation();
537 
538  TGeoCombiTrans* trrotQuar= new TGeoCombiTrans(trQuar,rotQuar);
539  name="QuarterVol";
540  trrotQuar->SetName(name);
541  trrotQuar->RegisterYourself();
542 
543  // The Backward endcap has additional ReflectX(1) for each copy,
544  // thus, 'ttt' translations are differnt, compare to the Forward endcap.
545  // Bwendcap is placed in -Z direction and the order of four copies (4 Quarters)
546  // is the same like for the old (first) version of backward endcap.
547  // The coordinates shown below are according to PandaRoot.
548 
549  trrotQuar->ReflectX(1); // first copy: -X +Y
550 
551  top->AddNode(QuarterVol,1,trrotQuar); //right-upper Quarter
552 
553  for (Int_t q=1; q<=3; q++){
554  TGeoCombiTrans reflection;
555  TGeoTranslation ttt;
556 
557  if (q==1){ // second copy: -X -Y
558  reflection.ReflectY(1); // right-lower Quarter
559  reflection.ReflectX(1);
560  ttt = new TGeoTranslation(-0.5*sizeOfQuar,-0.5*sizeOfQuar,0.);
561  }
562  if (q==2){ // third copy: +X -Y
563  reflection.ReflectY(1); // left-lower Quarter
564  reflection.ReflectX(1);
565  reflection.ReflectX(1);
566  ttt = new TGeoTranslation(0.5*sizeOfQuar,-0.5*sizeOfQuar,0.);
567  }
568  if (q==3){ // fourth copy: +X +Y
569  reflection.ReflectX(1); // left-upper Quarter
570  reflection.ReflectX(1);
571  ttt = new TGeoTranslation(0.5*sizeOfQuar,0.5*sizeOfQuar,0.);
572  }
573 
574  top->AddNode(QuarterVol,q+1,new TGeoCombiTrans(ttt,reflection));
575  }
576 
577  gGeoMan->CloseGeometry();
578  top->Write();
579  fi->Close();
580  //gGeoManager->Export(outfile);//
581  //top->Draw();//
582 }
int row
Definition: anaLmdDigi.C:67
TGeoVolume * SubunitVol6
const Double_t kSpaceInSub
TGeoVolume * QuarterVol
TGeoShape * QuarterShape
TGeoVolume * BoxVol3
FairGeoLoader * geoLoad
Int_t i
Definition: run_full.C:25
FairGeoMedia * Media
__m128 m
Definition: P4_F32vec4.h:28
TTree * b
TGeoShape * CrystalShape
TGeoTranslation trCrystal
const Double_t kSpaceSubGlue
TGeoManager * gGeoMan
FairGeoMedium * CbmMediumCarbon
TGeoVolume * SubunitVol5
int col
Definition: anaLmdDigi.C:67
Double_t FrontFaceToOffPoint
int n
TGeoTranslation trSub
Double_t vertBox[20]
TGeoVolume * SubunitVol8
Double_t vert0[20]
TGeoVolume * top
FairGeoMedium * CbmMediumAluminium
TGeoTranslation trQuar
TGeoVolume * SubunitVol
TGeoVolume * BoxVol1
TGeoRotation rotBox
Double_t vertSub[20]
FairGeoBuilder * geobuild
TFile * fi
Double_t
TString medium
Double_t vert[20]
TGeoCombiTrans reflection
TGeoVolume * BoxVol4
TGeoVolume * BoxVol
TGeoRotation rotQuar
TGeoVolume * SubunitVol2
TGeoShape * BoxShape
TString name
FairGeoMedium * CbmMediumAir
const Double_t kAlveoleThickness
TGeoVolume * CrystalVol
Double_t vertQuar[20]
TGeoVolume * SubunitVol7
TGeoRotation rotCrystal
TGeoCombiTrans * trrotQuar
TGeoVolume * SubunitVol4
TGeoVolume * SubunitVol9
TGeoRotation rotSub
TGeoShape * SubunitShape
TGeoVolume * BoxVol2
FairGeoMedium * CbmMediumPWO
FairGeoInterface * geoFace
TGeoTranslation trBox
TGeoVolume * SubunitVol3
Double_t Pi
const Int_t kNumOfBoxes
const Int_t kNumOfCrystals
TString outfile
TGeoVolume * SubunitVol1
const Int_t kNumOfQuarters