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

#include <Doxymodules_runAndEvent.h>

Inheritance diagram for RE01DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 RE01DetectorConstruction ()
 
virtual ~RE01DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 

Private Attributes

G4LogicalVolumefTrackerLayer_log
 
G4LogicalVolumefCalorimeter_log
 

Detailed Description

Definition at line 23 of file Doxymodules_runAndEvent.h.

Constructor & Destructor Documentation

◆ RE01DetectorConstruction()

RE01DetectorConstruction::RE01DetectorConstruction ( )

◆ ~RE01DetectorConstruction()

RE01DetectorConstruction::~RE01DetectorConstruction ( )
virtual

Definition at line 68 of file RE01DetectorConstruction.cc.

69{;}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * RE01DetectorConstruction::Construct ( )
virtual

Definition at line 72 of file RE01DetectorConstruction.cc.

73{
74 //-------------------------------------------------------------------------
75 // Materials
76 //-------------------------------------------------------------------------
77
78 G4double a, iz, density;
79 G4String name, symbol;
80 G4int nel;
81
82 a = 1.01*g/mole;
83 G4Element* elH = new G4Element(name="Hydrogen", symbol="H", iz=1., a);
84
85 a = 12.01*g/mole;
86 G4Element* elC = new G4Element(name="Carbon", symbol="C", iz=6., a);
87
88 // Material Information imported from NIST database.
89 G4NistManager* NISTman = G4NistManager::Instance();
90 G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
91 G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
92 G4Material* arGas = NISTman->FindOrBuildMaterial("G4_Ar");
93 G4Material* silicon = NISTman->FindOrBuildMaterial("G4_Si");
94
95 density = 1.032*g/cm3;
96 G4Material* scinti = new G4Material(name="Scintillator", density, nel=2);
97 scinti->AddElement(elC, 9);
98 scinti->AddElement(elH, 10);
99
100 //-------------------------------------------------------------------------
101 // Detector geometry
102 //-------------------------------------------------------------------------
103 //------------------------------ experimental hall
104 G4Box * experimentalHall_box
105 = new G4Box("expHall_b",fExpHall_x,fExpHall_y,fExpHall_z);
106 G4LogicalVolume * experimentalHall_log
107 = new G4LogicalVolume(experimentalHall_box,air,"expHall_L",0,0,0);
108 G4VPhysicalVolume * experimentalHall_phys
109 = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
110 0,false,0);
111 G4VisAttributes* experimentalHallVisAtt
112 = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
113 experimentalHallVisAtt->SetForceWireframe(true);
114 experimentalHall_log->SetVisAttributes(experimentalHallVisAtt);
115 G4Region* defaultRegion = (*(G4RegionStore::GetInstance()))[0];
116 RE01RegionInformation* defaultRInfo = new RE01RegionInformation();
117 defaultRInfo->SetWorld();
118 defaultRInfo->Print();
119 defaultRegion->SetUserInformation(defaultRInfo);
120
121 //------------------------------ tracker
122 G4VSolid * tracker_tubs
123 = new G4Tubs("trkTubs_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
125 G4LogicalVolume * tracker_log
126 = new G4LogicalVolume(tracker_tubs,arGas,"trackerT_L",0,0,0);
127 // G4VPhysicalVolume * tracker_phys =
128 new G4PVPlacement(0,G4ThreeVector(),tracker_log,"tracker_phys",
129 experimentalHall_log,false,0);
130 G4VisAttributes* tracker_logVisAtt
131 = new G4VisAttributes(G4Colour(1.0,0.0,1.0));
132 tracker_logVisAtt->SetForceWireframe(true);
133 tracker_log->SetVisAttributes(tracker_logVisAtt);
134 G4Region* trackerRegion = new G4Region("TrackerRegion");
135 RE01RegionInformation* trackerInfo = new RE01RegionInformation();
136 trackerInfo->SetTracker();
137 trackerRegion->SetUserInformation(trackerInfo);
138 tracker_log->SetRegion(trackerRegion);
139 trackerRegion->AddRootLogicalVolume(tracker_log);
140
141 //------------------------------ tracker layers
142 // As an example for Parameterised volume
143 // dummy values for G4Tubs -- modified by parameterised volume
144 G4VSolid * trackerLayer_tubs
145 = new G4Tubs("trackerLayer_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
148 = new G4LogicalVolume(trackerLayer_tubs,silicon,"trackerB_L",0,0,0);
149 G4VPVParameterisation * trackerParam
151 // dummy value : kXAxis -- modified by parameterised volume
152 // G4VPhysicalVolume *trackerLayer_phys =
153 new G4PVParameterised("trackerLayer_phys",fTrackerLayer_log,tracker_log,
154 kXAxis, fNotrkLayers, trackerParam);
155 G4VisAttributes* trackerLayer_logVisAtt
156 = new G4VisAttributes(G4Colour(0.5,0.0,1.0));
157 trackerLayer_logVisAtt->SetForceWireframe(true);
158 fTrackerLayer_log->SetVisAttributes(trackerLayer_logVisAtt);
159
160 //------------------------------ calorimeter
161 G4VSolid * calorimeter_tubs
162 = new G4Tubs("calorimeter_tubs",fCaloTubs_rmin,fCaloTubs_rmax,
165 = new G4LogicalVolume(calorimeter_tubs,scinti,"caloT_L",0,0,0);
166 // G4VPhysicalVolume * calorimeter_phys =
167 new G4PVPlacement(0,G4ThreeVector(),fCalorimeter_log,"caloM_P",
168 experimentalHall_log,false,0);
169 G4VisAttributes* calorimeter_logVisATT
170 = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
171 calorimeter_logVisATT->SetForceWireframe(true);
172 fCalorimeter_log->SetVisAttributes(calorimeter_logVisATT);
173 G4Region* calorimeterRegion = new G4Region("CalorimeterRegion");
174 RE01RegionInformation* calorimeterInfo
175 = new RE01RegionInformation();
176 calorimeterInfo->SetCalorimeter();
177 calorimeterRegion->SetUserInformation(calorimeterInfo);
178 fCalorimeter_log->SetRegion(calorimeterRegion);
179 calorimeterRegion->AddRootLogicalVolume(fCalorimeter_log);
180
181 //------------------------------- Lead layers
182 // As an example for Parameterised volume
183 // dummy values for G4Tubs -- modified by parameterised volume
184 G4VSolid * caloLayer_tubs
185 = new G4Tubs("caloLayer_tubs",fCaloRing_rmin,fCaloRing_rmax,
187 G4LogicalVolume * caloLayer_log
188 = new G4LogicalVolume(caloLayer_tubs,lead,"caloR_L",0,0,0);
189 G4VPVParameterisation * calorimeterParam
191 // dummy value : kXAxis -- modified by parameterised volume
192 // G4VPhysicalVolume * caloLayer_phys =
193 new G4PVParameterised("caloLayer_phys",caloLayer_log,fCalorimeter_log,
194 kXAxis, fNocaloLayers, calorimeterParam);
195 G4VisAttributes* caloLayer_logVisAtt
196 = new G4VisAttributes(G4Colour(0.7,1.0,0.0));
197 caloLayer_logVisAtt->SetForceWireframe(true);
198 caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
199
200
201 return experimentalHall_phys;
202}
std::vector< ExP01TrackerHit * > a
G4double fCaloTubs_dphi
G4double fExpHall_z
G4double fTrkTubs_rmax
G4double fCaloTubs_rmin
G4double fCaloRing_dphi
G4double fCaloRing_dz
G4double fCaloRing_rmin
G4int fNocaloLayers
G4double fCaloRing_sphi
G4double fTrkTubs_dphi
G4double fTrkTubs_sphi
G4double fExpHall_y
G4int fNotrkLayers
G4double fTrkTubs_rmin
G4double fCaloTubs_sphi
G4double fTrkTubs_dz
G4double fCaloTubs_rmax
G4double fCaloTubs_dz
G4double fCaloRing_rmax
G4double fExpHall_x
void SetTracker(G4bool v=true)
void SetCalorimeter(G4bool v=true)
virtual void Print() const
void SetWorld(G4bool v=true)

◆ ConstructSDandField()

void RE01DetectorConstruction::ConstructSDandField ( )
virtual

Definition at line 205 of file RE01DetectorConstruction.cc.

206{
207 //------------------------------------------------------------------
208 // Sensitive Detector
209 //------------------------------------------------------------------
210
211 G4String trackerSDname = "/mydet/tracker";
212 RE01TrackerSD * trackerSD = new RE01TrackerSD(trackerSDname);
213 G4SDManager::GetSDMpointer()->AddNewDetector(trackerSD);
214 SetSensitiveDetector(fTrackerLayer_log, trackerSD);
215
216 // N.B. Calorimeter SD is defined in the parallel world.
217
218 //-------------------------------------------------------------------------
219 // Magnetic field
220 //-------------------------------------------------------------------------
221
222 RE01Field* myField = new RE01Field;
223 G4FieldManager* fieldMgr
224 = G4TransportationManager::GetTransportationManager()->GetFieldManager();
225 fieldMgr->SetDetectorField(myField);
226 fieldMgr->CreateChordFinder(myField);
227}

Member Data Documentation

◆ fTrackerLayer_log

G4LogicalVolume* RE01DetectorConstruction::fTrackerLayer_log
private

Definition at line 53 of file RE01DetectorConstruction.hh.

◆ fCalorimeter_log

G4LogicalVolume* RE01DetectorConstruction::fCalorimeter_log
private

Definition at line 54 of file RE01DetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration