ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LArGeo::EndcapDMConstruction Class Reference

#include <EndcapDMConstruction.h>

Collaboration diagram for LArGeo::EndcapDMConstruction:

Public Member Functions

 EndcapDMConstruction (bool)
 
 ~EndcapDMConstruction ()=default
 
void create (GeoIntrusivePtr< GeoFullPhysVol > envelope) const
 

Private Member Functions

 EndcapDMConstruction (const EndcapDMConstruction &)
 
EndcapDMConstructionoperator= (const EndcapDMConstruction &)
 

Private Attributes

bool m_activateFT
 

Detailed Description

Definition at line 13 of file EndcapDMConstruction.h.

Constructor & Destructor Documentation

◆ EndcapDMConstruction() [1/2]

LArGeo::EndcapDMConstruction::EndcapDMConstruction ( bool  ft)

Definition at line 41 of file EndcapDMConstruction.cxx.

41  :
43 {
44 }

◆ ~EndcapDMConstruction()

LArGeo::EndcapDMConstruction::~EndcapDMConstruction ( )
default

◆ EndcapDMConstruction() [2/2]

LArGeo::EndcapDMConstruction::EndcapDMConstruction ( const EndcapDMConstruction )
private

Member Function Documentation

◆ create()

void LArGeo::EndcapDMConstruction::create ( GeoIntrusivePtr< GeoFullPhysVol >  envelope) const

Definition at line 48 of file EndcapDMConstruction.cxx.

