26 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
29 gSystem->Load(
"libGeoBase");
30 gSystem->Load(
"libParBase");
31 gSystem->Load(
"libBase");
32 gSystem->Load(
"libPndData");
33 gSystem->Load(
"libPassive");
36 TFile*
fi =
new TFile(outfile.c_str(),
"RECREATE");
38 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
39 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
40 geoFace->setMediaFile(
"../../../../geometry/media_pnd.geo");
46 FairGeoMedia *
Media = geoFace->getMedia();
47 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
52 Int_t
nmed=geobuild->createMedium(CbmMediumScint);
53 nmed=geobuild->createMedium(CbmMediumIron);
55 TGeoManager*
gGeoMan = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
57 TGeoVolume *
top =
new TGeoVolumeAssembly(
"HCAL");
59 gGeoMan->SetTopVolume(top);
62 TGeoVolumeAssembly*
SubunitVol =
new TGeoVolumeAssembly(
"TTVol");
64 TGeoRotation*
rot1 =
new TGeoRotation(
"",90.,0.,0.);
71 name1 = Form(
"TestHCalScintillator%d",
i+1);
72 name2 = Form(
"TestHCalAbsorber%d",
i+1);
73 TGeoShape* Box1 =
new TGeoBBox(name1.c_str(), dxSci,
dySci,
dzSci);
75 TGeoVolume* BoxVolume1 =
new TGeoVolume(name1.c_str(),Box1,gGeoMan->GetMedium(
"polyvinyltoluene"));
76 TGeoVolume* BoxVolume2 =
new TGeoVolume(name2.c_str(),Box2,gGeoMan->GetMedium(
"iron"));
77 TGeoTranslation* translation1 =
new TGeoTranslation(0.,0.,(
double)
i * 2. *(dzSci+dzAbs));
78 TGeoTranslation* translation2 =
new TGeoTranslation(0.,0.,(
double)
i * 2. * (dzSci+dzAbs) + dzSci+dzAbs);
80 TGeoCombiTrans* geocombi1=
new TGeoCombiTrans(*translation1,*dummyrot);
81 TGeoCombiTrans* geocombi2=
new TGeoCombiTrans(*translation2,*dummyrot);
82 geocombi1->SetName(
"scintillator"+
i);
83 geocombi2->SetName(
"absorber"+
i);
84 geocombi1->RegisterYourself();
85 geocombi2->RegisterYourself();
86 SubunitVol->AddNode(BoxVolume1,0,geocombi1);
87 SubunitVol->AddNode(BoxVolume2,0,geocombi2);
91 top->AddNode(SubunitVol,0,
new TGeoCombiTrans());
93 gGeoMan->CloseGeometry();
101 std::string
move = Form(
"mv %s %s/geometry/.", outfile.c_str(), directory.c_str());
102 cout <<
"moving geometry to the correct folder" << endl;
103 system(move.c_str());
FairGeoBuilder * geobuild
TGeoVolumeAssembly * SubunitVol
FairGeoInterface * geoFace
FairGeoMedium * CbmMediumScint
FairGeoMedium * CbmMediumIron