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

Detector construction class. More...

#include <Doxymodules_errorpropagation.h>

Inheritance diagram for ExErrorDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 ExErrorDetectorConstruction ()
 
 ~ExErrorDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
void SetMagField (G4double)
 

Private Attributes

G4double fXBEAM
 
G4double fXCDET
 
G4double fXECAL
 
G4double fXSOLN
 
G4double fXHCAL
 
G4double fXMUON
 
G4double fNdivECAL
 
G4double fNdivHCAL
 
G4double fYZLength
 
G4double fXHalfWorldLength
 
G4UserLimitsfUserLimits
 
ExErrorMagneticFieldfMagField
 
ExErrorDetectorMessengerfDetectorMessenger
 

Detailed Description

Detector construction class.

Creates a simplified typical HEP detector: An air beamline ( BEAM ) An air central detector ( CDET ) A copper calorimeter, divided in four ( ECAL ) An aluminium calorimeter, divided in ten ( HCAL ) An air muon detector ( MUON )

History: Created: May 2007

Author
P. Arce

Definition at line 19 of file Doxymodules_errorpropagation.h.

Constructor & Destructor Documentation

◆ ExErrorDetectorConstruction()

ExErrorDetectorConstruction::ExErrorDetectorConstruction ( )

Definition at line 50 of file ExErrorDetectorConstruction.cc.

52 fXBEAM(5.*cm), fXCDET(20.*cm), fXECAL(40.*cm), fXSOLN(10.*cm), fXHCAL(100.*cm),
53 fXMUON(50.*cm), fNdivECAL(40./10.), fNdivHCAL(100./10.), fYZLength(50.*cm),
56{
57
58 // create UserLimits
60
62 G4ThreeVector(0.*kilogauss,0.*kilogauss,-1.*kilogauss));
64
65}
ExErrorDetectorMessenger * fDetectorMessenger

◆ ~ExErrorDetectorConstruction()

ExErrorDetectorConstruction::~ExErrorDetectorConstruction ( )

Definition at line 68 of file ExErrorDetectorConstruction.cc.

69{
70 delete fMagField;
71 delete fDetectorMessenger;
72}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExErrorDetectorConstruction::Construct ( )
virtual

Definition at line 75 of file ExErrorDetectorConstruction.cc.

76{
77//--------- Material definition ---------
78
79 //Vacuum
80 /* a = 1.*g/mole;
81 density = 1.E-9*g/cm3;
82 G4Material* Vacuum = new G4Material(name="Vacuum", z=1., a, density);
83 */
84
85 G4NistManager* nistMgr = G4NistManager::Instance();
86 G4Material* air = nistMgr->FindOrBuildMaterial("G4_AIR");
87 //Al
88 G4Material* al = nistMgr->FindOrBuildMaterial("G4_Al");
89 //Fe
90 G4Material* fe = nistMgr->FindOrBuildMaterial("G4_Fe");
91 //Cu
92 G4Material* cu = nistMgr->FindOrBuildMaterial("G4_Cu");
93
94 // Print all the materials defined.
95 //
96 G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
97 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
98
99 //--- Sizes of the principal geometrical components (solids) --- (half lengths)
100 //double fXBEAM = 5.*2.*cm;
101 //double fXCDET = 90.*cm;
102 //double fXECAL = 40.*cm;
103 //double fXSOLN = 10.*cm;
104 //double fXHCAL = 100.*cm;
105 //double fXMUON = 50.*cm;
106 //double fNdivECAL = 10;
107 //double fNdivHCAL = 10;
108 //double fYZLength = 100.*cm;
109
110 // double fXWorldLength= fXBEAM + fXCDET + fXECAL + fXSOLN + fXHCAL + fXMUON;
111
112
113//--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
114
115 //------------------------------
116 // World
117 //------------------------------
118 //- G4double HalfWorldLength = fXWorldLength;
119 G4cout << " HalfWorldLength " << fXHalfWorldLength << G4endl;
120
121 G4Box* solidWorld= new G4Box("world",fXHalfWorldLength,fYZLength,fYZLength);
122 G4LogicalVolume* logicWorld= new G4LogicalVolume( solidWorld, air, "World", 0, 0, 0);
123 // Must place the World Physical volume unrotated at (0,0,0).
124 //
125 G4VPhysicalVolume* physiWorld
126 = new G4PVPlacement(0, // no rotation
127 G4ThreeVector(), // at (0,0,0)
128 "World", // its name
129 logicWorld, // its logical volume
130 0, // its mother volume
131 false, // no boolean operations
132 0); // no field specific to volum
133
134 //------------------------------
135 // BEAM
136 //------------------------------
137 G4Box* solidBEAM = new G4Box("BEAM",fXBEAM,fYZLength,fYZLength);
138 G4LogicalVolume* logicBEAM = new G4LogicalVolume(solidBEAM,air,"BEAM",0,0,0);
139 G4ThreeVector positionBEAM = G4ThreeVector(0.,0.,0.);
140 //G4VPhysicalVolume* physiBEAM =
141 new G4PVPlacement(0, // no rotation
142 positionBEAM, // at (x,y,z)
143 "BEAM", // its name
144 logicBEAM, // its logical volume
145 physiWorld, // its mother volume
146 false, // no boolean operations
147 0); // no particular field
148
149 //------------------------------
150 // CDET (Central DETector)
151 //------------------------------
152 G4ThreeVector positionCdet = G4ThreeVector(fXBEAM + fXCDET/2.,0.,0.);
153 G4Box* solidCDET = new G4Box("CDET",fXCDET/2.,fYZLength,fYZLength);
154 G4LogicalVolume* logicCDET = new G4LogicalVolume(solidCDET,air,"Cdet",0,0,0);
155 // G4VPhysicalVolume* physiCDET =
156 new G4PVPlacement(0, // no rotation
157 positionCdet, // at (x,y,z)
158 "CDET", // its name
159 logicCDET, // its logical volume
160 physiWorld, // its mother volume
161 false, // no boolean operations
162 0); // no particular field
163
164 //------------------------------
165 // ECAL
166 //------------------------------
167 G4ThreeVector positionECAL = G4ThreeVector(fXBEAM + fXCDET + fXECAL/2., 0., 0.);
168 G4Box* solidECAL = new G4Box("ECAL",fXECAL/2.,fYZLength,fYZLength);
169 G4LogicalVolume* logicECAL = new G4LogicalVolume(solidECAL,cu,"ECAL",0,0,0);
170 G4VPhysicalVolume* physiECAL
171 = new G4PVPlacement(0, // no rotation
172 positionECAL, // at (x,y,z)
173 "ECAL", // its name
174 logicECAL, // its logical volume
175 physiWorld, // its mother volume
176 false, // no boolean operations
177 0); // no particular field
178 //--------- Divide it
179 G4Box* solidECALdiv = new G4Box("ECAL",fXECAL/2./fNdivECAL,fYZLength,fYZLength);
180 G4LogicalVolume* logicECALdiv = new G4LogicalVolume(solidECALdiv,cu,"ECALdiv",0,0,0);
181 new G4PVReplica("DVEC", logicECALdiv, physiECAL,
182 kXAxis, G4int(fNdivECAL), fXECAL/fNdivECAL);
183
184
185 //------------------------------
186 // SOLN
187 //------------------------------
188 G4ThreeVector positionSOLN
189 = G4ThreeVector(fXBEAM + fXCDET + fXECAL + fXSOLN/2., 0., 0.);
190 G4Box* solidSOLN = new G4Box("SOLN",fXSOLN/2.,fYZLength,fYZLength);
191 G4LogicalVolume* logicSOLN = new G4LogicalVolume(solidSOLN,al,"SOLN",0,0,0);
192 new G4PVPlacement(0, // no rotation
193 positionSOLN, // at (x,y,z)
194 "SOLN", // its name
195 logicSOLN, // its logical volume
196 physiWorld, // its mother volume
197 false, // no boolean operations
198 0); // no particular field
199
200 //------------------------------
201 // HCAL
202 //------------------------------
203 G4ThreeVector positionHCAL = G4ThreeVector(fXBEAM + fXCDET + fXECAL + fXSOLN + fXHCAL/2., 0., 0.);
204 G4Box* solidHCAL = new G4Box("HCAL",fXHCAL/2.,fYZLength,fYZLength);
205 G4LogicalVolume* logicHCAL = new G4LogicalVolume(solidHCAL,fe,"HCAL",0,0,0);
206 G4VPhysicalVolume* physiHCAL
207 = new G4PVPlacement(0, // no rotation
208 positionHCAL, // at (x,y,z)
209 "HCAL", // its name
210 logicHCAL, // its logical volume
211 physiWorld, // its mother volume
212 false, // no boolean operations
213 0); // no particular field
214 //--------- Divide it
215 G4Box* solidHCALdiv = new G4Box("HCAL",fXHCAL/2./fNdivHCAL,fYZLength,fYZLength);
216 G4LogicalVolume* logicHCALdiv = new G4LogicalVolume(solidHCALdiv,fe,"HCALdiv",0,0,0);
217 new G4PVReplica("DVEH", logicHCALdiv, physiHCAL,
218 kXAxis, G4int(fNdivHCAL), fXHCAL/fNdivHCAL);
219
220 //------------------------------
221 // MUON
222 //------------------------------
223 G4ThreeVector positionMUON
224 = G4ThreeVector(fXBEAM + fXCDET + fXECAL + fXSOLN + fXHCAL + fXMUON/2., 0., 0.);
225 G4Box* solidMUON = new G4Box("MUON",fXMUON/2.,fYZLength,fYZLength);
226 G4LogicalVolume* logicMUON = new G4LogicalVolume(solidMUON,air,"MUON",0,0,0);
227 new G4PVPlacement(0, // no rotation
228 positionMUON, // at (x,y,z)
229 "MUON", // its name
230 logicMUON, // its logical volume
231 physiWorld, // its mother volume
232 false, // no boolean operations
233 0); // no particular field
234
235
236 G4VisAttributes* worldVisAtt = new G4VisAttributes(0);
237 logicWorld->SetVisAttributes( worldVisAtt);
238 return physiWorld;
239}

◆ SetMagField()

void ExErrorDetectorConstruction::SetMagField ( G4double  fieldValue)

Definition at line 242 of file ExErrorDetectorConstruction.cc.

243{
244 fMagField->SetFieldValue(fieldValue);
245}
void SetFieldValue(G4double fieldValue)

Member Data Documentation

◆ fXBEAM

G4double ExErrorDetectorConstruction::fXBEAM
private

Definition at line 71 of file ExErrorDetectorConstruction.hh.

◆ fXCDET

G4double ExErrorDetectorConstruction::fXCDET
private

Definition at line 72 of file ExErrorDetectorConstruction.hh.

◆ fXECAL

G4double ExErrorDetectorConstruction::fXECAL
private

Definition at line 73 of file ExErrorDetectorConstruction.hh.

◆ fXSOLN

G4double ExErrorDetectorConstruction::fXSOLN
private

Definition at line 74 of file ExErrorDetectorConstruction.hh.

◆ fXHCAL

G4double ExErrorDetectorConstruction::fXHCAL
private

Definition at line 75 of file ExErrorDetectorConstruction.hh.

◆ fXMUON

G4double ExErrorDetectorConstruction::fXMUON
private

Definition at line 76 of file ExErrorDetectorConstruction.hh.

◆ fNdivECAL

G4double ExErrorDetectorConstruction::fNdivECAL
private

Definition at line 77 of file ExErrorDetectorConstruction.hh.

◆ fNdivHCAL

G4double ExErrorDetectorConstruction::fNdivHCAL
private

Definition at line 78 of file ExErrorDetectorConstruction.hh.

◆ fYZLength

G4double ExErrorDetectorConstruction::fYZLength
private

Definition at line 79 of file ExErrorDetectorConstruction.hh.

◆ fXHalfWorldLength

G4double ExErrorDetectorConstruction::fXHalfWorldLength
private

Definition at line 80 of file ExErrorDetectorConstruction.hh.

◆ fUserLimits

G4UserLimits* ExErrorDetectorConstruction::fUserLimits
private

Definition at line 83 of file ExErrorDetectorConstruction.hh.

◆ fMagField

ExErrorMagneticField* ExErrorDetectorConstruction::fMagField
private

Definition at line 85 of file ExErrorDetectorConstruction.hh.

◆ fDetectorMessenger

ExErrorDetectorMessenger* ExErrorDetectorConstruction::fDetectorMessenger
private

Definition at line 87 of file ExErrorDetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration