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