FairRoot/PandaRoot
Functions | Variables
createRootGeoFileFwEnd.C File Reference

Go to the source code of this file.

Functions

 for (Int_t i=0;i< 16;i++)
 
gROOT LoadMacro ("$VMCWORKDIR/gconfig/basiclibs.C")
 
 basiclibs ()
 
gSystem Load ("libGeoBase")
 
gSystem Load ("libParBase")
 
gSystem Load ("libBase")
 
gSystem Load ("libPndData")
 
gSystem Load ("libPassive")
 
geoFace setMediaFile ("../../../pandaroot/geometry/media_pnd.geo")
 
geoFace readMedia ()
 
geoFace print ()
 
gGeoMan SetTopVolume (top)
 
cout
<< "-----------------------------------------------> Quarter
VOLUME<<endl;name="QuarterShape";QuarterShape=newTGeoArb8(name,dz,vertQuar);name="QuarterVol";TStringmedium="air";QuarterVol=newTGeoVolume(name,QuarterShape,gGeoMan-> 
GetMedium (medium))
 
CrystalVol SetLineColor (5)
 
trrotQuar SetName (name)
 
trrotQuar RegisterYourself ()
 
top AddNode (QuarterVol, 1, trrotQuar)
 
 for (Int_t q=1;q<=3;q++)
 
gGeoMan CloseGeometry ()
 
top Write ()
 
fi Close ()
 

Variables

const Double_t kSpaceInSub = 0.024
 
const Double_t kSpaceSubGlue = 0.036
 
const Double_t kAlveoleThickness = 0.018
 
const Int_t kNumOfQuarters = 1
 
const Int_t kNumOfBoxes = 4
 
const Int_t kNumOfCrystals = 4
 
Double_t tr = 2.51875
 
Double_t dz = 10.000
 
Double_t vert [20] = 0.0000
 
Double_t vert0 [20]
 
Double_t vertBox [20]
 
Double_t vertSub [20]
 
Double_t vertQuar [20]
 
Double_t spacesQuar = 0.0
 
TString outfile = "../../geometry/emc_module3.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 = 96.192
 
TGeoVolume * top = gGeoMan->MakeTube("top",gGeoMan->GetMedium("air"),0,98,22.5)
 
TGeoTranslation trQuar = new TGeoTranslation(0.5*sizeOfQuar,0.5*sizeOfQuar,0.)
 
TGeoTranslation trSub
 
TGeoTranslation trBox
 
TGeoTranslation trCrystal
 
TGeoRotation rotQuar = new TGeoRotation()
 
TGeoRotation rotSub
 
TGeoRotation rotBox
 
TGeoRotation rotCrystal
 
TGeoShape * QuarterShape
 
TGeoShape * SubunitShape = new TGeoArb8(name,dz,vertSub)
 
TGeoShape * BoxShape = new TGeoArb8(name,dz,vertBox)
 
TGeoShape * CrystalShape = new TGeoArb8(name,dz,vert)
 
TGeoVolume * QuarterVol
 
TGeoVolume * SubunitVol = new TGeoVolume(name,SubunitShape,gGeoMan->GetMedium(medium))
 
TGeoVolume * BoxVol = new TGeoVolume(name,BoxShape,gGeoMan->GetMedium(medium))
 
TGeoVolume * CrystalVol = new TGeoVolume(name,CrystalShape,gGeoMan->GetMedium(medium))
 
TString name = "SubunitShape"
 
TString medium ="air"
 
Double_t ShiftToZeroSub = kSpaceInSub + kAlveoleThickness
 
Double_t kSubShift =10.363
 
Double_t FrontFaceToOffPoint =295
 
Int_t jj =0
 
TGeoCombiTrans * trrotQuar = new TGeoCombiTrans(trQuar,rotQuar)
 

Function Documentation

top AddNode ( QuarterVol  ,
,
trrotQuar   
)
basiclibs ( )
fi Close ( )
gGeoMan CloseGeometry ( )
for ( )

Definition at line 39 of file createRootGeoFileFwEnd.C.

References Double_t, i, and kSpaceInSub.

