]> git.uio.no Git - u/mrichter/AliRoot.git/blob - Flugg/examples/fluggEx/BiasEx/src/MyDetectorConstruction.cc
Initial import
[u/mrichter/AliRoot.git] / Flugg / examples / fluggEx / BiasEx / src / MyDetectorConstruction.cc
1 // $Id$
2 // Flugg tag $Name$
3
4 #include "MyDetectorConstruction.hh"
5
6 #include "G4Box.hh"
7 #include "G4Tubs.hh"
8 #include "G4Sphere.hh"
9 #include "G4LogicalVolume.hh"
10 #include "G4RotationMatrix.hh"
11 #include "G4ThreeVector.hh"
12 #include "G4Transform3D.hh"
13 #include "G4PVPlacement.hh"
14
15 MyDetectorConstruction::MyDetectorConstruction()
16 {
17   expHall_rad = 1000.*cm;
18   expHall_z = 1000.*cm;
19
20   tar_rad = 3.*cm;
21   tar_z = 10.*cm;
22
23   litCil_rad = 1000.*cm;
24   litCil_z = 10.*cm;
25
26   bigCil_rad = 1000.*cm;
27   bigCil_z = 250.*cm;
28 }
29
30 MyDetectorConstruction::~MyDetectorConstruction()
31 {;}
32
33 G4VPhysicalVolume* MyDetectorConstruction::Construct()
34 {
35 //=======================volumes
36 //-------------------- experimental hall
37   G4Tubs * experimentalHall_tub 
38     = new G4Tubs("expHall_S",0.*cm,expHall_rad,expHall_z,0.*deg,360.*deg);
39   G4LogicalVolume * experimentalHall_log
40     = new G4LogicalVolume(experimentalHall_tub,0,"expHall_L",0,0,0);
41   G4VPhysicalVolume * experimentalHall_phys
42     = new G4PVPlacement(0,G4ThreeVector(),"expHall_P",
43                         experimentalHall_log,0,false,0);
44
45   //------------------------------ big cylinder
46   G4Tubs * bigCil_tub
47     = new G4Tubs("bigCil_S",0.*cm,bigCil_rad,bigCil_z,0.*deg,360.*deg);
48   G4LogicalVolume * bigCil_log
49     = new G4LogicalVolume(bigCil_tub,0,"bigCil_L",0,0,0);
50   G4VPhysicalVolume * bigCil_phys
51     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,750.*cm),"bigCil_P",
52                         bigCil_log,experimentalHall_phys,false,0);
53
54   //------------------------------ target
55   G4Tubs * target_tub
56     = new G4Tubs("tar_S",0.*cm,tar_rad,tar_z,0.*deg,360.*deg);
57   G4LogicalVolume * target_log
58     = new G4LogicalVolume(target_tub,0,"tar_L",0,0,0);
59   G4VPhysicalVolume * target_phys
60     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,-10.*cm),"tar_P",
61                         target_log,experimentalHall_phys,false,0);
62
63   //------------------------------ little cylinders
64   G4Tubs * litCil_tub
65     = new G4Tubs("litCil_S",0.*cm,litCil_rad,litCil_z,0.*deg,360.*deg);
66   G4LogicalVolume * litCil_log
67     = new G4LogicalVolume(litCil_tub,0,"litCil_L",0,0,0);
68
69   /*  G4VPhysicalVolume * litCil_phy1
70     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,10.*cm),
71                         "litCil_P1",litCil_log,experimentalHall_phys,false,0);
72   G4VPhysicalVolume * litCil_phy2
73     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,30.*cm),
74                         "litCil_P2",litCil_log,experimentalHall_phys,false,0);
75   G4VPhysicalVolume * litCil_phy3
76     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,50.*cm),
77                         "litCil_P3",litCil_log,experimentalHall_phys,false,0);
78   G4VPhysicalVolume * litCil_phy4
79     = new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,70.*cm),
80                         "litCil_P4",litCil_log,experimentalHall_phys,false,0);
81                         */
82
83        for(G4int i=0;i<25;i++)
84   {
85     cout<<"Cilindretto num. "<<i<<endl;
86     new G4PVPlacement(0,G4ThreeVector(0.*cm,0.*cm,(1+2*i)*10.*cm),"litCil_P",
87                         litCil_log,experimentalHall_phys,false,i);
88   }
89   
90   //------------------------------------------------------------------
91   return experimentalHall_phys;
92 }