49 {
50  ISvcLocator* svcLocator = Gaudi::svcLocator();
51  IMessageSvc* msgSvc(nullptr);
52  if(svcLocator->service("MessageSvc", msgSvc, true)==StatusCode::FAILURE)
53  throw std::runtime_error("Error in EndcapDMConstruction, cannot access MessageSvc");
54  MsgStream log(msgSvc, "EndcapDMConstruction");
55  log << MSG::INFO << "Start building EC electronics geometry" << endmsg;
56 
57  StoreGateSvc* detStore(nullptr);
58  if(svcLocator->service("DetectorStore", detStore, false)==StatusCode::FAILURE)
59  throw std::runtime_error("Error in EndcapDMConstruction, cannot access DetectorStore");
60 
61  IGeoModelSvc* geoModel(nullptr);
62  if(svcLocator->service("GeoModelSvc",geoModel) == StatusCode::FAILURE)
63  throw std::runtime_error("Error in EndcapDMConstruction, cannot access GeoModelSvc");
64 
65  IRDBAccessSvc* rdbAccess(nullptr);
66  if(svcLocator->service("RDBAccessSvc",rdbAccess) == StatusCode::FAILURE)
67  throw std::runtime_error("Error in EndcapDMConstruction, cannot access RDBAccessSvc");
68 
69  DecodeVersionKey keyLAr(geoModel, "LAr");
70  StoredMaterialManager* materialManager = nullptr;
71  if(StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS")))
72  throw std::runtime_error("Error in EndcapDMConstruction, stored MaterialManager is not found");
73 
74  IRDBRecordset_ptr LArEndcapCrate = rdbAccess->getRecordsetPtr("LArEndcapCrate",keyLAr.tag(),keyLAr.node());
75  if(LArEndcapCrate->size()==0) {
76  log << MSG::INFO << "Skip building EC electronics. Database flag not set" << endmsg;
77  return;
78  }
79  IRDBRecordset_ptr LArEndcapCratePhiPos = rdbAccess->getRecordsetPtr("LArEndcapCratePhiPos",keyLAr.tag(),keyLAr.node());
80  IRDBRecordset_ptr BarrelDMTraps = rdbAccess->getRecordsetPtr("BarrelDMTraps",keyLAr.tag(),keyLAr.node());
81  IRDBRecordset_ptr BarrelDMTrds = rdbAccess->getRecordsetPtr("BarrelDMTrds",keyLAr.tag(),keyLAr.node());
82  IRDBRecordset_ptr BarrelDMTubes = rdbAccess->getRecordsetPtr("BarrelDMTubes",keyLAr.tag(),keyLAr.node());
83  IRDBRecordset_ptr BarrelDMBoxes = rdbAccess->getRecordsetPtr("BarrelDMBoxes",keyLAr.tag(),keyLAr.node());
84 
85  std::map<std::string, unsigned int> boxMap;
86  for(unsigned int j=0; j<BarrelDMBoxes->size(); j++) {
87  const std::string& key = (*BarrelDMBoxes)[j]->getString("BOXNAME");
88  boxMap[key] = j;
89  }
90  std::map<std::string, unsigned int> tubeMap;
91  for(unsigned int i=0; i<BarrelDMTubes->size(); i++) {
92  const std::string& key = (*BarrelDMTubes)[i]->getString("TUBENAME");
93  tubeMap[key] = i;
94  }
95  std::map<std::string, unsigned int> ecCrateMap;
96  for(unsigned int i=0; i<LArEndcapCrate->size(); i++) {
97  const std::string& key = (*LArEndcapCrate)[i]->getString("BOXNAME");
98  ecCrateMap[key] = i;
99  }
100 
101  unsigned int recordIndex;
102 
103  // Get materials
104  const GeoMaterial *alu = materialManager->getMaterial("std::Aluminium");
105  const GeoMaterial* matBoardsEnvelope = materialManager->getMaterial("LAr::BoardsEnvelope");
106 
108  recordIndex = tubeMap["Ped2"];
109  double ped2zhlen = (*BarrelDMTubes)[recordIndex]->getDouble("ZHLEN");
110  double ped2minr = (*BarrelDMTubes)[recordIndex]->getDouble("MINR");
111  double ped2maxr = (*BarrelDMTubes)[recordIndex]->getDouble("MAXR");
112  double ped2ytr = (*BarrelDMTubes)[recordIndex]->getDouble("YTR");
113  recordIndex = tubeMap["Ped3"];
114  double ped3zhlen = (*BarrelDMTubes)[recordIndex]->getDouble("ZHLEN");
115  double ped3minr = (*BarrelDMTubes)[recordIndex]->getDouble("MINR");
116  double ped3maxr = (*BarrelDMTubes)[recordIndex]->getDouble("MAXR");
117  double ped3xtr = (*BarrelDMTubes)[recordIndex]->getDouble("XTR");
118 
119  recordIndex = boxMap["Pedest"];
120  double pedesthlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
121  double pedesthwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
122  double pedesthhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
123  double pedestxtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
124  double pedestztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
125  recordIndex = boxMap["Ped1"];
126  double ped1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
127  double ped1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
128  double ped1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
129  recordIndex = boxMap["Crate1"];
130  double crate1hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
131  double crate1hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
132  double crate1hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
133  double crate1xtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
134  double crate1ztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
135  recordIndex = boxMap["Crate2"];
136  double crate2hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
137  double crate2hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
138  double crate2hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
139  recordIndex = boxMap["Crate3"];
140  double crate3hlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
141  double crate3hwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
142  double crate3hhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
143  double crate3xtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
144  recordIndex = boxMap["BoardE"];
145  double BoardEhlen = (*BarrelDMBoxes)[recordIndex]->getDouble("HLEN");
146  double BoardEhwdt = (*BarrelDMBoxes)[recordIndex]->getDouble("HWDT");
147  double BoardEhhgt = (*BarrelDMBoxes)[recordIndex]->getDouble("HHGT");
148  double BoardExtr = (*BarrelDMBoxes)[recordIndex]->getDouble("XTR");
149  double BoardEytr = (*BarrelDMBoxes)[recordIndex]->getDouble("YTR");
150  double BoardEztr = (*BarrelDMBoxes)[recordIndex]->getDouble("ZTR");
151 
152  // For endcap cryostat overwrite some values
153  std::map<std::string, unsigned int>::const_iterator it = ecCrateMap.find("Crate1");
154  if(it != ecCrateMap.end()) {
155  recordIndex = ecCrateMap["Crate1"];
156  double ztrEC = (*LArEndcapCrate)[recordIndex]->getDouble("ZTR");
157  /* FEC position sould be corrected in the DB, but we have no time */
158  if(m_activateFT && ztrEC == -249.05){
159  ztrEC += 6.;
160  log << MSG::DEBUG << "FEC position corrected to " << ztrEC
161  << " to fit mother volume" << endmsg;
162  }
163  crate1ztr = ztrEC;
164  pedestztr = ztrEC;
165  BoardEztr = ztrEC;
166  if(m_activateFT){
167  // keep crate at same height as in Barrel - there is no difference
168  } else {
169  // keep the old behavoir
170  double xtrEC = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
171  crate1xtr = xtrEC;
172  }
173  }
174  if(!m_activateFT){ // keep the old behavior
175  it = ecCrateMap.find("Pedest");
176  if(it!=ecCrateMap.end()) {
177  recordIndex = ecCrateMap["Pedest"];
178  pedestxtr = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
179  }
180  it = ecCrateMap.find("BoardE");
181  if(it!=ecCrateMap.end()) {
182  recordIndex = ecCrateMap["BoardE"];
183  BoardExtr = (*LArEndcapCrate)[recordIndex]->getDouble("XTR");
184  }
185  } // otherwise do not move Pedest and BoardE in r - they are also like in the barrel
186 
187  const double epsilon = m_activateFT? 0.: 6.;
188 
189  // ----- build pedestal -----
190  GeoBox *Pedestal = new GeoBox(pedesthlen, pedesthwdt, pedesthhgt - epsilon);
191  GeoBox *Ped1 = new GeoBox(ped1hlen, ped1hwdt, ped1hhgt - epsilon);
192  GeoTube *Ped2 = new GeoTube(ped2minr, ped2maxr, ped2zhlen);
193  GeoTube *Ped3 = new GeoTube(ped3minr,ped3maxr , ped3zhlen);
194  const GeoShape & CratePed=((*Pedestal).subtract(*Ped1).
195  subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*Gaudi::Units::deg)).
196  subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)).
197  subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*Gaudi::Units::deg)));
198 
199  GeoLogVol *lvped = new GeoLogVol("LAr::DM::Ped",&CratePed,alu);
200  GeoIntrusivePtr<GeoPhysVol>pedestal = new GeoPhysVol(lvped);
201 
202  // ----- build crates -----
203  GeoBox *Crate1 = new GeoBox(crate1hlen, crate1hwdt, crate1hhgt - epsilon);
204  GeoBox *Crate2 = new GeoBox(crate2hlen, crate2hwdt, crate2hhgt - epsilon);
205  GeoBox *Crate3 = new GeoBox(crate3hlen, crate3hwdt, crate3hhgt - epsilon);
206  const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr));
207 
208  GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::Crate",&FEBCrate,alu);
209  GeoIntrusivePtr<GeoPhysVol>crate = new GeoPhysVol(lvcrate);
210 
211  // ----- build boardenvelopes -----
212  GeoBox *BoardEnvelope = new GeoBox(BoardEhlen, BoardEhwdt, BoardEhhgt - epsilon);
213  GeoLogVol *lvbenv = new GeoLogVol("LAr::DM::FEBoard",BoardEnvelope,matBoardsEnvelope);
214  GeoIntrusivePtr<GeoPhysVol>boardenvelope = new GeoPhysVol(lvbenv);
215 
216  //-------------- Place volumes in envelope ----------------------------
217  GeoTransform* xfCrateBase(new GeoTransform(GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr)));
218  GeoTransform* xfPedestBase(new GeoTransform(GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr)));
219  GeoTransform* xfBoardEBase1(new GeoTransform(GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr)));
220  GeoTransform* xfBoardEBase2(new GeoTransform(GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr)));
221 
222  for(unsigned i(0); i<LArEndcapCratePhiPos->size(); ++i) {
223  double phiPos = (*LArEndcapCratePhiPos)[i]->getDouble("PHIPOS")*Gaudi::Units::deg;
224  GeoTransform* xfPhiPos(new GeoTransform(GeoTrf::RotateZ3D(phiPos)));
225 
226  envelope->add(xfPhiPos);
227  envelope->add(xfCrateBase);
228  envelope->add(crate);
229 
230  envelope->add(xfPhiPos);
231  envelope->add(xfPedestBase);
232  envelope->add(pedestal);
233 
234  envelope->add(xfPhiPos);
235  envelope->add(xfBoardEBase1);
236  envelope->add(boardenvelope);
237 
238  envelope->add(xfPhiPos);
239  envelope->add(xfBoardEBase2);
240  envelope->add(boardenvelope);
241  }
242 
243  if(m_activateFT){
244  std::string name = "LAr::Endcap::SignalFT::";
245  log << MSG::DEBUG << "creating " << name << " volumes" << endmsg;
246 
247  const GeoMaterial* iron = materialManager->getMaterial("std::Iron");
248 
249  const double wflange_height = 37.*Gaudi::Units::mm;
250  const double wflange_R = 0.5*360.*Gaudi::Units::mm;
251  const GeoMaterial* wflange_mat = materialManager->getMaterial("LAr::FT::WarmFlange");
252 
253  GeoShape* wflange = new GeoTube(0., wflange_R, wflange_height/2);
254  GeoLogVol* wflangeLV = new GeoLogVol(name + "WarmFlange", wflange, wflange_mat);
255  GeoIntrusivePtr<GeoPhysVol> wflangePV = new GeoPhysVol(wflangeLV);
256 
257  const double bellow_height = 225.*Gaudi::Units::mm;
258  const double bellow_Router = 0.5*299.*Gaudi::Units::mm; // this also to be cut in warm wall
259  const double bellow_wall = 15.*Gaudi::Units::mm;
260  const GeoMaterial* bellow_mat = materialManager->getMaterial("LAr::FT::Bellow");
261 
262  const double bellow_Rinner = bellow_Router - bellow_wall;
263  GeoShape* bellow = new GeoTube(bellow_Rinner, bellow_Router, bellow_height/2);
264  GeoLogVol* bellowLV = new GeoLogVol(name + "Bellow", bellow, bellow_mat);
265  GeoIntrusivePtr<GeoPhysVol> bellowPV = new GeoPhysVol(bellowLV);
266 
267  const GeoMaterial* vcables_mat = materialManager->getMaterial("LAr::FT::VacuumCables");
268 
269  GeoShape* vcables = new GeoTube(0., bellow_Rinner, bellow_height/2);
270  GeoLogVol* vcablesLV = new GeoLogVol(name + "VacuumCables", vcables, vcables_mat);
271  GeoIntrusivePtr<GeoPhysVol> vcablesPV = new GeoPhysVol(vcablesLV);
272 
273  const double cflange_height = 35.*Gaudi::Units::mm;
274  const double cflange_Router = 0.5*283.*Gaudi::Units::mm;
275  const GeoMaterial* cflange_mat = materialManager->getMaterial("LAr::FT::ColdFlange");
276  GeoShape* cflange = new GeoTube(0., cflange_Router, cflange_height/2);
277  GeoLogVol* cflangeLV = new GeoLogVol(name + "ColdFlange", cflange, cflange_mat);
278  GeoIntrusivePtr<GeoPhysVol> cflangePV = new GeoPhysVol(cflangeLV);
279 
280  const double coldbox1_Router = cflange_Router;
281  const double coldbox1_wall = 0.134*2.54*Gaudi::Units::cm;
282  const double coldbox1_height = 90.*Gaudi::Units::mm;
283  const double coldbox2_height = 16.*Gaudi::Units::mm;
284  const double hole_r = 0.5*133.*Gaudi::Units::mm;
285  const double hole_shift = -31.*Gaudi::Units::mm;
286  const double coldbox3_Router = 0.5*140.*Gaudi::Units::mm; // this also to be cut in cold wall
287  const double coldbox3_height = 220.*Gaudi::Units::mm;
288  const GeoMaterial* coldbox_mat = iron;
289  GeoShape* coldbox1 = new GeoTube(coldbox1_Router - coldbox1_wall, coldbox1_Router, coldbox1_height/2); // wide part
290  GeoShape* coldbox11 = new GeoTube(0., coldbox1_Router, coldbox1_height/2); // wide part for FTenvelope
291  GeoLogVol* coldbox1LV = new GeoLogVol(name + "ColdBox1", coldbox1, coldbox_mat);
292  GeoIntrusivePtr<GeoPhysVol> coldbox1PV = new GeoPhysVol(coldbox1LV);
293  GeoShape* coldbox21 = new GeoTube(0., coldbox1_Router, coldbox2_height/2); // plate
294  GeoShape* coldbox22 = new GeoTube(0., hole_r, coldbox2_height); // hole in the plate
295  const GeoShape& coldbox2 = coldbox21->subtract((*coldbox22) << GeoTrf::TranslateY3D(hole_shift));
296  GeoLogVol* coldbox2LV = new GeoLogVol(name + "ColdBox2", &coldbox2, coldbox_mat);
297  GeoIntrusivePtr<GeoPhysVol> coldbox2PV = new GeoPhysVol(coldbox2LV);
298  GeoShape* coldbox3 = new GeoTube(hole_r, coldbox3_Router, coldbox3_height/2); // narrow part
299  GeoShape* coldbox31 = new GeoTube(0., coldbox3_Router, coldbox3_height/2); // narrow part for FTenvelope
300  GeoLogVol* coldbox3LV = new GeoLogVol(name + "ColdBox3", coldbox3, coldbox_mat);
301  GeoIntrusivePtr<GeoPhysVol> coldbox3PV = new GeoPhysVol(coldbox3LV);
302 
303  GeoTrf::TranslateZ3D bellow_pos(-wflange_height/2 - bellow_height/2);
304  GeoTrf::TranslateZ3D cflange_pos(-wflange_height/2 - bellow_height - cflange_height/2);
305  GeoTrf::TranslateZ3D coldbox1_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height/2);
306  GeoTrf::TranslateZ3D coldbox2_pos(-wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2);
307  GeoTrf::Translate3D coldbox2hole_pos(
308  0., hole_shift,
309  -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height/2
310  );
311  GeoTrf::Translate3D coldbox3_pos(
312  0., hole_shift,
313  -wflange_height/2 - bellow_height - cflange_height - coldbox1_height - coldbox2_height - coldbox3_height/2
314  );
315 
316  const GeoShape& FTenvelope = wflange->add(
317  (*bellow) << bellow_pos
318  ).add(
319  (*cflange) << cflange_pos
320  ).add(
321  (*coldbox11) << coldbox1_pos
322  ).add(
323  (*coldbox21) << coldbox2_pos
324  ).add(
325  (*coldbox31) << coldbox3_pos
326  );
327 
328  GeoLogVol* FTLV = new GeoLogVol(name + "Envelope",
329  &FTenvelope,
330  materialManager->getMaterial("std::Air")
331  );
332  GeoIntrusivePtr<GeoPhysVol> FTPV = new GeoPhysVol(FTLV);
333 
334  FTPV->add(wflangePV);
335  GeoTransform *bellow_trf = new GeoTransform(bellow_pos);
336  FTPV->add(bellow_trf);
337  FTPV->add(bellowPV);
338  FTPV->add(bellow_trf);
339  FTPV->add(vcablesPV);
340  GeoTransform *cflange_trf = new GeoTransform(cflange_pos);
341  FTPV->add(cflange_trf);
342  FTPV->add(cflangePV);
343  GeoTransform *coldbox1_trf = new GeoTransform(coldbox1_pos);
344  FTPV->add(coldbox1_trf);
345  FTPV->add(coldbox1PV);
346  GeoTransform *coldbox2_trf = new GeoTransform(coldbox2_pos);
347  FTPV->add(coldbox2_trf);
348  FTPV->add(coldbox2PV);
349  GeoTransform *coldbox3_trf = new GeoTransform(coldbox3_pos);
350  FTPV->add(coldbox3_trf);
351  FTPV->add(coldbox3PV);
352 
353  const GeoMaterial* lar_mat = materialManager->getMaterial("std::LiquidArgon");
354  GeoShape* lar1 = new GeoTube(0., coldbox1_Router - coldbox1_wall, coldbox1_height/2);
355  GeoShape* lar2 = new GeoTube(0., hole_r, coldbox1_height);
356  const GeoShape& lar = lar1->subtract((*lar2) << GeoTrf::TranslateY3D(hole_shift));
357  GeoLogVol* larLV = new GeoLogVol(name + "LAr", &lar, lar_mat);
358  GeoIntrusivePtr<GeoPhysVol> larPV = new GeoPhysVol(larLV);
359  FTPV->add(coldbox1_trf);
360  FTPV->add(larPV);
361 
362  const GeoMaterial *pigtail_mat = materialManager->getMaterial("LAr::FT::Pigtail");
363 
364  const double pth = (coldbox1_height + coldbox2_height + coldbox3_height) / 2;
365  GeoTransform *pigtail_trf = new GeoTransform(
366  GeoTrf::Translate3D(0, hole_shift,
367  -wflange_height/2 - bellow_height - cflange_height - pth
368  ));
369  GeoShape* pigtail = new GeoTube(0., hole_r, pth);
370  GeoLogVol* pigtailLV = new GeoLogVol(name + "Pigtails", pigtail, pigtail_mat);
371  GeoIntrusivePtr<GeoPhysVol> pigtailPV = new GeoPhysVol(pigtailLV);
372  FTPV->add(pigtail_trf);
373  FTPV->add(pigtailPV);
374 
375  // total lenght should be 28.5 cm
376  const double ocable_len = 10.*Gaudi::Units::cm;
377  const double ocable_R = (1.1/2)*sqrt(1920*2.85)*Gaudi::Units::mm;
378  const GeoMaterial* ocable_mat = materialManager->getMaterial("LAr::FT::Cable");
379  GeoShape* ocable = new GeoTube(0., ocable_R, ocable_len / 2);
380  GeoLogVol* ocableLV = new GeoLogVol("LAr::Endcap::FTCables", ocable, ocable_mat);
381  GeoIntrusivePtr<GeoPhysVol> ocablePV = new GeoPhysVol(ocableLV);
382 
383  const double chimney_height = 277.*Gaudi::Units::mm;
384  const double chimney_wall = 5.*Gaudi::Units::mm;
385  const double chimney_Router = 0.5*351.*Gaudi::Units::mm;
386  const GeoMaterial* chimney_mat = iron;
387  GeoShape* chimney1 = new GeoTube(chimney_Router - chimney_wall, chimney_Router, chimney_height/2);
388  const double ch_lowring_h = 30.*Gaudi::Units::mm;
389  const double ch_lowring_r = 20.*Gaudi::Units::mm;
390  GeoShape* chimney2 = new GeoTube(chimney_Router, chimney_Router + ch_lowring_r, ch_lowring_h/2);
391  const double ch_upring_r = 5.*Gaudi::Units::mm;
392  const double ch_upring_h = 20.*Gaudi::Units::mm;
393  GeoShape* chimney3 = new GeoTube(bellow_Router, chimney_Router + ch_upring_r, ch_upring_h/2);
394  const GeoShape& chimney = chimney1->add(
395  (*chimney2) << GeoTrf::TranslateZ3D(-chimney_height/2 + ch_lowring_h/2)
396  ).add(
397  (*chimney3) << GeoTrf::TranslateZ3D(chimney_height/2 - ch_upring_h/2)
398  );
399  GeoLogVol* chimneyLV = new GeoLogVol("LAr::Endcap::FTChimney", &chimney, chimney_mat);
400  GeoIntrusivePtr<GeoPhysVol> chimneyPV = new GeoPhysVol(chimneyLV);
401 
402  // todo: take cryostat parameters from DB
403  const double cryo_Router = 2475.*Gaudi::Units::mm; // cryo warm wall outer radius
404  const double z_pos = -(472 - 412 + 247)*Gaudi::Units::mm;
405  const double r0 = cryo_Router + chimney_height + wflange_height/2;
406  const double r1 = cryo_Router + chimney_height/2;
407  const double r2 = cryo_Router + chimney_height + wflange_height + ocable_len/2;
408  auto put1 = [&envelope, z_pos](GeoIntrusivePtr<GeoPhysVol>object, double r, double phi)
409  {
410  envelope->add(new GeoTransform(
411  GeoTrf::Translate3D(r*cos(phi), r*sin(phi), z_pos) *
412  GeoTrf::RotateX3D(90.*Gaudi::Units::deg) *
413  GeoTrf::RotateY3D(phi + 90.*Gaudi::Units::deg)
414  ));
415  envelope->add(object);
416  };
417 
418  auto put = [&put1, &FTPV, &chimneyPV, &ocablePV, r0, r1, r2](double phi)
419  {
420  put1(FTPV, r0, phi);
421  put1(chimneyPV, r1, phi);
422  put1(ocablePV, r2, phi);
423  };
424 
425  const double dphi = 5.*Gaudi::Units::deg;
426  for(unsigned int i{0}; i < LArEndcapCratePhiPos->size(); ++ i){
427  const int num = (*LArEndcapCratePhiPos)[i]->getInt("CRATENUM");
428  const double phi = (*LArEndcapCratePhiPos)[i]->getDouble("PHIPOS")*Gaudi::Units::deg;
429  if(num == 10){ // the topmost crate has one FT, positioned assymetrically
430  put(phi + dphi);
431  } else {
432  put(phi - dphi);
433  put(phi + dphi);
434  }
435  }
436  } else { // No FTs, old LArServices variant
437 /*
438  S.M. Feb 2020: these services are located between FEC and TileFingers.
439  In this area is mostly air and a few cables. It was
440  probably intended to go below the FEC
441 */
442  IRDBRecordset_ptr EndcapDMTubes = rdbAccess->getRecordsetPtr("LArEndcapDMTubes",keyLAr.tag(),keyLAr.node());
443  if(EndcapDMTubes->size()) {
444  const GeoMaterial* matECServices = materialManager->getMaterial("LAr::LArECServices");
445  for(unsigned i(0); i<EndcapDMTubes->size(); ++i) {
446  GeoTube* endcapTube = new GeoTube((*EndcapDMTubes)[i]->getDouble("RMIN"),(*EndcapDMTubes)[i]->getDouble("RMAX"),(*EndcapDMTubes)[i]->getDouble("DZ"));
447  GeoLogVol* endcapTubeLv = new GeoLogVol((*EndcapDMTubes)[i]->getString("TUBENAME"),endcapTube,matECServices);
448  GeoIntrusivePtr<GeoPhysVol> endcapTubePv = new GeoPhysVol(endcapTubeLv);
449  envelope->add(new GeoTransform(GeoTrf::TranslateZ3D((*EndcapDMTubes)[i]->getDouble("ZPOS"))));
450  envelope->add(endcapTubePv);
451  }
452  }
453  }
454 }

◆ operator=()

EndcapDMConstruction& LArGeo::EndcapDMConstruction::operator= ( const EndcapDMConstruction )
private

Member Data Documentation

◆ m_activateFT

bool LArGeo::EndcapDMConstruction::m_activateFT
private

Definition at line 25 of file EndcapDMConstruction.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
LArGeo::EndcapDMConstruction::m_activateFT
bool m_activateFT
Definition: EndcapDMConstruction.h:25
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
IGeoModelSvc
Definition: IGeoModelSvc.h:17
skel.it
it
Definition: skel.GENtoEVGEN.py:423
deg
#define deg
Definition: SbPolyhedron.cxx:17
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
MCP::ScaleSmearParam::r2
@ r2
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
TRT_PAI_physicsConstants::r0
const double r0
electron radius{cm}
Definition: TRT_PAI_physicsConstants.h:20
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
pickleTool.object
object
Definition: pickleTool.py:30
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
MCP::ScaleSmearParam::r1
@ r1
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37