39  {
40  Double_t spaces = 0.5*kSpaceInBox + kSpaceInSub;
41  if (i==0 || i==1)
42  {
43  vertBox[i] = (-vert[3] - spaces); // lower-left corner back-side
44  }
45  else if (i==8 || i==9)
46  {
47  vertBox[i] = (-vert[11] - spaces); // lower-left corner front-side
48  }
49  else if (i==7 || i==15)
50  {
51  vertBox[i] = (-vert[i-1] - spaces); // lower-right points (front & back sides)
52  }
53  else if (i==2 || i==10) // upper-left points (front & back sides)
54  {
55  vertBox[i] = (-vert[i+1] - spaces);
56  }
57  else
58  {
59  vertBox[i] = (vert[i] + spaces); // rest of those points
60  }
61  }
const Double_t kSpaceInSub
Int_t i
Definition: run_full.C:25
Double_t vertBox[20]
Double_t
Double_t vert[20]
for ( Int_t  q = 1; q<=3; q++)

Definition at line 359 of file createRootGeoFileFwEnd.C.

References reflection.

359  {
360  TGeoCombiTrans reflection;
361  TGeoTranslation ttt;
362  if (q==1){
363  reflection.ReflectX(1);
364  ttt = new TGeoTranslation(-0.5*sizeOfQuar,0.5*sizeOfQuar,0.);
365  }
366  if (q==2){
367  reflection.ReflectY(1);
368  ttt = new TGeoTranslation(0.5*sizeOfQuar,-0.5*sizeOfQuar,0.);
369  }
370  if (q==3){
371  reflection.ReflectY(1);
372  reflection.ReflectX(1);
373  ttt = new TGeoTranslation(-0.5*sizeOfQuar,-0.5*sizeOfQuar,0.);
374  }
375 
376  top->AddNode(QuarterVol,q+1,new TGeoCombiTrans(ttt,reflection));
377  }
TGeoVolume * QuarterVol
TGeoVolume * top
TGeoCombiTrans reflection
cout<< "-----------------------------------------------> Quarter VOLUME<<endl;name="QuarterShape";QuarterShape=newTGeoArb8(name,dz,vertQuar);name="QuarterVol";TStringmedium="air";QuarterVol=newTGeoVolume(name,QuarterShape,gGeoMan-> GetMedium ( medium  )
gSystem Load ( "libGeoBase"  )
gSystem Load ( "libParBase"  )
gSystem Load ( "libBase"  )
gSystem Load ( "libPndData"  )
gSystem Load ( "libPassive"  )
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/basiclibs.C )
geoFace readMedia ( )
trrotQuar RegisterYourself ( )
CrystalVol SetLineColor ( )
geoFace setMediaFile ( "../../../pandaroot/geometry/media_pnd.geo"  )
trrotQuar SetName ( name  )
gGeoMan SetTopVolume ( top  )
top Write ( )

Variable Documentation

BoxShape = new TGeoArb8(name,dz,vertBox)

Definition at line 167 of file createRootGeoFileFwEnd.C.

BoxVol = new TGeoVolume(name,BoxShape,gGeoMan->GetMedium(medium))

Definition at line 172 of file createRootGeoFileFwEnd.C.

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

Definition at line 136 of file createRootGeoFileFwEnd.C.

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

Definition at line 139 of file createRootGeoFileFwEnd.C.

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

Definition at line 138 of file createRootGeoFileFwEnd.C.

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

Definition at line 137 of file createRootGeoFileFwEnd.C.

CrystalShape = new TGeoArb8(name,dz,vert)

Definition at line 168 of file createRootGeoFileFwEnd.C.

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

Definition at line 173 of file createRootGeoFileFwEnd.C.

dz = 10.000

Definition at line 15 of file createRootGeoFileFwEnd.C.

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

Definition at line 125 of file createRootGeoFileFwEnd.C.

Double_t FrontFaceToOffPoint =295

Definition at line 290 of file createRootGeoFileFwEnd.C.

FairGeoBuilder* geobuild =geoLoad->getGeoBuilder()

Definition at line 134 of file createRootGeoFileFwEnd.C.

FairGeoInterface* geoFace = geoLoad->getGeoInterface()

Definition at line 128 of file createRootGeoFileFwEnd.C.

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

