FairRoot/PandaRoot
Functions | Variables
createJuelichHCal.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 ("../../../../geometry/media_pnd.geo")
 
geoFace readMedia ()
 
geoFace print ()
 
gGeoMan SetTopVolume (top)
 
 for (int i=0;i< nStages;i++)
 
top AddNode (SubunitVol, 0, new TGeoCombiTrans())
 
gGeoMan CloseGeometry ()
 
top Write ()
 
fi Close ()
 

Variables

const Double_t dySci = 1.4
 
const Double_t dzSci = 0.225
 
const Double_t dxAbs = 1.4
 
const Double_t dyAbs = 1.4
 
const Double_t dzAbs = 0.25
 
const Int_t nStages = 15
 
std::string outfile = "HCal.root"
 
TFile * fi = new TFile(outfile.c_str(),"RECREATE")
 
FairGeoLoader * geoLoad = new FairGeoLoader("TGeo","FairGeoLoader")
 
FairGeoInterface * geoFace = geoLoad->getGeoInterface()
 
FairGeoMedia * Media = geoFace->getMedia()
 
FairGeoBuilder * geobuild =geoLoad->getGeoBuilder()
 
FairGeoMedium * CbmMediumScint = Media->getMedium("polyvinyltoluene")
 
FairGeoMedium * CbmMediumIron = Media->getMedium("iron")
 
Int_t nmed =geobuild->createMedium(CbmMediumScint)
 
TGeoManager * gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom")
 
TGeoVolume * top = new TGeoVolumeAssembly("HCAL")
 
TGeoVolumeAssembly * SubunitVol = new TGeoVolumeAssembly("TTVol")
 
TGeoRotation * dummyrot = new TGeoRotation()
 
TGeoRotation * rot1 = new TGeoRotation("",90.,0.,0.)
 
std::string name1
 
std::string name2
 
std::string directory = gSystem->Getenv("VMCWORKDIR")
 
std::string move = Form("mv %s %s/geometry/.", outfile.c_str(), directory.c_str())
 

Function Documentation

top AddNode ( SubunitVol  ,
,
new   TGeoCombiTrans() 
)
fi Close ( )
gGeoMan CloseGeometry ( )
for ( )

Definition at line 68 of file createJuelichHCal.C.

References dxAbs, dyAbs, dySci, dzAbs, dzSci, and i.

69  {
70 
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);
74  TGeoShape* Box2 = new TGeoBBox(name2.c_str(), dxAbs, dyAbs, dzAbs);
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);
79 
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);
88 
89  }
const Double_t dySci
TGeoRotation * dummyrot
const Double_t dyAbs
Int_t i
Definition: run_full.C:25
TGeoManager * gGeoMan
TGeoVolume * SubunitVol
const Double_t dxAbs
const Double_t dzSci
const Double_t dzAbs
gSystem Load ( "libGeoBase"  )
gSystem Load ( "libParBase"  )
gSystem Load ( "libBase"  )
gSystem Load ( "libPndData"  )
gSystem Load ( "libPassive"  )
gROOT Macro ( "$VMCWORKDIR/gconfig/rootlogon.C )
geoFace readMedia ( )
geoFace setMediaFile ( "../../../../geometry/media_pnd.geo"  )
gGeoMan SetTopVolume ( top  )
top Write ( )

Variable Documentation

FairGeoMedium* CbmMediumIron = Media->getMedium("iron")

Definition at line 50 of file createJuelichHCal.C.

FairGeoMedium* CbmMediumScint = Media->getMedium("polyvinyltoluene")

Definition at line 49 of file createJuelichHCal.C.

std::string directory = gSystem->Getenv("VMCWORKDIR")

Definition at line 100 of file createJuelichHCal.C.

TGeoRotation* dummyrot = new TGeoRotation()

Definition at line 63 of file createJuelichHCal.C.

const Double_t dxAbs = 1.4

Definition at line 15 of file createJuelichHCal.C.

Referenced by for().

const Double_t dyAbs = 1.4

Definition at line 16 of file createJuelichHCal.C.

Referenced by for().

const Double_t dySci = 1.4

Definition at line 11 of file createJuelichHCal.C.

Referenced by for().

const Double_t dzAbs = 0.25

Definition at line 17 of file createJuelichHCal.C.

Referenced by for().

const Double_t dzSci = 0.225

Definition at line 12 of file createJuelichHCal.C.

Referenced by for().

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

Definition at line 36 of file createJuelichHCal.C.

FairGeoBuilder* geobuild =geoLoad->getGeoBuilder()

Definition at line 47 of file createJuelichHCal.C.

FairGeoInterface* geoFace = geoLoad->getGeoInterface()

Definition at line 39 of file createJuelichHCal.C.

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

Definition at line 38 of file createJuelichHCal.C.

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

Definition at line 55 of file createJuelichHCal.C.

FairGeoMedia* Media = geoFace->getMedia()

Definition at line 46 of file createJuelichHCal.C.

std::string move = Form("mv %s %s/geometry/.", outfile.c_str(), directory.c_str())
std::string name1

Definition at line 66 of file createJuelichHCal.C.

std::string name2

Definition at line 66 of file createJuelichHCal.C.

Definition at line 52 of file createJuelichHCal.C.

const Int_t nStages = 15

Definition at line 20 of file createJuelichHCal.C.

std::string outfile = "HCal.root"

Definition at line 35 of file createJuelichHCal.C.

TGeoRotation* rot1 = new TGeoRotation("",90.,0.,0.)

Definition at line 64 of file createJuelichHCal.C.

TGeoVolumeAssembly* SubunitVol = new TGeoVolumeAssembly("TTVol")

Definition at line 62 of file createJuelichHCal.C.

TGeoVolume* top = new TGeoVolumeAssembly("HCAL")

Definition at line 57 of file createJuelichHCal.C.