4 #include "MyDetectorConstruction.hh"
9 #include "G4LogicalVolume.hh"
10 #include "G4RotationMatrix.hh"
11 #include "G4ThreeVector.hh"
12 #include "G4Transform3D.hh"
13 #include "G4PVPlacement.hh"
15 MyDetectorConstruction::MyDetectorConstruction()
17 expHall_rad = 1000.*cm;
23 litCil_rad = 1000.*cm;
26 bigCil_rad = 1000.*cm;
30 MyDetectorConstruction::~MyDetectorConstruction()
33 G4VPhysicalVolume* MyDetectorConstruction::Construct()
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);
45 //------------------------------ big cylinder
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);
54 //------------------------------ target
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);
63 //------------------------------ little cylinders
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);
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);
83 for(G4int i=0;i<25;i++)
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);
90 //------------------------------------------------------------------
91 return experimentalHall_phys;