Definition at line 127 of file createRootGeoFileFwEnd.C.

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

Definition at line 146 of file createRootGeoFileFwEnd.C.

Int_t jj =0

Definition at line 291 of file createRootGeoFileFwEnd.C.

const Double_t kAlveoleThickness = 0.018

Definition at line 8 of file createRootGeoFileFwEnd.C.

const Int_t kNumOfBoxes = 4

Definition at line 11 of file createRootGeoFileFwEnd.C.

const Int_t kNumOfCrystals = 4

Definition at line 12 of file createRootGeoFileFwEnd.C.

const Int_t kNumOfQuarters = 1

Definition at line 10 of file createRootGeoFileFwEnd.C.

const Double_t kSpaceInSub = 0.024

Definition at line 5 of file createRootGeoFileFwEnd.C.

const Double_t kSpaceSubGlue = 0.036

Definition at line 6 of file createRootGeoFileFwEnd.C.

Double_t kSubShift =10.363

Definition at line 289 of file createRootGeoFileFwEnd.C.

FairGeoMedia* Media = geoFace->getMedia()

Definition at line 133 of file createRootGeoFileFwEnd.C.

TString medium ="air"

Definition at line 194 of file createRootGeoFileFwEnd.C.

name = "SubunitShape"

Definition at line 175 of file createRootGeoFileFwEnd.C.

Definition at line 141 of file createRootGeoFileFwEnd.C.

TString outfile = "../../geometry/emc_module3.root"

Definition at line 124 of file createRootGeoFileFwEnd.C.

TGeoShape* QuarterShape

Definition at line 165 of file createRootGeoFileFwEnd.C.

TGeoVolume* QuarterVol

Definition at line 170 of file createRootGeoFileFwEnd.C.

TGeoRotation rotBox

Definition at line 162 of file createRootGeoFileFwEnd.C.

TGeoRotation rotCrystal

Definition at line 163 of file createRootGeoFileFwEnd.C.

rotQuar = new TGeoRotation()

Definition at line 160 of file createRootGeoFileFwEnd.C.

TGeoRotation rotSub

Definition at line 161 of file createRootGeoFileFwEnd.C.

Definition at line 288 of file createRootGeoFileFwEnd.C.

Double_t sizeOfQuar = 96.192

Definition at line 149 of file createRootGeoFileFwEnd.C.

Double_t spacesQuar = 0.0

Definition at line 89 of file createRootGeoFileFwEnd.C.

SubunitShape = new TGeoArb8(name,dz,vertSub)

Definition at line 166 of file createRootGeoFileFwEnd.C.

SubunitVol = new TGeoVolume(name,SubunitShape,gGeoMan->GetMedium(medium))

Definition at line 171 of file createRootGeoFileFwEnd.C.

TGeoVolume* top = gGeoMan->MakeTube("top",gGeoMan->GetMedium("air"),0,98,22.5)

Definition at line 151 of file createRootGeoFileFwEnd.C.

Double_t tr = 2.51875

Definition at line 14 of file createRootGeoFileFwEnd.C.

TGeoTranslation trBox

Definition at line 157 of file createRootGeoFileFwEnd.C.

TGeoTranslation trCrystal

Definition at line 158 of file createRootGeoFileFwEnd.C.

trQuar = new TGeoTranslation(0.5*sizeOfQuar,0.5*sizeOfQuar,0.)

Definition at line 155 of file createRootGeoFileFwEnd.C.

TGeoCombiTrans* trrotQuar = new TGeoCombiTrans(trQuar,rotQuar)

Definition at line 352 of file createRootGeoFileFwEnd.C.

TGeoTranslation trSub

Definition at line 156 of file createRootGeoFileFwEnd.C.

vert[15] = 0.0000

Definition at line 15 of file createRootGeoFileFwEnd.C.

Double_t vert0[20]

Definition at line 16 of file createRootGeoFileFwEnd.C.

Double_t vertBox[20]

Definition at line 16 of file createRootGeoFileFwEnd.C.

Double_t vertQuar[20]

Definition at line 16 of file createRootGeoFileFwEnd.C.

Double_t vertSub[20]

Definition at line 16 of file createRootGeoFileFwEnd.C.