FairRoot/PandaRoot
createRootGeoFileFwEnd_fixed.C
Go to the documentation of this file.
1 {
2  // This macro creates the Forward EndCap (BwEndCap) geometry
3  // of the EMC detector for PANDA.
4  // The tapered crystals with the size of:
5  // 24.4 x 24.4 x 200 mm^3 (front side) and
6  // 26.0 x 26.0 x 200 mm^3 (back side) are used
7  //
8  // Autor: Aleksandra Biegun, KVI (2.07.2009)
9 
10  // FwEndCap geometry parameters
11  //-----------------------------
12  const Double_t kSpaceInBox = 0.06; // Space in Box (cm)
13  const Double_t kSpaceInSub = 0.024; // Space in Subunit (cm)
14  const Double_t kSpaceSubGlue = 0.036; // Thickness of glued alveole
15  // between Boxes in Subunit (cm)
16  const Double_t kAlveoleThickness = 0.018;// Thickness of alveole between Subunits (cm)
17 
18  const Int_t kNumOfQuarters = 1;
19  const Int_t kNumOfBoxes = 4;
20  const Int_t kNumOfCrystals = 4;
21 
22  Double_t tr = 2.51875; // Size of the Crystal in its center (cm)
23 
24  Double_t b1 = 2.6000-0.5*tr; // Back-tilted part (-Z direction) of the Crystal center (cm)
25  Double_t b2 = 2.4375-0.5*tr; // Front-tilted part (+Z direction) of the Crystal center (cm)
26 
27  Double_t dz,vert[20]; // Parameters for TGeoArb8 shape of crystal (cm)
29 
30  // Parameters for crystal shape: front size: 24.375(mm) x 24.375(mm)
31  // back size: 26.0(mm) x 26.0(mm)
32  dz = 10.000;
33  // first four vertices - in -Z direction
34  vert[0] = -0.5*tr;
35  vert[1] = -0.5*tr;
36  vert[2] = -0.5*tr;
37  vert[3] = +b1;
38  vert[4] = +b1;
39  vert[5] = +b1;
40  vert[6] = +b1;
41  vert[7] = -0.5*tr;
42 
43  // second four vertices - in +Z direction
44  vert[8] = -0.5*tr;
45  vert[9] = -0.5*tr;
46  vert[10] = -0.5*tr;
47  vert[11] = +b2;
48  vert[12] = +b2; // Tapered right side the front face
49  vert[13] = +b2; // of the crystal (upper corner)
50  vert[14] = +b2; // Tapered right side the front face
51  vert[15] = -0.5*tr; // of the crystal (lower corner)
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_module3new.root";
139 
140  TFile* fi = new TFile(outfile,"RECREATE");
141 
142  FairGeoLoader* geoLoad = new FairGeoLoader("TGeo","FairGeoLoader");
143  FairGeoInterface *geoFace = geoLoad->getGeoInterface();
144  geoFace->setMediaFile("../../geometry/media_pnd.geo");
145  geoFace->readMedia();
146  geoFace->print();
147 
148  FairGeoMedia *Media = geoFace->getMedia();
149  FairGeoBuilder *geobuild=geoLoad->getGeoBuilder();
150 
151  FairGeoMedium *CbmMediumAir = Media->getMedium("air");
152  FairGeoMedium *CbmMediumPWO = Media->getMedium("PWO");
153  FairGeoMedium *CbmMediumCarbon = Media->getMedium("carbon");
154  FairGeoMedium *CbmMediumAluminium = Media->getMedium("aluminium");
155 
156  Int_t nmed=geobuild->createMedium(CbmMediumAir);
157  nmed=geobuild->createMedium(CbmMediumPWO);
158  nmed=geobuild->createMedium(CbmMediumCarbon);
159  nmed=geobuild->createMedium(CbmMediumAluminium);
160 
161  TGeoManager* gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom");
162 
163  //construct the overall box
164  Double_t sizeOfQuar = 96.192; // size of one Quarter (the same in X and Y direction)
165  // size of one Subunit (back side): 10.688*9 = 96.192 (cm)
166  //TGeoVolume *top = gGeoMan->MakeTube("top",gGeoMan->GetMedium("air"),0,98,22.5);//cm
167 
168  TGeoVolume *top = new TGeoVolumeAssembly("Emc3");
169 
170  gGeoMan->SetTopVolume(top);
171 
172  TGeoTranslation trQuar;
173  TGeoRotation rotQuar;
174 
175  TGeoTranslation trSub;
176  TGeoTranslation trBox;
177  TGeoTranslation trCrystal;
178 
179  TGeoRotation rotSub;
180  TGeoRotation rotBox;
181  TGeoRotation rotCrystal;
182 
183  TGeoShape* QuarterShape;
184  TGeoShape* SubunitShape;
185  TGeoShape* BoxShape;
186  TGeoShape* CrystalShape;
187 
188  TGeoVolume* QuarterVol[4];
189  TGeoVolume* SubunitVol[4];
190  TGeoVolume* BoxVol[4];
191  TGeoVolume* CrystalVol;
192 
194 
195  for(Int_t q=0; q<4; q++){
196 
197  // ========== SUBUNIT (16 crystals) ========================
198  name = "SubunitShape";
199  SubunitShape = new TGeoArb8(name,dz,vertSub);
200 
201  TString medium="air";
202  name = "SubunitVol";
203  name+=(q+1);
204  //SubunitVol[q] = new TGeoVolume(name,SubunitShape,gGeoMan->GetMedium(medium));
205  SubunitVol[q] = new TGeoVolumeAssembly(name);
206 
207 
208  // ========== BOX (4 crystals) ========================
209  Int_t bx[4]=0;
210  name = "BoxShape";
211  BoxShape = new TGeoArb8(name,dz,vertBox);
212 
213  //TString medium="carbon";
214  TString medium="air";
215  name="BoxVol";
216  name+=(q+1);
217  //BoxVol[q] = new TGeoVolume(name,BoxShape,gGeoMan->GetMedium(medium));
218  BoxVol[q] = new TGeoVolumeAssembly(name);
219 
220  if (q==0){
221  bx[0]=0;
222  bx[1]=1;
223  bx[2]=2;
224  bx[3]=3;
225  }
226  if (q==1){
227  bx[0]=2;
228  bx[1]=3;
229  bx[2]=0;
230  bx[3]=1;
231  }
232  if (q==2){
233  bx[0]=1;
234  bx[1]=0;
235  bx[2]=3;
236  bx[3]=2;
237  }
238  if (q==3){
239  bx[0]=3;
240  bx[1]=2;
241  bx[2]=1;
242  bx[3]=0;
243  }
244  cout <<" "<<endl;
245  cout <<"bx[0]= "<<bx[0]
246  <<", bx[1]= "<<bx[1]
247  <<", bx[2]= "<<bx[2]
248  <<", bx[3]= "<<bx[3]
249  <<", kNumOfBoxes = "<<kNumOfBoxes
250  <<endl;
251 
252  // Translations and Rotations for Boxes are according to co-ordinate system
253  // which is in the center of the Subunit
254  for(Int_t b=0; b<kNumOfBoxes; b++){
255  cout << " " << endl;
256  cout << "----------------> BOX number: " << b <<endl;
257  if (b==bx[0]) {
258  trBox = new TGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox, 0.);
259  rotBox = new TGeoRotation();
260  rotBox.RotateX(0.465518); // rotation in "up" direction
261  rotBox.RotateY(-0.465518); // rotation in "right" direction
262  }
263  if (b==bx[1]) {
264  trBox = new TGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox, 0.);
265  rotBox = new TGeoRotation();
266  rotBox.RotateX(-0.465518); // rotation in "down" direction
267  rotBox.RotateY(0.465518); // rotation in "left" direction
268  }
269  if (b==bx[2]) {
270  trBox = new TGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox, 0.);
271  rotBox = new TGeoRotation();
272  rotBox.RotateX(-0.465518); // rotation in "down" direction
273  rotBox.RotateY(-0.465518); // rotation in "right" direction
274  }
275  if (b==bx[3]) {
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.465518); // rotation in "up" direction
279  rotBox.RotateY(0.465518); // rotation in "left" direction
280  }
281  TGeoCombiTrans* trrotBox= new TGeoCombiTrans(trBox,rotBox);
282 
283  name="BoxVol";
284  name+=b;
285  trrotBox->SetName(name);
286  trrotBox->RegisterYourself();
287 
288  SubunitVol[q]->AddNode(BoxVol[q],b,trrotBox);
289  }
290 
291  // ========== CRYSTAL (TGeoArb8 shape)=================
292  Int_t cr[4]=0;
293  name = "CrystalShape";
294  CrystalShape = new TGeoArb8(name,dz,vert);
295 
296  TString medium="PWO";
297  name = "CrystalVol";
298  name+=(q+1);
299  CrystalVol = new TGeoVolume(name,CrystalShape,gGeoMan->GetMedium(medium));
300 
301  CrystalVol->SetLineColor(5);
302 
303  if (q==0){
304  cr[0]=0;
305  cr[1]=1;
306  cr[2]=2;
307  cr[3]=3;
308  }
309  if (q==1){
310  cr[0]=3;
311  cr[1]=2;
312  cr[2]=1;
313  cr[3]=0;
314  }
315  if (q==2){
316  cr[0]=1;
317  cr[1]=0;
318  cr[2]=3;
319  cr[3]=2;
320  }
321  if (q==3){
322  cr[0]=2;
323  cr[1]=3;
324  cr[2]=0;
325  cr[3]=1;
326  }
327  /*cout <<" "<<endl;
328  cout <<"->cr[0]= "<<cr[0]
329  <<", cr[1]= "<<cr[1]
330  <<", cr[2]= "<<cr[2]
331  <<", cr[3]= "<<cr[3]
332  <<", kNumOfCrystals = "<<kNumOfCrystals
333  <<endl;
334  */
335  for(Int_t k=0; k<kNumOfCrystals; k++){
336  if (k==cr[0]){
337  trCrystal = new TGeoTranslation(tr/2.+0.5*kSpaceInBox,tr/2.+0.5*kSpaceInBox,0.);
338  rotCrystal = new TGeoRotation() ; // "right-upper" Crystal
339  }else if (k==cr[1]){
340  trCrystal= new TGeoTranslation(-tr/2.-0.5*kSpaceInBox,-tr/2.-0.5*kSpaceInBox,0.);
341  rotCrystal = new TGeoRotation(); // "left-lower" Crystal
342  rotCrystal.RotateZ(180.);
343  }else if (k==cr[2]){
344  trCrystal= new TGeoTranslation(-tr/2.-0.5*kSpaceInBox,tr/2.+0.5*kSpaceInBox,0.);
345  rotCrystal = new TGeoRotation(); // "left-upper" Crystal
346  rotCrystal.RotateZ(90.);
347  }else if (k==cr[3]){
348  trCrystal= new TGeoTranslation(tr/2.+0.5*kSpaceInBox,-tr/2.-0.5*kSpaceInBox,0.);
349  rotCrystal = new TGeoRotation() ; // "right-lower" Crystal
350  rotCrystal.RotateZ(270.);
351  }
352 
353  TGeoCombiTrans* trrotCrystal= new TGeoCombiTrans(trCrystal,rotCrystal);
354  name = "CrystalVol";
355  name+=k;
356  trrotCrystal->SetName(name);
357  trrotCrystal->RegisterYourself();
358 
359  BoxVol[q]->AddNode(CrystalVol,k,trrotCrystal);
360  }
361 
363  Double_t kSubShift=10.363; // size of 1 Subunit (cm) in its half Z-distance
364  Double_t FrontFaceToOffPoint=295; // Off_point -> front_face_of_crystals distance (cm)
365 
366  Int_t cp_row[4]=0;
367  Int_t cp_col[4]=0;
368 
369  // ========== QUARTER (55 subunits) ===================
370  cout << " "
371  << " "
372  <<endl;
373  cout<< "------------------------> Quarter VOLUME ** " <<q+1<<" ** is created."<<endl;
374  name = "QuarterVol";
375  name+=(q+1);
376  QuarterVol[q] = new TGeoVolumeAssembly(name);
377 
378  TString medium="air";
379  cout << "Quarter Medium ==== "<< gGeoMan->GetMedium(medium)->GetName()<< endl;
380 
381  Int_t jj=0;
382  for (Int_t row=0; row<9; row++){ // <-- tj. col!!
383  for (Int_t col=0; col<9; col++){ // <-- tj.row !!
384 
385  Int_t flag=1;
386 
387  if (row<3 && col <2) flag=0;
388  if (row==3 && col==0) flag=0;
389  if (col>1 && row >7) flag=0;
390  if (col>4 && row >6) flag=0;
391  if (col>5 && row >5) flag=0;
392  if (col>6 && row >4) flag=0;
393  if (col>7 && row >1) flag=0;
394 
395  if (flag){
396 
397  jj++;
398  cout<< "----------------------------> 16 CRYSTALS SUBUNIT No: " << jj <<endl;
399 
400  rotSub = new TGeoRotation();
401 
402  Int_t n=2*row+1; // fixed angle for each Subunit
403  Int_t m=2*col+1;
404 
405  if (q==0){ // first quarter
406  cp_row[q]=n; // X
407  cp_col[q]=m; // Y
408  }
409  if (q==1){ // second quarter
410  cp_row[q]=n; // X
411  cp_col[q]=-m; //-Y
412  }
413  if (q==2){ // third quarter
414  cp_row[q]=-n; //-X
415  cp_col[q]=-m; //-Y
416  }
417  if (q==3){ // fourth quarter
418  cp_row[q]=-n; //-X
419  cp_col[q]=m; // Y
420  }
421 
422  //cout << " X: "<<cp_row[q]
423  //<< " Y: "<<cp_col[q]
424  //<< endl;
425 
426  Double_t RotToZeroSubX= 0.931*cp_col[q]; // 0.931 (deg) -> rotation along X and Y
427  Double_t RotToZeroSubY= -0.931*cp_row[q]; // axis to have "right angle" between Quarters
428 
429  rotSub.RotateX(RotToZeroSubX);
430  rotSub.RotateY(RotToZeroSubY);
431 
432  Double_t tan_alpha1=tan(cp_row[q]*(TMath::Pi()/180.));
433  Double_t addShiftX=FrontFaceToOffPoint*tan_alpha1;
434 
435  Double_t tan_alpha2=tan(cp_col[q]*(TMath::Pi()/180.));
436  Double_t addShiftY=FrontFaceToOffPoint*tan_alpha2;
437 
438  Double_t ShiftX=(ShiftToZeroSub + addShiftX -0.5*sizeOfQuar);
439  Double_t ShiftY=(ShiftToZeroSub + addShiftY -0.5*sizeOfQuar);
440 
441  trSub = new TGeoTranslation(ShiftX, ShiftY, 0.);
442 
443  TGeoCombiTrans* thAngle= new TGeoCombiTrans(trSub,rotSub);
444 
445  name="SubunitVol";
446  name+=jj;
447  thAngle->SetName(name);
448  thAngle->RegisterYourself();
449 
450  QuarterVol[q]->AddNode(SubunitVol[q],jj,thAngle); // right-upper Quarter
451  }
452  }
453  }
454 
455  trQuar = new TGeoTranslation(0.5*sizeOfQuar,0.5*sizeOfQuar,0.);
456  rotQuar = new TGeoRotation();
457 
458  TGeoCombiTrans* trrotQuar= new TGeoCombiTrans(trQuar,rotQuar);
459  name = "QuarterVol";
460  name+=(q+1);
461  trrotQuar->SetName(name);
462  trrotQuar->RegisterYourself();
463 
464  top->AddNode(QuarterVol[q],q+1,trrotQuar); //Quarter of EMC
465  }
466  /*
467  cout <<" "<< endl;
468  cout <<"*************************************** "<< endl;
469  TString nameBoxVol0 = BoxVol[0]->GetName();
470  TString nameBoxVol1 = BoxVol[1]->GetName();
471  TString nameBoxVol2 = BoxVol[2]->GetName();
472  TString nameBoxVol3 = BoxVol[3]->GetName();
473  cout <<"Checking overlaps for --------->>>> "<< nameBoxVol0 <<endl ;
474  cout <<"-> BOX Volume has: " <<BoxVol[0]->GetNdaughters() <<" Crystals"<<endl;
475  gGeoManager->GetVolume(nameBoxVol0)->CheckOverlaps(0.001);
476  cout <<"Number of Overlaps for "<< nameBoxVol0 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
477 
478  cout <<"Checking overlaps for --------->>>> "<< nameBoxVol1 <<endl ;
479  cout <<"-> BOX Volume has: " <<BoxVol[1]->GetNdaughters() <<" Crystals"<<endl;
480  gGeoManager->GetVolume(nameBoxVol1)->CheckOverlaps(0.001);
481  cout <<"Number of Overlaps for "<< nameBoxVol1 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
482 
483  cout <<"Checking overlaps for --------->>>> "<< nameBoxVol2 <<endl ;
484  cout <<"-> BOX Volume has: " <<BoxVol[2]->GetNdaughters() <<" Crystals"<<endl;
485  gGeoManager->GetVolume(nameBoxVol2)->CheckOverlaps(0.001);
486  cout <<"Number of Overlaps for "<< nameBoxVol2 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
487 
488  cout <<"Checking overlaps for --------->>>> "<< nameBoxVol3 <<endl ;
489  cout <<"-> BOX Volume has: " <<BoxVol[3]->GetNdaughters() <<" Crystals"<<endl;
490  gGeoManager->GetVolume(nameBoxVol3)->CheckOverlaps(0.001);
491  cout <<"Number of Overlaps for "<< nameBoxVol3 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
492 
493 
494  cout <<" "<< endl;
495  cout <<"*************************************** "<< endl;
496  TString nameSubVol0 = SubunitVol[0]->GetName();
497  TString nameSubVol1 = SubunitVol[1]->GetName();
498  TString nameSubVol2 = SubunitVol[2]->GetName();
499  TString nameSubVol3 = SubunitVol[3]->GetName();
500  cout <<"Checking overlaps for --------->>>> "<< nameSubVol0 <<endl ;
501  cout <<"-> SUBUNIT Volume has: " <<SubunitVol[0]->GetNdaughters()<<" Boxes"<<endl;
502  gGeoManager->GetVolume(nameSubVol0)->CheckOverlaps(0.001);
503  cout <<"Number of Overlaps for "<< nameSubVol0 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
504 
505  cout <<"Checking overlaps for --------->>>> "<< nameSubVol1 <<endl ;
506  cout <<"-> SUBUNIT Volume has: " <<SubunitVol[1]->GetNdaughters()<<" Boxes"<<endl;
507  gGeoManager->GetVolume(nameSubVol1)->CheckOverlaps(0.001);
508  cout <<"Number of Overlaps for "<< nameSubVol1 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
509 
510  cout <<"Checking overlaps for --------->>>> "<< nameSubVol2 <<endl ;
511  cout <<"-> SUBUNIT Volume has: " <<SubunitVol[2]->GetNdaughters()<<" Boxes"<<endl;
512  gGeoManager->GetVolume(nameSubVol2)->CheckOverlaps(0.001);
513  cout <<"Number of Overlaps for "<< nameSubVol2 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
514 
515  cout <<"Checking overlaps for --------->>>> "<< nameSubVol3 <<endl ;
516  cout <<"-> SUBUNIT Volume has: " <<SubunitVol[3]->GetNdaughters()<<" Boxes"<<endl;
517  gGeoManager->GetVolume(nameSubVol3)->CheckOverlaps(0.001);
518  cout <<"Number of Overlaps for "<< nameSubVol3 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
519 
520  cout <<" "<< endl;
521  cout <<"*************************************** "<< endl;
522  TString nameQuarVol0 = QuarterVol[0]->GetName();
523  TString nameQuarVol1 = QuarterVol[1]->GetName();
524  TString nameQuarVol2 = QuarterVol[2]->GetName();
525  TString nameQuarVol3 = QuarterVol[3]->GetName();
526  cout <<"Checking overlaps for --------->>>> "<< nameQuarVol0 <<endl ;
527  cout <<"-> QUARTER Volume has: " <<QuarterVol[0]->GetNdaughters()<< " Subunits"<<endl;
528  gGeoManager->GetVolume(nameQuarVol0)->CheckOverlaps(0.001);
529  cout <<"Number of Overlaps for "<< nameQuarVol0 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
530 
531  cout <<"Checking overlaps for --------->>>> "<< nameQuarVol1 <<endl ;
532  cout <<"-> QUARTER Volume has: " <<QuarterVol[1]->GetNdaughters()<< " Subunits"<<endl;
533  gGeoManager->GetVolume(nameQuarVol1)->CheckOverlaps(0.001);
534  cout <<"Number of Overlaps for "<< nameQuarVol1 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
535 
536  cout <<"Checking overlaps for --------->>>> "<< nameQuarVol2 <<endl ;
537  cout <<"-> QUARTER Volume has: " <<QuarterVol[2]->GetNdaughters()<< " Subunits"<<endl;
538  gGeoManager->GetVolume(nameQuarVol2)->CheckOverlaps(0.001);
539  cout <<"Number of Overlaps for "<< nameQuarVol2 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
540 
541  cout <<"Checking overlaps for --------->>>> "<< nameQuarVol3 <<endl ;
542  cout <<"-> QUARTER Volume has: " <<QuarterVol[3]->GetNdaughters()<< " Subunits"<<endl;
543  gGeoManager->GetVolume(nameQuarVol3)->CheckOverlaps(0.001);
544  cout <<"Number of Overlaps for "<< nameQuarVol3 <<" is: "<<gGeoManager->PrintOverlaps()<<endl ;
545 
546  cout <<" "<< endl;
547  cout <<"*************************************** "<< endl;
548  TString nameTopVol = top->GetName();
549  cout <<"Checking overlaps for --------->>>> "<< nameTopVol <<endl ;
550  cout <<"-> TOP Volume has: " <<top->GetNdaughters() <<" Quarters"<<endl;
551  gGeoManager->GetVolume(nameTopVol)->CheckOverlaps(0.001);
552  cout <<"Number of Overlaps for TOP Volume is: " <<gGeoManager->PrintOverlaps()<<endl;
553 
554  cout<<" "<<endl;
555  */
556 
557 
558 
559  gGeoMan->CloseGeometry();
560  top->Write();
561  fi->Close();
562  //gGeoManager->Export(outfile);//
563  top->Draw();//
564 }
int row
Definition: anaLmdDigi.C:67
const Double_t kSpaceInSub
TGeoVolume * QuarterVol
TGeoShape * QuarterShape
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
int col
Definition: anaLmdDigi.C:67
Double_t FrontFaceToOffPoint
int n
TGeoTranslation trSub
Double_t vertBox[20]
Double_t vert0[20]
TGeoVolume * top
FairGeoMedium * CbmMediumAluminium
TGeoTranslation trQuar
TGeoVolume * SubunitVol
TGeoRotation rotBox
Double_t vertSub[20]
FairGeoBuilder * geobuild
TFile * fi
Double_t
TString medium
Double_t vert[20]
TGeoVolume * BoxVol
TGeoRotation rotQuar
TGeoShape * BoxShape
TString name
FairGeoMedium * CbmMediumAir
const Double_t kAlveoleThickness
TGeoVolume * CrystalVol
Double_t vertQuar[20]
TGeoRotation rotCrystal
TGeoCombiTrans * trrotQuar
TGeoRotation rotSub
TGeoShape * SubunitShape
FairGeoMedium * CbmMediumPWO
FairGeoInterface * geoFace
TGeoTranslation trBox
Double_t Pi
const Int_t kNumOfBoxes
const Int_t kNumOfCrystals
TString outfile
const Int_t kNumOfQuarters