ATLAS Offline Software
Loading...
Searching...
No Matches
TBBarrelCryostatConstruction.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// TBBarrelCryostatConstruction
6
7// 25-Jan-2006 G.Unal creation from hardcoded G4 geometry
8
12
13
14#include "GeoModelKernel/GeoElement.h"
15#include "GeoModelKernel/GeoMaterial.h"
16#include "GeoModelKernel/GeoFullPhysVol.h"
17#include "GeoModelKernel/GeoPhysVol.h"
18#include "GeoModelKernel/GeoVPhysVol.h"
19#include "GeoModelKernel/GeoLogVol.h"
20#include "GeoModelKernel/GeoPcon.h"
21#include "GeoModelKernel/GeoTubs.h"
22#include "GeoModelKernel/GeoTransform.h"
23#include "GeoModelKernel/GeoDefinitions.h"
24#include "GeoModelKernel/Units.h"
27#include "GaudiKernel/MsgStream.h"
28#include "GaudiKernel/Bootstrap.h"
29#include "GaudiKernel/PhysicalConstants.h"
33
34#include <string>
35#include <cmath>
36#include <map>
37#include <climits>
38
39#define DEBUG_GEO
40
41#define BUILD_TBCRYO1
42#define BUILD_TBCRYO2
43#define BUILD_ENDCRYO
44#define BUILD_LARMODULE
45#define BUILD_PRESAMPLER
46#define BUILD_LARFOAM
47#define BUILD_SUPPORTRING
48
49
55
56
58
59GeoIntrusivePtr<GeoFullPhysVol> LArGeo::TBBarrelCryostatConstruction::GetEnvelope(const VDetectorParameters* params)
60{
61
63
64// Get access to the material manager
65 MsgStream log(Athena::getMessageSvc(), "LArGeo::TBBarrelCryostatConstruction");
66
67 log << MSG::INFO << "++++++++++++++++++++++++++++++++++++++++++++++++++++i++" << endmsg;
68 log << MSG::INFO << "+ +" << endmsg;
69 log << MSG::INFO << "+ HELLO from LArGeo::TBBarrelCryostatConstruction +" << endmsg;
70 log << MSG::INFO << "+ +" << endmsg;
71 log << MSG::INFO << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endmsg;
72
73
74 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service("DetectorStore")};
75 if(!detStore.isValid()) {
76 throw std::runtime_error("Error in LArDetectorFactory, cannot access DetectorStore");
77 }
78
79// Get the materials from the material manager:---------------------------------------------------
80//
81
82 StoredMaterialManager* materialManager = nullptr;
83 if (StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS"))) return nullptr;
84
85 const GeoMaterial *Air = materialManager->getMaterial("std::Air");
86 if (!Air) {
87 throw std::runtime_error("Error in TBBarrelCryostatConstruction, std::Air is not found.");
88 }
89
90 const GeoMaterial *Aluminium = materialManager->getMaterial("std::Aluminium");
91 if (!Aluminium) {
92 throw std::runtime_error("Error in TBBarrelCryostatConstruction, std::Aluminium is not found.");
93 }
94
95 const GeoMaterial *LAr = materialManager->getMaterial("std::LiquidArgon");
96 if (!LAr) {
97 throw std::runtime_error("Error in TBBarrelCryostatConstruction, std::LiquidArgon is not found.");
98 }
99
100 const GeoMaterial* Iron = materialManager->getMaterial("std::Iron");
101 if (!Iron) {
102 throw std::runtime_error("Error in TBBarrelCryostatConstruction, std::Iron is not found.");
103 }
104
105 const GeoElement* Hydrogen = materialManager->getElement("Hydrogen");
106 if (!Hydrogen) {
107 throw std::runtime_error("Error in TBBarrelCryostatConstruction, hydrogen not found.");
108 }
109
110 const GeoElement* Carbon = materialManager->getElement("Carbon");
111 if (!Carbon) {
112 throw std::runtime_error("Error in TBBarrelCryostatConstruction, carbon not found.");
113 }
114
115 const GeoElement* Oxygen = materialManager->getElement("Oxygen");
116 if (!Oxygen) {
117 throw std::runtime_error("Error in TBBarrelCryostatConstruction, oxygen not found.");
118 }
119
120 GeoMaterial *Vacuum = new GeoMaterial("Vacuum",Gaudi::Units::universe_mean_density );
121 Vacuum->add(Hydrogen,1.);
122 Vacuum->lock();
123
124// define material for FOAM (C5H8O2)
125// latest density value from P.Puzo (october 2003)
126//
127 double density = 0.058*GeoModelKernelUnits::g/Gaudi::Units::cm3;
128 GeoMaterial* Foam = new GeoMaterial("Foam", density);
129 double fraction=8*1.01/(5*12.01+8*1.01+2.*16.0);
130 Foam->add(Hydrogen,fraction);
131 fraction=5.*12.01/(5*12.01+8*1.01+2.*16.0);
132 Foam->add(Carbon,fraction);
133 fraction=2.*16.0/(5*12.01+8*1.01+2.*16.0);
134 Foam->add(Oxygen,fraction);
135 Foam->lock();
136#ifdef DEBUGGEO
137 std::cout << " Foam density,rad length from GeoModel " << density << " " << Foam->getRadLength() << std::endl;
138#endif
139
140
141 std::string baseName = "LAr::TBBarrel::Cryostat::";
142
144// Define geometry
146
147// Big mother volume to be included in transparent way in Calo Ctb envelope
148
149 double zp[3] ={-1050.,0.,3810.};
150 double ri[3] ={965.,965.,965.};
151 double ro[3] ={2270.,2270.,2270.};
152#ifdef DEBUG_GEO
153 std::cout << " " << std::endl;
154 std::cout << " Pcone volume for overall envelope " << std::endl;
155 std::cout << " phi0=-25deg, Dphi=50deg " << std::endl;
156 for (int i=0;i<3;i++) {
157 std::cout << " Plane zp/ri/ro " << zp[i] << " " << ri[i] << " " << ro[i] << std::endl;
158 }
159#endif
160 GeoPcon* Em_pcone = new GeoPcon(-25.*Gaudi::Units::deg,50.*Gaudi::Units::deg);
161 for (int i=0; i < 3; i++) Em_pcone->addPlane(zp[i],ri[i],ro[i]);
162
163 const GeoLogVol* cryoMotherLogical =
164 new GeoLogVol(baseName+"Envelope",Em_pcone, Air);
165
166 cryoMotherPhysical = new GeoFullPhysVol(cryoMotherLogical);
167
168
169// Cryostat geometry
170
171 double Cryo_Distz = 483.5*Gaudi::Units::cm; // total size in z
172 double Cryo_z0 = 103.0*Gaudi::Units::cm; // eta=0 position wrt cryosta edge at z<0
173
174 double DeltaR_cold = 4.1*Gaudi::Units::cm; // thickness cold vessel before calo
175 double DeltaRout_cold = 5.0*Gaudi::Units::cm; // thickness cold vessel after calo
176
177 double DeltaR_warm= 3.86*Gaudi::Units::cm; // thickness warm vessel before calo
178 double DeltaRout_warm = 4.0*Gaudi::Units::cm; // thickness warm vessel after calo
179
180 double DeltaRout_vac = 3.0*Gaudi::Units::cm; // vacuum space cryo after calo
181
182 double Dz_end_warm = 7.0*Gaudi::Units::cm; // thickness of end plate at high z
183 double Dz_end_vac = 8.0*Gaudi::Units::cm;
184 double Dz_end_cold = 7.0*Gaudi::Units::cm;
185
186 double Dz_end_tot = Dz_end_warm + Dz_end_vac + Dz_end_cold;
187
188// position of center of curvature of cryostat before calo
189 double Cryo_Xcent = 3363.;
190
191 double Cryo_Rmax_C = 2326.;
192 double Cryo_Rmin_C = Cryo_Rmax_C - DeltaR_cold;
193
194 double Cryo_Rmax_W = 2396.;
195 double Cryo_Rmin_W = Cryo_Rmax_W - DeltaR_warm;
196
197// recompute vacuum space cryoastat before calo
198// double DeltaR_vac = Cryo_Rmin_W - Cryo_Rmax_C;
199
200 double Rmin_mother = Cryo_Xcent-Cryo_Rmax_W;
201 double Rmax_mother = 2270.;
202
203 double Phi_Min = -5.0 * Gaudi::Units::deg;
204 double Phi_Span = 32.5 * Gaudi::Units::deg;
205// GU 10/09/2004
206// For cryostat mother volume, sligthly larger phi range
207// to avoid clash with front cryostat
208 double Phi_Min_Moth=-9.0*Gaudi::Units::deg;
209 double Phi_Span_Moth=38.5*Gaudi::Units::deg;
210
211// -----------------------------------------------------------------
212// Mother volume for Cryostat, filled with foam
213// ------------------------------------------------------------------
214
215#ifdef DEBUG_GEO
216 std::cout << " " << std::endl;
217 std::cout << "** Mother Volume for TB cryostat (Tubs) " << std::endl;
218 std::cout << " (matter = foam) " << std::endl;
219 std::cout << " Rmin/Rmax " << Rmin_mother << " " << Rmax_mother << std::endl;
220 std::cout << " Dz/2 " << Cryo_Distz/2. << std::endl;
221 std::cout << " PhiMin, Span " << Phi_Min_Moth*(1./Gaudi::Units::deg) << " "
222 << Phi_Span_Moth*(1./Gaudi::Units::deg) << std::endl;
223#endif
224
225 GeoTubs* Cent_tube = new GeoTubs(Rmin_mother,
226 Rmax_mother,
227 Cryo_Distz/2.,
228 Phi_Min_Moth,
229 Phi_Span_Moth);
230 GeoLogVol* Cent_log = new GeoLogVol(baseName+"Mother",Cent_tube,Foam);
231// position in Pcon mother envelope (which has Atlas reference frame)
232 double zpos = Cryo_Distz/2.-Cryo_z0;
233 double phi = -1.*360.*Gaudi::Units::deg/16/2.; // to have x axis in middle of volume
234
235 GeoIntrusivePtr<GeoPhysVol> Cent_phys = new GeoPhysVol(Cent_log);
236 cryoMotherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(phi)));
237 cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zpos)));
238 cryoMotherPhysical->add(Cent_phys);
239
240// ----------------------------------------------------------------------
241// Cryostat before calo
242// ----------------------------------------------------------------------
243#ifdef BUILD_TBCRYO1
244
245// Warm vessel
246
247#ifdef DEBUG_GEO
248 std::cout << " " << std::endl;
249 std::cout << " ** Cryostat before LAr (shape=Tubs)" << std::endl;
250 std::cout << " center in x = " << Cryo_Xcent << std::endl;
251 std::cout << " angle 180-11 deg, span = 14 deg" << std::endl;
252 std::cout << " R warm vessel " << Cryo_Rmin_W << " "
253 << Cryo_Rmax_W << std::endl;
254 std::cout << " R vacuum " << Cryo_Rmax_C << " "
255 << Cryo_Rmin_W << std::endl;
256 std::cout << " R cold vessel " << Cryo_Rmin_C << " "
257 << Cryo_Rmax_C << std::endl;
258 std::cout << " Half size in z " << (Cryo_Distz-Dz_end_tot)/2. << std::endl;
259 std::cout << " position in z in mother " << -Dz_end_tot/2. << std::endl;
260#endif
261
262 GeoTubs* CryoW_tube = new GeoTubs(
263 Cryo_Rmin_W,
264 Cryo_Rmax_W,
265 (Cryo_Distz-Dz_end_tot)/2.,
266 (180.-11.)*Gaudi::Units::deg,
267 14.*Gaudi::Units::deg);
268
269 GeoLogVol* CryoW_log = new GeoLogVol(baseName+"WarmTube",
270 CryoW_tube,
271 Aluminium);
272
273 GeoIntrusivePtr<GeoPhysVol> CryoW_phys = new GeoPhysVol(CryoW_log);
274 Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.)));
275 Cent_phys->add(CryoW_phys);
276
277// Waccum between warm and cold vessels
278
279 GeoTubs* CryoV_tube = new GeoTubs(
280 Cryo_Rmax_C,
281 Cryo_Rmin_W,
282 (Cryo_Distz-Dz_end_tot)/2.,
283 (180.-11.)*Gaudi::Units::deg,
284 14.*Gaudi::Units::deg);
285
286 GeoLogVol *CryoV_log = new GeoLogVol(baseName+"VacTube",
287 CryoV_tube,
288 Vacuum);
289
290 GeoIntrusivePtr<GeoPhysVol> CryoV_phys = new GeoPhysVol(CryoV_log);
291 Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.)));
292 Cent_phys->add(CryoV_phys);
293
294// Cold vessel
295
296 GeoTubs* CryoC_tube = new GeoTubs(
297 Cryo_Rmin_C,
298 Cryo_Rmax_C,
299 (Cryo_Distz-Dz_end_tot)/2.,
300 (180.-11.)*Gaudi::Units::deg,
301 14.*Gaudi::Units::deg);
302
303 GeoLogVol *CryoC_log = new GeoLogVol(baseName+"ColdTube",
304 CryoC_tube,
305 Aluminium);
306
307 GeoIntrusivePtr<GeoPhysVol> CryoC_phys = new GeoPhysVol(CryoC_log);
308 Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.)));
309 Cent_phys->add(CryoC_phys);
310
311#endif
312
313// ----------------------------------------------------------------------
314// ACCB Mother volume for all the LAr
315// including PS + Accordion
316// the LAr start at r=1410mm (end of foam) and go to the beginning of the
317// cold vessel of the cryostat after calo
318//-----------------------------------------------------------------------
319
320 double LAr_inner_radius=141.00*Gaudi::Units::cm; // min radius of PS
321 double LAr_outer_radius=Rmax_mother-DeltaRout_warm-DeltaRout_cold
322 -DeltaRout_vac;
323
324 double LAr_z_max = Cryo_Distz-Dz_end_tot;
325
326#ifdef DEBUG_GEO
327 std::cout << " " << std::endl;
328 std::cout << " *** LAr volume (tubs put in foam)" << std::endl;
329 std::cout << "Rmin/Rmax " << LAr_inner_radius << " "
330 << LAr_outer_radius << std::endl;
331 std::cout << "PhiMin,Span " << Phi_Min*(1./Gaudi::Units::deg) << " "
332 << Phi_Span*(1./Gaudi::Units::deg) << std::endl;
333 std::cout << "DeltaZ/2 " << LAr_z_max/2. << std::endl;
334 std::cout << "Position in z in mother " << (LAr_z_max-Cryo_Distz)/2. << std::endl;
335#endif
336
337// ACCB mother is a tube
338
339 GeoTubs* moth_tube = new GeoTubs( LAr_inner_radius,
340 LAr_outer_radius,
341 LAr_z_max/2.,
342 Phi_Min,
343 Phi_Span);
344
345 GeoLogVol* moth_log = new GeoLogVol(baseName+"LAr",moth_tube,LAr);
346
347 GeoIntrusivePtr<GeoPhysVol> moth_phys = new GeoPhysVol(moth_log);
348
349 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.)));
350 Cent_phys->add(moth_phys);
351
352// Adjust LAR volumes at the end of foam, such as to have
353// 18.5mm before PS at top
354// 12.5mm before PS at mid top
355// 14.5mm before PS at mid
356// 7.5mm before PS at mid bottom
357// 9.5mm before PS at bottom
358// takes into account that for 1 PS sector r at the middle is 1412 and
359// at the edges is 1419. (middle of PS sectors=mid top and mid bottom)
360// therefore compared to r=1410mm (LAr above) to get the correct Ar space
361// one needs to add ~9.5mm at the top, 10mm at mid top, 5.5mm at mid,
362// 5.5mm at mid bottom and 0.5 mm at bottom
363
364// modified 17-Aug-05
365// the measured thickness are at 0, 22.5/4, 22.5/2, 3*22.5/4 and 22.5 deg
366// so define the regions in phi to be better centered on the measurements
367// and to cover:
368// - 0 to 22.5/8 deg = bottom thickness => need 9.5 - 9mm = 0.5mm Ar
369// - 22.5/8 to 3*22.5/8 deg = mid bottom => need 7.5-2mm = 5.5mm Ar
370// - 3*22.5/8 to 5*22.5/8 deg = mid => need 14.5-9 = 5.5 mm Ar
371// - 5*22.5/8 to 7*22.5/8 deg = mid top => need 12.5-2mm = 10.5mm Ar
372// - 7*22.5/8 to 22.5/8 deg = top => need 18.5-9 = 9.5 mm Ar
373
374#ifdef BUILD_LARFOAM
375
376 double delta_LAr[5]={0.5*Gaudi::Units::mm,5.5*Gaudi::Units::mm,5.5*Gaudi::Units::mm,10.5*Gaudi::Units::mm,9.5*Gaudi::Units::mm};
377 double Phi1[5]={0.*Gaudi::Units::deg,22.5/8.*Gaudi::Units::deg,3.*22.5/8*Gaudi::Units::deg,5.*22.5/8*Gaudi::Units::deg,7.*22.5/8*Gaudi::Units::deg};
378 double Delta_phi[5]={22.5/8*Gaudi::Units::deg, 2.*22.5/8.*Gaudi::Units::deg,2.*22.5/8.*Gaudi::Units::deg,2.*22.5/8.*Gaudi::Units::deg,22.5/8.*Gaudi::Units::deg};
379
380// GU 08-dec-2005
381// additionnal LAr fudged before presampler to get better agreement
382// waiting for Rhoacell measurement to know if this is reasonnable or not
383// this should be now considered as a systematics
384// 25mm LAr ~ 0.18 X0
385// double fudge_lar_gap = 25.*mm;
386// GU 28--feb-2006 removed this fudge 25mm, not supported by measurements of Rohacell
387
388 for (int ilar=0;ilar<5;ilar++) {
389 double r1=LAr_inner_radius-delta_LAr[ilar];
390 double r2=LAr_inner_radius;
391
392#ifdef DEBUG_GEO
393 std::cout << " Ar additionnal volume before PS " << r1 << " "
394 << r2 << " " << Phi1[ilar]*(1./Gaudi::Units::deg) << " " << Delta_phi[ilar]*(1./Gaudi::Units::deg) << std::endl;
395#endif
396
397 GeoTubs* lar_tube = new GeoTubs(r1,
398 r2,
399 LAr_z_max/2.,
400 Phi1[ilar],
401 Delta_phi[ilar]);
402
403 GeoLogVol* lar_log = new GeoLogVol(baseName+"LAr2",lar_tube,LAr);
404
405 GeoIntrusivePtr<GeoPhysVol> lar_phys = new GeoPhysVol(lar_log);
406 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.)));
407 Cent_phys->add(lar_phys);
408
409 }
410#endif
411
412// Outer support rings: 6 steel rings, starting just
413// after Barrel volume (G10 bars) (r=2003.6)
414// DZ=80mm for DR=12mm, then DZ=10mm for DR=757mm then DZ=80mm for DR=12mm
415// at locations z=397,805,1255,1750,2316,2868 mm
416#ifdef BUILD_SUPPORTRING
417
418 double R_ring = 2003.6;
419 double DeltaR1_ring = 12.0;
420 double DeltaZ1_ring = 80.0;
421 double DeltaR2_ring = 75.7;
422 double DeltaZ2_ring = 10.0;
423 double DeltaR3_ring = 12.0;
424 double DeltaZ3_ring = 80.0;
425
426#ifdef DEBUG_GEO
427 std::cout << " " << std::endl;
428 std::cout << " *** Support Ring1: R/DR/DZ " << R_ring << " "
429 << DeltaR1_ring << " " << DeltaZ1_ring << std::endl;
430 std::cout << " Ring2: R/DR/DZ " << R_ring+DeltaR1_ring << " "
431 << DeltaR2_ring << " " << DeltaZ2_ring << std::endl;
432 std::cout << " Ring3: R/DR/DZ " << R_ring+DeltaR1_ring+DeltaR2_ring << " "
433 << DeltaR3_ring << " " << DeltaZ3_ring << std::endl;
434#endif
435
436
437 GeoTubs* ring1_shape = new GeoTubs(
438 R_ring,
439 R_ring+DeltaR1_ring,
440 DeltaZ1_ring/2.,
441 Phi_Min,
442 Phi_Span);
443 GeoLogVol* ring1_log = new GeoLogVol(baseName+"Ring1",ring1_shape,Iron);
444 GeoIntrusivePtr<GeoPhysVol> ring1_phys = new GeoPhysVol(ring1_log);
445
446 GeoTubs* ring2_shape = new GeoTubs(
447 R_ring+DeltaR1_ring,
448 R_ring+DeltaR1_ring+DeltaR2_ring,
449 DeltaZ2_ring/2.,
450 Phi_Min,
451 Phi_Span);
452 GeoLogVol* ring2_log = new GeoLogVol(baseName+"Ring2",ring2_shape,Iron);
453 GeoIntrusivePtr<GeoPhysVol> ring2_phys = new GeoPhysVol(ring2_log);
454
455 GeoTubs* ring3_shape = new GeoTubs(
456 R_ring+DeltaR1_ring+DeltaR2_ring,
457 R_ring+DeltaR1_ring+DeltaR2_ring+DeltaR3_ring,
458 DeltaZ3_ring/2.,
459 Phi_Min,
460 Phi_Span);
461 GeoLogVol* ring3_log = new GeoLogVol(baseName+"Ring3",ring3_shape,Iron);
462 GeoIntrusivePtr<GeoPhysVol> ring3_phys = new GeoPhysVol(ring3_log);
463
464 static const double zring[6] = {397.,805.,1255.,1750.,2316.,2868.};
465 for (int iring=0; iring < 6; iring++)
466 {
467 double Zcd = zring[iring]-LAr_z_max/2.+Cryo_z0;
468#ifdef DEBUG_GEO
469 std::cout << " Position ring in LAr mother volume at z = "
470 << Zcd << " (z atlas= " << zring[iring] << std::endl;
471#endif
472 moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd)));
473 moth_phys->add(ring1_phys);
474 moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd)));
475 moth_phys->add(ring2_phys);
476 moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd)));
477 moth_phys->add(ring3_phys);
478 }
479#endif
480
481// -----------------------------------------------------------------
482// Cryostat after LAr
483// -----------------------------------------------------------------
484#ifdef BUILD_TBCRYO2
485 double rmin,rmax;
486
487// Cold vessel
488 rmin = LAr_outer_radius;
489 rmax = LAr_outer_radius + DeltaRout_cold;
490#ifdef DEBUG_GEO
491 std::cout << " " << std::endl;
492 std::cout << "** Cryostat after calo " << std::endl;
493 std::cout << "cold vessel from " << rmin << " to " << rmax << std::endl;
494 std::cout << " position in mother in z " << -Dz_end_tot/2. << std::endl;
495#endif
496 GeoTubs * CryoC2_tube = new GeoTubs(
497 rmin,
498 rmax,
499 (Cryo_Distz-Dz_end_tot)/2.,
500 Phi_Min,
501 Phi_Span);
502 GeoLogVol* CryoC2_log = new GeoLogVol(baseName+"ColdTube2",CryoC2_tube,Aluminium);
503 GeoIntrusivePtr<GeoPhysVol> CryoC2_phys = new GeoPhysVol(CryoC2_log);
504 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.)));
505 Cent_phys->add(CryoC2_phys);
506
507// vacuum between warn and cold vessel
508 rmin = rmax;
509 rmax = rmin + DeltaRout_vac;
510#ifdef DEBUG_GEO
511 std::cout << "vacuum from " << rmin << " to " << rmax << std::endl;
512#endif
513 GeoTubs* CryoV2_tube = new GeoTubs(
514 rmin,
515 rmax,
516 (Cryo_Distz-Dz_end_tot)/2.,
517 Phi_Min,
518 Phi_Span);
519 GeoLogVol* CryoV2_log = new GeoLogVol(baseName+"VacTube2",CryoV2_tube,Vacuum);
520 GeoIntrusivePtr<GeoPhysVol> CryoV2_phys = new GeoPhysVol(CryoV2_log);
521 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.)));
522 Cent_phys->add(CryoV2_phys);
523
524// warm vessel
525 rmin = rmax;
526 rmax = rmin + DeltaRout_warm;
527#ifdef DEBUG_GEO
528 std::cout << "warm vessel from " << rmin << " to " << rmax << std::endl;
529#endif
530 GeoTubs* CryoW2_tube = new GeoTubs(
531 rmin,
532 rmax,
533 (Cryo_Distz-Dz_end_tot)/2.,
534 Phi_Min,
535 Phi_Span);
536 GeoLogVol* CryoW2_log = new GeoLogVol(baseName+"WarmTube2",CryoW2_tube,Aluminium);
537 GeoIntrusivePtr<GeoPhysVol> CryoW2_phys = new GeoPhysVol(CryoW2_log);
538 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.)));
539 Cent_phys->add(CryoW2_phys);
540#endif
541
542// Cryostat end plates at high z
543#ifdef BUILD_ENDCRYO
544
545
546// warm vessel
547#ifdef DEBUG_GEO
548 std::cout << "End plate for warm vessel Rmin,Rmax " << Rmin_mother << " "
549 << Rmax_mother << std::endl;
550 std::cout << " half size in z " << Dz_end_warm/2. << std::endl;
551#endif
552 GeoTubs* CryoEndW_tube = new GeoTubs(
553 Rmin_mother,
554 Rmax_mother,
555 Dz_end_warm/2.,
556 Phi_Min,
557 Phi_Span);
558 GeoLogVol* CryoEndW_log = new GeoLogVol(baseName+"EndWarm",CryoEndW_tube,Aluminium);
559 GeoIntrusivePtr<GeoPhysVol> CryoEndW_phys = new GeoPhysVol(CryoEndW_log);
560 double zwarm = Cryo_Distz/2. - Dz_end_warm/2.;
561#ifdef DEBUG_GEO
562 std::cout << " position in mother at z " << zwarm << std::endl;
563#endif
564 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zwarm)));
565 Cent_phys->add(CryoEndW_phys);
566
567// vaccum part
568#ifdef DEBUG_GEO
569 std::cout << "End plate for vacuum Rmin,Rmax " << Rmin_mother << " "
570 << Rmax_mother << std::endl;
571 std::cout << " half size in z " << Dz_end_vac/2. << std::endl;
572#endif
573 GeoTubs* CryoEndV_tube = new GeoTubs(
574 Rmin_mother,
575 Rmax_mother,
576 Dz_end_vac/2.,
577 Phi_Min,
578 Phi_Span);
579 GeoLogVol* CryoEndV_log = new GeoLogVol(baseName+"EndVac",CryoEndV_tube,Vacuum);
580 GeoIntrusivePtr<GeoPhysVol> CryoEndV_phys = new GeoPhysVol(CryoEndV_log);
581 double zvac = Cryo_Distz/2. - Dz_end_warm - Dz_end_vac/2.;
582#ifdef DEBUG_GEO
583 std::cout << " position in mother at z " << zvac << std::endl;
584#endif
585 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zvac)));
586 Cent_phys->add(CryoEndV_phys);
587
588// cold vessel
589#ifdef DEBUG_GEO
590 std::cout << "End plate for cold vessel Rmin,Rmax " << Rmin_mother << " "
591 << Rmax_mother << std::endl;
592 std::cout << " half size in z " << Dz_end_cold/2. << std::endl;
593#endif
594 GeoTubs* CryoEndC_tube = new GeoTubs(
595 Rmin_mother,
596 Rmax_mother,
597 Dz_end_cold/2.,
598 Phi_Min,
599 Phi_Span);
600 GeoLogVol* CryoEndC_log = new GeoLogVol(baseName+"EndCold",CryoEndC_tube,Aluminium);
601 GeoIntrusivePtr<GeoPhysVol> CryoEndC_phys = new GeoPhysVol(CryoEndC_log);
602 double zcold = Cryo_Distz/2. - Dz_end_warm - Dz_end_vac -Dz_end_cold/2.;
603#ifdef DEBUG_GEO
604 std::cout << " position in mother at z " << zcold << std::endl;
605#endif
606 Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zcold)));
607 Cent_phys->add(CryoEndC_phys);
608
609#endif
610
611// --------------------------------------------------------------------
612// Place the barrel test module inside the LAR volume (moth_phys)
613// --------------------------------------------------------------------
614
615#ifdef BUILD_LARMODULE
616 BarrelConstruction barrelConstruction(true, params); // full geometry
617 barrelConstruction.setBarrelSagging(_barrelSagging);
618 barrelConstruction.setBarrelCellVisLimit(_barrelVisLimit);
619 GeoIntrusivePtr<GeoFullPhysVol> barrelEnvelope = barrelConstruction.GetPositiveEnvelope();
620
621//z=0 of ECAM is z=0 of Atlas
622//z=0 of moth_phys is at + LAr_z_max/2.-Cryo_z0 in atlas frame
623
624 double Zcd = -LAr_z_max/2.+Cryo_z0;
625
626#ifdef DEBUG_GEO
627 std::cout << " " << std::endl;
628 std::cout << " Position ECAM volume in mother LAr at z " << Zcd << std::endl;
629#endif
630
631 if (barrelEnvelope ) {
632 moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd)));
633 moth_phys->add(barrelEnvelope);
634 }
635#endif
636
637// ------------------------------------------------------------------------
638// Place the Presampler test module inside the LAr volume (moth_phys)
639// ------------------------------------------------------------------------
640#ifdef BUILD_PRESAMPLER
641 BarrelPresamplerConstruction barrelPSConstruction(1, params);
642 GeoIntrusivePtr<GeoFullPhysVol> barrelPSEnvelope = barrelPSConstruction.GetPositiveEnvelope();
643// PS lenght = 2*1582.5
644// start should be a z=0 in Atlas => z = -LAr_z_max/2.+Cryo_z0 in moth_phys
645// center of PS in moth phys should be at 1582.5-Cryo_Distz+Cryo_z0 in moth_phys
646
647// Zcd = 1582.5-LAr_z_max/2.+Cryo_z0;
648// new value of PS mother lenght
649// Zcd = 1550.0*mm-LAr_z_max/2.+Cryo_z0;
650// also the PS is shifted by 3mm to start at z=3mm in Atlas equivalent frame
651 double PresamplerMother_length=1549.*Gaudi::Units::mm;
652 double presamplerShift = 3.*Gaudi::Units::mm;
653 Zcd = presamplerShift+PresamplerMother_length-LAr_z_max/2.+Cryo_z0;
654
655#ifdef DEBUG_GEO
656 std::cout << " " << std::endl;
657 std::cout << " Position PS volume in mother LAr at z " << Zcd << std::endl;
658#endif
659
660 if (barrelPSEnvelope ) {
661 moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd)));
662 moth_phys->add(barrelPSEnvelope);
663 StoredPhysVol *sPhysVol = new StoredPhysVol(barrelPSEnvelope);
664 StatusCode status=detStore->record(sPhysVol,"PRESAMPLER_B_POS");
665 if(!status.isSuccess()) throw std::runtime_error ("Cannot store PRESAMPLER_B_POS");
666 }
667
668#endif
669
670 return cryoMotherPhysical;
671
672}
673
674
Scalar phi() const
phi method
#define endmsg
Declaration of BarrelPresamplerConstruction class.
GeoIntrusivePtr< GeoFullPhysVol > GetPositiveEnvelope()
void setBarrelCellVisLimit(int maxCell)
GeoModel description of the LAr Barrel Presampler.
GeoIntrusivePtr< GeoFullPhysVol > GetPositiveEnvelope()
virtual GeoIntrusivePtr< GeoFullPhysVol > GetEnvelope(const VDetectorParameters *params)
GeoIntrusivePtr< GeoFullPhysVol > cryoMotherPhysical
This class holds one or more material managers and makes them storeable, under StoreGate.
virtual const GeoElement * getElement(const std::string &name)=0
virtual const GeoMaterial * getMaterial(const std::string &name)=0
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)