FairRoot/PandaRoot
createDummySensor.C
Go to the documentation of this file.
1 {
2 
3  TString outfile= "dummysensor.root";
4 
5  // materials & media
6  TGeoMaterial *matVacuum = new TGeoMaterial("vacuum",0,0,0);
7  TGeoMaterial *matSilicon = new TGeoMaterial("silicon", 28.0855, 14, 2.33);
8  TGeoMedium *medVacuum = new TGeoMedium("vacuum", 1, matVacuum);
9  TGeoMedium *medSilicon = new TGeoMedium("silicon", 2, matSilicon);
10 
11  //surrounding box
12  TGeoShape* topShape= new TGeoBBox(100,100,100);
13  TGeoVolume* topNode = new TGeoVolume("top", topShape, medVacuum);
14  topNode->SetAsTopVolume();
15 
16  TGeoVolumeAssembly* assamb = new TGeoVolumeAssembly("DummysensorAss");
17 
18  TGeoShape* shape = new TGeoBBox(0.96, 0.96, 0.015);
19  TGeoRotation* rot = new TGeoRotation("rot",0.,85.,0.);//2.Stelle in 10er
20  TGeoCombiTrans *trafo = new TGeoCombiTrans(0., 0., 4., rot);
21  TGeoVolume* sensor = new TGeoVolume("DtsStripSensorRect",shape,medSilicon);
22 
23  assamb->AddNode(sensor,0,trafo);
24  topNode->AddNode(assamb,0,new TGeoHMatrix());
25 
26  topNode->Export(outfile.Data(),"topNode","recreate");
27 
28 // topNode->Draw("ogl");
29 }
30 
TGeoMedium * medSilicon
TGeoCombiTrans * trafo
TGeoVolume * sensor
TGeoMedium * medVacuum
TGeoVolumeAssembly * assamb
TGeoMaterial * matSilicon
TGeoShape * shape
TGeoMaterial * matVacuum
TGeoVolume * topNode
TGeoRotation rot
TGeoShape * topShape
TString outfile