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

#include <LArDetectorConstructionH62003.h>

Collaboration diagram for LArGeo::LArDetectorConstructionH62003:

Public Member Functions

 LArDetectorConstructionH62003 ()
 
virtual ~LArDetectorConstructionH62003 ()
 
virtual PVLink GetEnvelope ()
 
void SetFCALVisLimit (int limit)
 
void SetAxisVisState (bool state)
 

Static Private Member Functions

static void createAxis (GeoIntrusivePtr< GeoFullPhysVol > H62003MotherPhysical, const GeoMaterial *mat)
 

Private Attributes

GeoIntrusivePtr< GeoFullPhysVol > m_H62003EnvelopePhysical
 
int m_fcalVisLimit
 
bool m_axisVisState
 
IRDBAccessSvcm_pAccessSvc
 

Detailed Description

Definition at line 18 of file LArDetectorConstructionH62003.h.

Constructor & Destructor Documentation

◆ LArDetectorConstructionH62003()

LArGeo::LArDetectorConstructionH62003::LArDetectorConstructionH62003 ( )

Definition at line 71 of file LArDetectorConstructionH62003.cxx.

72  : m_H62003EnvelopePhysical(nullptr)
73  , m_fcalVisLimit(-1)
74  , m_axisVisState(false)
75  , m_pAccessSvc(nullptr)
76 {
77 }

◆ ~LArDetectorConstructionH62003()

LArGeo::LArDetectorConstructionH62003::~LArDetectorConstructionH62003 ( )
virtualdefault

Member Function Documentation

◆ createAxis()

void LArGeo::LArDetectorConstructionH62003::createAxis ( GeoIntrusivePtr< GeoFullPhysVol >  H62003MotherPhysical,
const GeoMaterial *  mat 
)
staticprivate

Definition at line 878 of file LArDetectorConstructionH62003.cxx.

879 {
880  std::string baseName = "LAr::TBH62003::";
881  double axisXYHalfLength = 2.5*m;
882  double axisZHalfLength = 5*m;
883 
884  GeoTube* ZaxisShape = new GeoTube( 0.*cm, 1.*cm, axisZHalfLength );
885  GeoTube* XYaxisShape = new GeoTube( 0.*cm, 1.*cm, axisXYHalfLength );
886 
887  // x-axis
888  std::string XAxisName = baseName + "::XAxis";
889  const GeoLogVol* XAxisLogical = new GeoLogVol(XAxisName,XYaxisShape,mat);
890  GeoIntrusivePtr<GeoPhysVol> XAxisPhysVol = new GeoPhysVol(XAxisLogical);
891 
892  H62003EnvelopePhysical->add(new GeoTransform(Transform3D(GeoTrf::Translate3D(axisXYHalfLength,0.*m,0.*m)*GeoTrf::RotateY3D(90.*deg))));
893  H62003EnvelopePhysical->add(XAxisPhysVol);
894 
895  // y-axis
896  std::string YAxisName = baseName + "::YAxis";
897  const GeoLogVol* YAxisLogical = new GeoLogVol(YAxisName,XYaxisShape,mat);
898  GeoIntrusivePtr<GeoPhysVol> YAxisPhysVol = new GeoPhysVol( YAxisLogical );
899 
900  H62003EnvelopePhysical->add(new GeoTransform(Transform3D(GeoTrf::Translate3D(0.*m,axisXYHalfLength,0.*m)*GeoTrf::RotateX3D(-90.*deg))));
901  H62003EnvelopePhysical->add(YAxisPhysVol);
902 
903  //z-axis
904  std::string ZAxisName = baseName + "::ZAxis";
905  const GeoLogVol* ZAxisLogical = new GeoLogVol(ZAxisName,ZaxisShape,mat);
906  GeoIntrusivePtr<GeoPhysVol> ZAxisPhysVol = new GeoPhysVol(ZAxisLogical);
907 
908  H62003EnvelopePhysical->
909  add(new GeoTransform(TranslateZ3D(axisZHalfLength)));
910  H62003EnvelopePhysical->add(ZAxisPhysVol);
911 }

◆ GetEnvelope()

PVLink LArGeo::LArDetectorConstructionH62003::GetEnvelope ( )
virtual

Definition at line 82 of file LArDetectorConstructionH62003.cxx.

83 {
84 
86 
87  ISvcLocator *svcLocator = Gaudi::svcLocator();
88  IMessageSvc * msgSvc;
89  if (svcLocator->service("MessageSvc", msgSvc, true )==StatusCode::FAILURE) {
90  throw std::runtime_error("Error in LArDetectorConstructionH62003, cannot access MessageSvc");
91  }
92 
93  MsgStream log(msgSvc, "LArGeo::LArDetectorConstructionH62003");
94 
95  log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
96  log << "+ +" << std::endl;
97  log << "+ HELLO from LArGeo::LArDetectorConstructionH62003 +" << std::endl;
98  log << "+ +" << std::endl;
99  log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
100 
102  if (svcLocator->service("DetectorStore", detStore, false )==StatusCode::FAILURE) {
103  throw std::runtime_error("Error in LArDetectorConstructionH62003, cannot access DetectorStore");
104  }
105  StoredMaterialManager* materialManager = nullptr;
106  if (StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS"))) return nullptr;
107 
108  StatusCode sc;
109  sc=svcLocator->service("RDBAccessSvc",m_pAccessSvc);
110  if (sc != StatusCode::SUCCESS) {
111  throw std::runtime_error ("Cannot locate RDBAccessSvc!!");
112  }
113 
114  DecodeVersionKey larVersion("LAr");
115  const std::string& detectorKey = larVersion.tag();
116  const std::string& detectorNode = larVersion.node();
117 
118  log << MSG::DEBUG << "detectorKey is " << detectorKey << endmsg;
119  log << MSG::DEBUG << "detectorNode is " << detectorNode << endmsg;
120 
121 
122  // Get the materials from the material manager:----------------------//
123  //
124  const GeoMaterial *Air = materialManager->getMaterial("std::Air");
125  if (!Air)
126  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Air is not found.");
127 
128  const GeoMaterial *Lead = materialManager->getMaterial("std::Lead");
129  if (!Lead)
130  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Lead is not found.");
131 
132  const GeoMaterial *PStyrene = materialManager->getMaterial("std::Polystyrene");
133  if (!PStyrene)
134  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Polystyrene is not found.");
135 
136  const GeoMaterial *Iron = materialManager->getMaterial("std::Iron");
137  if (!Iron)
138  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Iron is not found.");
139 
140  const GeoMaterial *Aluminum = materialManager->getMaterial("std::Aluminium");
141  if (!Aluminum)
142  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Aluminum is not found.");
143 
144  const GeoMaterial *Concrete = materialManager->getMaterial("std::Concrete");
145  if (!Concrete)
146  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Concrete is not found.");
147 
148  const GeoMaterial *LAr = materialManager->getMaterial("std::LiquidArgon");
149  if (!LAr)
150  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::LiquidArgon is not found.");
151 
152  const GeoMaterial *Vac = materialManager->getMaterial("std::Vacuum");
153  if (!Vac)
154  throw std::runtime_error("Error in LArDetectorConstructionH62003, std::Vacuum is not found.");
155 
156  // Rohacell foam has density: 0.011g/cm3
157  const std::string RohacellName = "Rohacell";
158  const double RoDensity = 0.011*g/cm3;
159  const GeoElement* C=materialManager->getElement("Carbon");
160  const GeoElement* H=materialManager->getElement("Hydrogen");
161  const GeoElement* O=materialManager->getElement("Oxygen");
162  const GeoElement* N=materialManager->getElement("Nitrogen");
163  GeoMaterial* Rohacell = new GeoMaterial(RohacellName, RoDensity);
164  Rohacell->add(C,0.6465);
165  Rohacell->add(H,0.07836);
166  Rohacell->add(O,0.19137);
167  Rohacell->add(N,0.08377);
168  Rohacell->lock();
169 
170 
171  // Stainless Steel
172  const std::string SSteelName = "StainlessSteel";
173  double SSDensity = 7.9*g/cm3;
174  const GeoElement* Fe=materialManager->getElement("Iron");
175  const GeoElement* Cr=materialManager->getElement("Chromium");
176  GeoMaterial* StainlessSteel = new GeoMaterial(SSteelName, SSDensity);
177  StainlessSteel->add(Fe,0.90);
178  StainlessSteel->add(Cr,0.10);
179  StainlessSteel->lock();
180 
181  // Define the Geometries:--------------------------------------------//
182  // Set up strings for volume names.
183  std::string baseName = "LAr::TBH62003";
184 
185  // Define a translation variable to write detector positions so that if we add beampipe, etc, we can just translate the detectors.
186 
187  // double trans = -535.68*cm; // chosen so that FCal is in original ATLAS FCal position.
188  double trans = -543.12*cm; //=-535.68-7.44; chosen so that FCal is in original ATLAS FCal position.
189 
190  // Define the Experimental Hall
191  std::string H62003MotherName = baseName + "::MotherVolume";
192  const GeoBox* H62003MotherShape = new GeoBox(2.5*m, 2.5*m, 30.*m);
193  const GeoLogVol* H62003MotherLogical =
194  new GeoLogVol(H62003MotherName, H62003MotherShape, Air);
195 
196  m_H62003EnvelopePhysical = new GeoFullPhysVol(H62003MotherLogical);
197  m_H62003EnvelopePhysical->add( new GeoNameTag("LArEndcapPos") );
198 
199  // number of volumes added to m_H62003EnvelopePhysical.
200  // Every time a volume is added to H62003EP, increment. Used for debugging
201  unsigned int NH6EP = 0;
202 
203  // Tubular axis, dummy; used for dedugging
204  // Make it a jobOption.
205  if ( m_axisVisState ) {
206  std::cout << "Axis is ON" << std::endl;
208  }
209 
210  // Cryostat
211  H6CryostatConstruction cryoConstruction;
212  GeoIntrusivePtr<GeoVFullPhysVol> cryoPhys = cryoConstruction.GetEnvelope();
213  GeoIntrusivePtr<GeoPhysVol> LArPhysical = cryoConstruction.GetLArPhysical();
214 
215  // The Cryostat will be the reference to which other detectors are positioned.
216  std::string nickname = "POSITION1";
217  int nicknumber = 0;
218 
219  if(LArPhysical) {
220  IRDBRecordset_ptr larTBPos =
221  m_pAccessSvc->getRecordsetPtr("LArTBPosition", detectorKey, detectorNode);
222 
223  LArG4TBPosOptions *posOptions = nullptr;
224  StatusCode status = detStore->retrieve(posOptions,"LArG4TBPosOptions");
225  if (status.isSuccess()) {
226  nickname = posOptions->PositionNickname();
227  nicknumber = posOptions->PositionNicknumber();
228  }
229  // These will enventually go in the database
230  double CryoXPos = 0.0;
231  double CryoYPos = 0.0;
232  //double CryoZPos = 0.0;
233  if( nickname == "POSITION1") {CryoXPos = 1.8*cm;}
234  if( nickname == "POSITION2") {CryoXPos = -1.45*cm;}
235  if( nickname == "POSITION3") {CryoXPos = - 4.7*cm;}
236  if((nickname == "POSITION4L") || (nickname == "POSITION4H"))
237  {CryoXPos = -15.5*cm;}
238  // {CryoXPos = -15.697*cm;}
239  // {CryoXPos = -18.0*cm;}
240 
241  log << MSG::DEBUG << "TB2003 Cryostat Position is "
242  << nickname << endmsg;
243  log << MSG::DEBUG << "CryoXPos = "
244  << CryoXPos << endmsg;
245 
246  // double CryoXRot = 90.0*deg;
247  double CryoXRot = -90.0*deg;
248  //double CryoRotateY = 0.0*deg;
249 
250  m_H62003EnvelopePhysical->add( new GeoIdentifierTag( 1 ) );
251  GeoAlignableTransform *xf =
252  new GeoAlignableTransform(Transform3D(
253  Translate3D(CryoXPos,
254  CryoYPos,
255  trans)
256  *RotateX3D(CryoXRot)));
257 
258  double xrot=0,yrot=0,zrot=0;
259  if(larTBPos->size()!=0) {
260  for (unsigned int i=0;i<larTBPos->size();i++) {
261  if((*larTBPos)[i]->getString("MOVABLE_NAME") == "LARCRYO_EC_POS") {
262  if((*larTBPos)[i]->getString("POSITION_NICKNAME")==nickname){
263  if (((*larTBPos)[i]->getInt("POSITION_NICKNUMBER")==0) || ((*larTBPos)[i]->getInt("POSITION_NICKNUMBER")==nicknumber)) {
264  //xt = (*larTBPos)[i]->getDouble("XTRANS")*cm;
265  //yt = (*larTBPos)[i]->getDouble("YTRANS")*cm;
266  //zt = (*larTBPos)[i]->getDouble("ZTRANS")*cm;
267  xrot = (*larTBPos)[i]->getDouble("XROT")*deg;
268  yrot = (*larTBPos)[i]->getDouble("YROT")*deg;
269  zrot = (*larTBPos)[i]->getDouble("ZROT")*deg;
270  log << MSG::DEBUG << "xrot is " << xrot/deg << " degrees"
271  << endmsg;
272  log << MSG::DEBUG << "yrot is " << yrot/deg << " degrees"
273  << endmsg;
274  log << MSG::DEBUG << "zrot is " << zrot/deg << " degrees"
275  << endmsg;
276  // The rotation axis of the cryostat is now the z-axis.
277  xf->setDelta(Transform3D(RotateZ3D(yrot)));
278  }
279  }
280  }
281  }
282  }
283 
284  m_H62003EnvelopePhysical->add(xf);
285  m_H62003EnvelopePhysical->add(cryoPhys);
286  NH6EP++;
287 
288  // Add the bathtub
289  // The bathtub (and therefore, the FCal) was rotated about the
290  // y-axis in the Cryostat to produce the angle of incidence of
291  // the real ATLAS setup.
292 
293  std::string tubName = baseName + "::Tub::Envelope";
294  const double tubXPos = -9.0*cm; // initial offset of FCal
295  const double tubYPos = 1.5*cm;
296  const double tubZPos = 7.44*cm;
297 
298  const double tubXRot = 90.0*deg;
299  const double tubYRot = 1.49*deg; // initial rotation of FCal
300 
301  const double tubThickness = 0.079*cm; // tub is 1/16 of inch
302 
303  const double tubWidth = 64.75*cm; // XDim for ends
304  const double tubHeighth = 72.75*cm; // YDim for ends
305  const double tubLength = 84.50*cm; // ZDim for sides and bottom
306 
307  const GeoShape* tubEnvelopeShape =
308  new GeoBox(tubWidth+2*tubThickness,
309  tubHeighth+2*tubThickness,
310  tubLength);
311  const GeoLogVol* tubEnvelopeLog =
312  new GeoLogVol(tubName,tubEnvelopeShape,LAr);
313  //new GeoLogVol(tubName,tubEnvelopeShape,Air);
314  GeoIntrusivePtr<GeoPhysVol> tubEnvelopePhys = new GeoPhysVol(tubEnvelopeLog);
315  // Recall that in the coords of the cryostat, a transformation
316  // in z wrt to the world will be a transformation in -y in the
317  // cryostat and a transformation in y wrt to world will be
318  // a transformation in z wrt to cryostat.
319  LArPhysical->add(new GeoTransform(Translate3D(tubXPos,
320  -tubZPos,
321  tubYPos)));
322  LArPhysical->add(new GeoTransform(RotateX3D(tubXRot)));
323  LArPhysical->add(new GeoTransform(RotateY3D(tubYRot)));
324  LArPhysical->add(tubEnvelopePhys);
325 
326  // Add the ends to the tub
327  std::string tubEndName = baseName + "::Tub::End";
328  const GeoShape* tubEndShape =
329  new GeoBox(tubWidth,tubHeighth,tubThickness);
330  const GeoLogVol* tubEndLog =
331  new GeoLogVol(tubEndName, tubEndShape, StainlessSteel);
332  GeoIntrusivePtr<GeoPhysVol> tubEndPhys = new GeoPhysVol(tubEndLog);
333 
334  // All transformations of the tub sides will be w.r.t the
335  // tubEnvelope
336  tubEnvelopePhys->add(new GeoTransform(Translate3D(0.0*cm,
337  0.0*cm,
338  tubLength-tubThickness)));
339  tubEnvelopePhys->add(tubEndPhys);
340  tubEnvelopePhys->add(new GeoTransform(Translate3D(0.0*cm,
341  0.0*cm,
342  -tubLength+tubThickness)));
343  tubEnvelopePhys->add(tubEndPhys);
344 
345  // Add the sides to the bathtub
346  std::string tubSideName = baseName + "::Tub::Side";
347  const GeoShape* tubSideShape =
348  new GeoBox(tubHeighth,tubLength,tubThickness);
349  const GeoLogVol* tubSideLog =
350  new GeoLogVol(tubSideName, tubSideShape, StainlessSteel);
351  GeoIntrusivePtr<GeoPhysVol> tubSidePhys = new GeoPhysVol(tubSideLog);
352 
353  tubEnvelopePhys->add(new GeoTransform(Translate3D(tubWidth,
354  0.0*cm,
355  0.0*cm)));
356  tubEnvelopePhys->add(new GeoTransform(RotateX3D(90*deg)));
357  tubEnvelopePhys->add(new GeoTransform(RotateY3D(90*deg)));
358  tubEnvelopePhys->add(tubSidePhys);
359  tubEnvelopePhys->add(new GeoTransform(Translate3D(-tubWidth,
360  0.0*cm,
361  0.0*cm)));
362  tubEnvelopePhys->add(new GeoTransform(RotateX3D(90*deg)));
363  tubEnvelopePhys->add(new GeoTransform(RotateY3D(90*deg)));
364  tubEnvelopePhys->add(tubSidePhys);
365  // Add the bottom
366  std::string tubBottomName = baseName + "::Tub::Bottom";
367  const GeoShape* tubBottomShape =
368  new GeoBox(tubWidth,tubLength,tubThickness);
369  const GeoLogVol* tubBottomLog =
370  new GeoLogVol(tubBottomName, tubBottomShape, StainlessSteel);
371  GeoIntrusivePtr<GeoPhysVol> tubBottomPhys = new GeoPhysVol(tubBottomLog);
372  tubEnvelopePhys->add(new GeoTransform(Translate3D(0.0*cm,
373  -tubHeighth,
374  0.0*cm)));
375  tubEnvelopePhys->add(new GeoTransform(RotateX3D(90*deg)));
376  tubEnvelopePhys->add(tubBottomPhys);
377 
378  // FCAL:
379  // See notes in LArGeoFcal
380  FCALConstruction fcalConstruction;
381  fcalConstruction.setFCALVisLimit(m_fcalVisLimit);
382  // Only need one FCal
383  bool isPositive(false); // C side for TB 2003; C side is negative
384  GeoIntrusivePtr<GeoVFullPhysVol> fcalEnvelope = fcalConstruction.GetEnvelope(isPositive);
385  if(fcalEnvelope == nullptr)
386  {
387  throw std::runtime_error("Error getting FCAL envelope");
388  }
389 
390  // uses LArGeoFcal/FCALConstruction.cxx: */
391  IRDBRecordset_ptr fcalMod =
392  m_pAccessSvc->getRecordsetPtr("FCalMod", detectorKey,detectorNode);
393  if (fcalMod->size()==0) {
394  fcalMod=m_pAccessSvc->getRecordsetPtr("FCalMod", "FCalMod-00");
395  if (fcalMod->size()==0) {
396  throw std::runtime_error("Error getting FCAL Module parameters from database");
397  }
398  }
399 
400  tubEnvelopePhys->add(new GeoIdentifierTag(1));
401  tubEnvelopePhys->add(new GeoTransform(RotateX3D(2*tubXRot)));
402  tubEnvelopePhys->add(new GeoTransform(RotateZ3D(2*tubXRot)));
403  tubEnvelopePhys->add(fcalEnvelope);
404 
405  // The 'beampipe' part of FCal is evacuated in TB2003
406  const std::string FCalBeamName = baseName + "::FCalBeamPipe";
407 
408  const double FCal1ZStart = (*fcalMod)[0]->getDouble("STARTPOSITION");
409  const double FCal3ZStart = (*fcalMod)[2]->getDouble("STARTPOSITION");
410  const double FCal3Depth = (*fcalMod)[2]->getDouble("FULLMODULEDEPTH");
411  const double FCal3Stop = FCal3ZStart + FCal3Depth;
412  const double halfDepth = (FCal3Stop - FCal1ZStart)/2.0;
413 
414  const double innerRadius = 0.0*cm;
415  const double outerRadius = (*fcalMod)[0]->getDouble("INNERMODULERADIUS");
416 
417  GeoTubs *FCalBeamTubs =
418  new GeoTubs(innerRadius, outerRadius,halfDepth,0,360*deg);
419  GeoLogVol* FCalBeamLog = new GeoLogVol(FCalBeamName,FCalBeamTubs,Vac);
420  GeoIntrusivePtr<GeoPhysVol> FCalBeamPhys = new GeoPhysVol(FCalBeamLog);
421 
422  tubEnvelopePhys->add(new GeoNameTag(FCalBeamName));
423  tubEnvelopePhys->add(FCalBeamPhys);
424 
425  // Aluminum plate attached to inside of bathtub
426  std::string AlPlateName = baseName + "::AlPlate";
427  const double AlXDim = 15.0*cm;
428  const double AlYDim = 8.25*cm;
429  const double AlZDim = 2.54*cm; // There are two pieces at thickness 25.4mm each
430 
431  const GeoShape *AlPlateBox = new GeoBox(AlXDim,AlYDim,AlZDim);
432  const GeoShape *AlPlateSlit = new GeoBox(5.0*cm,2.75*cm,AlZDim+0.5*mm);
433  // GeoShape *AlPlateHole = new GeoTube(0.0*cm,7.0*cm,1.27*cm);
434 
435  Translate3D AlSlitOffset(4.5*cm,-5.5*cm,0.0*cm);
436 
437  const GeoShape & AlPlateShape =
438  (AlPlateBox->subtract(*AlPlateSlit<<AlSlitOffset));
439 
440  const GeoLogVol* AlPlateLog =
441  new GeoLogVol(AlPlateName, &AlPlateShape, Aluminum);
442 
443  const double AlTrans = tubLength - (tubThickness + AlZDim);
444  GeoIntrusivePtr<GeoPhysVol> AlPlatePhys = new GeoPhysVol(AlPlateLog);
445 
446  tubEnvelopePhys->
447  add(new GeoTransform(Translate3D(20.0*cm,
448  2.75*cm,
449  AlTrans)));
450  tubEnvelopePhys->add(AlPlatePhys);
451 
452  // Add Excluder in cryostat
453  std::string ExcludertubName = baseName + "::Excluder";
454 
455  const GeoShape* ExcluderTubShape =
456  new GeoTrap(16.0*cm,
457  0.0*deg, 0.0*deg,
458  19.0*cm, 26.0*cm, 26.0*cm, 0.0*deg,
459  17.25*cm, 19.75*cm, 19.75*cm, 0.0*deg);
460 
461  const GeoShape* ExcluderSlit = new GeoBox(7.0*cm, 16.25*cm, 5.0*cm);
462 
463  // Translate3D ExSlitOffset(6.5*cm, 2.75*cm, -27.1*cm);
464  Translate3D ExSlitOffset(6.5*cm, -2.75*cm, -11.01*cm);
465 
466  const GeoShape & ExcluderShape =
467  (ExcluderTubShape->subtract(*ExcluderSlit<<ExSlitOffset));
468  const GeoLogVol* ExcluderTubLog =
469  new GeoLogVol(ExcludertubName, &ExcluderShape, Rohacell);
470  GeoIntrusivePtr<GeoPhysVol> ExcluderTubPhys =
471  new GeoPhysVol(ExcluderTubLog);
472 
473  // The excuder is right up against the cryostat
474  const double ExTrans = 107.94*cm; // 125.5 - 17.56
475  const double ExXPos = 5.5*cm;
476  // Recall that in the coords of the cryostat, a transformation
477  // in z wrt to the world will be a transformation in -y in the
478  // cryostat and a transformation in y wrt to world will be
479  // a transformation in z wrt to cryostat.
480  LArPhysical->add(new GeoTransform(Translate3D(tubXPos+ExXPos,
481  -ExTrans,
482  tubYPos)));
483  LArPhysical->add(new GeoTransform(RotateX3D(tubXRot)));
484  LArPhysical->add(new GeoTransform(RotateY3D(tubYRot)));
485  LArPhysical->add(ExcluderTubPhys);
486  }
487 
488  // Beam chambers
489  IRDBRecordset_ptr ScintGeom =
490  m_pAccessSvc->getRecordsetPtr("LArScintTB",detectorKey, detectorNode);
491  // If nothing is in the database, we don't build.
492  if (ScintGeom->size()!=0) {
493 
494  log << MSG::DEBUG << "LArH62003: Creating beam chambers ..." << std::endl;
495 
496  // Scintillators: S1, S2 are behind cryostat and S3 is in front
497 
498  std::vector<double> v_ScintXDim;
499  std::vector<double> v_ScintYDim;
500  std::vector<double> v_ScintZDim;
501 
502  std::vector<double> v_ScintXPos;
503  std::vector<double> v_ScintYPos;
504  std::vector<double> v_ScintZPos;
505 
506  // Use these values for now; need to update the DB
507  //Scint1
508  v_ScintXDim.push_back(63.4*cm);
509  v_ScintYDim.push_back(63.4*cm);
510  v_ScintZDim.push_back(0.5*cm);
511  v_ScintXPos.push_back(0.0*cm);
512  v_ScintYPos.push_back(5.0*cm);
513  //Scint2
514  v_ScintXDim.push_back(145.0*cm);
515  v_ScintYDim.push_back(145.0*cm);
516  v_ScintZDim.push_back(1.27*cm); // This should be 0.5*cm!
517  v_ScintXPos.push_back(0.0*cm);
518  v_ScintYPos.push_back(-20.0*cm);
519  //Scint3
520  v_ScintXDim.push_back(100.0*cm);
521  v_ScintYDim.push_back(100.0*cm);
522  v_ScintZDim.push_back(0.5*cm);
523  v_ScintXPos.push_back(0.0*cm);
524  v_ScintYPos.push_back(-28.0*cm);
525  // There are three Scintillators
526  // Must put new values into DB
527  for( unsigned int i=0; i < 3; i++)
528  {
529  std::string ScintName = baseName + "::Scintillator";
530  /* Use these values when updated in DB
531  v_ScintXDim.push_back((*ScintGeom)[i]->getDouble("XDIM")*cm);
532  v_ScintYDim.push_back((*ScintGeom)[i]->getDouble("YDIM")*cm);
533  v_ScintZDim.push_back((*ScintGeom)[i]->getDouble("ZDIM")*cm);
534 
535  v_ScintXPos.push_back((*ScintGeom)[i]->getDouble("XPOS")*cm);
536  v_ScintYPos.push_back((*ScintGeom)[i]->getDouble("YPOS")*cm);
537  */
538  v_ScintZPos.push_back((*ScintGeom)[i]->getDouble("ZPOS")*cm);
539 
540  const GeoBox* ScintShape =
541  new GeoBox(v_ScintXDim[i],v_ScintYDim[i],v_ScintZDim[i] );
542  // Convert integer i into string;
543  std::ostringstream o;
544  o << (i+1);
545  ScintName += o.str();
546  const GeoLogVol* ScintLogical =
547  new GeoLogVol(ScintName,ScintShape,PStyrene);
548  GeoIntrusivePtr<GeoPhysVol> ScintPhysical = new GeoPhysVol(ScintLogical);
549 
550  m_H62003EnvelopePhysical->add(new GeoIdentifierTag(1));
552  add(new GeoTransform(Translate3D(v_ScintXPos[i],
553  v_ScintYPos[i],
554  //zside*(trans+v_ScintZPos[i]))));
555  trans-v_ScintZPos[i])));
556  m_H62003EnvelopePhysical->add( new GeoNameTag(ScintName));
557  m_H62003EnvelopePhysical->add(ScintPhysical);
558  NH6EP++;
559  }
560 
561  // Scintillators on Table
562  double tableHeight;
563  if(nickname == "POSITION4H")
564  {
565  tableHeight = 47.0*mm;
566  }
567  else if( nickname == "POSITION4L")
568  {
569  tableHeight = -21.0*mm;
570  }
571  else
572  {
573  tableHeight = 0.0*mm;
574  }
575 
576  std::vector<double> v_TableScintXDim;
577  std::vector<double> v_TableScintYDim;
578  std::vector<double> v_TableScintZDim;
579 
580  std::vector<double> v_TableScintXPos;
581  std::vector<double> v_TableScintYPos;
582  std::vector<double> v_TableScintZPos;
583 
584  // Use these values for now; need to update the DB
585  //Scint1
586  v_TableScintXDim.push_back(5.0*cm);
587  v_TableScintYDim.push_back(5.0*cm);
588  v_TableScintZDim.push_back(0.5*cm);
589  v_TableScintXPos.push_back(0.0*cm);
590  v_TableScintYPos.push_back(0.0*cm);
591  //Scint2
592  v_TableScintXDim.push_back(5.0*cm);
593  v_TableScintYDim.push_back(5.0*cm);
594  v_TableScintZDim.push_back(0.5*cm);
595  v_TableScintXPos.push_back(0.0*cm);
596 // v_TableScintYPos.push_back(2.8*cm);
597  v_TableScintYPos.push_back(0.0*cm);
598  //Scint3
599  v_TableScintXDim.push_back(3.5*cm);
600  v_TableScintYDim.push_back(3.5*cm);
601  v_TableScintZDim.push_back(0.5*cm);
602  v_TableScintXPos.push_back(0.0*cm);
603 // v_TableScintYPos.push_back(4.8*cm);
604  v_TableScintYPos.push_back(0.0*cm);
605 
606  // There are three Scintillators on the table so far and the DB ID's start at 3.
607  for( unsigned int i=3; i < 6; i++)
608  {
609  /* Use these values when they get updated in DB
610  v_TableScintXDim.push_back((*ScintGeom)[i]->getDouble("XDIM")*cm);
611  v_TableScintYDim.push_back((*ScintGeom)[i]->getDouble("YDIM")*cm);
612  v_TableScintZDim.push_back((*ScintGeom)[i]->getDouble("ZDIM")*cm);
613 
614  v_TableScintXPos.push_back((*ScintGeom)[i]->getDouble("XPOS")*cm);
615  v_TableScintYPos.push_back((*ScintGeom)[i]->getDouble("YPOS")*cm);
616  */
617  v_TableScintZPos.push_back((*ScintGeom)[i]->getDouble("ZPOS")*cm);
618  }
619 
620  for( unsigned int i=0; i < 3; i++)
621  {
622  std::string TableScintName = baseName + "::TableScintillator";
623  const GeoBox* TableScintShape = new GeoBox(v_TableScintXDim[i],
624  v_TableScintYDim[i],
625  v_TableScintZDim[i] );
626  // Convert integer i into string;
627  std::ostringstream o;
628  o << (i+1);
629  TableScintName += o.str();
630  const GeoLogVol* TableScintLogical =
631  new GeoLogVol(TableScintName,TableScintShape,PStyrene );
632  GeoIntrusivePtr<GeoPhysVol> TableScintPhysical =
633  new GeoPhysVol( TableScintLogical );
634 
635  // m_H62003EnvelopePhysical->add( new GeoIdentifierTag( 1 ) );
637  add(new GeoTransform(Translate3D(v_TableScintXPos[i],
638  (tableHeight +
639  v_TableScintYPos[i]),
640  trans -
641  v_TableScintZPos[i])));
642  m_H62003EnvelopePhysical->add(new GeoNameTag(TableScintName));
643  m_H62003EnvelopePhysical->add(TableScintPhysical);
644  NH6EP++;
645  }
646 
647  // Veto Counter
648  std::string VetoName = baseName + "::VetoCounter";
649  const double VetoXDim = 31.7*cm;
650  const double VetoYDim = 31.7*cm;
651  const double VetoZDim = 2.5*cm;
652 
653  const double VetoXPos = 0.0*cm;
654  const double VetoYPos = 0.0*cm;
655  const double VetoZPos = -472.2*cm;
656 
657  const GeoShape* VetoBoxShape = new GeoBox(VetoXDim, VetoYDim, VetoZDim);
658  const GeoShape* VetoHole = new GeoTube(0.0*cm, 3.25*cm,VetoZDim);
659 
660  const GeoShape & VetoShape =
661  VetoBoxShape->subtract(*VetoHole);
662 
663  const GeoLogVol* VetoLog = new GeoLogVol(VetoName, &VetoShape, PStyrene);
664  GeoIntrusivePtr<GeoPhysVol> VetoPhys = new GeoPhysVol(VetoLog);
665 
667  add(new GeoTransform(Translate3D(VetoXPos,
668  tableHeight + VetoYPos,
669  trans-VetoZPos)));
670  m_H62003EnvelopePhysical->add( new GeoNameTag(VetoName));
671  m_H62003EnvelopePhysical->add(VetoPhys);
672  NH6EP++;
673 
674  // Muon Counter. Made the same size as the Scintillators for now.
675  const double MuonCtrXDim = (*ScintGeom)[6]->getDouble("XDIM")*cm;
676  const double MuonCtrYDim = (*ScintGeom)[6]->getDouble("YDIM")*cm;
677  const double MuonCtrZDim = (*ScintGeom)[6]->getDouble("ZDIM")*cm;
678 
679  const double MuonCtrXPos = (*ScintGeom)[6]->getDouble("XPOS")*cm;
680  const double MuonCtrYPos = (*ScintGeom)[6]->getDouble("YPOS")*cm;
681  const double MuonCtrZPos = (*ScintGeom)[6]->getDouble("ZPOS")*cm;
682 
683  std::string MuonCtrName = baseName + "::MuonCounter";
684 
685  const GeoBox* MuonCtrShape = new
686  GeoBox(MuonCtrXDim,MuonCtrYDim,MuonCtrZDim);
687  const GeoLogVol* MuonCtrLogical =
688  new GeoLogVol(MuonCtrName,MuonCtrShape,PStyrene);
689  GeoIntrusivePtr<GeoPhysVol> MuonCtrPhysical = new GeoPhysVol(MuonCtrLogical);
690 
692  add(new GeoTransform(Translate3D(MuonCtrXPos,
693  MuonCtrYPos,
694  trans-MuonCtrZPos)));
695  m_H62003EnvelopePhysical->add( new GeoNameTag(MuonCtrName));
696  m_H62003EnvelopePhysical->add(MuonCtrPhysical);
697  NH6EP++;
698 
699  // Tail Catcher
700  //Scintillator Component of Tail Catcher
701  const double TCScintXDim = (*ScintGeom)[7]->getDouble("XDIM")*cm;
702  const double TCScintYDim = (*ScintGeom)[7]->getDouble("YDIM")*cm;
703  const double TCScintZDim = (*ScintGeom)[7]->getDouble("ZDIM")*cm;
704 
705  const double TCScintXPos = (*ScintGeom)[7]->getDouble("XPOS")*cm;
706  const double TCScintYPos = (*ScintGeom)[7]->getDouble("YPOS")*cm;
707  const double TCScintZPos = (*ScintGeom)[7]->getDouble("ZPOS")*cm;
708  // double TCScintZPos = 200*cm;
709 
710  std::string TCScintLogName = baseName + "::TCScint";
711 
712  const GeoBox *TCScintBox =
713  new GeoBox(TCScintXDim, TCScintYDim, TCScintZDim);
714 
715  const GeoLogVol* TCScintLogical =
716  new GeoLogVol(TCScintLogName,TCScintBox, PStyrene);
717  GeoSerialDenominator *TCScintName =
718  new GeoSerialDenominator(TCScintLogName);
719 
720  // Iron Component of Tail Catcher
721  const double TCIronXDim = (*ScintGeom)[8]->getDouble("XDIM")*cm;
722  const double TCIronYDim = (*ScintGeom)[8]->getDouble("YDIM")*cm;
723  const double TCIronZDim = (*ScintGeom)[8]->getDouble("ZDIM")*cm;
724 
725  const double TCIronXPos = (*ScintGeom)[8]->getDouble("XPOS")*cm;
726  const double TCIronYPos = (*ScintGeom)[8]->getDouble("YPOS")*cm;
727  const double TCIronZPos = (*ScintGeom)[8]->getDouble("ZPOS")*cm;
728 
729 
730  std::string TCIronLogName = baseName + "::TCIron";
731  const GeoBox *TCIronBox = new GeoBox(TCIronXDim, TCIronYDim, TCIronZDim);
732 
733  const GeoLogVol* TCIronLogical =
734  new GeoLogVol(TCIronLogName,TCIronBox, Iron);
735  GeoSerialDenominator *TCIronName =
736  new GeoSerialDenominator(TCIronLogName);
737 
738  m_H62003EnvelopePhysical->add(TCScintName);
739  for(int i = 0; i<6; i++)
740  {
741  GeoIntrusivePtr<GeoPhysVol> TCScintPhysical = new GeoPhysVol(TCScintLogical);
742  GeoAlignableTransform* TCScintTrans =
743  new GeoAlignableTransform(Translate3D(TCScintXPos,
744  TCScintYPos,
745  trans+
746  (2*i+1)*(TCIronZDim
747  +TCScintZDim)
748  -TCScintZPos));
749  m_H62003EnvelopePhysical->add(new GeoNameTag(TCScintLogName));
750  m_H62003EnvelopePhysical->add(TCScintTrans);
751  m_H62003EnvelopePhysical->add(TCScintPhysical);
752  NH6EP++;
753  }
754 
755  m_H62003EnvelopePhysical->add(TCIronName);
756  for(int i = 0; i<6; i++)
757  {
758  GeoIntrusivePtr<GeoPhysVol> TCIronPhysical = new GeoPhysVol(TCIronLogical);
759  GeoAlignableTransform* TCIronTrans =
760  new GeoAlignableTransform(Translate3D(TCIronXPos,
761  TCIronYPos,
762  trans+
763  2*i*(TCScintZDim+TCIronZDim)
764  -TCIronZPos));
765  m_H62003EnvelopePhysical->add(TCIronTrans);
766  m_H62003EnvelopePhysical->add(new GeoNameTag(TCIronLogName));
767  m_H62003EnvelopePhysical->add(TCIronPhysical);
768  NH6EP++;
769  }
770 
771  // Iron Wall in front of Cryostat
772  const double IronWallXDim = 100.0*cm;
773  const double IronWallYDim = 100.0*cm;
774  const double IronWallZDim = 20.0*cm;
775 
776  const double IronWallXPos = 0.0*cm;
777  const double IronWallYPos = -28.0*cm;
778  const double IronWallZPos = -181.0*cm;
779 
780  const double IronWallSlitXDim = 5.0*cm; // This Dim has to be checked
781  const double IronWallSlitYDim = 40.0*cm;
782  const double IronWallSlitZDim = 20.0*cm;
783 
784  const double IronWallSlitXPos = 0.0*cm;
785  const double IronWallSlitYPos = 21.0*cm;
786  const double IronWallSlitZPos = 0.0*cm;
787 
788  std::string IronWallName = baseName + "::IronWall";
789  const GeoShape* WallShape =
790  new GeoBox(IronWallXDim,IronWallYDim,IronWallZDim);
791  const GeoShape* SlitShape =
792  new GeoBox(IronWallSlitXDim,IronWallSlitYDim,IronWallSlitZDim);
793 
794  Translate3D
795  SlitOffset(IronWallSlitXPos,IronWallSlitYPos,IronWallSlitZPos);
796 
797  const GeoShape & IronWallShape =
798  (WallShape->subtract(*SlitShape<<SlitOffset));
799  GeoLogVol* IronWallLogical =
800  new GeoLogVol(IronWallName, &IronWallShape, Iron);
801  GeoIntrusivePtr<GeoPhysVol> IronWallPhysical = new GeoPhysVol(IronWallLogical);
802 
804  add(new GeoTransform(Translate3D(
805  IronWallXPos,
806  IronWallYPos,
807  trans-IronWallZPos)));
808  m_H62003EnvelopePhysical->add(new GeoNameTag(IronWallName));
809  m_H62003EnvelopePhysical->add(IronWallPhysical);
810  NH6EP++;
811 
812  // Concrete Walls behind cryostat.
813  const double ConSizeX = 130.0*cm;
814  const double ConSizeY = 120.0*cm;
815  const double ConSizeZ = 79.3*cm;
816 
817  const double ConAXPos = 0.0*cm;
818  const double ConAYPos = 0.0*cm;
819  const double ConAZPos = 518.0*cm;
820 
821  const double ConBXPos = 0.0*cm;
822  const double ConBYPos = 0.0*cm;
823  const double ConBZPos = 360.0*cm;
824  std::string ConcreteWallAName = baseName + "::ConcreteWallA";
825  const GeoBox* ConAShape = new GeoBox(ConSizeX, ConSizeY, ConSizeZ);
826  const GeoLogVol* ConALogical =
827  new GeoLogVol(ConcreteWallAName,ConAShape,Concrete);
828  GeoIntrusivePtr<GeoPhysVol> ConAPhysical = new GeoPhysVol(ConALogical);
829 
831  add(new GeoTransform(Translate3D(ConAXPos,
832  ConAYPos,
833  trans-ConAZPos)));
834  m_H62003EnvelopePhysical->add(new GeoNameTag(ConcreteWallAName));
835  m_H62003EnvelopePhysical->add(ConAPhysical);
836  NH6EP++;
837 
838  std::string ConcreteWallBName = baseName + "::ConcreteWallB";
839  const GeoBox* ConBShape = new GeoBox(ConSizeX, ConSizeY, ConSizeZ);
840  const GeoLogVol* ConBLogical =
841  new GeoLogVol(ConcreteWallBName, ConBShape, Concrete);
842  GeoIntrusivePtr<GeoPhysVol> ConBPhysical = new GeoPhysVol(ConBLogical);
843 
844  m_H62003EnvelopePhysical->add(new GeoTransform(Translate3D(ConBXPos,
845  ConBYPos,
846  trans-ConBZPos)));
847  m_H62003EnvelopePhysical->add(new GeoNameTag(ConcreteWallBName));
848  m_H62003EnvelopePhysical->add(ConBPhysical);
849  NH6EP++;
850 
851  //For Debugging: Get x,y,z position of beamline detectors
852  for(unsigned int i=0; i < NH6EP; i++)
853  {
854  log << MSG::DEBUG
855  << "The beamline material "
856  << m_H62003EnvelopePhysical->getNameOfChildVol(i).c_str()
857  << " is located at: "
858  << "\n"
859  << "x = "
860  << m_H62003EnvelopePhysical->getXToChildVol(i).translation().x()
861  << "\n"
862  << "y = "
863  << m_H62003EnvelopePhysical->getXToChildVol(i).translation().y()
864  << "\n"
865  << "z = "
866  << m_H62003EnvelopePhysical->getXToChildVol(i).translation().z()
867  << "\n"
868  << endmsg;
869  }
870 
871  } // End if(ScintGeom.size()!=0)
872 
873  // End beamline detectors
874 
876 }

◆ SetAxisVisState()

void LArGeo::LArDetectorConstructionH62003::SetAxisVisState ( bool  state)
inline

Definition at line 30 of file LArDetectorConstructionH62003.h.

30 {m_axisVisState=state;}

◆ SetFCALVisLimit()

void LArGeo::LArDetectorConstructionH62003::SetFCALVisLimit ( int  limit)
inline

Definition at line 29 of file LArDetectorConstructionH62003.h.

Member Data Documentation

◆ m_axisVisState

bool LArGeo::LArDetectorConstructionH62003::m_axisVisState
private

Definition at line 39 of file LArDetectorConstructionH62003.h.

◆ m_fcalVisLimit

int LArGeo::LArDetectorConstructionH62003::m_fcalVisLimit
private

Definition at line 38 of file LArDetectorConstructionH62003.h.

◆ m_H62003EnvelopePhysical

GeoIntrusivePtr<GeoFullPhysVol> LArGeo::LArDetectorConstructionH62003::m_H62003EnvelopePhysical
private

Definition at line 36 of file LArDetectorConstructionH62003.h.

◆ m_pAccessSvc

IRDBAccessSvc* LArGeo::LArDetectorConstructionH62003::m_pAccessSvc
private

Definition at line 41 of file LArDetectorConstructionH62003.h.


The documentation for this class was generated from the following files:
LArG4TBPosOptions::PositionNicknumber
void PositionNicknumber(int value)
Definition: LArG4TBPosOptions.h:34
LArGeo::LArDetectorConstructionH62003::m_fcalVisLimit
int m_fcalVisLimit
Definition: LArDetectorConstructionH62003.h:38
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
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.
LArG4TBPosOptions
Definition: LArG4TBPosOptions.h:19
LAr
Definition: LArVolumeBuilder.h:36
LArGeo::LArDetectorConstructionH62003::m_pAccessSvc
IRDBAccessSvc * m_pAccessSvc
Definition: LArDetectorConstructionH62003.h:41
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
DMTest::C
C_v1 C
Definition: C.h:26
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
cm3
#define cm3
deg
#define deg
Definition: SbPolyhedron.cxx:17
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArGeo::LArDetectorConstructionH62003::createAxis
static void createAxis(GeoIntrusivePtr< GeoFullPhysVol > H62003MotherPhysical, const GeoMaterial *mat)
Definition: LArDetectorConstructionH62003.cxx:878
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
lwtDev::Component::O
@ O
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
H
#define H(x, y, z)
Definition: MD5.cxx:114
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
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
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
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
LArGeo::LArDetectorConstructionH62003::m_H62003EnvelopePhysical
GeoIntrusivePtr< GeoFullPhysVol > m_H62003EnvelopePhysical
Definition: LArDetectorConstructionH62003.h:36
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
merge.status
status
Definition: merge.py:17
LArGeo::LArDetectorConstructionH62003::m_axisVisState
bool m_axisVisState
Definition: LArDetectorConstructionH62003.h:39
LArG4TBPosOptions::PositionNickname
void PositionNickname(const std::string &value)
Definition: LArG4TBPosOptions.h:33
FCALConstruction
Insert the LAr FCAL into a pre-defined mother volume.
updateCoolNtuple.limit
int limit
Definition: updateCoolNtuple.py:45