Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ExP02DetectorConstruction Class Reference

Detector construction. More...

#include <Doxymodules_persistency.h>

Inheritance diagram for ExP02DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 ExP02DetectorConstruction ()
 
 ~ExP02DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 

Private Attributes

G4LogicalVolumefExperimentalHall_log
 
G4LogicalVolumefTracker_log
 
G4LogicalVolumefCalorimeterBlock_log
 
G4LogicalVolumefCalorimeterLayer_log
 
G4VPhysicalVolumefExperimentalHall_phys
 
G4VPhysicalVolumefCalorimeterLayer_phys
 
G4VPhysicalVolumefCalorimeterBlock_phys
 
G4VPhysicalVolumefTracker_phys
 

Detailed Description

Detector construction.

Definition at line 102 of file Doxymodules_persistency.h.

Constructor & Destructor Documentation

◆ ExP02DetectorConstruction()

ExP02DetectorConstruction::ExP02DetectorConstruction ( )

◆ ~ExP02DetectorConstruction()

ExP02DetectorConstruction::~ExP02DetectorConstruction ( )

Definition at line 61 of file ExP02DetectorConstruction.cc.

62{
63}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExP02DetectorConstruction::Construct ( )
virtual

Definition at line 67 of file ExP02DetectorConstruction.cc.

68{
69
70 //------------------------------------------------------ materials
71
72 G4double a; // atomic mass
73 G4double z; // atomic number
74 G4double density;
75
76 G4Material* Ar =
77 new G4Material("ArgonGas", z= 18., a= 39.95*g/mole, density= 1.782*mg/cm3);
78
79 G4Material* Al =
80 new G4Material("Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);
81
82 G4Material* Pb =
83 new G4Material("Lead", z= 82., a= 207.19*g/mole, density= 11.35*g/cm3);
84
85 //------------------------------------------------------ volumes
86
87 //------------------------------ experimental hall (world volume)
88 //------------------------------ beam line along x axis
89
90 G4double expHall_x = 3.0*m;
91 G4double expHall_y = 1.0*m;
92 G4double expHall_z = 1.0*m;
93 G4Box* experimentalHall_box
94 = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
95 fExperimentalHall_log = new G4LogicalVolume(experimentalHall_box,
96 Ar,"expHall_log",0,0,0);
97 fExperimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),
98 fExperimentalHall_log,"expHall",0,false,0);
99
100 //------------------------------ a tracker tube
101
102 G4double innerRadiusOfTheTube = 0.*cm;
103 G4double outerRadiusOfTheTube = 60.*cm;
104 G4double hightOfTheTube = 50.*cm;
105 G4double startAngleOfTheTube = 0.*deg;
106 G4double spanningAngleOfTheTube = 360.*deg;
107 G4Tubs* tracker_tube = new G4Tubs("tracker_tube",innerRadiusOfTheTube,
108 outerRadiusOfTheTube,hightOfTheTube,
109 startAngleOfTheTube,spanningAngleOfTheTube);
110 fTracker_log = new G4LogicalVolume(tracker_tube,Al,"tracker_log",0,0,0);
111 G4double trackerPos_x = -1.0*m;
112 G4double trackerPos_y = 0.*m;
113 G4double trackerPos_z = 0.*m;
115 G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z),
116 fTracker_log,"tracker",fExperimentalHall_log,false,0);
117
118 //------------------------------ a calorimeter block
119
120 G4double block_x = 1.0*m;
121 G4double block_y = 50.0*cm;
122 G4double block_z = 50.0*cm;
123 G4Box* calorimeterBlock_box = new G4Box("calBlock_box",block_x,
124 block_y,block_z);
125 fCalorimeterBlock_log = new G4LogicalVolume(calorimeterBlock_box,
126 Pb,"caloBlock_log",0,0,0);
127 G4double blockPos_x = 1.0*m;
128 G4double blockPos_y = 0.0*m;
129 G4double blockPos_z = 0.0*m;
131 G4ThreeVector(blockPos_x,blockPos_y,blockPos_z),
132 fCalorimeterBlock_log,"caloBlock",fExperimentalHall_log,false,0);
133
134 //------------------------------ calorimeter layers
135
136 G4double calo_x = 1.*cm;
137 G4double calo_y = 40.*cm;
138 G4double calo_z = 40.*cm;
139 G4Box* calorimeterLayer_box = new G4Box("caloLayer_box",
140 calo_x,calo_y,calo_z);
141 fCalorimeterLayer_log = new G4LogicalVolume(calorimeterLayer_box,
142 Al,"caloLayer_log",0,0,0);
143 for(G4int i=0;i<19;i++) // loop for 19 layers
144 {
145 G4double caloPos_x = (i-9)*10.*cm;
146 G4double caloPos_y = 0.0*m;
147 G4double caloPos_z = 0.0*m;
149 G4ThreeVector(caloPos_x,caloPos_y,caloPos_z),
150 fCalorimeterLayer_log,"caloLayer",fCalorimeterBlock_log,false,i);
151 }
152
153 //------------------------------------------------------------------
154
155 // writing the geometry to a ROOT file
156
157 // initialize ROOT
158 TSystem ts;
159
160 gSystem->Load("libExP02ClassesDict");
161
162 // gDebug = 1;
163
164 const G4ElementTable* eltab = G4Element::GetElementTable();
165
166 ExP02GeoTree* geotree = new ExP02GeoTree(fExperimentalHall_phys, eltab);
167
168 TFile fo("geo.root","RECREATE");
169
170 fo.WriteObject(geotree, "my_geo");
171
173}
std::vector< ExP01TrackerHit * > a
Helper class needed for the ROOT I/O.

Member Data Documentation

◆ fExperimentalHall_log

G4LogicalVolume* ExP02DetectorConstruction::fExperimentalHall_log
private

Definition at line 54 of file ExP02DetectorConstruction.hh.

◆ fTracker_log

G4LogicalVolume* ExP02DetectorConstruction::fTracker_log
private

Definition at line 55 of file ExP02DetectorConstruction.hh.

◆ fCalorimeterBlock_log

G4LogicalVolume* ExP02DetectorConstruction::fCalorimeterBlock_log
private

Definition at line 56 of file ExP02DetectorConstruction.hh.

◆ fCalorimeterLayer_log

G4LogicalVolume* ExP02DetectorConstruction::fCalorimeterLayer_log
private

Definition at line 57 of file ExP02DetectorConstruction.hh.

◆ fExperimentalHall_phys

G4VPhysicalVolume* ExP02DetectorConstruction::fExperimentalHall_phys
private

Definition at line 61 of file ExP02DetectorConstruction.hh.

◆ fCalorimeterLayer_phys

G4VPhysicalVolume* ExP02DetectorConstruction::fCalorimeterLayer_phys
private

Definition at line 62 of file ExP02DetectorConstruction.hh.

◆ fCalorimeterBlock_phys

G4VPhysicalVolume* ExP02DetectorConstruction::fCalorimeterBlock_phys
private

Definition at line 63 of file ExP02DetectorConstruction.hh.

◆ fTracker_phys

G4VPhysicalVolume* ExP02DetectorConstruction::fTracker_phys
private

Definition at line 64 of file ExP02DetectorConstruction.hh.


The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration