G4double maxLength = 2*trackerLength, maxTime = 0.1*ns, minEkin = 10*MeV; trackerLV->SetUserLimits(new G4UserLimits(maxStep,
maxLength,
maxTime,
minEkin));
118{
119 G4Material* air = G4Material::GetMaterial(
"G4_AIR");
120
121
122
123 G4int NbOfChambers = 5;
124 G4double chamberSpacing = 80*cm;
125
126 G4double chamberWidth = 20.0*cm;
127 G4double targetLength = 5.0*cm;
128
129 G4double trackerLength = (NbOfChambers+1)*chamberSpacing;
130
131 G4double worldLength = 1.2 * (2*targetLength + trackerLength);
132
133 G4double targetRadius = 0.5*targetLength;
134 targetLength = 0.5*targetLength;
135 G4double trackerSize = 0.5*trackerLength;
136
137
138
139
140
141 G4GeometryManager::GetInstance()->SetWorldMaximumExtent(worldLength);
142
143 G4cout << "Computed tolerance = "
144 << G4GeometryTolerance::GetInstance()->GetSurfaceTolerance()/mm
145 << " mm" << G4endl;
146
149 worldLength/2,worldLength/2,worldLength/2);
152 worldS,
153 air,
154 "World");
155
156
157
160 0,
161 G4ThreeVector(),
162 worldLV,
163 "World",
164 0,
165 false,
166 0,
168
169
170
171 G4ThreeVector positionTarget = G4ThreeVector(0,0,-(targetLength+trackerSize));
172
174 =
new G4Tubs(
"target",0.,targetRadius,targetLength,0.*deg,360.*deg);
178 positionTarget,
180 "Target",
181 worldLV,
182 false,
183 0,
185
186 G4cout << "Target is " << 2*targetLength/cm << " cm of "
188
189
190
191 G4ThreeVector positionTracker = G4ThreeVector(0,0,0);
192
194 =
new G4Tubs(
"tracker",0,trackerSize,trackerSize, 0.*deg, 360.*deg);
198 positionTracker,
199 trackerLV,
200 "Tracker",
201 worldLV,
202 false,
203 0,
205
206
207
208
209
210
212 =
new G4Tubs(
"tracker",0, 100*cm, 100*cm, 0.*deg, 360.*deg);
215
216 G4double firstPosition = -trackerSize + chamberSpacing;
217 G4double firstLength = trackerLength/10;
218 G4double lastLength = trackerLength;
219
222 NbOfChambers,
223 firstPosition,
224 chamberSpacing,
225 chamberWidth,
226 firstLength,
227 lastLength);
228
229
230
233 trackerLV,
234 kZAxis,
235 NbOfChambers,
236 chamberParam,
238
239 G4cout << "There are " << NbOfChambers << " chambers in the tracker region. "
240 << "\nThe chambers are " << chamberWidth/cm << " cm of "
242 << chamberSpacing/cm << " cm" << G4endl;
243
244
245
247 worldLV ->SetVisAttributes(boxVisAtt);
249 trackerLV ->SetVisAttributes(boxVisAtt);
250
253
254
255
256
257
258
259
260
261 G4double maxStep = 0.5*chamberWidth;
264
265
266
267
268
269
270
271
272
273
274
275 return worldPV;
276}
A parameterisation that describes a series of boxes along Z.