FairRoot/PandaRoot
Functions | Variables
createRootGeoFileBwEnd_Str24.4_fixed.C File Reference

Go to the source code of this file.

Functions

gROOT Macro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
gSystem Load ("libGeoBase")
 
gSystem Load ("libParBase")
 
gSystem Load ("libBase")
 
gSystem Load ("libPndData")
 
gSystem Load ("libPassive")
 
geoFace setMediaFile ("/home/dkhaneft/PANDA/pandaroot/trunk_25544/geometry/media_pnd.geo")
 
geoFace readMedia ()
 
geoFace print ()
 
gGeoMan SetTopVolume (top)
 
CrystalVol SetLineColor (4)
 
 for (Int_t k=0;k< kNumOfCrystals;k++)
 
 for (Int_t q=1;q<=4;q++)
 
cout
<< "********************************** \n";cout
<< "*** Checking overlaps for
Emc4 *** \n";cout
<< "********************************** \n";gGeoMan-> 
CheckOverlaps (0.001)
 
gGeoMan CloseGeometry ()
 
top Write ()
 
fi Close ()
 

Variables

const Double_t kHeight = 2.44
 
const Double_t kLength = 20.0
 
const Double_t kSizeOfCrys = 2.44
 
const Double_t kAlveoleThickness = 0.02
 
const Double_t kGluedAlveoleThickness = 0.04
 
const Double_t kCrystalCrystal = 0.06
 
const Double_t kAlveoleAlveole = 0.08
 
const Double_t kCrystalAlveole = 0.024
 
const Int_t kNumOfQuarters = 4
 
const Int_t kNumOfSubunit = 4
 
const Int_t kNumOfBoxes4InSubunit = 4
 
const Int_t kNumOfBoxes4 = 12
 
const Int_t kNumOfBoxes2 = 10
 
const Int_t kNumOfBoxes1 = 3
 
const Int_t kNumOfCrystalsInBox4 = 4
 
const Int_t kNumOfCrystalsInBox2 = 2
 
const Int_t kNumOfBoxes = 4
 
const Int_t kNumOfCrystals = 4
 
Double_t sizeOfBox1 = kWidth + 2*kAlveoleThickness + 2*kCrystalAlveole
 
Double_t sizeOfBox2 = 2*kWidth + 2*kAlveoleThickness + 2*kCrystalAlveole + kCrystalCrystal
 
Double_t sizeOfBox4 = sizeOfBox2
 
Double_t sizeOfSubunit = 2*sizeOfBox4
 
TString outfile = "./emc_module4_StraightGeo24.4.root"
 
TFile * fi = new TFile(outfile,"RECREATE")
 
FairGeoLoader * geoLoad = new FairGeoLoader("TGeo","FairGeoLoader")
 
FairGeoInterface * geoFace = geoLoad->getGeoInterface()
 
FairGeoMedia * Media = geoFace->getMedia()
 
FairGeoBuilder * geobuild =geoLoad->getGeoBuilder()
 
FairGeoMedium * CbmMediumAir = Media->getMedium("air")
 
FairGeoMedium * CbmMediumPWO = Media->getMedium("PWO")
 
FairGeoMedium * CbmMediumCarbon = Media->getMedium("carbon")
 
FairGeoMedium * CbmMediumAluminium = Media->getMedium("aluminium")
 
Int_t nmed =geobuild->createMedium(CbmMediumAir)
 
TGeoManager * gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom")
 
Double_t sizeOfQuar = 37.644
 
TGeoVolume * top = new TGeoVolumeAssembly("Emc4")
 
TGeoTranslation trQuar = new TGeoTranslation(0.,0.,0.)
 
TGeoTranslation trSub
 
TGeoTranslation trBox
 
TGeoTranslation trCrystal
 
TGeoRotation rotQuar
 
TGeoRotation rotSub
 
TGeoRotation rotBox
 
TGeoRotation rotCrystal
 
TGeoShape * CrystalShape = new TGeoBBox(name,0.5*kWidth,0.5*kHeight,0.5*kLength,0)
 
TGeoVolume * CrystalVol = new TGeoVolume(name,CrystalShape,gGeoMan->GetMedium(medium))
 
TString name = "CrystalShape"
 
TGeoVolume * QuarterVol = new TGeoVolumeAssembly("QuarterNewVol")
 
TGeoVolume * SubunitVol = new TGeoVolumeAssembly("SubunitVol")
 
TGeoVolume * SubunitVol1 = new TGeoVolumeAssembly("SubunitVol1")
 
TGeoVolume * SubunitVol2 = new TGeoVolumeAssembly("SubunitVol2")
 
TGeoVolume * SubunitVol3 = new TGeoVolumeAssembly("SubunitVol3")
 
TGeoVolume * SubunitVol4 = new TGeoVolumeAssembly("SubunitVol4")
 
TGeoVolume * SubunitVol5 = new TGeoVolumeAssembly("SubunitVol5")
 
TGeoVolume * SubunitVol6 = new TGeoVolumeAssembly("SubunitVol6")
 
TGeoVolume * SubunitVol7 = new TGeoVolumeAssembly("SubunitVol7")
 
TGeoVolume * SubunitVol8 = new TGeoVolumeAssembly("SubunitVol8")
 
TGeoVolume * SubunitVol9 = new TGeoVolumeAssembly("SubunitVol9")
 
TGeoVolume * BoxVol = new TGeoVolumeAssembly("BoxVol")
 
TGeoVolume * BoxVol1 = new TGeoVolumeAssembly("BoxVol1")
 
TGeoVolume * BoxVol2 = new TGeoVolumeAssembly("BoxVol2")
 
TGeoVolume * BoxVol3 = new TGeoVolumeAssembly("BoxVol3")
 
TGeoVolume * BoxVol4 = new TGeoVolumeAssembly("BoxVol4")
 
TGeoVolume * BoxVol5 = new TGeoVolumeAssembly("BoxVol5")
 
TGeoVolume * BoxVol6 = new TGeoVolumeAssembly("BoxVol6")
 
TString medium ="PWO"
 
Int_t jj = 0
 
TGeoCombiTrans reflection
 

Function Documentation

cout<< "********************************** \n"; cout << "*** Checking overlaps for Emc4 *** \n"; cout << "********************************** \n"; gGeoMan-> CheckOverlaps ( 0.  001)
fi Close ( )
gGeoMan CloseGeometry ( )
for ( )

Definition at line 141 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

141  {
142  cout << " " << endl;
143  cout << " -----> CRYSTAL number: "<< k << endl;
144  if (k==0){
145  trCrystal = new TGeoTranslation(0.5*kSizeOfCrys + 0.5*kCrystalCrystal,0.5*kSizeOfCrys + 0.5*kCrystalCrystal,0.);
146  rotCrystal = new TGeoRotation(); // "right-upper" Crystal
147  rotCrystal.RotateZ(0.);
148  }else if (k==1){
149  trCrystal= new TGeoTranslation(-0.5*kSizeOfCrys - 0.5*kCrystalCrystal,-0.5*kSizeOfCrys - 0.5*kCrystalCrystal,0.);
150  rotCrystal = new TGeoRotation(); // "left-lower" Crystal
151  rotCrystal.RotateZ(180.);
152  }else if (k==2){
153  trCrystal= new TGeoTranslation(-0.5*kSizeOfCrys - 0.5*kCrystalCrystal,0.5*kSizeOfCrys + 0.5*kCrystalCrystal,0.);
154  rotCrystal = new TGeoRotation(); // "left-upper" Crystal
155  rotCrystal.RotateZ(90.);
156  }else if (k==3){
157  trCrystal= new TGeoTranslation(0.5*kSizeOfCrys + 0.5*kCrystalCrystal,-0.5*kSizeOfCrys - 0.5*kCrystalCrystal,0.);
158  rotCrystal = new TGeoRotation(); // "right-lower" Crystal
159  rotCrystal.RotateZ(270.);
160  }
161 
162  TGeoCombiTrans* trrotCrystal= new TGeoCombiTrans(trCrystal,rotCrystal);
163 
164  name = "CrystalVol";
165  name+=k;
166  trrotCrystal->SetName(name);
167  trrotCrystal->RegisterYourself();
168 
169  //cout << "name = " << name << " k = " << k << endl;
170 
171  BoxVol->AddNode(CrystalVol,k,trrotCrystal);
172 
173  if (k==0) {
174  name+=k;
175  trrotCrystal->SetName(name);
176  trrotCrystal->RegisterYourself();
177 cout << "name = " << name << " k = " << k << endl;
178  BoxVol4->AddNode(CrystalVol,k,trrotCrystal);
179  BoxVol5->AddNode(CrystalVol,k,trrotCrystal);
180  }
181  if (k==1) {
182  name+=k;
183  trrotCrystal->SetName(name);
184  trrotCrystal->RegisterYourself();
185 cout << "name = " << name << " k = " << k << endl;
186  BoxVol1->AddNode(CrystalVol,k,trrotCrystal);
187  BoxVol2->AddNode(CrystalVol,k,trrotCrystal);
188  BoxVol3->AddNode(CrystalVol,k,trrotCrystal);
189  BoxVol6->AddNode(CrystalVol,k,trrotCrystal);
190  }
191  if (k==2) {
192  name+=k;
193  trrotCrystal->SetName(name);
194  trrotCrystal->RegisterYourself();
195 cout << "name = " << name << " k = " << k << endl;
196  BoxVol3->AddNode(CrystalVol,k,trrotCrystal);
197  BoxVol4->AddNode(CrystalVol,k,trrotCrystal);
198  BoxVol6->AddNode(CrystalVol,k,trrotCrystal);
199  }
200  if (k==3) {
201  name+=k;
202  trrotCrystal->SetName(name);
203  trrotCrystal->RegisterYourself();
204 cout << "name = " << name << " k = " << k << endl;
205  BoxVol1->AddNode(CrystalVol,k,trrotCrystal);
206  BoxVol3->AddNode(CrystalVol,k,trrotCrystal);
207  BoxVol5->AddNode(CrystalVol,k,trrotCrystal);
208  }
209  }
TGeoVolume * BoxVol3
TGeoTranslation trCrystal
TGeoVolume * BoxVol5
const Double_t kSizeOfCrys
const Double_t kCrystalCrystal
TGeoVolume * BoxVol1
TGeoVolume * BoxVol4
TGeoVolume * BoxVol
TString name
TGeoVolume * CrystalVol
TGeoRotation rotCrystal
TGeoVolume * BoxVol2
TGeoVolume * BoxVol6
for ( Int_t  q = 1; q<=4; q++)

Definition at line 377 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

377  {
378  if (q==1){ // first copy: -X +Y
379  reflection.ReflectX(1);
380  top->AddNode(QuarterVol,q,new TGeoCombiTrans(trQuar,reflection) );
381  }
382  if (q==2){ // second copy: -X -Y
383  reflection.ReflectX(1);
384  top->AddNode(QuarterVol,q,new TGeoCombiTrans(trQuar,reflection) );
385  }
386  if (q==3){ // third copy: +X -Y
387  reflection.ReflectX(1);
388  reflection.ReflectY(1);
389  top->AddNode(QuarterVol,q,new TGeoCombiTrans(trQuar,reflection) );
390  }
391  if (q==4){ // fourth copy: +X +Y
392  reflection.ReflectX(1);
393  top->AddNode(QuarterVol,q,new TGeoCombiTrans(trQuar,reflection) );
394  }
395  }
TGeoVolume * QuarterVol
TGeoVolume * top
TGeoTranslation trQuar
TGeoCombiTrans reflection
gSystem Load ( "libGeoBase"  )
gSystem Load ( "libParBase"  )
gSystem Load ( "libBase"  )
gSystem Load ( "libPndData"  )
gSystem Load ( "libPassive"  )
gROOT Macro ( "$VMCWORKDIR/gconfig/rootlogon.C )
geoFace readMedia ( )
CrystalVol SetLineColor ( )
geoFace setMediaFile ( "/home/dkhaneft/PANDA/pandaroot/trunk_25544/geometry/media_pnd.geo"  )
gGeoMan SetTopVolume ( top  )
top Write ( )

Variable Documentation

TGeoVolume* BoxVol = new TGeoVolumeAssembly("BoxVol")

Definition at line 110 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol1 = new TGeoVolumeAssembly("BoxVol1")

Definition at line 111 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol2 = new TGeoVolumeAssembly("BoxVol2")

Definition at line 112 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol3 = new TGeoVolumeAssembly("BoxVol3")

Definition at line 113 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol4 = new TGeoVolumeAssembly("BoxVol4")

Definition at line 114 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol5 = new TGeoVolumeAssembly("BoxVol5")

Definition at line 115 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* BoxVol6 = new TGeoVolumeAssembly("BoxVol6")

Definition at line 116 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoMedium* CbmMediumAir = Media->getMedium("air")

Definition at line 60 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoMedium* CbmMediumAluminium = Media->getMedium("aluminium")

Definition at line 63 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoMedium* CbmMediumCarbon = Media->getMedium("carbon")

Definition at line 62 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoMedium* CbmMediumPWO = Media->getMedium("PWO")

Definition at line 61 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

CrystalShape = new TGeoBBox(name,0.5*kWidth,0.5*kHeight,0.5*kLength,0)

Definition at line 89 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

CrystalVol = new TGeoVolume(name,CrystalShape,gGeoMan->GetMedium(medium))

Definition at line 90 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TFile* fi = new TFile(outfile,"RECREATE")

Definition at line 49 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoBuilder* geobuild =geoLoad->getGeoBuilder()

Definition at line 58 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoInterface* geoFace = geoLoad->getGeoInterface()

Definition at line 52 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoLoader* geoLoad = new FairGeoLoader("TGeo","FairGeoLoader")

Definition at line 51 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoManager* gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom")

Definition at line 70 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Int_t jj = 0

Definition at line 305 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kAlveoleAlveole = 0.08

Definition at line 17 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kAlveoleThickness = 0.02

Definition at line 14 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kCrystalAlveole = 0.024

Definition at line 18 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kCrystalCrystal = 0.06

Definition at line 16 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kGluedAlveoleThickness = 0.04

Definition at line 15 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kHeight = 2.44

Definition at line 10 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kLength = 20.0

Definition at line 11 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfBoxes = 4

Definition at line 30 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfBoxes1 = 3

Definition at line 25 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfBoxes2 = 10

Definition at line 24 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfBoxes4 = 12

Definition at line 23 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfBoxes4InSubunit = 4

Definition at line 22 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfCrystals = 4

Definition at line 31 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfCrystalsInBox2 = 2

Definition at line 27 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfCrystalsInBox4 = 4

Definition at line 26 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfQuarters = 4

Definition at line 20 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Int_t kNumOfSubunit = 4

Definition at line 21 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

const Double_t kSizeOfCrys = 2.44

Definition at line 12 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

FairGeoMedia* Media = geoFace->getMedia()

Definition at line 57 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TString medium ="PWO"

Definition at line 133 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

name = "CrystalShape"

Definition at line 92 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Definition at line 65 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TString outfile = "./emc_module4_StraightGeo24.4.root"

Definition at line 48 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* QuarterVol = new TGeoVolumeAssembly("QuarterNewVol")

Definition at line 95 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoCombiTrans reflection
TGeoRotation rotBox

Definition at line 86 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoRotation rotCrystal

Definition at line 87 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoRotation rotQuar

Definition at line 84 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoRotation rotSub

Definition at line 85 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Double_t sizeOfBox1 = kWidth + 2*kAlveoleThickness + 2*kCrystalAlveole

Definition at line 33 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Double_t sizeOfBox2 = 2*kWidth + 2*kAlveoleThickness + 2*kCrystalAlveole + kCrystalCrystal

Definition at line 34 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Double_t sizeOfBox4 = sizeOfBox2

Definition at line 35 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Double_t sizeOfQuar = 37.644

Definition at line 73 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

Double_t sizeOfSubunit = 2*sizeOfBox4

Definition at line 36 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol = new TGeoVolumeAssembly("SubunitVol")

Definition at line 98 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol1 = new TGeoVolumeAssembly("SubunitVol1")

Definition at line 99 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol2 = new TGeoVolumeAssembly("SubunitVol2")

Definition at line 100 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol3 = new TGeoVolumeAssembly("SubunitVol3")

Definition at line 101 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol4 = new TGeoVolumeAssembly("SubunitVol4")

Definition at line 102 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol5 = new TGeoVolumeAssembly("SubunitVol5")

Definition at line 103 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol6 = new TGeoVolumeAssembly("SubunitVol6")

Definition at line 104 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol7 = new TGeoVolumeAssembly("SubunitVol7")

Definition at line 105 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol8 = new TGeoVolumeAssembly("SubunitVol8")

Definition at line 106 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* SubunitVol9 = new TGeoVolumeAssembly("SubunitVol9")

Definition at line 107 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoVolume* top = new TGeoVolumeAssembly("Emc4")

Definition at line 75 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoTranslation trBox

Definition at line 81 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoTranslation trCrystal

Definition at line 82 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

trQuar = new TGeoTranslation(0.,0.,0.)

Definition at line 79 of file createRootGeoFileBwEnd_Str24.4_fixed.C.

TGeoTranslation trSub

Definition at line 80 of file createRootGeoFileBwEnd_Str24.4_fixed.C.