ATLAS Offline Software
EMECSupportConstruction.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // EMECSupportConstruction
6 // April 2013 J.T. Insert extra material after PS in front of emec electronics
7 // June 2009 AMS General code cleanup
8 // Static variables avioded
9 // Almost all hardcoded numbers copied to DB
10 // 18-Sep-2006 V.N Updated material definitions
11 // 19-Dec-2005 V.N Inversed angle alpha for filling of electronic boards
12 // 28-Oct-2005 J.T. bug fixes, + InnerAluCone details
13 // 20-July-2004 J.T. back support included as well
14 // 06-Oct-2003 J.T. new class EMECSupportConstruction created for GeoModel:
15 // 06-Oct-2003 J.T. code of LArEMECSupportConstruction revised to work in
16 // the GeoModel framework
17 // 06-Oct-2003 J.T. isModule parameter was introduced some time ago
18 // (when and by whom - is not documented in this header)
19 // This destroyed the geometry of the BARRETTE sections
20 // either in the case of isModule=true or isModule=false.
21 // Therefore I have recalled the previous(original) geometry
22 // for isModule=false. In case of isModule=true, I kept
23 // phistart=Position-PI/8, m_PhiSize=PI/4, such a way that
24 // in case of Position=0, there is an electrode at phi=0
25 // (what I think was a feature of the implemented module's
26 // concept as well).
27 // Back structure always should be rotated by 180deg
28 // around x axis before placement into EMECMother.
29 // Therefore in case of isModule=true, an appropriate
30 // rotation around z is to be performed afterwards as well.
31 // Cables and electronics are not included.
32 
33 
34 // **** **** **** New Version of EMECSupportConstruction **** **** ****
35 // 31-July-2005 Vakho
36 // The idea was to reorganize EMECSupportConstruction in order to make it look
37 // as closer as possible to LArG4EC/LArEMECSupportConstruction.
38 //
39 // Known issues
40 //
41 // 1. Front envelope. rmax of FrontInnerLongBar reduced from 574.0 to 572.0
42 // in order to avoid clash with FrontMiddleRing (clash comes from G4 description)
43 //
44 // 2. Outer envelope. rmin of Wide- and NarrowStretchers increased from 2044.0 to 2048.0
45 // in order to avoid clashes with TopIndexingRing (clash comes from G4 description)
46 //
47 // 3. Few polycones give a 'Solid Problem' error message when running G4 geometry test
48 // on translated geometry. The reason is not clear. Visualization does not show
49 // any problems for these solids and it looks like simulation is not affected either
50 //
51 //
52 // ToDo:
53 // 1. Use parameterisations wherever possible;
54 
55 #include<string>
56 #include<sstream>
57 #include<cassert>
58 
59 #include "GeoModelKernel/GeoElement.h"
60 #include "GeoModelKernel/GeoMaterial.h"
61 #include "GeoModelKernel/GeoFullPhysVol.h"
62 #include "GeoModelKernel/GeoPhysVol.h"
63 #include "GeoModelKernel/GeoVPhysVol.h"
64 #include "GeoModelKernel/GeoLogVol.h"
65 #include "GeoModelKernel/GeoBox.h"
66 #include "GeoModelKernel/GeoPcon.h"
67 #include "GeoModelKernel/GeoTubs.h"
68 #include "GeoModelKernel/GeoCons.h"
69 #include "GeoModelKernel/GeoPara.h"
70 #include "GeoModelKernel/GeoNameTag.h"
71 #include "GeoModelKernel/GeoTransform.h"
72 #include "GeoModelKernel/GeoAlignableTransform.h"
73 #include "GeoModelKernel/GeoIdentifierTag.h"
74 #include "GeoModelKernel/GeoDefinitions.h"
75 
78 #include "StoreGate/StoreGateSvc.h"
79 #include "GaudiKernel/MsgStream.h"
80 #include "GaudiKernel/ISvcLocator.h"
81 #include "GaudiKernel/PhysicalConstants.h"
82 
86 
89 #include "CxxUtils/starts_with.h"
90 
91 using namespace LArGeo;
92 
94  type_t type, bool pos_zside, bool is_module,
95  std::string basename, double position
96 ) : m_Type(type), m_pos_zside(pos_zside), m_isModule(is_module),
97  m_BaseName(std::move(basename)), m_Position(position)
98 {
99 // std::cout << "Experimental EMECSupportConstruction" << std::endl;
100 
101  ISvcLocator *svcLocator = Gaudi::svcLocator();
103  if(svcLocator->service("DetectorStore", detStore, false) == StatusCode::FAILURE){
104  throw std::runtime_error("Error in EMECSupportConstruction, cannot access DetectorStore");
105  }
106  StoredMaterialManager* materialManager = nullptr;
107  if (detStore->retrieve(materialManager, std::string("MATERIALS")).isFailure()) {
108  throw std::runtime_error("Error in EMECSupportConstruction, cannot access MATERIALS");
109  }
110 
111  m_PhiStart = 0.;
113 
114  if(m_isModule){
117  }
118 
119  // Get the materials from the manager
120 
121  m_Lead = materialManager->getMaterial("std::Lead");
122  if(!m_Lead) throw std::runtime_error("Error in EMECSupportConstruction, std::Lead is not found.");
123 
124  m_Alu = materialManager->getMaterial("std::Aluminium");
125  if(!m_Alu) throw std::runtime_error("Error in EMECSupportConstruction, std::Aluminium is not found.");
126 
127  m_Copper = materialManager->getMaterial("std::Copper");
128  if(!m_Copper) throw std::runtime_error("Error in EMECSupportConstruction, std::Copper is not found.");
129 
130  m_LAr = materialManager->getMaterial("std::LiquidArgon");
131  if(!m_LAr) throw std::runtime_error("Error in EMECSupportConstruction, std::LiquidArgon is not found.");
132 
133  m_Gten = materialManager->getMaterial("LAr::G10");
134  if(!m_Gten) throw std::runtime_error("Error in EMECSupportConstruction, LAr::G10 is not found.");
135 
136  m_PermaliE730 = materialManager->getMaterial("LAr::Glue");
137  if(!m_PermaliE730) throw std::runtime_error("Error in EMECSupportConstruction, LAr::Glue is not found.");
138 
139  m_G10FeOuter = materialManager->getMaterial("LAr::G10FeOuter");
140  if(!m_G10FeOuter) throw std::runtime_error("Error in EMECSupportConstruction, LAr::G10FeOuter is not found.");
141 
142  m_G10FeInner = materialManager->getMaterial("LAr::G10FeInner");
143  if(!m_G10FeInner) throw std::runtime_error("Error in EMECSupportConstruction, LAr::G10FeInner is not found.");
144 
145  m_Kapton_Cu = materialManager->getMaterial("LAr::KaptonC");
146  if(!m_Kapton_Cu) throw std::runtime_error("Error in EMECSupportConstruction, LAr::KaptonC is not found.");
147 
148  m_Cable = materialManager->getMaterial("LAr::Cables");
149  if(!m_Cable) throw std::runtime_error("Error in EMECSupportConstruction, LAr::Cables is not found.");
150 
151  IGeoModelSvc *geoModel;
152  IRDBAccessSvc* rdbAccess;
153 
154  if(svcLocator->service("GeoModelSvc", geoModel) == StatusCode::FAILURE)
155  throw std::runtime_error("Error cannot access GeoModelSvc");
156  if(svcLocator->service ("RDBAccessSvc",rdbAccess) == StatusCode::FAILURE)
157  throw std::runtime_error("Error cannot access RDBAccessSvc");
158 
159  //emecExtraCyl, add extra material after PS
160  std::string AtlasVersion = geoModel->atlasVersion();
161  std::string LArVersion = geoModel->LAr_VersionOverride();
162  std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
163  std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
164  m_DB_emecExtraCyl = rdbAccess->getRecordsetPtr("LArCones",detectorKey, detectorNode);
165  //--
166 
167  DecodeVersionKey larVersionKey(geoModel, "LAr");
168 
170  rdbAccess->getRecordsetPtr("EmecGeometry", larVersionKey.tag(), larVersionKey.node());
171  if(m_DB_EmecGeometry->size() == 0){
172  m_DB_EmecGeometry = rdbAccess->getRecordsetPtr("EmecGeometry", "EmecGeometry-00");
173  }
174 
176  rdbAccess->getRecordsetPtr("EmecWheelParameters", larVersionKey.tag(), larVersionKey.node());
177  if(m_DB_EmecWheelParameters->size() == 0){
178  m_DB_EmecWheelParameters = rdbAccess->getRecordsetPtr("EmecWheelParameters", "EmecWheelParameters-00");
179  }
180 
181  m_DB_boxes = rdbAccess->getRecordsetPtr("EmecDMBoxes", larVersionKey.tag(), larVersionKey.node());
182  if(m_DB_boxes->size() == 0){
183  m_DB_boxes = rdbAccess->getRecordsetPtr("EmecDMBoxes", "EmecDMBoxes-00");
184  }
185  m_DB_numbers = rdbAccess->getRecordsetPtr("EmecDMNumbers", larVersionKey.tag(), larVersionKey.node());
186  if(m_DB_numbers->size() == 0){
187  m_DB_numbers = rdbAccess->getRecordsetPtr("EmecDMNumbers", "EmecDMNumbers-00");
188  }
189  m_DB_tubes = rdbAccess->getRecordsetPtr("EmecDMTubes", larVersionKey.tag(), larVersionKey.node());
190  if(m_DB_tubes->size() == 0){
191  m_DB_tubes = rdbAccess->getRecordsetPtr("EmecDMTubes", "EmecDMTubes-00");
192  }
193  m_DB_pcons = rdbAccess->getRecordsetPtr("EmecDMPCons", larVersionKey.tag(), larVersionKey.node());
194  if(m_DB_pcons->size() == 0){
195  m_DB_pcons = rdbAccess->getRecordsetPtr("EmecDMPCons", "EmecDMPCons-00");
196  }
197 
198  m_DB_mn = rdbAccess->getRecordsetPtr("EmecMagicNumbers", larVersionKey.tag(), larVersionKey.node());
199  if(m_DB_mn->size() == 0){
200  m_DB_mn = rdbAccess->getRecordsetPtr("EmecMagicNumbers", "EmecMagicNumbers-00");
201  }
202 
203  m_DB_EmecFan = rdbAccess->getRecordsetPtr("EmecFan", larVersionKey.tag(), larVersionKey.node());
204  if(m_DB_EmecFan->size() == 0){
205  m_DB_EmecFan = rdbAccess->getRecordsetPtr("EmecFan", "EmecFan-00");
206  }
207  m_DB_ColdContraction = rdbAccess->getRecordsetPtr("ColdContraction", larVersionKey.tag(), larVersionKey.node());
208  if(m_DB_ColdContraction->size() == 0){
209  m_DB_ColdContraction = rdbAccess->getRecordsetPtr("ColdContraction", "ColdContraction-00");
210  }
211 }
212 
213 static void printWarning(const std::ostringstream &message)
214 {
215  ISvcLocator* svcLocator = Gaudi::svcLocator();
216  IMessageSvc* msgSvc;
217  StatusCode status = svcLocator->service("MessageSvc", msgSvc);
218  if(status.isFailure()){
219  throw std::runtime_error("EMECSupportConstruction: cannot initialze message service");
220  }
221  MsgStream msg(msgSvc, "EMECSupportConstruction");
222  msg << MSG::WARNING << message.str() << endmsg;
223 }
224 
225 #include<map>
226 #include <utility>
227 using map_t = std::map<std::string, unsigned int>;
228 static map_t getMap(const IRDBRecordset_ptr& db, const std::string& s)
229 {
230  map_t result;
231  for(unsigned int i = 0; i < db->size(); ++ i) {
232  const std::string& key = (*db)[i]->getString(s);
233  result[key] = i;
234  }
235  return result;
236 }
237 
238 static map_t getNumbersMap(const IRDBRecordset_ptr& db, const std::string& s)
239 {
240  map_t result;
241  for(unsigned int i = 0; i < db->size(); ++ i) {
242  const std::string& object = (*db)[i]->getString("OBJECTNAME");
243  if(object == s) {
244  const std::string& key = (*db)[i]->getString("PARNAME");
245  result[key] = i;
246  }
247  }
248  return result;
249 }
250 
251 static double getNumber(
252  const IRDBRecordset_ptr& db, const map_t &m, const std::string &idx,
253  const char *number, double defval = 0.
254 )
255 {
256  map_t::const_iterator i = m.find(idx);
257  if(i == m.end()){
258  std::ostringstream tmp;
259  tmp << "Cannot get " << idx << "/" << number << " from DB";
260  printWarning(tmp);
261  return defval;
262  }
263  double value = (*db)[(*i).second]->getDouble(number);
264  assert(value == defval);
265  return value;
266 }
267 
268 static double getNumber(
269  const IRDBRecordset_ptr& db, const std::string &s,
270  const std::string &parameter, double defval = 0.)
271 {
272  for(unsigned int i = 0; i < db->size(); ++ i){
273  const std::string& object = (*db)[i]->getString("OBJECTNAME");
274  if(object == s){
275  const std::string& key = (*db)[i]->getString("PARNAME");
276  if(key == parameter){
277  double value = (*db)[i]->getDouble("PARVALUE");
278  assert(value == defval);
279  return value;
280  }
281  }
282  }
283  std::ostringstream tmp;
284  tmp << "Cannot get " << s << "/" << parameter << " from DB_numbers";
285  tmp << ", default is " << defval;
286  printWarning(tmp);
287  return defval;
288 }
289 
291 
292 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::GetEnvelope(void) const
293 {
294  switch(m_Type){
295  case Front: return front_envelope();
296  case Back: return back_envelope();
297  case Outer: return outer_envelope();
298  case Inner: return inner_envelope();
299  case Middle: return middle_envelope();
300  case FrontInner: return front_inner_envelope();
301  case BackInner: return back_inner_envelope();
302  case FrontOuter: return front_outer_envelope();
303  case BackOuter: return back_outer_envelope();
304  default:
305  std::ostringstream tmp;
306  tmp << "Unknown Type " << m_Type << " in GetEnvelope,"
307  << " null pointer returned";
308  printWarning(tmp);
309  return nullptr;
310  }
311 }
312 
313 GeoPcon* EMECSupportConstruction::getPcon(const std::string& id) const
314 {
315  double phi_start = m_PhiStart;
316  double phi_size = m_PhiSize;
317  std::vector<double> zplane, rmin, rmax;
318 
319  std::string id1 = id;
320  if(CxxUtils::starts_with(id, "FrontSupportMother")) id1 = "FrontSupportMother";
321  else if(CxxUtils::starts_with(id, "BackSupportMother")) id1 = "BackSupportMother";
322  else if(id.find("Stretchers") != std::string::npos) id1 = "Stretchers";
323  else if(id == "FrontMiddleRing::LowerHole") id1 = "FrontMiddleRing::LH";
324  else if(id == "FrontMiddleRing::LowerGTen") id1 = "FrontMiddleRing::LGT";
325  else if(id == "FrontMiddleRing::UpperHole") id1 = "FrontMiddleRing::UH";
326  else if(id == "FrontMiddleRing::UpperGTen") id1 = "FrontMiddleRing::UGT";
327  else if(id == "BackMiddleRing::LowerHole") id1 = "BackMiddleRing::LH";
328  else if(id == "BackMiddleRing::LowerGTen") id1 = "BackMiddleRing::LGT";
329  else if(id == "BackMiddleRing::UpperHole") id1 = "BackMiddleRing::UH";
330  else if(id == "BackMiddleRing::UpperGTen") id1 = "BackMiddleRing::UGT";
331 
332  std::map<int, unsigned int> pcone;
333  int nzplanes = 0;
334  double R0 = 0.;
335  for(unsigned int i = 0; i < m_DB_pcons->size(); ++ i){
336  const std::string& object = (*m_DB_pcons)[i]->getString("PCONNAME");
337  if(object == id1){
338  int key = (*m_DB_pcons)[i]->getInt("NZPLANE");
339  if(pcone.find(key) != pcone.end()){
340  std::ostringstream tmp;
341  tmp << "Duplicate NZPLANE in " << id;
342  printWarning(tmp);
343  nzplanes = 0;
344  break;
345  }
346  pcone[key] = i;
347  if(key >= 0) ++ nzplanes;
348  else R0 = (*m_DB_pcons)[i]->getDouble("RMIN")*Gaudi::Units::mm;
349  }
350  }
351  if(nzplanes > 0){
352  zplane.resize(nzplanes); rmin.resize(nzplanes); rmax.resize(nzplanes);
353  for(int n = 0; n < nzplanes; ++ n){
354  zplane[n] = (*m_DB_pcons)[pcone[n]]->getDouble("ZPOS")*Gaudi::Units::mm;
355  rmin[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMIN")*Gaudi::Units::mm;
356  rmax[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMAX")*Gaudi::Units::mm;
357  }
358  if(id1 == "FrontSupportMother"){
359  if(id.find("Inner") != std::string::npos){
360  zplane.resize(2); rmin.resize(2); rmax.resize(2);
361  double rlim = getNumber(m_DB_numbers, id, "Inner", 614.)*Gaudi::Units::mm;
362  rmax[0] = rlim;
363  rmax[1] = rlim;
364  } else if(id.find("Outer") != std::string::npos){
365  double rlim = getNumber(m_DB_numbers, id, "Outer", 603.-1.)*Gaudi::Units::mm;
366  rmin[0] = rlim;
367  rmin[1] = rlim;
368  }
369  }
370  if(id1 == "BackSupportMother"){
371  if(id.find("Inner") != std::string::npos){
372  zplane.resize(2); rmin.resize(2); rmax.resize(2);
373  double rlim = getNumber(m_DB_numbers, id, "Inner", 699.)*Gaudi::Units::mm;
374  rmax[0] = rlim;
375  rmax[1] = rlim;
376  } else if(id.find("Outer") != std::string::npos){
377  double rlim = getNumber(m_DB_numbers, id, "Outer", 687.-1.)*Gaudi::Units::mm;
378  rmin[0] = rlim;
379  rmin[1] = rlim;
380  }
381  }
382  if(id1 == "Stretchers"){
383  if(id == "WideStretchers"){
384  double dfiWS = 360./3./256.*24.*Gaudi::Units::deg; //this is the design variable for WS
385  phi_start = m_Position - dfiWS*0.5;
386  phi_size = dfiWS;
387  }
388  if(id == "NarrowStretchers"){
389  double lengthNS = getNumber(m_DB_numbers, id, "Width", 200.)*Gaudi::Units::mm; // transversal length of NS
390  double dfiNS = lengthNS / rmax[0] * Gaudi::Units::rad;
391  phi_start = m_Position - dfiNS*0.5;
392  phi_size = dfiNS;
393  }
394  }
395 //#define DEBUG
396 #ifdef DEBUG
397 std::cout << "!!!! " << id << ":" << std::endl;
398 for(int i = 0; i < nzplanes; ++ i){
399  std::cout << "\t" << i << " " << zplane[i] << " " << rmin[i] << " " << rmax[i] << std::endl;
400 }
401 #endif
402  } else {
403  if(CxxUtils::starts_with(id, "FrontSupportMother")){
404  zplane.resize(6); rmin.resize(6); rmax.resize(6);
405  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = 292.*Gaudi::Units::mm-1.*Gaudi::Units::mm; rmax[0] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
406  zplane[1] = 61. *Gaudi::Units::mm; rmin[1] = 292.*Gaudi::Units::mm-1.*Gaudi::Units::mm; rmax[1] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
407  zplane[2] = 61. *Gaudi::Units::mm; rmin[2] = 2023.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[2] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
408  zplane[3] = 72.3*Gaudi::Units::mm; rmin[3] = 2023.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[3] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
409  zplane[4] = 124.2*Gaudi::Units::mm; rmin[4] = 2051.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[4] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
410  zplane[5] = 153. *Gaudi::Units::mm; rmin[5] = 2051.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[5] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
411  if(id == "FrontSupportMother::Outer"){
412  rmin[0] = 603.*Gaudi::Units::mm-1.*Gaudi::Units::mm;
413  rmin[1] = 603.*Gaudi::Units::mm-1.*Gaudi::Units::mm;
414  }
415  if(id == "FrontSupportMother::Inner"){
416  zplane.resize(2); rmin.resize(2); rmax.resize(2);
417  rmax[0] = 614.*Gaudi::Units::mm;
418  rmax[1] = 614.*Gaudi::Units::mm;
419  }
420  } else if(CxxUtils::starts_with(id, "BackSupportMother")){
421  zplane.resize(4); rmin.resize(4); rmax.resize(4);
422  zplane[0] = 0.001*Gaudi::Units::mm; rmin[0] = 333.*Gaudi::Units::mm-1.*Gaudi::Units::mm; rmax[0] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
423  zplane[1] = 55. *Gaudi::Units::mm; rmin[1] = 333.*Gaudi::Units::mm-1.*Gaudi::Units::mm; rmax[1] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
424  zplane[2] = 55. *Gaudi::Units::mm; rmin[2] = 2051.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[2] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
425  zplane[3] = 147. *Gaudi::Units::mm; rmin[3] = 2051.*Gaudi::Units::mm-7.*Gaudi::Units::mm; rmax[3] = 2077.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
426  if(id == "BackSupportMother::Outer"){
427  rmin[0] = 687.*Gaudi::Units::mm-1.*Gaudi::Units::mm;
428  rmin[1] = 687.*Gaudi::Units::mm-1.*Gaudi::Units::mm;
429  }
430  if(id == "BackSupportMother::Inner"){
431  zplane.resize(2); rmin.resize(2); rmax.resize(2);
432  rmax[0] = 699.*Gaudi::Units::mm;
433  rmax[1] = 699.*Gaudi::Units::mm;
434  }
435  } else if(id == "WideStretchers" || id == "NarrowStretchers"){
436  double dzS = 165.*Gaudi::Units::mm;
437  double dznotch = 10.*Gaudi::Units::mm; // half z extent of the notch
438  double drnotch = 6.5*Gaudi::Units::mm; // deepness of the noth in radial direction
439  double rmaxS = (2077. - 7.)*Gaudi::Units::mm;//ROuter+116. // -7 for cold
440  double rminS = rmaxS - 26.*Gaudi::Units::mm;
441  double rmidS = rminS + drnotch;
442  zplane.resize(6); rmin.resize(6); rmax.resize(6);
443  zplane[0] = -dzS ; rmin[0] = rminS; rmax[0] = rmaxS;
444  zplane[1] = -dznotch; rmin[1] = rminS; rmax[1] = rmaxS;
445  zplane[2] = -dznotch; rmin[2] = rmidS; rmax[2] = rmaxS;
446  zplane[3] = dznotch; rmin[3] = rmidS; rmax[3] = rmaxS;
447  zplane[4] = dznotch; rmin[4] = rminS; rmax[4] = rmaxS;
448  zplane[5] = dzS ; rmin[5] = rminS; rmax[5] = rmaxS;
449  if(id == "WideStretchers"){
450  double dfiWS = 360./3./256.*24.*Gaudi::Units::deg; //this is the design variable for WS
451  phi_start = m_Position - dfiWS*0.5;
452  phi_size = dfiWS;
453  }
454  if(id == "NarrowStretchers"){
455  double lengthNS = 200.*Gaudi::Units::mm; // transversal length of NS
456  double dfiNS = lengthNS / rmaxS * Gaudi::Units::rad;
457  phi_start = m_Position - dfiNS*0.5;
458  phi_size = dfiNS;
459  }
460  } else if(id == "OuterSupportMother"){
461  double dzS = 165.*Gaudi::Units::mm;
462  double rmaxS = (2077. - 7.)*Gaudi::Units::mm;//ROuter+116. // -7 for cold
463  double rminOTB = (2034. + 2.)*Gaudi::Units::mm;
464  double rmaxOTB = rminOTB + 3.*Gaudi::Units::mm;
465  double dzOTB = 201.*Gaudi::Units::mm;
466  zplane.resize(6); rmin.resize(6); rmax.resize(6);
467  zplane[0] = -dzOTB ; rmin[0] = rminOTB; rmax[0] = rmaxOTB;
468  zplane[1] = -dzS; rmin[1] = rminOTB; rmax[1] = rmaxOTB;
469  zplane[2] = -dzS; rmin[2] = rminOTB; rmax[2] = rmaxS;
470  zplane[3] = dzS; rmin[3] = rminOTB; rmax[3] = rmaxS;
471  zplane[4] = dzS; rmin[4] = rminOTB; rmax[4] = rmaxOTB;
472  zplane[5] = dzOTB ; rmin[5] = rminOTB; rmax[5] = rmaxOTB;
473  } else if(id == "FrontMiddleRing"){
474  double r0 =614.*Gaudi::Units::mm-2.*Gaudi::Units::mm ; // RMiddle=middle radius of the ring
475  zplane.resize(4); rmin.resize(4); rmax.resize(4);
476  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = r0 - 57.*Gaudi::Units::mm; rmax[0] = r0 + 57.*Gaudi::Units::mm;
477  zplane[1] = 27.5*Gaudi::Units::mm; rmin[1] = r0 - 57.*Gaudi::Units::mm; rmax[1] = r0 + 57.*Gaudi::Units::mm;
478  zplane[2] = 27.5*Gaudi::Units::mm; rmin[2] = r0 - 40.*Gaudi::Units::mm; rmax[2] = r0 + 40.*Gaudi::Units::mm;
479  zplane[3] = 59. *Gaudi::Units::mm; rmin[3] = r0 - 40.*Gaudi::Units::mm; rmax[3] = r0 + 40.*Gaudi::Units::mm;
480  } else if(id == "FrontMiddleRing::LowerHole"){
481  double r0 = 614.*Gaudi::Units::mm-2.*Gaudi::Units::mm; // RMiddle=middle radius of the ring
482  zplane.resize(6); rmin.resize(6); rmax.resize(6);
483  zplane[0] = 23. *Gaudi::Units::mm; rmin[0] = r0 - 28.3*Gaudi::Units::mm; rmax[0] = r0 - 8.*Gaudi::Units::mm;
484  zplane[1] = 27.5*Gaudi::Units::mm; rmin[1] = r0 - 28.3*Gaudi::Units::mm; rmax[1] = r0 - 8.*Gaudi::Units::mm;
485  zplane[2] = 27.5*Gaudi::Units::mm; rmin[2] = r0 - 40. *Gaudi::Units::mm; rmax[2] = r0 - 8.*Gaudi::Units::mm;
486  zplane[3] = 48.5*Gaudi::Units::mm; rmin[3] = r0 - 40. *Gaudi::Units::mm; rmax[3] = r0 - 8.*Gaudi::Units::mm;
487  zplane[4] = 48.5*Gaudi::Units::mm; rmin[4] = r0 - 28.3*Gaudi::Units::mm; rmax[4] = r0 - 8.*Gaudi::Units::mm;
488  zplane[5] = 53. *Gaudi::Units::mm; rmin[5] = r0 - 28.3*Gaudi::Units::mm; rmax[5] = r0 - 8.*Gaudi::Units::mm;
489  } else if(id == "FrontMiddleRing::LowerGTen"){
490  double r0 = 614.*Gaudi::Units::mm - 2.*Gaudi::Units::mm; // RMiddle=middle radius of the ring
491  zplane.resize(6); rmin.resize(6); rmax.resize(6);
492  zplane[0] = 23.*Gaudi::Units::mm; rmin[0] = r0 - 28.*Gaudi::Units::mm; rmax[0] = r0 - 8.*Gaudi::Units::mm;
493  zplane[1] = 28.*Gaudi::Units::mm; rmin[1] = r0 - 28.*Gaudi::Units::mm; rmax[1] = r0 - 8.*Gaudi::Units::mm;
494  zplane[2] = 28.*Gaudi::Units::mm; rmin[2] = r0 - 40.*Gaudi::Units::mm; rmax[2] = r0 - 8.*Gaudi::Units::mm;
495  zplane[3] = 48.*Gaudi::Units::mm; rmin[3] = r0 - 40.*Gaudi::Units::mm; rmax[3] = r0 - 8.*Gaudi::Units::mm;
496  zplane[4] = 48.*Gaudi::Units::mm; rmin[4] = r0 - 28.*Gaudi::Units::mm; rmax[4] = r0 - 8.*Gaudi::Units::mm;
497  zplane[5] = 53.*Gaudi::Units::mm; rmin[5] = r0 - 28.*Gaudi::Units::mm; rmax[5] = r0 - 8.*Gaudi::Units::mm;
498  } else if(id == "FrontMiddleRing::UpperHole"){
499  double r0 =614.*Gaudi::Units::mm-2.*Gaudi::Units::mm ; // RMiddle=middle radius of the ring
500  zplane.resize(6); rmin.resize(6); rmax.resize(6);
501  zplane[0] = 23. *Gaudi::Units::mm; rmin[0] = r0 + 8.*Gaudi::Units::mm; rmax[0] = r0 + 28.3*Gaudi::Units::mm;
502  zplane[1] = 27.5*Gaudi::Units::mm; rmin[1] = r0 + 8.*Gaudi::Units::mm; rmax[1] = r0 + 28.3*Gaudi::Units::mm;
503  zplane[2] = 27.5*Gaudi::Units::mm; rmin[2] = r0 + 8.*Gaudi::Units::mm; rmax[2] = r0 + 40. *Gaudi::Units::mm;
504  zplane[3] = 48.5*Gaudi::Units::mm; rmin[3] = r0 + 8.*Gaudi::Units::mm; rmax[3] = r0 + 40. *Gaudi::Units::mm;
505  zplane[4] = 48.5*Gaudi::Units::mm; rmin[4] = r0 + 8.*Gaudi::Units::mm; rmax[4] = r0 + 28.3*Gaudi::Units::mm;
506  zplane[5] = 53. *Gaudi::Units::mm; rmin[5] = r0 + 8.*Gaudi::Units::mm; rmax[5] = r0 + 28.3*Gaudi::Units::mm;
507  } else if(id == "FrontMiddleRing::UpperGTen"){
508  double r0 =614.*Gaudi::Units::mm-2.*Gaudi::Units::mm ; // RMiddle=middle radius of the ring
509  zplane.resize(6); rmin.resize(6); rmax.resize(6);
510  zplane[0] = 23.*Gaudi::Units::mm; rmin[0] = r0 + 8.*Gaudi::Units::mm; rmax[0] = r0 + 28.*Gaudi::Units::mm;
511  zplane[1] = 28.*Gaudi::Units::mm; rmin[1] = r0 + 8.*Gaudi::Units::mm; rmax[1] = r0 + 28.*Gaudi::Units::mm;
512  zplane[2] = 28.*Gaudi::Units::mm; rmin[2] = r0 + 8.*Gaudi::Units::mm; rmax[2] = r0 + 40.*Gaudi::Units::mm;
513  zplane[3] = 48.*Gaudi::Units::mm; rmin[3] = r0 + 8.*Gaudi::Units::mm; rmax[3] = r0 + 40.*Gaudi::Units::mm;
514  zplane[4] = 48.*Gaudi::Units::mm; rmin[4] = r0 + 8.*Gaudi::Units::mm; rmax[4] = r0 + 28.*Gaudi::Units::mm;
515  zplane[5] = 53.*Gaudi::Units::mm; rmin[5] = r0 + 8.*Gaudi::Units::mm; rmax[5] = r0 + 28.*Gaudi::Units::mm;
516  } else if(id == "FrontInnerRing"){
517  double r0 = 335.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the inner ring
518  zplane.resize(5); rmin.resize(5); rmax.resize(5);
519  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = r0 - 22.5*Gaudi::Units::mm; rmax[0] = r0 + 51.5*Gaudi::Units::mm;
520  zplane[1] = 6. *Gaudi::Units::mm; rmin[1] = r0 - 28.5*Gaudi::Units::mm; rmax[1] = r0 + 51.5*Gaudi::Units::mm;
521  zplane[2] = 27.5*Gaudi::Units::mm; rmin[2] = r0 - 28.5*Gaudi::Units::mm; rmax[2] = r0 + 51.5*Gaudi::Units::mm;
522  zplane[3] = 27.5*Gaudi::Units::mm; rmin[3] = r0 - 43.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
523  zplane[4] = 59. *Gaudi::Units::mm; rmin[4] = r0 - 43.5*Gaudi::Units::mm; rmax[4] = r0 + 40.5*Gaudi::Units::mm;
524  } else if(id == "FrontInnerRing::Hole"){
525  double r0 = 335.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the inner ring
526  zplane.resize(6); rmin.resize(6); rmax.resize(6);
527  zplane[0] = 23. *Gaudi::Units::mm; rmin[0] = r0 + 6.5*Gaudi::Units::mm; rmax[0] = r0 + 29.5*Gaudi::Units::mm;
528  zplane[1] = 27.5*Gaudi::Units::mm; rmin[1] = r0 + 6.5*Gaudi::Units::mm; rmax[1] = r0 + 29.5*Gaudi::Units::mm;
529  zplane[2] = 27.5*Gaudi::Units::mm; rmin[2] = r0 + 6.5*Gaudi::Units::mm; rmax[2] = r0 + 40.5*Gaudi::Units::mm;
530  zplane[3] = 48.5*Gaudi::Units::mm; rmin[3] = r0 + 6.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
531  zplane[4] = 48.5*Gaudi::Units::mm; rmin[4] = r0 + 6.5*Gaudi::Units::mm; rmax[4] = r0 + 29.5*Gaudi::Units::mm;
532  zplane[5] = 53. *Gaudi::Units::mm; rmin[5] = r0 + 6.5*Gaudi::Units::mm; rmax[5] = r0 + 29.5*Gaudi::Units::mm;
533  } else if(id == "FrontInnerRing::GTen"){
534  double r0 = 335.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the inner ring
535  zplane.resize(6); rmin.resize(6); rmax.resize(6);
536  zplane[0] = 23.*Gaudi::Units::mm; rmin[0] = r0 + 8.5*Gaudi::Units::mm; rmax[0] = r0 + 28.5*Gaudi::Units::mm;
537  zplane[1] = 28.*Gaudi::Units::mm; rmin[1] = r0 + 8.5*Gaudi::Units::mm; rmax[1] = r0 + 28.5*Gaudi::Units::mm;
538  zplane[2] = 28.*Gaudi::Units::mm; rmin[2] = r0 + 8.5*Gaudi::Units::mm; rmax[2] = r0 + 40.5*Gaudi::Units::mm;
539  zplane[3] = 48.*Gaudi::Units::mm; rmin[3] = r0 + 8.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
540  zplane[4] = 48.*Gaudi::Units::mm; rmin[4] = r0 + 8.5*Gaudi::Units::mm; rmax[4] = r0 + 28.5*Gaudi::Units::mm;
541  zplane[5] = 53.*Gaudi::Units::mm; rmin[5] = r0 + 8.5*Gaudi::Units::mm; rmax[5] = r0 + 28.5*Gaudi::Units::mm;
542  } else if(id == "BackMiddleRing"){
543  double r0 = 699.*Gaudi::Units::mm-2.5*Gaudi::Units::mm; // RMiddle radius of the ring
544  zplane.resize(4); rmin.resize(4); rmax.resize(4);
545  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = r0 - 57.*Gaudi::Units::mm; rmax[0] = r0 + 57.*Gaudi::Units::mm;
546  zplane[1] = 21. *Gaudi::Units::mm; rmin[1] = r0 - 57.*Gaudi::Units::mm; rmax[1] = r0 + 57.*Gaudi::Units::mm;
547  zplane[2] = 21. *Gaudi::Units::mm; rmin[2] = r0 - 40.*Gaudi::Units::mm; rmax[2] = r0 + 40.*Gaudi::Units::mm;
548  zplane[3] = 52.5*Gaudi::Units::mm; rmin[3] = r0 - 40.*Gaudi::Units::mm; rmax[3] = r0 + 40.*Gaudi::Units::mm;
549  } else if(id == "BackMiddleRing::LowerHole"){
550  double r0 = 699.*Gaudi::Units::mm-2.5*Gaudi::Units::mm; // RMiddle radius of the ring
551  zplane.resize(6); rmin.resize(6); rmax.resize(6);
552  zplane[0] = 16.5*Gaudi::Units::mm; rmin[0] = r0 - 28.3*Gaudi::Units::mm; rmax[0] = r0 - 8.*Gaudi::Units::mm;
553  zplane[1] = 21. *Gaudi::Units::mm; rmin[1] = r0 - 28.3*Gaudi::Units::mm; rmax[1] = r0 - 8.*Gaudi::Units::mm;
554  zplane[2] = 21. *Gaudi::Units::mm; rmin[2] = r0 - 40. *Gaudi::Units::mm; rmax[2] = r0 - 8.*Gaudi::Units::mm;
555  zplane[3] = 42. *Gaudi::Units::mm; rmin[3] = r0 - 40. *Gaudi::Units::mm; rmax[3] = r0 - 8.*Gaudi::Units::mm;
556  zplane[4] = 42. *Gaudi::Units::mm; rmin[4] = r0 - 28.3*Gaudi::Units::mm; rmax[4] = r0 - 8.*Gaudi::Units::mm;
557 // zplane[5] = 56.5*Gaudi::Units::mm; rmin[5] = r0 - 28.3*Gaudi::Units::mm; rmax[5] = r0 - 8.*Gaudi::Units::mm;
558  zplane[5] = 46.5*Gaudi::Units::mm; rmin[5] = r0 - 28.3*Gaudi::Units::mm; rmax[5] = r0 - 8.*Gaudi::Units::mm;
559  } else if(id == "BackMiddleRing::LowerGTen"){
560  double r0 = 699.*Gaudi::Units::mm-2.5*Gaudi::Units::mm; // RMiddle radius of the ring
561  zplane.resize(6); rmin.resize(6); rmax.resize(6);
562  zplane[0] = 16.5*Gaudi::Units::mm; rmin[0] = r0 - 28.*Gaudi::Units::mm; rmax[0] = r0 - 8.*Gaudi::Units::mm;
563  zplane[1] = 21.5*Gaudi::Units::mm; rmin[1] = r0 - 28.*Gaudi::Units::mm; rmax[1] = r0 - 8.*Gaudi::Units::mm;
564  zplane[2] = 21.5*Gaudi::Units::mm; rmin[2] = r0 - 40.*Gaudi::Units::mm; rmax[2] = r0 - 8.*Gaudi::Units::mm;
565  zplane[3] = 41.5*Gaudi::Units::mm; rmin[3] = r0 - 40.*Gaudi::Units::mm; rmax[3] = r0 - 8.*Gaudi::Units::mm;
566  zplane[4] = 41.5*Gaudi::Units::mm; rmin[4] = r0 - 28.*Gaudi::Units::mm; rmax[4] = r0 - 8.*Gaudi::Units::mm;
567  zplane[5] = 46.5*Gaudi::Units::mm; rmin[5] = r0 - 28.*Gaudi::Units::mm; rmax[5] = r0 - 8.*Gaudi::Units::mm;
568  } else if(id == "BackMiddleRing::UpperHole"){
569  double r0 = 699.*Gaudi::Units::mm-2.5*Gaudi::Units::mm; // RMiddle radius of the ring
570  zplane.resize(6); rmin.resize(6); rmax.resize(6);
571  zplane[0] = 16.5*Gaudi::Units::mm; rmin[0] = r0 + 8.*Gaudi::Units::mm; rmax[0] = r0 + 28.3*Gaudi::Units::mm;
572  zplane[1] = 21. *Gaudi::Units::mm; rmin[1] = r0 + 8.*Gaudi::Units::mm; rmax[1] = r0 + 28.3*Gaudi::Units::mm;
573  zplane[2] = 21. *Gaudi::Units::mm; rmin[2] = r0 + 8.*Gaudi::Units::mm; rmax[2] = r0 + 40. *Gaudi::Units::mm;
574  zplane[3] = 42. *Gaudi::Units::mm; rmin[3] = r0 + 8.*Gaudi::Units::mm; rmax[3] = r0 + 40. *Gaudi::Units::mm;
575  zplane[4] = 42. *Gaudi::Units::mm; rmin[4] = r0 + 8.*Gaudi::Units::mm; rmax[4] = r0 + 28.3*Gaudi::Units::mm;
576  zplane[5] = 46.5*Gaudi::Units::mm; rmin[5] = r0 + 8.*Gaudi::Units::mm; rmax[5] = r0 + 28.3*Gaudi::Units::mm;
577  } else if(id == "BackMiddleRing::UpperGTen"){
578  double r0 = 699.*Gaudi::Units::mm-2.5*Gaudi::Units::mm; // RMiddle radius of the ring
579  zplane.resize(6); rmin.resize(6); rmax.resize(6);
580  zplane[0] = 16.5*Gaudi::Units::mm; rmin[0] = r0 + 8.*Gaudi::Units::mm; rmax[0] = r0 + 28.*Gaudi::Units::mm;
581  zplane[1] = 21.5*Gaudi::Units::mm; rmin[1] = r0 + 8.*Gaudi::Units::mm; rmax[1] = r0 + 28.*Gaudi::Units::mm;
582  zplane[2] = 21.5*Gaudi::Units::mm; rmin[2] = r0 + 8.*Gaudi::Units::mm; rmax[2] = r0 + 40.*Gaudi::Units::mm;
583  zplane[3] = 41.5*Gaudi::Units::mm; rmin[3] = r0 + 8.*Gaudi::Units::mm; rmax[3] = r0 + 40.*Gaudi::Units::mm;
584  zplane[4] = 41.5*Gaudi::Units::mm; rmin[4] = r0 + 8.*Gaudi::Units::mm; rmax[4] = r0 + 28.*Gaudi::Units::mm;
585  zplane[5] = 46.5*Gaudi::Units::mm; rmin[5] = r0 + 8.*Gaudi::Units::mm; rmax[5] = r0 + 28.*Gaudi::Units::mm;
586  } else if(id == "BackInnerRing"){
587  double r0 =357.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the ring
588  zplane.resize(4); rmin.resize(4); rmax.resize(4);
589  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = r0 - 22.5*Gaudi::Units::mm; rmax[0] = r0 + 53.5*Gaudi::Units::mm;
590  zplane[1] = 22.5*Gaudi::Units::mm; rmin[1] = r0 - 22.5*Gaudi::Units::mm; rmax[1] = r0 + 53.5*Gaudi::Units::mm;
591  zplane[2] = 22.5*Gaudi::Units::mm; rmin[2] = r0 - 24.5*Gaudi::Units::mm; rmax[2] = r0 + 40.5*Gaudi::Units::mm;
592  zplane[3] = 54. *Gaudi::Units::mm; rmin[3] = r0 - 24.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
593  } else if(id == "BackInnerRing::Hole"){
594  double r0 =357.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the ring
595  zplane.resize(6); rmin.resize(6); rmax.resize(6);
596  zplane[0] = 18. *Gaudi::Units::mm; rmin[0] = r0 + 6.5*Gaudi::Units::mm; rmax[0] = r0 + 29.5*Gaudi::Units::mm;
597  zplane[1] = 22.5*Gaudi::Units::mm; rmin[1] = r0 + 6.5*Gaudi::Units::mm; rmax[1] = r0 + 29.5*Gaudi::Units::mm;
598  zplane[2] = 22.5*Gaudi::Units::mm; rmin[2] = r0 + 6.5*Gaudi::Units::mm; rmax[2] = r0 + 40.5*Gaudi::Units::mm;
599  zplane[3] = 43.5*Gaudi::Units::mm; rmin[3] = r0 + 6.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
600  zplane[4] = 43.5*Gaudi::Units::mm; rmin[4] = r0 + 6.5*Gaudi::Units::mm; rmax[4] = r0 + 29.5*Gaudi::Units::mm;
601  zplane[5] = 48. *Gaudi::Units::mm; rmin[5] = r0 + 6.5*Gaudi::Units::mm; rmax[5] = r0 + 29.5*Gaudi::Units::mm;
602  } else if(id == "BackInnerRing::GTen"){
603  double r0 =357.5*Gaudi::Units::mm-1.*Gaudi::Units::mm; // RInner = reference radius of the ring
604  zplane.resize(6); rmin.resize(6); rmax.resize(6);
605  zplane[0] = 18.*Gaudi::Units::mm; rmin[0] = r0 + 8.5*Gaudi::Units::mm; rmax[0] = r0 + 28.5*Gaudi::Units::mm;
606  zplane[1] = 23.*Gaudi::Units::mm; rmin[1] = r0 + 8.5*Gaudi::Units::mm; rmax[1] = r0 + 28.5*Gaudi::Units::mm;
607  zplane[2] = 23.*Gaudi::Units::mm; rmin[2] = r0 + 8.5*Gaudi::Units::mm; rmax[2] = r0 + 40.5*Gaudi::Units::mm;
608  zplane[3] = 43.*Gaudi::Units::mm; rmin[3] = r0 + 8.5*Gaudi::Units::mm; rmax[3] = r0 + 40.5*Gaudi::Units::mm;
609  zplane[4] = 43.*Gaudi::Units::mm; rmin[4] = r0 + 8.5*Gaudi::Units::mm; rmax[4] = r0 + 28.5*Gaudi::Units::mm;
610  zplane[5] = 48.*Gaudi::Units::mm; rmin[5] = r0 + 8.5*Gaudi::Units::mm; rmax[5] = r0 + 28.5*Gaudi::Units::mm;
611  } else if(id == "FrontOuterRing"){
612  double r0 = 1961.*Gaudi::Units::mm-7.*Gaudi::Units::mm; // ROuter = inner radius of the outer ring
613  zplane.resize(7); rmin.resize(7); rmax.resize(7);
614  zplane[0] = 0. *Gaudi::Units::mm; rmin[0] = r0 + 0.*Gaudi::Units::mm; rmax[0] = r0 + 111.*Gaudi::Units::mm;
615  zplane[1] = 5. *Gaudi::Units::mm; rmin[1] = r0 + 0.*Gaudi::Units::mm; rmax[1] = r0 + 116.*Gaudi::Units::mm;
616  zplane[2] = 20. *Gaudi::Units::mm; rmin[2] = r0 + 0.*Gaudi::Units::mm; rmax[2] = r0 + 116.*Gaudi::Units::mm;
617  zplane[3] = 20. *Gaudi::Units::mm; rmin[3] = r0 + 62.*Gaudi::Units::mm; rmax[3] = r0 + 116.*Gaudi::Units::mm;
618  zplane[4] = 63.3*Gaudi::Units::mm; rmin[4] = r0 + 62.*Gaudi::Units::mm; rmax[4] = r0 + 116.*Gaudi::Units::mm;
619  zplane[5] = 115.2*Gaudi::Units::mm; rmin[5] = r0 + 90.*Gaudi::Units::mm; rmax[5] = r0 + 116.*Gaudi::Units::mm;
620  zplane[6] = 144. *Gaudi::Units::mm; rmin[6] = r0 + 90.*Gaudi::Units::mm; rmax[6] = r0 + 116.*Gaudi::Units::mm;
621  } else if(id == "FrontOuterLongBar"){
622  zplane.resize(4); rmin.resize(4); rmax.resize(4);
623  zplane[0] = 0.*Gaudi::Units::mm; rmin[0] = 1969.7*Gaudi::Units::mm; rmax[0] = 2016.*Gaudi::Units::mm;
624  zplane[1] = 1.*Gaudi::Units::mm; rmin[1] = 1969.7*Gaudi::Units::mm; rmax[1] = 2016.*Gaudi::Units::mm;
625  zplane[2] = 1.*Gaudi::Units::mm; rmin[2] = 652. *Gaudi::Units::mm; rmax[2] = 2016.*Gaudi::Units::mm;
626  zplane[3] = 21.*Gaudi::Units::mm; rmin[3] = 652. *Gaudi::Units::mm; rmax[3] = 2016.*Gaudi::Units::mm;
627  //2020-46.3 ; RMiddle+40.//RMiddle+8+(lengthofbar=1398)
628  } else if(id == "BackOuterRing"){
629  double r0 = 1961.*Gaudi::Units::mm-7.*Gaudi::Units::mm;
630  zplane.resize(7); rmin.resize(7); rmax.resize(7);
631  zplane[0] = 0.*Gaudi::Units::mm; rmin[0] = r0 + 0.*Gaudi::Units::mm; rmax[0] = r0 + 111.*Gaudi::Units::mm;
632  zplane[1] = 5.*Gaudi::Units::mm; rmin[1] = r0 + 0.*Gaudi::Units::mm; rmax[1] = r0 + 116.*Gaudi::Units::mm;
633  zplane[2] = 15.*Gaudi::Units::mm; rmin[2] = r0 + 0.*Gaudi::Units::mm; rmax[2] = r0 + 116.*Gaudi::Units::mm;
634  zplane[3] = 15.*Gaudi::Units::mm; rmin[3] = r0 + 62.*Gaudi::Units::mm; rmax[3] = r0 + 116.*Gaudi::Units::mm;
635  zplane[4] = 41.*Gaudi::Units::mm; rmin[4] = r0 + 62.*Gaudi::Units::mm; rmax[4] = r0 + 116.*Gaudi::Units::mm;
636  zplane[5] = 41.*Gaudi::Units::mm; rmin[5] = r0 + 90.*Gaudi::Units::mm; rmax[5] = r0 + 116.*Gaudi::Units::mm;
637  zplane[6] = 139.*Gaudi::Units::mm; rmin[6] = r0 + 90.*Gaudi::Units::mm; rmax[6] = r0 + 116.*Gaudi::Units::mm;
638  } else if(id == "BackOuterLongBar"){
639  zplane.resize(4); rmin.resize(4); rmax.resize(4);
640  zplane[0] = 0.*Gaudi::Units::mm; rmin[0] = 1969.7*Gaudi::Units::mm; rmax[0] = 2016.*Gaudi::Units::mm;
641  zplane[1] = 1.*Gaudi::Units::mm; rmin[1] = 1969.7*Gaudi::Units::mm; rmax[1] = 2016.*Gaudi::Units::mm;
642  zplane[2] = 1.*Gaudi::Units::mm; rmin[2] = 736.5*Gaudi::Units::mm; rmax[2] = 2016.*Gaudi::Units::mm;
643  zplane[3] = 21.*Gaudi::Units::mm; rmin[3] = 736.5*Gaudi::Units::mm; rmax[3] = 2016.*Gaudi::Units::mm;
644  } else {
645  throw std::runtime_error("EMECSupportConstruction: wrong Pcone id");
646  }
647  std::ostringstream tmp;
648  tmp << "Cannot get " << id << " polycone fom DB";
649  printWarning(tmp);
650  } // zplane.empty()?
651 
652  GeoPcon* shape = new GeoPcon(phi_start, phi_size);
653  for(size_t i = 0; i < zplane.size(); ++ i){
654  shape->addPlane(zplane[i], rmin[i], rmax[i]);
655  }
656 
657  return shape;
658 }
659 
660 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::front_envelope(void) const
661 {
662  std::string id = "FrontSupportMother";
663  std::string name = m_BaseName + id;
664  GeoPcon *motherShape = getPcon(id);
665  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
666  GeoIntrusivePtr<GeoPhysVol>motherPhysical= new GeoPhysVol(motherLogical);
667 
668  put_front_outer_extracyl(motherPhysical); // put lead plate after PS
669  put_front_outer_ring(motherPhysical);
670  put_front_outer_longbar(motherPhysical);
671  put_front_indexing_rings(motherPhysical);
672  put_front_middle_ring(motherPhysical);
673  put_front_inner_ring(motherPhysical);
674  put_front_inner_longbar(motherPhysical);
675  put_front_outer_barettes(motherPhysical);
676  put_front_inner_barettes(motherPhysical);
677  put_front_outer_electronics(motherPhysical);
678 
679  return motherPhysical;
680 }
681 
682 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::back_envelope(void) const
683 {
684  std::string id = "BackSupportMother";
685  std::string name = m_BaseName + id;
686  GeoPcon *motherShape = getPcon(id);
687  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
688  GeoIntrusivePtr<GeoPhysVol>motherPhysical= new GeoPhysVol(motherLogical);
689 
690  put_back_indexing_rings(motherPhysical);
691  put_back_outer_ring(motherPhysical);
692  put_back_middle_ring(motherPhysical);
693  put_back_inner_ring(motherPhysical);
694  put_back_inner_longbar(motherPhysical);
695  put_back_outer_longbar(motherPhysical);
696  put_back_inner_barettes(motherPhysical);
697  put_back_outer_barettes(motherPhysical);
698 
699  return motherPhysical;
700 }
701 
702 void EMECSupportConstruction::put_front_outer_barettes(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
703 {
704 
705  const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble("ABSORBERCONTRACTION");
706  const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble("ELECTRODEINVCONTRACTION");
707  const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble("LEADTHICKNESSOUTER")*Gaudi::Units::mm;
708  const double steelThickness=(*m_DB_EmecFan)[0]->getDouble("STEELTHICKNESS")*Gaudi::Units::mm;
709  const double glueThickness=(*m_DB_EmecFan)[0]->getDouble("GLUETHICKNESS")*Gaudi::Units::mm;
710  const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble("ELECTRODETOTALTHICKNESS")*Gaudi::Units::mm;
711 
712  const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
713  const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
714 
715  std::string id = "FrontOuterBarrettes";
716  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
717  map_t numbers = getNumbersMap(m_DB_numbers, id);
718 
719  std::string name = m_BaseName + id;
720  double rminFOB = getNumber(m_DB_tubes, tubes, id, "RMIN", 614.-2.+40.);
721  double rmaxFOB = getNumber(m_DB_tubes, tubes, id, "RMAX", 1961.-7.+62.);
722  double dzFOB = getNumber(m_DB_tubes, tubes, id, "DZ", 11. / 2);
723  double zposFOB = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 50.) + dzFOB;
724  GeoTubs *shapeFOB = new GeoTubs(rminFOB, rmaxFOB, dzFOB, m_PhiStart, m_PhiSize);
725  GeoLogVol *logicalFOB = new GeoLogVol(name, shapeFOB, m_LAr);
726  GeoIntrusivePtr<GeoPhysVol>physFOB = new GeoPhysVol(logicalFOB);
727  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposFOB)));
728  motherPhysical->add(physFOB);
729 
730  const int number_of_modules = 8;
731  const double moduldfi = Gaudi::Units::twopi / number_of_modules;
732  const int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt("NABS");
733  const int nofdiv = nofabs / number_of_modules;
734  const double dfi = Gaudi::Units::twopi / nofabs;
735  //define a fi section including one absorber and electrode
736  name = m_BaseName + "FrontOuterBarrette::Module::Phidiv";
737  GeoTubs *shapeFOBMP = new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., dfi);
738  GeoLogVol *logicalFOBMP = new GeoLogVol(name, shapeFOBMP, m_LAr);
739  GeoIntrusivePtr<GeoPhysVol>physFOBMP = new GeoPhysVol(logicalFOBMP);
740 
741  //longitudinal bar - absorber connection
742  name = m_BaseName + "FrontOuterBarrette::Abs";
743  double rmn = getNumber(m_DB_numbers, numbers, "R0", "PARVALUE", 613.38); // start of abs.
744  double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 41.4); // start of barrette rel to start of abs.
745  double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 1290.) / 2.; // length of the connected part
746  assert(rmn + dr > rminFOB && rmn + dr + dx*2 < rmaxFOB);
747 
748  const double r0A = rmn + dr + dx;
749  GeoBox *shapeFOBA = new GeoBox(dx, outerAbsorberDy, dzFOB);
750  GeoLogVol *logicalFOBA = new GeoLogVol(name, shapeFOBA, m_G10FeOuter);
751  GeoIntrusivePtr<GeoPhysVol>physFOBA = new GeoPhysVol(logicalFOBA);
752  physFOBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A)));
753  physFOBMP->add(physFOBA);
754 
755  name = m_BaseName + "FrontOuterBarrette::Ele"; // piece of electrode
756  dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 48.4);
757  dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 1283.8) / 2.;
758  assert(rmn + dr > rminFOB && rmn + dr + dx*2 < rmaxFOB);
759 
760  const double r0E = rmn + dr + dx;
761  double x0 = r0E * cos(dfi/2.);
762  double y0 = r0E * sin(dfi/2.);
763  GeoBox *shapeFOBE = new GeoBox(dx, electrodeDy, dzFOB);
764  GeoLogVol *logicalFOBE = new GeoLogVol(name, shapeFOBE, m_Kapton_Cu);
765  GeoIntrusivePtr<GeoPhysVol>physFOBE = new GeoPhysVol(logicalFOBE);
766  physFOBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
767  physFOBMP->add(physFOBE);
768 
769  if(m_isModule){
770  name = m_BaseName + "FrontOuterBarrette::Module::Phidiv";
771  for(int i = 0; i < nofdiv - 1; ++ i){
772  double fi = m_PhiStart + dfi/2. + i * dfi;
773  physFOB->add(new GeoIdentifierTag(i));
774  physFOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
775  physFOB->add(physFOBMP);
776  }
777  name = m_BaseName + "FrontOuterBarrette::Abs";
778  double fi = m_PhiStart + dfi/2.+ (nofdiv-1) * dfi;
779  x0 = r0A*cos(fi);
780  y0 = r0A*sin(fi);
781  physFOB->add(new GeoIdentifierTag(nofdiv-1));
782  physFOB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
783  physFOB->add(physFOBA);
784  } else {
785  // in case one wants to build the whole wheel:
786  // define a (virtual)module
787  name = m_BaseName + "FrontOuterBarrette::Module";
788  GeoTubs *shapeFOBM = new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., moduldfi);
789  GeoLogVol *logicalFOBM = new GeoLogVol(name, shapeFOBM, m_LAr);
790  GeoIntrusivePtr<GeoPhysVol>physFOBM = new GeoPhysVol(logicalFOBM);
791  //position the fi divisions into module
792  name = m_BaseName + "FrontOuterBarrette::Module::Phidiv";
793  for(int i = 0; i < nofdiv; ++ i){
794  double fi = i * dfi;
795  physFOBM->add(new GeoIdentifierTag(i));
796  physFOBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
797  physFOBM->add(physFOBMP);
798  }
799  //position modules into Barrette mother to create the full wheel
800  name = m_BaseName + "FrontOuterBarrette::Module";
801  for(int i = 0; i < number_of_modules; ++ i){
802  double fi = dfi/2.+ i * moduldfi;
803  physFOB->add(new GeoIdentifierTag(i));
804  physFOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
805  physFOB->add(physFOBM);
806  }
807  }
808 }
809 
810 void EMECSupportConstruction::put_front_inner_barettes(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
811 {
812 
813  const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble("ABSORBERCONTRACTION");
814  const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble("ELECTRODEINVCONTRACTION");
815  const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble("LEADTHICKNESSINNER")*Gaudi::Units::mm;
816  const double steelThickness=(*m_DB_EmecFan)[0]->getDouble("STEELTHICKNESS")*Gaudi::Units::mm;
817  const double glueThickness=(*m_DB_EmecFan)[0]->getDouble("GLUETHICKNESS")*Gaudi::Units::mm;
818  const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble("ELECTRODETOTALTHICKNESS")*Gaudi::Units::mm;
819 
820  const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
821  const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
822 
823  std::string id = "FrontInnerBarrettes";
824  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
825  map_t numbers = getNumbersMap(m_DB_numbers, id);
826  std::string name = m_BaseName + id;
827 
828  double rminFIB = getNumber(m_DB_tubes, tubes, id, "RMIN", 335.5-1.+40.5); //RInner + 40.5// -1mm for rcold
829  double rmaxFIB = getNumber(m_DB_tubes, tubes, id, "RMAX", 614.-2.-40.); //RMiddle-40.mm // -2mm for cold
830  double dzFIB = getNumber(m_DB_tubes, tubes, id, "DZ", 11. / 2);
831  double zposFIB = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 50.) + dzFIB;
832 
833  GeoTubs *shapeFIB = new GeoTubs(rminFIB, rmaxFIB, dzFIB, m_PhiStart, m_PhiSize);
834  GeoLogVol *logicalFIB = new GeoLogVol(name, shapeFIB, m_LAr);
835  GeoIntrusivePtr<GeoPhysVol>physFIB = new GeoPhysVol(logicalFIB);
836  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposFIB)));
837  motherPhysical->add(physFIB);
838 
839  const int number_of_modules = 8;
840  const double moduldfi = Gaudi::Units::twopi / number_of_modules;
841  const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt("NABS");
842  const int nofdiv = nofabs / number_of_modules;
843  const double dfi = Gaudi::Units::twopi / nofabs;
844 
845  name = m_BaseName + "FrontInnerBarrette::Module::Phidiv";
846  GeoTubs *shapeFIBMP = new GeoTubs(rminFIB,rmaxFIB,dzFIB, -dfi/4., dfi);
847  GeoLogVol *logicalFIBMP = new GeoLogVol(name, shapeFIBMP, m_LAr);
848  GeoIntrusivePtr<GeoPhysVol>physFIBMP = new GeoPhysVol(logicalFIBMP);
849 
850  name = m_BaseName + "FrontInnerBarrette::Abs";
851  double rmn = getNumber(m_DB_numbers, numbers, "R0", "PARVALUE", 302.31); // start of abs.
852  double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 75.6); // start of barrette rel to start of abs.
853  double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 192.) / 2.; // length of the connected part
854  assert(rmn + dr > rminFIB && rmn + dr + dx*2 < rmaxFIB);
855 
856  const double r0A = rmn + dr + dx;
857  GeoBox *shapeFIBA = new GeoBox(dx, innerAbsorberDy, dzFIB);
858  GeoLogVol *logicalFIBA = new GeoLogVol(name, shapeFIBA, m_G10FeInner);
859  GeoIntrusivePtr<GeoPhysVol>physFIBA = new GeoPhysVol(logicalFIBA);
860  physFIBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A)));
861  physFIBMP->add(physFIBA);
862 
863  name = m_BaseName + "FrontInnerBarrette::Ele"; // piece of electrode
864  dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 106.3);
865  dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 144.4) / 2.;
866  assert(rmn + dr > rminFIB && rmn + dr + dx*2 < rmaxFIB);
867 
868  const double r0E = rmn + dr + dx;
869  double x0 = r0E * cos(dfi/2.);
870  double y0 = r0E * sin(dfi/2.);
871  GeoBox *shapeFIBE = new GeoBox(dx, electrodeDy, dzFIB);
872  GeoLogVol *logicalFIBE = new GeoLogVol(name, shapeFIBE, m_Kapton_Cu);
873  GeoIntrusivePtr<GeoPhysVol>physFIBE = new GeoPhysVol(logicalFIBE);
874  physFIBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
875  physFIBMP->add(physFIBE);
876 
877  if(m_isModule){
878  name = m_BaseName + "FrontInnerBarrette::Phidiv";
879  for(int i = 0; i < nofdiv - 1; ++ i){
880  double fi = m_PhiStart + dfi/2. + i * dfi;
881  physFIB->add(new GeoIdentifierTag(i));
882  physFIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
883  physFIB->add(physFIBMP);
884  }
885  name = m_BaseName + "FrontInnerBarrette::Abs";
886  double fi = m_PhiStart + dfi/2.+ (nofdiv-1) * dfi;
887  x0 = r0A * cos(fi);
888  y0 = r0A * sin(fi);
889  physFIB->add(new GeoIdentifierTag(nofdiv-1));
890  physFIB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
891  physFIB->add(physFIBA);
892  } else {
893  // in case one wants to build the whole wheel:
894  // define a (virtual)module
895  name = m_BaseName + "FrontInnerBarrette::Module";
896  GeoTubs *shapeFIBM = new GeoTubs(rminFIB, rmaxFIB, dzFIB, -dfi/4., moduldfi);
897  GeoLogVol *logicalFIBM = new GeoLogVol(name, shapeFIBM, m_LAr);
898  GeoIntrusivePtr<GeoPhysVol>physFIBM = new GeoPhysVol(logicalFIBM);
899  name = m_BaseName + "FrontInnerBarrette::Module::Phidiv";
900  for(int i = 0; i < nofdiv; ++ i){
901  double fi = i * dfi;
902  physFIBM->add(new GeoIdentifierTag(i));
903  physFIBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
904  physFIBM->add(physFIBMP);
905  }
906  //position modules into Barrette mother to create the full wheel
907  name = m_BaseName + "FrontInnerBarrette::Module";
908  for(int i = 0; i < number_of_modules; ++ i){
909  double fi = dfi/2.+ i * moduldfi;
910  physFIB->add(new GeoIdentifierTag(i));
911  physFIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
912  physFIB->add(physFIBM);
913  }
914  }
915 }
916 
917 // It seems we need to accout for z side for BOB only at the moment
918 void EMECSupportConstruction::put_back_outer_barettes(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
919 {
920 
921  const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble("ABSORBERCONTRACTION");
922  const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble("ELECTRODEINVCONTRACTION");
923  const double leadThicknessOuter=(*m_DB_EmecFan)[0]->getDouble("LEADTHICKNESSOUTER")*Gaudi::Units::mm;
924  const double steelThickness=(*m_DB_EmecFan)[0]->getDouble("STEELTHICKNESS")*Gaudi::Units::mm;
925  const double glueThickness=(*m_DB_EmecFan)[0]->getDouble("GLUETHICKNESS")*Gaudi::Units::mm;
926  const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble("ELECTRODETOTALTHICKNESS")*Gaudi::Units::mm;
927 
928  const double outerAbsorberDy=(leadThicknessOuter/2+steelThickness+glueThickness)*coldContraction;
929  const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
930 
931  const std::string id = "BackOuterBarrettes";
932 
933  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
934  map_t numbers = getNumbersMap(m_DB_numbers, id);
935 
936  std::string baseName = m_BaseName;
937  if(!m_isModule) baseName += m_pos_zside? "Pos::" : "Neg::";
938  std::string name = baseName + id;
939 
940  double rminBOB = getNumber(m_DB_tubes, tubes, id, "RMIN", 699.-2.5+40.); //RMiddle+40. // -2.5 for cold
941  double rmaxBOB = getNumber(m_DB_tubes, tubes, id, "RMAX", 1961.-7.+62.); //ROuter+62. // -7 for cold
942  double dzBOB = getNumber(m_DB_tubes, tubes, id, "DZ", 11. / 2);
943  double zposBOB = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 44.) + dzBOB;
944  GeoTubs *shapeBOB = new GeoTubs(rminBOB, rmaxBOB, dzBOB, m_PhiStart, m_PhiSize);
945  GeoLogVol *logicalBOB = new GeoLogVol(name, shapeBOB, m_LAr);
946  GeoIntrusivePtr<GeoPhysVol>physBOB = new GeoPhysVol(logicalBOB);
947  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposBOB)));
948  motherPhysical->add(physBOB);
949 
950  const int number_of_modules = 8;
951  const double moduldfi = Gaudi::Units::twopi / number_of_modules;
952  int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt("NABS");
953  int nofdiv = nofabs / number_of_modules;
954  double dfi = Gaudi::Units::twopi / nofabs;
955 
956  name = baseName + "BackOuterBarrette::Module::Phidiv";
957  GeoTubs *shapeBOBMP = new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4., dfi);
958  GeoLogVol *logicalBOBMP = new GeoLogVol(name, shapeBOBMP, m_LAr);
959  GeoIntrusivePtr<GeoPhysVol>physBOBMP = new GeoPhysVol(logicalBOBMP);
960 
961  name = baseName + "BackOuterBarrette::Abs"; //longitudinal bar - absorber connection
962  double rmn = getNumber(m_DB_numbers, numbers, "R0", "PARVALUE", 698.4); // start of abs.
963  double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 42.1); // start of barrette rel to start of abs
964  double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 1229.) / 2.; // length of the connected part
965  assert(rmn + dr > rminBOB && rmn + dr + dx * 2 < rmaxBOB);
966 
967  const double r0A = rmn + dr + dx;
968  GeoBox *shapeBOBA = new GeoBox(dx, outerAbsorberDy, dzBOB);
969  GeoLogVol *logicalBOBA = new GeoLogVol(name, shapeBOBA, m_G10FeOuter);
970  GeoIntrusivePtr<GeoPhysVol>physBOBA = new GeoPhysVol(logicalBOBA);
971  physBOBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A)));
972  physBOBMP->add(physBOBA);
973 
974  name = baseName + "BackOuterBarrette::Ele"; // piece of electrode
975  dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 41.);
976  dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 1246.9) / 2.;
977  assert(rmn + dr > rminBOB && rmn + dr + dx*2 < rmaxBOB);
978 
979  double r0E = rmn + dr + dx;
980  double y0 = r0E * sin(dfi/2.);
981  double x0 = r0E * cos(dfi/2.);
982  GeoBox *shapeBOBE = new GeoBox(dx, electrodeDy, dzBOB);
983  GeoLogVol *logicalBOBE = new GeoLogVol(name, shapeBOBE, m_Kapton_Cu);
984  GeoIntrusivePtr<GeoPhysVol>physBOBE = new GeoPhysVol(logicalBOBE);
985  physBOBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.))));
986  physBOBMP->add(physBOBE);
987 
988  if(m_isModule){
989  // Put phi divisions directly to Barrette Mother
990  name = baseName + "BackOuterBarrette::Module::Phidiv";
991  for(int i = 0; i < nofdiv - 1; ++ i){
992  double fi = m_PhiStart + dfi/2. + i * dfi;
993  physBOB->add(new GeoIdentifierTag(i));
994  physBOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
995  physBOB->add(physBOBMP);
996  }
997  name = baseName + "BackOuterBarrette::Abs";
998  double fi = m_PhiStart + dfi/2.+ (nofdiv - 1) * dfi;
999  x0 = r0A * cos(fi);
1000  y0 = r0A * sin(fi);
1001  physBOB->add(new GeoIdentifierTag(nofdiv - 1));
1002  physBOB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi))));
1003  physBOB->add(physBOBA);
1004  } else {
1005  // in case one wants to build the whole wheel:
1006  // define a (virtual)module
1007  name = m_BaseName + "BackOuterBarrette::Module";
1008  GeoTubs *shapeBOBM = new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4.,moduldfi);
1009  GeoLogVol *logicalBOBM = new GeoLogVol(name, shapeBOBM, m_LAr);
1010  GeoIntrusivePtr<GeoPhysVol>physBOBM = new GeoPhysVol(logicalBOBM);
1011  //position the fi divisions into module
1012  name = baseName + "BackOuterBarrette::Module::Phidiv";
1013  for(int i = 0; i < nofdiv; ++ i){
1014  double fi = dfi * i;
1015  physBOBM->add(new GeoIdentifierTag(i));
1016  physBOBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
1017  physBOBM->add(physBOBMP);
1018  }
1019  //position modules into Barrette mother to create the full wheel
1020  name = baseName + "BackOuterBarrette::Module";
1021  for(int i = 0; i < number_of_modules; ++ i){
1022  double fi = dfi/2.+ i * moduldfi;
1023  physBOB->add(new GeoIdentifierTag(i));
1024  physBOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
1025  physBOB->add(physBOBM);
1026  }
1027  }
1028 }
1029 
1030 void EMECSupportConstruction::put_back_inner_barettes(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1031 {
1032  const double coldContraction=(*m_DB_ColdContraction)[0]->getDouble("ABSORBERCONTRACTION");
1033  const double electrodeInvColdContraction=(*m_DB_ColdContraction)[0]->getDouble("ELECTRODEINVCONTRACTION");
1034  const double leadThicknessInner=(*m_DB_EmecFan)[0]->getDouble("LEADTHICKNESSINNER")*Gaudi::Units::mm;
1035  const double steelThickness=(*m_DB_EmecFan)[0]->getDouble("STEELTHICKNESS")*Gaudi::Units::mm;
1036  const double glueThickness=(*m_DB_EmecFan)[0]->getDouble("GLUETHICKNESS")*Gaudi::Units::mm;
1037  const double electrodeTotalThickness=(*m_DB_EmecFan)[0]->getDouble("ELECTRODETOTALTHICKNESS")*Gaudi::Units::mm;
1038 
1039  const double innerAbsorberDy=(leadThicknessInner/2+steelThickness+glueThickness)*coldContraction;
1040  const double electrodeDy=electrodeTotalThickness/2/electrodeInvColdContraction;
1041 
1042 
1043 
1044  std::string id = "BackInnerBarrettes";
1045 
1046  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1047  map_t numbers = getNumbersMap(m_DB_numbers, id);
1048 
1049  std::string name = m_BaseName + id;
1050  double rminBIB = getNumber(m_DB_tubes, tubes, id, "RMIN", 357.5-1.+40.5); //RInner +40.5// -1.Gaudi::Units::mm for cold
1051  double rmaxBIB = getNumber(m_DB_tubes, tubes, id, "RMAX", 699.-2.5-40.); //RMiddle-40 //-2.5mm for cold
1052  double dzBIB = getNumber(m_DB_tubes, tubes, id, "DZ", 11. / 2);
1053  double zposBIB = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 44.) + dzBIB;
1054  GeoTubs *shapeBIB = new GeoTubs(rminBIB, rmaxBIB, dzBIB, m_PhiStart, m_PhiSize);
1055  GeoLogVol *logicalBIB = new GeoLogVol(name, shapeBIB, m_LAr);
1056  GeoIntrusivePtr<GeoPhysVol>physBIB = new GeoPhysVol(logicalBIB);
1057  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposBIB)));
1058  motherPhysical->add(physBIB);
1059 
1060  const int number_of_modules = 8;
1061  const double moduldfi = Gaudi::Units::twopi / number_of_modules;
1062  const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt("NABS");
1063  const int nofdiv = nofabs / number_of_modules;
1064  const double dfi = Gaudi::Units::twopi / nofabs;
1065 
1066  name = m_BaseName + "BackInnerBarrette::Module::Phidiv";
1067  GeoTubs *shapeBIBMP = new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., dfi);
1068  GeoLogVol *logicalBIBMP = new GeoLogVol(name, shapeBIBMP, m_LAr);
1069  GeoIntrusivePtr<GeoPhysVol>physBIBMP = new GeoPhysVol(logicalBIBMP);
1070 
1071  //longitudinal bar - absorber connection
1072  id = "BackInnerBarrette::Abs";
1073  name = m_BaseName + id;
1074  double rmn = getNumber(m_DB_numbers, numbers, "R0", "PARVALUE", 344.28); // start of abs.
1075  double dr = getNumber(m_DB_numbers, numbers, "DRabs", "PARVALUE", 56.1); // start of barrette rel to start of abs.
1076  double dx = getNumber(m_DB_numbers, numbers, "Labs", "PARVALUE", 255.) / 2.;
1077 
1078  assert(rmn+dr>rminBIB && rmn+dr+dx*2.<rmaxBIB);
1079  const double r0A = rmn + dr + dx;
1080  GeoBox *shapeBIBA = new GeoBox(dx, innerAbsorberDy, dzBIB);
1081  GeoLogVol *logicalBIBA = new GeoLogVol(name, shapeBIBA, m_G10FeInner);
1082  GeoIntrusivePtr<GeoPhysVol>physBIBA = new GeoPhysVol(logicalBIBA);
1083  physBIBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A)));
1084  physBIBMP->add(physBIBA);
1085 
1086  id = "BackInnerBarrette::Ele"; // piece of electrode
1087  name = m_BaseName + id;
1088  dr = getNumber(m_DB_numbers, numbers, "DRele", "PARVALUE", 76.6);
1089  dx = getNumber(m_DB_numbers, numbers, "Lele", "PARVALUE", 208.9) / 2.;
1090  assert(rmn + dr > rminBIB && rmn + dr + dx * 2. < rmaxBIB);
1091 
1092  const double r0E = rmn + dr + dx;
1093  double y0 = r0E * sin(dfi * 0.5);
1094  double x0 = r0E * cos(dfi * 0.5);
1095  GeoBox *shapeBIBE = new GeoBox(dx, electrodeDy, dzBIB);
1096  GeoLogVol *logicalBIBE = new GeoLogVol(name, shapeBIBE, m_Kapton_Cu);
1097  GeoIntrusivePtr<GeoPhysVol>physBIBE = new GeoPhysVol(logicalBIBE);
1098  physBIBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(dfi*0.5))));
1099  physBIBMP->add(physBIBE);
1100 
1101  if(m_isModule){
1102 /*
1103  Put phi divisions directly to Barrette Mother
1104  which goes from Phistart to m_PhiStart+m_PhiSize.
1105  This is the barrette volume of the Module itself in fact.
1106  Positioning will be done such a way, that in case of
1107  m_Position=0, there should be an electrode at phi=0.
1108  Only nofdiv-1 section can be positioned,
1109  otherwise a phi section will leak out of the phi boundary
1110  of the Module.
1111  The abs. and electr. pieces at the phi limits of the Module
1112  could be positioned individually(not done);
1113 */
1114  name = m_BaseName + "BackInnerBarrette::Module::Phidiv";
1115  for(int i = 0; i < nofdiv - 1; ++ i){
1116  double fi = m_PhiStart + dfi/2. + i * dfi;
1117  physBIB->add(new GeoIdentifierTag(i));
1118  physBIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
1119  physBIB->add(physBIBMP);
1120  }
1121  name = m_BaseName + "BackInnerBarrette::Abs";
1122  double fi = m_PhiStart + dfi/2.+ (nofdiv - 1) * dfi;
1123  x0 = r0A*cos(fi);
1124  y0 = r0A*sin(fi);
1125  physBIB->add(new GeoIdentifierTag(nofdiv - 1));
1126  physBIB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(fi))));
1127  physBIB->add(physBIBA);
1128  } else {
1129  // in case one wants to build the whole wheel:
1130  // define a (virtual)module
1131  name = m_BaseName + "BackInnerBarrette::Module";
1132  GeoTubs *shapeBIBM = new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., moduldfi);
1133  GeoLogVol *logicalBIBM = new GeoLogVol(name, shapeBIBM, m_LAr);
1134  GeoIntrusivePtr<GeoPhysVol>physBIBM = new GeoPhysVol(logicalBIBM);
1135  //position the fi divisions into module
1136  name = m_BaseName + "BackInnerBarrette::Module::Phidiv";
1137  for(int i = 0; i < nofdiv; ++ i){
1138  double fi = dfi * i;
1139  physBIBM->add(new GeoIdentifierTag(i));
1140  physBIBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
1141  physBIBM->add(physBIBMP);
1142  }
1143  //position modules into Barrette mother to create the full wheel
1144  name = m_BaseName + "BackInnerBarrette::Module";
1145  for(int i = 0; i < number_of_modules; ++ i){
1146  double fi = dfi*0.5 + i * moduldfi;
1147  physBIB->add(new GeoIdentifierTag(i));
1148  physBIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi)));
1149  physBIB->add(physBIBM);
1150  }
1151  }
1152 }
1153 
1154 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::outer_envelope(void) const
1155 {
1156  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1157  std::string id = "OuterTransversalBars";
1158  std::string name = m_BaseName + id;
1159  double rminOTB = getNumber(m_DB_tubes, tubes, id, "RMIN", (2034. + 2.)*Gaudi::Units::mm);
1160  double rmaxOTB = getNumber(m_DB_tubes, tubes, id, "RMAX", rminOTB + 3.*Gaudi::Units::mm);
1161  double dzOTB = getNumber(m_DB_tubes, tubes, id, "DZ", 201.*Gaudi::Units::mm);
1162  GeoTubs* shapeOTB = new GeoTubs(rminOTB, rmaxOTB, dzOTB, m_PhiStart, m_PhiSize);
1163  GeoLogVol* logicalOTB = new GeoLogVol(name, shapeOTB, m_Gten);
1164  GeoIntrusivePtr<GeoPhysVol> physOTB = new GeoPhysVol(logicalOTB);
1165 
1166  id = "TopIndexingRing";
1167  name = m_BaseName + id;
1168  double rminTIR = getNumber(m_DB_tubes, tubes, id, "RMIN", rmaxOTB);
1169  double rmaxTIR = getNumber(m_DB_tubes, tubes, id, "RMAX", rminTIR + 9.*Gaudi::Units::mm);
1170  double dzTIR = getNumber(m_DB_tubes, tubes, id, "DZ", 10.*Gaudi::Units::mm);
1171  GeoTubs* shapeTIR = new GeoTubs(rminTIR, rmaxTIR, dzTIR, m_PhiStart, m_PhiSize);
1172  GeoLogVol* logicalTIR = new GeoLogVol(name, shapeTIR, m_Alu);
1173  GeoIntrusivePtr<GeoPhysVol> physTIR = new GeoPhysVol(logicalTIR);
1174  id += "::Hole";
1175  name = m_BaseName + id;
1176  double dzTIRH = getNumber(m_DB_tubes, tubes, id, "DZ", 4.5*Gaudi::Units::mm);
1177  double rmaxTIRH = getNumber(m_DB_tubes, tubes, id, "RMAX", rmaxTIR);
1178  double rminTIRH = getNumber(m_DB_tubes, tubes, id, "RMIN", rmaxTIRH - 2.*Gaudi::Units::mm);
1179  GeoTubs* shapeTIRH = new GeoTubs(rminTIRH, rmaxTIRH, dzTIRH, m_PhiStart, m_PhiSize);
1180  GeoLogVol* logicalTIRH = new GeoLogVol(name, shapeTIRH, m_LAr);
1181  GeoIntrusivePtr<GeoPhysVol> physTIRH = new GeoPhysVol(logicalTIRH);
1182  physTIR->add(physTIRH);
1183 
1184  id = "WideStretchers";
1185  name = m_BaseName + id;
1186  GeoPcon* shapeWS = getPcon(id);
1187  GeoLogVol* logicalWS = new GeoLogVol(name, shapeWS, m_Alu);
1188  GeoIntrusivePtr<GeoPhysVol> physWS = new GeoPhysVol(logicalWS);
1189 
1190  id = "NarrowStretchers";
1191  name = m_BaseName + id;
1192  GeoPcon* shapeNS = getPcon(id);
1193  GeoLogVol* logicalNS = new GeoLogVol(name, shapeNS, m_Alu);
1194  GeoIntrusivePtr<GeoPhysVol> physNS = new GeoPhysVol(logicalNS);
1195 
1196  id = "OuterSupportMother";
1197  name = m_BaseName + id;
1198  GeoPcon *motherShape = getPcon(id);
1199  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
1200  GeoIntrusivePtr<GeoPhysVol>motherPhysical= new GeoPhysVol(motherLogical);
1201 
1202  motherPhysical->add(physTIR);
1203  motherPhysical->add(physOTB);
1204 
1205  const int number_of_stretchers = 8; // for full wheel
1206  if(m_isModule){
1207  motherPhysical->add(new GeoIdentifierTag(0));
1208  motherPhysical->add(physNS);
1209  // place two narrow stretchers on edges instead of one wide
1210  double dfi = M_PI / number_of_stretchers;
1211  double dfiNS = shapeNS->getDPhi();
1212  motherPhysical->add(new GeoIdentifierTag(1));
1213  motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(dfi - dfiNS*0.5)));
1214  motherPhysical->add(physNS);
1215  motherPhysical->add(new GeoIdentifierTag(2));
1216  motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(-dfi + dfiNS*0.5)));
1217  motherPhysical->add(physNS);
1218  } else {
1219  double dfi = Gaudi::Units::twopi / number_of_stretchers;
1220  int copyno = 0;
1221  for(int i = 0; i < number_of_stretchers; ++ i, ++ copyno){
1222  double fiW = i * dfi;
1223  motherPhysical->add(new GeoIdentifierTag(copyno));
1224  motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(fiW)));
1225  motherPhysical->add(physWS);
1226  double fiN = (i + 0.5) * dfi;
1227  motherPhysical->add(new GeoIdentifierTag(copyno));
1228  motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(fiN)));
1229  motherPhysical->add(physNS);
1230  }
1231  }
1232 
1233  return motherPhysical;
1234 }
1235 
1236 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::inner_envelope(void) const
1237 {
1238  std::string id = "InnerAluCone";
1239  map_t numbers = getNumbersMap(m_DB_numbers, id);
1240  std::string name0 = m_BaseName + id;
1241 
1242 // double dz = LArWheelCalculator::GetWheelThickness() * 0.5; //257.*Gaudi::Units::mm; //zWheelThickness/2.
1243  double dz = 0.5 * (*m_DB_mn)[0]->getDouble("ACTIVELENGTH")*Gaudi::Units::mm;
1244  try {
1245  dz += (*m_DB_mn)[0]->getDouble("STRAIGHTSTARTSECTION")*Gaudi::Units::mm;
1246  }
1247  catch(...){
1248  dz += 2.*Gaudi::Units::mm;
1249  std::ostringstream tmp("cannot get STRAIGHTSTARTSECTION from DB");
1250  printWarning(tmp);
1251  }
1252 
1253  double r1min = getNumber(m_DB_numbers, numbers, "R1MIN", "PARVALUE", (292.-1.)*Gaudi::Units::mm); //lower radius of front inner ring, -1mm for cold
1254  double r2min = getNumber(m_DB_numbers, numbers, "R2MIN", "PARVALUE", (333.-1.)*Gaudi::Units::mm); //lower radius of back inner ring, -1mm for cold
1255  //RInnerFront-43.5;RInnerBack-24.5
1256  const double talpha = (r2min - r1min)*0.5/dz;
1257  const double calpha = 2.*dz/sqrt(pow(2.*dz,2.)+pow(r2min-r1min,2.));
1258  const double inv_calpha = 1. / calpha;
1259  const double alpha = atan(talpha);
1260  double surfthick = getNumber(m_DB_numbers, numbers, "surfthick", "PARVALUE", 1.*Gaudi::Units::mm); // thickness of the cone shell
1261  double barthick = getNumber(m_DB_numbers, numbers, "barthick", "PARVALUE", 5.*Gaudi::Units::mm); // thickness of the Alu bars
1262  double r1max = pow(barthick/2.,2.)+ pow(r1min+(surfthick+barthick)*inv_calpha,2.);
1263  r1max = sqrt(r1max)+surfthick*inv_calpha;
1264  double r2max = r2min+(r1max-r1min);
1265 
1266  GeoCons* shapeIAC = new GeoCons ( r1min ,r2min,
1267  r1max, r2max,
1268  dz, m_PhiStart, m_PhiSize);
1269 
1270  GeoLogVol* logicalIAC = new GeoLogVol (name0, shapeIAC, m_LAr);
1271  GeoIntrusivePtr<GeoPhysVol> physIAC = new GeoPhysVol(logicalIAC);
1272 
1273  if(m_isModule) return physIAC; // keep simplified shape
1274 
1275  // otherwise get the details: (9 Alu bars/module, between 2 shells)
1276 
1277  std::string name = name0 + "::InnerShell";
1278  GeoCons* shapeIACIS = new GeoCons(
1279  r1min , r2min,
1280  r1min+surfthick*inv_calpha, r2min+surfthick*inv_calpha,
1281  dz, m_PhiStart, m_PhiSize);
1282  GeoLogVol* logicalIACIS = new GeoLogVol (name,shapeIACIS,m_Alu);
1283  GeoIntrusivePtr<GeoPhysVol> physIACIS = new GeoPhysVol(logicalIACIS);
1284  physIAC->add(physIACIS);
1285 
1286  name = name0 + "::OuterShell";
1287 //-----------------------------/
1288 
1289  GeoCons* shapeIACOS = new GeoCons (
1290  r1max-surfthick*inv_calpha, r2max-surfthick*inv_calpha,
1291  r1max, r2max,
1292  dz, m_PhiStart, m_PhiSize);
1293  GeoLogVol* logicalIACOS = new GeoLogVol (name,shapeIACOS,m_Alu);
1294  GeoIntrusivePtr<GeoPhysVol> physIACOS = new GeoPhysVol(logicalIACOS);
1295  physIAC->add(physIACOS);
1296 
1297  name = name0 + "::Phidiv";
1298 //-------------------------/
1299 
1300  const int nofmodul = 8;
1301  const double moduldphi = Gaudi::Units::twopi / nofmodul;
1302  GeoCons* shapeIACP = new GeoCons(
1303  r1min+surfthick*inv_calpha,r2min+surfthick*inv_calpha,
1304  r1max-surfthick*inv_calpha,r2max-surfthick*inv_calpha,
1305  dz, -moduldphi/2.,moduldphi);
1306  GeoLogVol* logicalIACP = new GeoLogVol (name,shapeIACP,m_LAr);
1307  GeoIntrusivePtr<GeoPhysVol> physIACP = new GeoPhysVol(logicalIACP);
1308 
1309  name = name0 + "::AluBar";
1310 //-------------------------/
1311 
1312  GeoPara* shapeIACAB = new GeoPara(
1313  barthick/2.*inv_calpha,barthick/2.,dz,
1314  0.,alpha,0.);
1315  GeoLogVol* logicalIACAB= new GeoLogVol (name,shapeIACAB, m_Alu);
1316  GeoIntrusivePtr<GeoPhysVol> physIACAB= new GeoPhysVol(logicalIACAB);
1317 
1318  const double dphi = Gaudi::Units::twopi / 256.;
1319  const int nbar = 9;
1320  const double phi[9]={-15.,-11.,-7.5,-4.,0.,4.,7.5,11.,15.}; // phipos of the bars
1321  const double r0=r1min+(surfthick+barthick/2.)*inv_calpha+dz*talpha;
1322 
1323  for(int i = 0; i < nbar; ++ i){ // put the Alu bars into the module
1324  double fi=phi[i]*dphi;
1325  double cfi=cos(fi);
1326  double sfi=sin(fi);
1327  physIACP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(r0*cfi,r0*sfi,0.)*GeoTrf::RotateZ3D(fi))));
1328  physIACP->add(physIACAB);
1329  }
1330 
1331  name = name0 + "::Phidiv";
1332  for(int i=0;i<nofmodul;i++){ // put modules into wheel
1333  double fi=(i+0.5)*moduldphi;
1334  physIAC->add( new GeoIdentifierTag(i));
1335  physIAC->add( new GeoTransform(GeoTrf::RotateZ3D(fi)));
1336  physIAC->add(physIACP);
1337  }
1338 
1339  return physIAC;
1340 }
1341 
1343 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::middle_envelope(void) const
1344 {
1345  double dMechFocaltoWRP = (*m_DB_EmecGeometry)[0]->getDouble("Z1") *Gaudi::Units::cm;
1346  double LArEMECHalfCrack = (*m_DB_EmecGeometry)[0]->getDouble("DCRACK") *Gaudi::Units::cm;
1347  double LArTotalThickness = (*m_DB_EmecGeometry)[0]->getDouble("ETOT") *Gaudi::Units::cm;
1348 
1349  double eta_mid = (*m_DB_EmecWheelParameters)[0]->getDouble("ETAEXT");
1350 
1351  double tanThetaMid = 2. * exp(-eta_mid) / (1. - exp(-2.*eta_mid));
1352  const double cosThetaMid = (1. - exp(2.*-eta_mid)) / (1. + exp(-2.*eta_mid));
1353  const double inv_cosThetaMid = 1. / cosThetaMid;
1354 
1355  double z0 = LArTotalThickness * 0.5 + dMechFocaltoWRP;
1356  double length = 462.*Gaudi::Units::mm;
1357  double rthickness = 1.5*Gaudi::Units::mm * inv_cosThetaMid;
1358 
1359  std::string name = m_BaseName + "InnerTransversalBars";
1360  double dz = length * cosThetaMid * 0.5;
1361  double rmin0 = (z0 - dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
1362  double rmin1 = (z0 + dz) * tanThetaMid - LArEMECHalfCrack + inv_cosThetaMid;
1363 
1364  GeoCons* shapeITB = new GeoCons(rmin0, rmin1, rmin0 + rthickness, rmin1 + rthickness,
1365  dz, m_PhiStart, m_PhiSize);
1366 
1367  GeoLogVol* logicalITB = new GeoLogVol (name,shapeITB,m_Gten);
1368  GeoIntrusivePtr<GeoPhysVol> physITB = new GeoPhysVol(logicalITB);
1369 
1370  return physITB;
1371 }
1372 
1373 void EMECSupportConstruction::put_front_middle_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1374 {
1375 
1376  std::string id = "FrontMiddleRing";
1377  std::string name = m_BaseName + id;
1378 
1379  double z0 = getNumber(m_DB_numbers, id, "Z0", 2.);
1380  GeoPcon *shapeFMR = getPcon(id);
1381  GeoLogVol *logicalFMR = new GeoLogVol(name, shapeFMR, m_PermaliE730);
1382  GeoIntrusivePtr<GeoPhysVol>physFMR = new GeoPhysVol(logicalFMR);
1383  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1384  motherPhysical->add(physFMR);
1385 
1386  id = "FrontMiddleRing::LowerHole";
1387  name = m_BaseName + id;
1388  GeoPcon *shapeFMRLH = getPcon(id);
1389  GeoLogVol *logicalFMRLH = new GeoLogVol(name, shapeFMRLH, m_LAr);
1390  GeoIntrusivePtr<GeoPhysVol>physFMRLH = new GeoPhysVol(logicalFMRLH);
1391  physFMR->add(physFMRLH);
1392 
1393  // endpiece of the inner longitudinal bar embedded into middle ring
1394  id = "FrontMiddleRing::LowerGTen";
1395  name = m_BaseName + id;
1396  GeoPcon *shapeFMRLG = getPcon(id);
1397  GeoLogVol *logicalFMRLG = new GeoLogVol(name, shapeFMRLG, m_Gten);
1398  GeoIntrusivePtr<GeoPhysVol>physFMRLG = new GeoPhysVol(logicalFMRLG);
1399  physFMRLH->add(physFMRLG);
1400 
1401  id = "FrontMiddleRing::UpperHole";
1402  name = m_BaseName + id;
1403  GeoPcon *shapeFMRUH = getPcon(id);
1404  GeoLogVol *logicalFMRUH = new GeoLogVol(name, shapeFMRUH, m_LAr);
1405  GeoIntrusivePtr<GeoPhysVol>physFMRUH = new GeoPhysVol(logicalFMRUH);
1406  physFMR->add(physFMRUH);
1407 
1408  // endpiece of the outer longitudinal bar embedded into middle ring
1409  id = "FrontMiddleRing::UpperGTen";
1410  name = m_BaseName + id;
1411  GeoPcon *shapeFMRUG = getPcon(id);
1412  GeoLogVol *logicalFMRUG = new GeoLogVol(name, shapeFMRUG, m_Gten);
1413  GeoIntrusivePtr<GeoPhysVol>physFMRUG = new GeoPhysVol(logicalFMRUG);
1414  physFMRUH->add(physFMRUG);
1415 }
1416 
1417 void EMECSupportConstruction::put_front_inner_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1418 {
1419  std::string id = "FrontInnerRing";
1420  double z0 = getNumber(m_DB_numbers, id, "Z0", 2.); // z pos. of front face of the ring rel. to front of envelope
1421  std::string name = m_BaseName + id;
1422  GeoPcon *shapeFIR = getPcon(id);
1423  GeoLogVol *logicalFIR = new GeoLogVol(name, shapeFIR, m_Alu);
1424  GeoIntrusivePtr<GeoPhysVol>physFIR = new GeoPhysVol(logicalFIR);
1425  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1426  motherPhysical->add(physFIR);
1427 
1428  id = "FrontInnerRing::Hole";
1429  name = m_BaseName + id;
1430  GeoPcon *shapeFIRH = getPcon(id);
1431  GeoLogVol *logicalFIRH = new GeoLogVol(name, shapeFIRH, m_LAr);
1432  GeoIntrusivePtr<GeoPhysVol>physFIRH = new GeoPhysVol(logicalFIRH);
1433  physFIR->add(physFIRH);
1434 
1435  //endpiece of the inner longitudinal embedded into inner ring
1436  id = "FrontInnerRing::GTen";
1437  name = m_BaseName + id;
1438  GeoPcon *shapeFIRG = getPcon(id);
1439  GeoLogVol *logicalFIRG = new GeoLogVol(name, shapeFIRG, m_Gten);
1440  GeoIntrusivePtr<GeoPhysVol>physFIRG = new GeoPhysVol(logicalFIRG);
1441  physFIRH->add(physFIRG);
1442 }
1443 
1444 void EMECSupportConstruction::put_front_inner_longbar(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1445 {
1446  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1447  std::string id = "FrontInnerLongBar";
1448  std::string name = m_BaseName + id;
1449  // double rmin=376.; //RInner +40.5
1450  double rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", 375.); // Suggested by Jozsef (vakho)
1451  // double rmax=574.; //RMiddle-40.
1452  double rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 572.); // To avoid clash with FrontMiddleRing (vakho)
1453  double dz = getNumber(m_DB_tubes, tubes, id, "DZ", 20./2);
1454  double z0 = getNumber(m_DB_numbers, id, "Z0", 30.) + dz;
1455  GeoTubs *shapeFILB = new GeoTubs(rmin, rmax, dz, m_PhiStart, m_PhiSize);
1456  GeoLogVol *logicalFILB = new GeoLogVol(name,shapeFILB,m_Gten);
1457  GeoIntrusivePtr<GeoPhysVol>physFILB = new GeoPhysVol(logicalFILB);
1458  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1459  motherPhysical->add(physFILB);
1460 }
1461 
1462 void EMECSupportConstruction::put_back_middle_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1463 {
1464  std::string id = "BackMiddleRing";
1465  double z0 = getNumber(m_DB_numbers, id, "Z0", 2.5);
1466  std::string name = m_BaseName + id;
1467  GeoPcon *shapeBMR = getPcon(id);
1468  GeoLogVol *logicalBMR = new GeoLogVol(name, shapeBMR, m_Alu);
1469  GeoIntrusivePtr<GeoPhysVol>physBMR = new GeoPhysVol(logicalBMR);
1470  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1471  motherPhysical->add(physBMR);
1472 
1473  id = "BackMiddleRing::LowerHole";
1474  name = m_BaseName + id;
1475  GeoPcon *shapeBMRLH = getPcon(id);
1476  GeoLogVol *logicalBMRLH = new GeoLogVol(name, shapeBMRLH, m_LAr);
1477  GeoIntrusivePtr<GeoPhysVol>physBMRLH = new GeoPhysVol(logicalBMRLH);
1478  physBMR->add( physBMRLH);
1479 
1480  //endpiece of the inner longitudinal
1481  id = "BackMiddleRing::LowerGTen";
1482  name = m_BaseName + id;
1483  GeoPcon *shapeBMRLG = getPcon(id);
1484  GeoLogVol *logicalBMRLG = new GeoLogVol(name, shapeBMRLG, m_Gten);
1485  GeoIntrusivePtr<GeoPhysVol>physBMRLG = new GeoPhysVol(logicalBMRLG);
1486  physBMRLH->add(physBMRLG);
1487 
1488  id = "BackMiddleRing::UpperHole";
1489  name = m_BaseName + id;
1490  GeoPcon *shapeBMRUH = getPcon(id);
1491  GeoLogVol *logicalBMRUH = new GeoLogVol(name, shapeBMRUH, m_LAr);
1492  GeoIntrusivePtr<GeoPhysVol>physBMRUH = new GeoPhysVol(logicalBMRUH);
1493  physBMR->add( physBMRUH);
1494 
1495  //endpiece of the outer longitudinal bar embedded into middle ring
1496  id = "BackMiddleRing::UpperGTen";
1497  name = m_BaseName + id;
1498  GeoPcon *shapeBMRUG = getPcon(id);
1499  GeoLogVol *logicalBMRUG = new GeoLogVol(name, shapeBMRUG, m_Gten);
1500  GeoIntrusivePtr<GeoPhysVol>physBMRUG = new GeoPhysVol(logicalBMRUG);
1501  physBMRUH->add(physBMRUG);
1502 }
1503 
1504 void EMECSupportConstruction::put_back_inner_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1505 {
1506  std::string id = "BackInnerRing";
1507  double z0 = getNumber(m_DB_numbers, id, "Z0", 1.); // z pos. of back face of the ring rel. to back of envelope
1508  std::string name = m_BaseName + id;
1509  GeoPcon *shapeBIR = getPcon(id);
1510  GeoLogVol *logicalBIR = new GeoLogVol(name, shapeBIR, m_Alu);
1511  GeoIntrusivePtr<GeoPhysVol>physBIR = new GeoPhysVol(logicalBIR);
1512  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1513  motherPhysical->add(physBIR);
1514 
1515  id = "BackInnerRing::Hole";
1516  name = m_BaseName + id;
1517  GeoPcon *shapeBIRH = getPcon(id);
1518  GeoLogVol *logicalBIRH = new GeoLogVol(name, shapeBIRH, m_LAr);
1519  GeoIntrusivePtr<GeoPhysVol>physBIRH = new GeoPhysVol(logicalBIRH);
1520  physBIR->add(physBIRH);
1521 
1522  //endpiece of the inner longitudinal bar
1523  id = "BackInnerRing::GTen";
1524  name = m_BaseName + id;
1525  GeoPcon *shapeBIRG = getPcon(id);
1526  GeoLogVol *logicalBIRG = new GeoLogVol(name, shapeBIRG, m_Gten);
1527  GeoIntrusivePtr<GeoPhysVol>physBIRG = new GeoPhysVol(logicalBIRG);
1528  physBIRH->add(physBIRG);
1529 }
1530 
1531 void EMECSupportConstruction::put_back_inner_longbar(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1532 {
1533  std::string id = "BackInnerLongBar";
1534  std::string name = m_BaseName + id;
1535  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1536 
1537  double rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", 357.5-1.+40.5);//RInner +40.5
1538  double rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 699.-2.5-40.);//RMiddle-40.
1539  double dz = getNumber(m_DB_tubes, tubes, id, "DZ", 20./2.);
1540  double z0 = getNumber(m_DB_numbers, id, "Z0", 24.) + dz;
1541  GeoTubs *shapeBILB = new GeoTubs(rmin, rmax, dz, m_PhiStart, m_PhiSize);
1542  GeoLogVol *logicalBILB = new GeoLogVol(name, shapeBILB, m_Gten);
1543  GeoIntrusivePtr<GeoPhysVol>physBILB = new GeoPhysVol(logicalBILB);
1544  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1545  motherPhysical->add(physBILB);
1546 }
1547 
1548 void EMECSupportConstruction::put_front_outer_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1549 {
1550  std::string id = "FrontOuterRing";
1551  double z0 = getNumber(m_DB_numbers, id, "Z0", 9.); //position of the front face of the ring rel. to front of envelope
1552  std::string name = m_BaseName + id;
1553  GeoPcon *shapeFOR = getPcon(id);
1554  GeoLogVol *logicalFOR = new GeoLogVol(name, shapeFOR, m_Alu);
1555  GeoIntrusivePtr<GeoPhysVol>physFOR = new GeoPhysVol(logicalFOR);
1556  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1557  motherPhysical->add(physFOR);
1558 }
1559 
1560 void EMECSupportConstruction::put_front_outer_longbar(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1561 {
1562  std::string id = "FrontOuterLongBar";
1563  double z0 = getNumber(m_DB_numbers, id, "Z0", 29.);//rel to front of envelope
1564  std::string name = m_BaseName + id;
1565  GeoPcon *shapeFOLB = getPcon(id);
1566  GeoLogVol *logicalFOLB = new GeoLogVol(name, shapeFOLB, m_Gten);
1567  GeoIntrusivePtr<GeoPhysVol>physFOLB = new GeoPhysVol(logicalFOLB);
1568  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1569  motherPhysical->add(physFOLB);
1570 }
1571 
1572 void EMECSupportConstruction::put_front_indexing_rings(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1573 {
1574  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1575  map_t numbers = getNumbersMap(m_DB_numbers, "FrontIndexingRings");
1576 
1577  double r0 = getNumber(m_DB_numbers, numbers, "Router", "PARVALUE", 1565.-5.);
1578  double r1 = getNumber(m_DB_numbers, numbers, "Rinner", "PARVALUE", 1025.-4.);
1579  std::string id = "FrontIndexingRing";
1580  double ring_rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", -15.);
1581  double ring_rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 15.);
1582  double ring_dz = getNumber(m_DB_tubes, tubes, id, "DZ", 21./2.);
1583  double z_hole = -ring_dz;
1584  double z0 = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 9.) + ring_dz;
1585  double gten_dz = getNumber(m_DB_numbers, numbers, "GTenDZ", "PARVALUE", (16. - 11.) / 2);
1586  id += "::Hole";
1587  double hole_rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", -6.5);
1588  double hole_rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 6.5);
1589  double hole_dz = getNumber(m_DB_tubes, tubes, id, "DZ", 5.55/2.);
1590 
1591  std::string name = m_BaseName + "FrontHighRIndexingRing";
1592  GeoTubs *shapeFHIR = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1593  GeoLogVol *logicalFHIR = new GeoLogVol(name, shapeFHIR, m_Alu);
1594  GeoIntrusivePtr<GeoPhysVol>physFHIR = new GeoPhysVol(logicalFHIR);
1595  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1596  motherPhysical->add(physFHIR);
1597 
1598  name = m_BaseName + "FrontHighRIndexingRing::Hole";
1599  GeoTubs *shapeFHIRH = new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize);
1600  GeoLogVol *logicalFHIRH = new GeoLogVol(name, shapeFHIRH, m_LAr);
1601  GeoIntrusivePtr<GeoPhysVol>physFHIRH = new GeoPhysVol(logicalFHIRH);
1602  physFHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1603  physFHIR->add(physFHIRH);
1604 
1605  // the piece of long.bar on which indexing alu ring is sitting
1606  name = m_BaseName + "FrontHighRIndexingRing::GTen";
1607 // GeoTubs *shapeFHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1608  GeoTubs *shapeFHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize);
1609  GeoLogVol *logicalFHIRG = new GeoLogVol(name, shapeFHIRG, m_Gten);
1610  GeoIntrusivePtr<GeoPhysVol>physFHIRG = new GeoPhysVol(logicalFHIRG);
1611  physFHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1612  physFHIR->add(physFHIRG);
1613 
1614  name = m_BaseName + "FrontLowRIndexingRing";
1615  GeoTubs *shapeFLIR = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1616  GeoLogVol *logicalFLIR = new GeoLogVol(name, shapeFLIR, m_Alu);
1617  GeoIntrusivePtr<GeoPhysVol>physFLIR = new GeoPhysVol(logicalFLIR);
1618  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1619  motherPhysical->add(physFLIR);
1620 
1621  name = m_BaseName + "FrontLowRIndexingRing::Hole";
1622  GeoTubs *shapeFLIRH = new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize);
1623  GeoLogVol *logicalFLIRH = new GeoLogVol(name, shapeFLIRH, m_LAr);
1624  GeoIntrusivePtr<GeoPhysVol>physFLIRH = new GeoPhysVol(logicalFLIRH);
1625  physFLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1626  physFLIR->add(physFLIRH);
1627 
1628  name = m_BaseName + "FrontLowRIndexingRing::GTen"; //piece of long.bar
1629 // GeoTubs *shapeFLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1630  GeoTubs *shapeFLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize);
1631  GeoLogVol *logicalFLIRG = new GeoLogVol(name, shapeFLIRG, m_Gten);
1632  GeoIntrusivePtr<GeoPhysVol>physFLIRG = new GeoPhysVol(logicalFLIRG);
1633  physFLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1634  physFLIR->add(physFLIRG);
1635 }
1636 
1637 void EMECSupportConstruction::put_back_indexing_rings(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1638 {
1639  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1640  map_t numbers = getNumbersMap(m_DB_numbers, "BackIndexingRings");
1641 
1642  double r0 = getNumber(m_DB_numbers, numbers, "Router", "PARVALUE", 1437.-5.);
1643  double r1 = getNumber(m_DB_numbers, numbers, "Rinner", "PARVALUE", 1051.-4.);
1644  std::string id = "BackIndexingRing";
1645  double ring_rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", -15.);
1646  double ring_rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 15.);
1647  double ring_dz = getNumber(m_DB_tubes, tubes, id, "DZ", 16./2.);
1648  double z_hole = -ring_dz;
1649  double z0 = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 8.) + ring_dz;
1650  double gten_dz = getNumber(m_DB_numbers, numbers, "GTenDZ", "PARVALUE", (16. - 11.) / 2);
1651  id += "::Hole";
1652  double hole_rmin = getNumber(m_DB_tubes, tubes, id, "RMIN", -6.5);
1653  double hole_rmax = getNumber(m_DB_tubes, tubes, id, "RMAX", 6.5);
1654  double hole_dz = getNumber(m_DB_tubes, tubes, id, "DZ", 5.55/2.);
1655 
1656  std::string name = m_BaseName + "BackHighRIndexingRing";
1657  GeoTubs *shapeBHIR = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1658  GeoLogVol *logicalBHIR = new GeoLogVol(name, shapeBHIR, m_Alu);
1659  GeoIntrusivePtr<GeoPhysVol>physBHIR = new GeoPhysVol(logicalBHIR);
1660  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1661  motherPhysical->add(physBHIR);
1662 
1663  // the piece of long.bar on which indexing alu ring is sitting
1664  name += "::GTen";
1665 // GeoTubs *shapeBHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1666  GeoTubs *shapeBHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize);
1667  GeoLogVol *logicalBHIRG = new GeoLogVol(name, shapeBHIRG, m_Gten);
1668  GeoIntrusivePtr<GeoPhysVol>physBHIRG = new GeoPhysVol(logicalBHIRG);
1669  physBHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1670  physBHIR->add(physBHIRG);
1671 
1672  name = m_BaseName + "BackHighRIndexingRing::Hole";
1673  GeoTubs* shapeBHIRH = new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize);
1674  GeoLogVol* logicalBHIRH = new GeoLogVol(name, shapeBHIRH, m_LAr);
1675  GeoIntrusivePtr<GeoPhysVol> physBHIRH = new GeoPhysVol(logicalBHIRH);
1676  physBHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1677  physBHIR->add(physBHIRH);
1678 
1679  name = m_BaseName + "BackLowRIndexingRing";
1680  GeoTubs *shapeBLIR = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1681  GeoLogVol *logicalBLIR = new GeoLogVol(name, shapeBLIR, m_Alu);
1682  GeoIntrusivePtr<GeoPhysVol>physBLIR = new GeoPhysVol(logicalBLIR);
1683  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1684  motherPhysical->add(physBLIR);
1685 
1686  name += "::GTen";
1687 // GeoTubs *shapeBLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize);
1688  GeoTubs *shapeBLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize);
1689  GeoLogVol *logicalBLIRG = new GeoLogVol(name, shapeBLIRG, m_Gten);
1690  GeoIntrusivePtr<GeoPhysVol>physBLIRG = new GeoPhysVol(logicalBLIRG);
1691  physBLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz)));
1692  physBLIR->add(physBLIRG);
1693 
1694  name = m_BaseName + "BackLowRIndexingRing::Hole";
1695  GeoTubs *shapeBLIRH = new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize);
1696  GeoLogVol *logicalBLIRH = new GeoLogVol(name, shapeBLIRH, m_LAr);
1697  GeoIntrusivePtr<GeoPhysVol>physBLIRH = new GeoPhysVol(logicalBLIRH);
1698  physBLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz)));
1699  physBLIR->add(physBLIRH);
1700 }
1701 
1702 void EMECSupportConstruction::put_back_outer_ring(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1703 {
1704  std::string id = "BackOuterRing";
1705  double z0 = getNumber(m_DB_numbers, id, "Z0", 8.);
1706  std::string name = m_BaseName + id;
1707  GeoPcon *shapeBOR = getPcon(id);
1708  GeoLogVol *logicalBOR = new GeoLogVol(name, shapeBOR, m_Alu);
1709  GeoIntrusivePtr<GeoPhysVol>physBOR = new GeoPhysVol(logicalBOR);
1710  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1711  motherPhysical->add(physBOR);
1712 }
1713 
1714 void EMECSupportConstruction::put_back_outer_longbar(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1715 {
1716  std::string id = "BackOuterLongBar";
1717  double z0 = getNumber(m_DB_numbers, id, "Z0", 23.);
1718  std::string name = m_BaseName + id;
1719  GeoPcon *shapeBOLB = getPcon(id);
1720  GeoLogVol *logicalBOLB = new GeoLogVol(name, shapeBOLB, m_Gten);
1721  GeoIntrusivePtr<GeoPhysVol>physBOLB = new GeoPhysVol(logicalBOLB);
1722  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0)));
1723  motherPhysical->add(physBOLB);
1724 }
1725 
1726 void EMECSupportConstruction::put_front_outer_extracyl(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const{
1727 
1728  // put extra material after PS
1729 
1730  unsigned int nextra=m_DB_emecExtraCyl->size();
1731  if(nextra>0){
1732  bool finloop=false;
1733  double dzmax=6.6;
1734  for(unsigned int i=0;i<nextra;i++){
1735  const std::string& name=(*m_DB_emecExtraCyl)[i]->getString("CONE");
1736  if(name.find("EmecCylAfterPS") != std::string::npos){
1737  double rmin=(*m_DB_emecExtraCyl)[i]->getDouble("RMIN1"); //PS rmin
1738  double rmax=(*m_DB_emecExtraCyl)[i]->getDouble("RMAX1"); //PS rmax
1739  double dz = (*m_DB_emecExtraCyl)[i]->getDouble("DZ"); //leadthickness
1740  if(dz>0. && dz<= dzmax){
1741 
1742  ISvcLocator *svcLocator = Gaudi::svcLocator();
1744  if(svcLocator->service("DetectorStore", detStore, false) == StatusCode::FAILURE){
1745  throw std::runtime_error("Error in EMECSupportConstruction/extracyl, cannot access DetectorStore");
1746  }
1747  StoredMaterialManager* materialManager = nullptr;
1748  if (detStore->retrieve(materialManager, std::string("MATERIALS")).isFailure()) {
1749  throw std::runtime_error("Error in EMECSupportConstruction: cannot find MATERIALS.");
1750  }
1751 
1752  const std::string& material=(*m_DB_emecExtraCyl)[i]->getString("MATERIAL"); //lead
1753  const GeoMaterial *mat = materialManager->getMaterial(material);
1754  if (!mat) {
1755  throw std::runtime_error("Error in EMECSupportConstruction/extracyl,material for CylBeforePS is not found.");
1756  }
1757 
1758  std::string id = "ExtraCyl_afterPS";
1759  std::string name = m_BaseName + id;
1760 
1761  GeoTubs *solidCyl = new GeoTubs(rmin, rmax, dz/2., m_PhiStart, m_PhiSize);
1762  GeoLogVol *logicCyl = new GeoLogVol(name, solidCyl, mat);
1763  GeoIntrusivePtr<GeoPhysVol>physCyl = new GeoPhysVol(logicCyl);
1764 
1765  motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(dz/2.)));
1766  motherPhysical->add(physCyl);
1767 
1768  std::cout<<"******************************************************"<<std::endl;
1769  std::cout<<" EMECSupportConstruction insert extra material after PS"<<std::endl;
1770  std::cout<<" ExtraCyl params: name,mat= "<<name<<" "<<mat->getName()
1771  <<" rmin,rmax,dzthick,zpos="<<rmin<<" "<<rmax<<" "<<dz<<" "<<dz/2.
1772  <<" PhiStart,PhiSize="<<m_PhiStart<<" "<<m_PhiSize
1773  <<std::endl;
1774  std::cout<<"******************************************************"<<std::endl;
1775 
1776  finloop=true;
1777  } // cehck on dz thickness
1778  } // cehck on EmecCylAfterPS exist
1779  if(finloop)break;
1780  } // loop for records
1781  } // check on record length
1782 } // end of put_front_outer_extracyl
1783 
1784 void EMECSupportConstruction::put_front_outer_electronics(GeoIntrusivePtr<GeoPhysVol>motherPhysical) const
1785 {
1786  map_t boxes = getMap(m_DB_boxes, "BOXNAME");
1787  map_t tubes = getMap(m_DB_tubes, "TUBENAME");
1788  map_t fbn = getNumbersMap(m_DB_numbers, "FrontBoard");
1789  map_t mbn = getNumbersMap(m_DB_numbers, "MotherBoard");
1790  map_t fcson = getNumbersMap(m_DB_numbers, "FrontCables::SideOuter");
1791 
1792  std::string id = "FrontBoard";
1793 
1794  std::string idx = id + "I";
1795  std::string name = m_BaseName + idx;
1796  // up to low indexing ring // -4. for cold
1797  double rmax = getNumber(m_DB_tubes, tubes, idx, "RMAX", 1025.-4. - 15.);
1798  // up to middle ring, //-2mm for cold
1799  double rmin = getNumber(m_DB_tubes, tubes, idx, "RMIN", 614.-2. + 57.);
1800  double dz_boards = getNumber(m_DB_tubes, tubes, idx, "DZ", 1.);
1801  double phi_size = M_PI / getNumber(m_DB_numbers, fbn, "PhiSizeDiv", "PARVALUE", 16.);
1802  double phi_start = -0.5 * phi_size;
1803  GeoTubs *bi_shape = new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1804  GeoLogVol *bi_l = new GeoLogVol(name, bi_shape, m_Gten);
1805  GeoIntrusivePtr<GeoPhysVol>bi_phys = new GeoPhysVol(bi_l);
1806  double z_boards = getNumber(m_DB_numbers, fbn, "Zdist", "PARVALUE", 29.) - dz_boards;// 29 - start of longbar
1807 
1808  idx = id + "M";
1809  name = m_BaseName + idx;
1810  rmin = getNumber(m_DB_tubes, tubes, idx, "RMIN", 1025.-4. + 15.); // -4. for cold
1811  rmax = getNumber(m_DB_tubes, tubes, idx, "RMAX", (1565.-5. - 15.)); // -5. for cold
1812  dz_boards = getNumber(m_DB_tubes, tubes, idx, "DZ", 1.);
1813  GeoTubs *bm_shape = new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1814  GeoLogVol *bm_l = new GeoLogVol(name, bm_shape, m_Gten);
1815  GeoIntrusivePtr<GeoPhysVol>bm_phys = new GeoPhysVol(bm_l);
1816 
1817  idx = id + "O";
1818  name = m_BaseName + idx;
1819  rmin = getNumber(m_DB_tubes, tubes, idx, "RMIN", (1565.-5. + 15.)); // -5. for cold
1820  rmax = getNumber(m_DB_tubes, tubes, idx, "RMAX", (1961.-7.)); // -7mm for cold
1821  dz_boards = getNumber(m_DB_tubes, tubes, idx, "DZ", 1.);
1822  GeoTubs *bo_shape = new GeoTubs(rmin, rmax, dz_boards, phi_start, phi_size);
1823  GeoLogVol *bo_l = new GeoLogVol(name, bo_shape, m_Gten);
1824  GeoIntrusivePtr<GeoPhysVol>bo_phys = new GeoPhysVol(bo_l);
1825 
1826  // !!!To be checked whether the MBs do not cross the indexing ring in cold
1827  id = "MotherBoard";
1828  double z_mb = z_boards - dz_boards;
1829  std::string mb_n[5] = { "F1", "F2", "F3", "F4", "F5" };
1830  const double mb_dy[5] = { 74., 57., 57., 60., 44. };
1831  const double mb_dx[5] = { 38.5, 60., 138.5, 100., 165. };
1832  const double mb_dz_cu[5] = { .1, .15, .15, .15, .2 };
1833  // non-const arrays are updated from DB
1834  double mb_r[5] = { (1739.-5.) , (1640.-5.), (1400.-4.), (1140. - 4.), (835.-1.)};
1835  double mb_dz[5] = { 1.4, 1.1, 1.25, 1.1, 1.25 };
1836 
1837  GeoIntrusivePtr<GeoPhysVol>mb_p[5];
1838  for(int i = 0; i < 5; ++ i){
1839  idx = id + "::" + mb_n[i];
1840  name = m_BaseName + idx;
1841  double dx = getNumber(m_DB_boxes, boxes, idx, "HLEN", mb_dx[i]);
1842  double dy = getNumber(m_DB_boxes, boxes, idx, "HWDT", mb_dy[i]);
1843  mb_dz[i] = getNumber(m_DB_boxes, boxes, idx, "HHGT", mb_dz[i]);
1844  GeoBox *mb_s = new GeoBox(dx, dy, mb_dz[i]);
1845  GeoLogVol *mb_l = new GeoLogVol(name, mb_s, m_Gten);
1846  mb_p[i] = new GeoPhysVol(mb_l);
1847 
1848  name += "::Cu";
1849  std::ostringstream tmp;
1850  tmp << "Cu" << (i + 1) << "z";
1851  double dz1 = getNumber(m_DB_numbers, mbn, tmp.str(), "PARVALUE", mb_dz_cu[i]);
1852  GeoBox *cu = new GeoBox(dx, dy, dz1);
1853  GeoLogVol *cul = new GeoLogVol(name, cu, m_Copper);
1854  GeoIntrusivePtr<GeoPhysVol>cup = new GeoPhysVol(cul);
1855  mb_p[i]->add(new GeoTransform(GeoTrf::TranslateZ3D(dz1 - mb_dz[i])));
1856  mb_p[i]->add(cup);
1857 
1858  tmp.str("");
1859  tmp << "R" << (i + 1);
1860  mb_r[i] = getNumber(m_DB_numbers, mbn, tmp.str(), "PARVALUE", mb_r[i]);
1861  }
1862 
1863  id = "FrontCables";
1864 
1865  idx = id + "::Outer";
1866  name = m_BaseName + idx;
1867 
1868  double dz_oc = getNumber(m_DB_tubes, tubes, idx, "DZ", 5.);// 1cm = about 0.14 RL
1869  rmin = getNumber(m_DB_tubes, tubes, idx, "RMIN", 1780.); // ?? what is it for cold?
1870  rmax = getNumber(m_DB_tubes, tubes, idx, "RMAX", 1961.-7.); // -7mm for cold; To be checked
1871  GeoTubs *oc_s = new GeoTubs(rmin, rmax, dz_oc, phi_start, phi_size);
1872  GeoLogVol *oc_l = new GeoLogVol(name, oc_s, m_Cable);
1873  GeoIntrusivePtr<GeoPhysVol>oc_p = new GeoPhysVol(oc_l);
1874  double z_oc = z_boards - dz_boards - dz_oc;
1875 
1876  idx = id + "::SideOuter";
1877  name = m_BaseName + idx;
1878  double dz_soc = getNumber(m_DB_tubes, tubes, idx, "DZ", 1.2);
1879  rmin = getNumber(m_DB_tubes, tubes, idx, "RMIN", 1000.);
1880  rmax = getNumber(m_DB_tubes, tubes, idx, "RMAX", 1780.);
1881  double dphi_sc = getNumber(m_DB_numbers, fcson, "Width", "PARVALUE", 100.) / rmax;
1882  GeoTubs *soc_s = new GeoTubs(rmin, rmax, dz_soc, -0.5 * dphi_sc, dphi_sc);
1883  GeoLogVol *soc_l = new GeoLogVol(name, soc_s, m_Cable);
1884  GeoIntrusivePtr<GeoPhysVol>soc_p = new GeoPhysVol(soc_l);
1885  // relative to indexing rings
1886  double z_soc = getNumber(m_DB_numbers, fcson, "Zdist", "PARVALUE", 9.) - dz_soc;
1887 
1888  const int number_of_sectors = m_isModule? 4: 32;
1889  for(int i = 0; i < number_of_sectors; ++ i){
1890  double phi = m_Position + (i - 2) * phi_size - phi_start;
1891 
1892  GeoIdentifierTag* iTag = new GeoIdentifierTag(i);
1893  GeoTransform* xf = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_boards)*GeoTrf::Transform3D(GeoTrf::RotateZ3D(phi))));
1894  GeoTransform* xf1 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_oc)*GeoTrf::RotateZ3D(phi)));
1895 
1896  motherPhysical->add(iTag);
1897  motherPhysical->add(xf);
1898  motherPhysical->add(bi_phys);
1899 
1900  motherPhysical->add(iTag);
1901  motherPhysical->add(xf);
1902  motherPhysical->add(bm_phys);
1903 
1904  motherPhysical->add(iTag);
1905  motherPhysical->add(xf);
1906  motherPhysical->add(bo_phys);
1907 
1908  motherPhysical->add(iTag);
1909  motherPhysical->add(xf1);
1910  motherPhysical->add(oc_p);
1911 
1912  for(int j = 0; j < 5; ++ j){
1913  GeoTransform* xf2 = new GeoTransform(
1914  GeoTrf::Transform3D(GeoTrf::RotateZ3D(phi)*GeoTrf::Translate3D(mb_r[j], 0., z_mb - mb_dz[j])));
1915  motherPhysical->add(iTag);
1916  motherPhysical->add(xf2);
1917  motherPhysical->add(mb_p[j]);
1918  }
1919 
1920  GeoTransform* xf3 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(m_Position + (i - 2) * phi_size + 0.5 * dphi_sc)));;
1921 
1922  GeoTransform* xf4 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(m_Position + (i - 1) * phi_size - 0.5 * dphi_sc)));
1923 
1924  motherPhysical->add(new GeoIdentifierTag(i * 2));
1925  motherPhysical->add(xf3);
1926  motherPhysical->add(soc_p);
1927 
1928  motherPhysical->add(new GeoIdentifierTag(i * 2 + 1));
1929  motherPhysical->add(xf4);
1930  motherPhysical->add(soc_p);
1931  }
1932 }
1933 
1934 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::front_inner_envelope(void) const
1935 {
1936  std::string id = "FrontSupportMother";
1937  std::string name = m_BaseName + id;
1938  GeoPcon *motherShape = getPcon(id + "::Inner");
1939  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
1940  GeoIntrusivePtr<GeoPhysVol>motherPhysical = new GeoPhysVol(motherLogical);
1941 
1942  put_front_inner_ring(motherPhysical);
1943  put_front_inner_longbar(motherPhysical);
1944  put_front_inner_barettes(motherPhysical);
1945 
1946  return motherPhysical;
1947 }
1948 
1949 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::back_inner_envelope(void) const
1950 {
1951  std::string id = "BackSupportMother";
1952  std::string name = m_BaseName + id;
1953  GeoPcon *motherShape = getPcon(id + "::Inner");
1954  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
1955  GeoIntrusivePtr<GeoPhysVol>motherPhysical = new GeoPhysVol(motherLogical);
1956 
1957  put_back_inner_ring(motherPhysical);
1958  put_back_inner_longbar(motherPhysical);
1959  put_back_inner_barettes(motherPhysical);
1960 
1961  return motherPhysical;
1962 }
1963 
1964 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::front_outer_envelope(void) const
1965 {
1966  std::string id = "FrontSupportMother";
1967  std::string name = m_BaseName + id;
1968  GeoPcon *motherShape = getPcon(id + "::Outer");
1969  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
1970  GeoIntrusivePtr<GeoPhysVol>motherPhysical= new GeoPhysVol(motherLogical);
1971 
1972  put_front_outer_ring(motherPhysical);
1973  put_front_outer_longbar(motherPhysical);
1974  put_front_indexing_rings(motherPhysical);
1975  put_front_middle_ring(motherPhysical);
1976  put_front_outer_barettes(motherPhysical);
1977  put_front_outer_electronics(motherPhysical);
1978 
1979  return motherPhysical;
1980 }
1981 
1982 GeoIntrusivePtr<GeoPhysVol> EMECSupportConstruction::back_outer_envelope(void) const
1983 {
1984  std::string id = "BackSupportMother";
1985  std::string name = m_BaseName + id;
1986  GeoPcon *motherShape = getPcon(id + "::Outer");
1987  GeoLogVol *motherLogical = new GeoLogVol(name, motherShape, m_LAr);
1988  GeoIntrusivePtr<GeoPhysVol>motherPhysical= new GeoPhysVol(motherLogical);
1989 
1990  put_back_indexing_rings(motherPhysical);
1991  put_back_outer_ring(motherPhysical);
1992  put_back_middle_ring(motherPhysical);
1993  put_back_outer_longbar(motherPhysical);
1994  put_back_outer_barettes(motherPhysical);
1995 
1996  return motherPhysical;
1997 }
beamspotPlotBcids.x0
x0
Definition: beamspotPlotBcids.py:514
EMECSupportConstruction.h
Declaration of EMECSupportConstruction class.
LArGeo::EMECSupportConstruction::FrontOuter
@ FrontOuter
Definition: EMECSupportConstruction.h:52
LArGeo::EMECSupportConstruction::m_G10FeInner
const GeoMaterial * m_G10FeInner
Definition: EMECSupportConstruction.h:110
LArGeo::EMECSupportConstruction::middle_envelope
GeoIntrusivePtr< GeoPhysVol > middle_envelope(void) const
!!!
Definition: EMECSupportConstruction.cxx:1343
LArGeo::EMECSupportConstruction::put_back_inner_barettes
void put_back_inner_barettes(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1030
LArGeo::EMECSupportConstruction::inner_envelope
GeoIntrusivePtr< GeoPhysVol > inner_envelope(void) const
Definition: EMECSupportConstruction.cxx:1236
LArGeo::EMECSupportConstruction::m_DB_tubes
IRDBRecordset_ptr m_DB_tubes
Definition: EMECSupportConstruction.h:118
LArGeo::EMECSupportConstruction::put_front_outer_ring
void put_front_outer_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1548
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CxxUtils::starts_with
bool starts_with(const char *s, const char *prefix)
Test whether one null-terminated byte string starts with another.
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
LArGeo::EMECSupportConstruction::GetEnvelope
virtual GeoIntrusivePtr< GeoPhysVol > GetEnvelope(void) const
Definition: EMECSupportConstruction.cxx:292
LArGeo::EMECSupportConstruction::put_front_outer_extracyl
void put_front_outer_extracyl(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1726
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
IGeoModelSvc
Definition: IGeoModelSvc.h:17
LArGeo
Definition: LArDetectorFactory.h:25
LArGeo::EMECSupportConstruction::EMECSupportConstruction
EMECSupportConstruction(type_t type, bool pos_zside=true, bool is_module=false, std::string basename="LAr::EMEC::", double position=0.)
Definition: EMECSupportConstruction.cxx:93
LArGeo::EMECSupportConstruction::front_inner_envelope
GeoIntrusivePtr< GeoPhysVol > front_inner_envelope(void) const
Definition: EMECSupportConstruction.cxx:1934
LArGeo::EMECSupportConstruction::type_t
type_t
Definition: EMECSupportConstruction.h:49
LArGeo::EMECSupportConstruction::m_DB_EmecWheelParameters
IRDBRecordset_ptr m_DB_EmecWheelParameters
Definition: EMECSupportConstruction.h:117
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
LArGeo::EMECSupportConstruction::m_Position
double m_Position
Definition: EMECSupportConstruction.h:104
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
LArGeo::EMECSupportConstruction::put_front_inner_ring
void put_front_inner_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1417
python.PhysicalConstants.twopi
int twopi
Definition: PhysicalConstants.py:50
LArGeo::EMECSupportConstruction::put_front_outer_electronics
void put_front_outer_electronics(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1784
LArGeo::EMECSupportConstruction::put_back_inner_ring
void put_back_inner_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1504
M_PI
#define M_PI
Definition: ActiveFraction.h:11
deg
#define deg
Definition: SbPolyhedron.cxx:17
LArGeo::EMECSupportConstruction::m_DB_EmecFan
IRDBRecordset_ptr m_DB_EmecFan
Definition: EMECSupportConstruction.h:120
LArGeo::EMECSupportConstruction::m_DB_ColdContraction
IRDBRecordset_ptr m_DB_ColdContraction
Definition: EMECSupportConstruction.h:120
athena.value
value
Definition: athena.py:122
DecodeVersionKey::node
const std::string & node() const
Return the version node.
Definition: DecodeVersionKey.cxx:99
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
LArGeo::EMECSupportConstruction::put_front_outer_barettes
void put_front_outer_barettes(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:702
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
ReweightUtils.message
message
Definition: ReweightUtils.py:15
LArGeo::EMECSupportConstruction::m_DB_mn
IRDBRecordset_ptr m_DB_mn
Definition: EMECSupportConstruction.h:117
LArGeo::EMECSupportConstruction::front_envelope
GeoIntrusivePtr< GeoPhysVol > front_envelope(void) const
Definition: EMECSupportConstruction.cxx:660
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
LArGeo::EMECSupportConstruction::put_front_outer_longbar
void put_front_outer_longbar(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1560
LArGeo::EMECSupportConstruction::Middle
@ Middle
Definition: EMECSupportConstruction.h:50
LArGeo::EMECSupportConstruction::Outer
@ Outer
Definition: EMECSupportConstruction.h:50
LArGeo::EMECSupportConstruction::back_inner_envelope
GeoIntrusivePtr< GeoPhysVol > back_inner_envelope(void) const
Definition: EMECSupportConstruction.cxx:1949
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
LArGeo::EMECSupportConstruction::Front
@ Front
Definition: EMECSupportConstruction.h:50
IGeoModelSvc::LAr_VersionOverride
virtual const std::string & LAr_VersionOverride() const =0
LArGeo::EMECSupportConstruction::m_DB_emecExtraCyl
IRDBRecordset_ptr m_DB_emecExtraCyl
Definition: EMECSupportConstruction.h:119
LArGeo::EMECSupportConstruction::put_back_outer_ring
void put_back_outer_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1702
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
LArGeo::EMECSupportConstruction::getPcon
GeoPcon * getPcon(const std::string &) const
Definition: EMECSupportConstruction.cxx:313
LArGeo::EMECSupportConstruction::m_DB_pcons
IRDBRecordset_ptr m_DB_pcons
Definition: EMECSupportConstruction.h:118
LArGeo::EMECSupportConstruction::m_PermaliE730
const GeoMaterial * m_PermaliE730
Definition: EMECSupportConstruction.h:109
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArGeo::EMECSupportConstruction::put_front_inner_longbar
void put_front_inner_longbar(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1444
beamspotman.n
n
Definition: beamspotman.py:731
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
LArGeo::EMECSupportConstruction::m_Gten
const GeoMaterial * m_Gten
Definition: EMECSupportConstruction.h:108
Atlas.StoreGateSvc
StoreGateSvc
Definition: Atlas.UnixStandardJob.py:25
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArGeo::EMECSupportConstruction::BackInner
@ BackInner
Definition: EMECSupportConstruction.h:51
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
LArGeo::EMECSupportConstruction::put_back_indexing_rings
void put_back_indexing_rings(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1637
LArGeo::EMECSupportConstruction::m_pos_zside
bool m_pos_zside
Definition: EMECSupportConstruction.h:101
LArGeo::EMECSupportConstruction::put_back_outer_longbar
void put_back_outer_longbar(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1714
DecodeVersionKey::tag
const std::string & tag() const
Return version tag.
Definition: DecodeVersionKey.cxx:93
beamspotPlotBcids.y0
y0
Definition: beamspotPlotBcids.py:515
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
LArGeo::EMECSupportConstruction::m_PhiSize
double m_PhiSize
Definition: EMECSupportConstruction.h:104
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
LArGeo::EMECSupportConstruction::put_front_inner_barettes
void put_front_inner_barettes(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:810
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
starts_with.h
C++20-like starts_with/ends_with for strings.
LArGeo::EMECSupportConstruction::m_Alu
const GeoMaterial * m_Alu
Definition: EMECSupportConstruction.h:107
LArGeo::EMECSupportConstruction::Back
@ Back
Definition: EMECSupportConstruction.h:50
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArGeo::EMECSupportConstruction::front_outer_envelope
GeoIntrusivePtr< GeoPhysVol > front_outer_envelope(void) const
Definition: EMECSupportConstruction.cxx:1964
LArGeo::EMECSupportConstruction::Inner
@ Inner
Definition: EMECSupportConstruction.h:50
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
map_t
std::map< std::string, unsigned int > map_t
Definition: EMECSupportConstruction.cxx:227
StoredMaterialManager.h
LArGeo::EMECSupportConstruction::put_front_middle_ring
void put_front_middle_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1373
LArGeo::EMECSupportConstruction::back_envelope
GeoIntrusivePtr< GeoPhysVol > back_envelope(void) const
Definition: EMECSupportConstruction.cxx:682
LArGeo::EMECSupportConstruction::m_DB_numbers
IRDBRecordset_ptr m_DB_numbers
Definition: EMECSupportConstruction.h:118
LArGeo::EMECSupportConstruction::m_G10FeOuter
const GeoMaterial * m_G10FeOuter
Definition: EMECSupportConstruction.h:111
LArGeo::EMECSupportConstruction::put_back_inner_longbar
void put_back_inner_longbar(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1531
DecodeVersionKey.h
LArGeo::EMECSupportConstruction::m_Lead
const GeoMaterial * m_Lead
Definition: EMECSupportConstruction.h:115
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
LArGeo::EMECSupportConstruction::put_front_indexing_rings
void put_front_indexing_rings(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1572
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
LArGeo::EMECSupportConstruction::m_isModule
bool m_isModule
Definition: EMECSupportConstruction.h:102
LArGeo::EMECSupportConstruction::m_LAr
const GeoMaterial * m_LAr
Definition: EMECSupportConstruction.h:106
LArGeo::EMECSupportConstruction::m_Cable
const GeoMaterial * m_Cable
Definition: EMECSupportConstruction.h:113
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
LArGeo::EMECSupportConstruction::outer_envelope
GeoIntrusivePtr< GeoPhysVol > outer_envelope(void) const
Definition: EMECSupportConstruction.cxx:1154
LArGeo::EMECSupportConstruction::BackOuter
@ BackOuter
Definition: EMECSupportConstruction.h:52
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArGeo::EMECSupportConstruction::m_Kapton_Cu
const GeoMaterial * m_Kapton_Cu
Definition: EMECSupportConstruction.h:112
LArGeo::EMECSupportConstruction::m_Copper
const GeoMaterial * m_Copper
Definition: EMECSupportConstruction.h:114
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArGeo::EMECSupportConstruction::m_DB_boxes
IRDBRecordset_ptr m_DB_boxes
Definition: EMECSupportConstruction.h:118
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
checkFileSG.fi
fi
Definition: checkFileSG.py:65
LArGeo::EMECSupportConstruction::put_back_outer_barettes
void put_back_outer_barettes(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:918
LArGeo::EMECSupportConstruction::m_DB_EmecGeometry
IRDBRecordset_ptr m_DB_EmecGeometry
Definition: EMECSupportConstruction.h:117
merge.status
status
Definition: merge.py:17
python.test_cfgItemList.msg
msg
Definition: test_cfgItemList.py:7
LArGeo::EMECSupportConstruction::m_Type
type_t m_Type
Definition: EMECSupportConstruction.h:100
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
LArGeo::EMECSupportConstruction::FrontInner
@ FrontInner
Definition: EMECSupportConstruction.h:51
LArGeo::EMECSupportConstruction::m_BaseName
std::string m_BaseName
Definition: EMECSupportConstruction.h:103
IGeoModelSvc::atlasVersion
virtual const std::string & atlasVersion() const =0
IGeoModelSvc.h
LArGeo::EMECSupportConstruction::put_back_middle_ring
void put_back_middle_ring(GeoIntrusivePtr< GeoPhysVol >) const
Definition: EMECSupportConstruction.cxx:1462
StoreGateSvc.h
EMECConstruction.h
Declaration of EMECConstruction class.
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
LArGeo::EMECSupportConstruction::~EMECSupportConstruction
virtual ~EMECSupportConstruction()
python.SystemOfUnits.rad
int rad
Definition: SystemOfUnits.py:111
LArGeo::EMECSupportConstruction::back_outer_envelope
GeoIntrusivePtr< GeoPhysVol > back_outer_envelope(void) const
Definition: EMECSupportConstruction.cxx:1982
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
LArGeo::EMECSupportConstruction::m_PhiStart
double m_PhiStart
Definition: EMECSupportConstruction.h:104
beamspotman.basename
basename
Definition: beamspotman.py:640