ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HGTD_DetectorFactory Class Reference

#include <HGTD_DetectorFactory.h>

Inheritance diagram for HGTD_DetectorFactory:
Collaboration diagram for HGTD_DetectorFactory:

Public Member Functions

 HGTD_DetectorFactory (HGTD_GeoModelAthenaComps *athenaComps)
 
virtual ~HGTD_DetectorFactory ()
 
virtual void create (GeoPhysVol *world) override
 
virtual const HGTD_DetectorManagergetDetectorManager () const override
 
void setPrintIdentifierDict (bool)
 
StoreGateSvcdetStore ()
 
const StoreGateSvcdetStore () const
 
const IGeoDbTagSvcgeoDbTagSvc () const
 
IRDBAccessSvcrdbAccessSvc ()
 
const IGeometryDBSvcgeomDB () const
 
MsgStream & msg (MSG::Level lvl) const
 
bool msgLvl (MSG::Level lvl)
 
InDetDD::AthenaCompsgetAthenaComps ()
 

Private Member Functions

 HGTD_DetectorFactory (HGTD_DetectorFactory &right)
 
HGTD_DetectorFactoryoperator= (HGTD_DetectorFactory &right)
 
void initializeGeoParameters ()
 
GeoLogVol * buildEndcapLogicalVolume (bool isPositiveSide)
 
GeoVPhysVol * build (const GeoLogVol *logicalEnvelope, bool bPos)
 
InDetDD::HGTD_ModuleDesigncreateHgtdDesign (double thickness)
 
std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants (unsigned int)
 
PositionsInQuadrant prepareQuadrantsFromRows (int layer, unsigned int maxRow)
 
std::string formModuleName (int layer, int quadrant, unsigned int maxrows, int row, int mod, const ModulePosition &module, double &myx, double &myy, double &myrot, int &phi, int &eta)
 
PositionsInQuadrant mirrorModulesInQuadrant (PositionsInQuadrant)
 
std::vector< ModulePositionprepareModulePositionsInRowThreeRing (int row, int back=0)
 
int reorderRows (PositionsInQuadrant *quadrant)
 
std::vector< ModulePositionprepareModulePositionsInRowTwoRing (int row, bool back=false)
 
void mirrorPositionsAroundYaxis (std::array< PositionsInQuadrant, 4 > &arr)
 

Private Attributes

HGTD_DetectorManagerm_detectorManager
 
HGTD_GeoModelAthenaCompsm_athComps
 
StoredMaterialManagerm_materialMgr
 
int m_geomVersion
 
bool m_outputIdfr
 
std::map< std::string, GeoCylVolParamsm_cylVolPars
 
std::map< std::string, GeoBoxVolParamsm_boxVolPars
 
HgtdGeoParams m_hgtdPars
 
std::unique_ptr< const InDetDD::SiCommonItemsm_commonItems
 
InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Definition at line 70 of file HGTD_DetectorFactory.h.

Constructor & Destructor Documentation

◆ HGTD_DetectorFactory() [1/2]

HGTD_DetectorFactory::HGTD_DetectorFactory ( HGTD_GeoModelAthenaComps athenaComps)

Definition at line 58 of file HGTD_DetectorFactory.cxx.

58  :
59  InDetDD::DetectorFactoryBase( athComps ),
60  m_athComps( athComps ),
61  m_materialMgr( nullptr ),
62  m_geomVersion( -1 ),
63  m_outputIdfr( false ) {
64  // create the detector manager
66 
67  ATH_MSG_INFO( "HGTD geometry from hard-coded definition - No Information being taken from Geometry Tag!" );
68 
69 
70  // Create SiCommonItems. These are items that are shared by all elements
71  m_commonItems = std::make_unique<const InDetDD::SiCommonItems>(m_athComps->getIdHelper());
72 
73  // temporarily hardcode the HGTD version to build until the geo db has been updated with tables for 3-ring layout
74  // m_geomVersion = 0; // two-ring layout
75  m_geomVersion = 1; // three-ring layout
76 }

◆ ~HGTD_DetectorFactory()

HGTD_DetectorFactory::~HGTD_DetectorFactory ( )
virtual

Definition at line 78 of file HGTD_DetectorFactory.cxx.

78  {
79  // NB the detector manager (m_detectorManager) is stored in the detector store by the Tool and so we don't delete it.
80 }

◆ HGTD_DetectorFactory() [2/2]

HGTD_DetectorFactory::HGTD_DetectorFactory ( HGTD_DetectorFactory right)
private

Member Function Documentation

◆ build()

GeoVPhysVol * HGTD_DetectorFactory::build ( const GeoLogVol *  logicalEnvelope,
bool  bPos 
)
private

Definition at line 296 of file HGTD_DetectorFactory.cxx.

296  {
297 
298  ATH_MSG_INFO( "**************************************************");
299  ATH_MSG_INFO( " Building HGTD geometry , side = " << bPos << " ");
300  ATH_MSG_INFO( "**************************************************" );
301 
302  GeoFullPhysVol* HGTDparent = new GeoFullPhysVol( logicalEnvelope );
303 
304  // to be calculated from parameters in db using map
305  double motherHalfZ = ((GeoTube*) HGTDparent->getLogVol()->getShape())->getZHalfLength();
306  double modulePackageHalfZtot = 3.5/2 + 4./2; // including flex - can we not get this from the db numbers? /CO
307 
308  double modulePackageHalfZ = 2*m_boxVolPars["HGTD::GlueSensor"].zHalf + m_boxVolPars["HGTDSiSensor0"].zHalf
309  + m_boxVolPars["HGTD::LGADInactive"].zHalf + m_boxVolPars["HGTD::ASIC"].zHalf
310  + m_boxVolPars["HGTD::Hybrid"].zHalf + m_boxVolPars["HGTD::ModuleSpace"].zHalf;
311 
312  // add volumes by key name to ordered vector, outside in (from larger z to smaller)
313  std::vector<std::string> hgtdVolumes;
314  hgtdVolumes.push_back("HGTD::ModeratorOut"); // Out as in outside the vessel
315  hgtdVolumes.push_back("HGTD::BackCover");
316  hgtdVolumes.push_back("HGTD::ToleranceBack");
317  hgtdVolumes.push_back("HGTD::ModeratorIn"); // In as in inside the vessel
318 
319  hgtdVolumes.push_back("HGTD::ModuleLayer3");
320  hgtdVolumes.push_back("HGTD::SupportPlate");
321  hgtdVolumes.push_back("HGTD::CoolingPlate");
322  hgtdVolumes.push_back("HGTD::SupportPlate");
323  hgtdVolumes.push_back("HGTD::ModuleLayer2");
324 
325  hgtdVolumes.push_back("HGTD::ToleranceMid");
326 
327  hgtdVolumes.push_back("HGTD::ModuleLayer1");
328  hgtdVolumes.push_back("HGTD::SupportPlate");
329  hgtdVolumes.push_back("HGTD::CoolingPlate");
330  hgtdVolumes.push_back("HGTD::SupportPlate");
331  hgtdVolumes.push_back("HGTD::ModuleLayer0");
332 
333  hgtdVolumes.push_back("HGTD::ToleranceFront");
334  hgtdVolumes.push_back("HGTD::FrontCover");
335  // Important - these must come last since they will otherwise shift positions of the previous volumes!
336  hgtdVolumes.push_back("HGTD::InnerRCover1"); // don't reorder!
337  hgtdVolumes.push_back("HGTD::InnerRCover2"); // don't reorder!
338  hgtdVolumes.push_back("HGTD::InnerRCover3"); // don't reorder!
339  hgtdVolumes.push_back("HGTD::OuterRCover"); // don't reorder!
340  hgtdVolumes.push_back("HGTD::PeripheralCoolingLines"); // don't reorder!
341 
342  // Now build up the solid, logical and physical volumes as appropriate (starting from the outermost volume)
343  // We first start with the volumes we'll reuse several times
344 
346  // FLEX PACKAGE VOLUMES //
348 
349  // Flex package volume modeled as 8 concentric flex sheets with progressively larger inner radius
350  // Order of sheets depend on whether package is for front or back of a cooling plate
351  // First calculate the inner radii for the flex sheets
352  GeoCylVolParams packagePars = m_cylVolPars["HGTD::FlexPackage"];
353  GeoCylVolParams flexPars = m_cylVolPars["HGTD::FlexTube"];
354  std::vector<double> flexSheetInnerR;
355  double currentInnerR = 144.; // adding flex sheets from the second sensor (all have the hybrid already)
356  for (int flexSheet = 0; flexSheet < 8; flexSheet++) {
357  flexSheetInnerR.push_back(currentInnerR);
358  // set the inner radius for the next flex sheet, increased by two module heights and two radius-dependent spaces per sheet
359  currentInnerR += m_boxVolPars["HGTDModule0"].xHalf*2 * (2 + 2 * (flexSheet < 4 ? 0.2 : 0.8) );
360  }
361 
362  // build up the two flex volumes for front (0) and back (1) sides
363  GeoPhysVol* flexPackagePhysical[2] = {};
364  for (int flexVolume = 0; flexVolume < 2; flexVolume++) {
365  std::vector<double> rInner = flexSheetInnerR;
366  if (flexVolume) reverse(rInner.begin(), rInner.end()); // reverse order for backside flex package
367 
368  GeoTube* flexPackageSolid = new GeoTube(packagePars.rMin, packagePars.rMax, packagePars.zHalf);
369  GeoLogVol* flexPackageLogical = new GeoLogVol(packagePars.name, flexPackageSolid, m_materialMgr->getMaterial(packagePars.material));
370  flexPackagePhysical[flexVolume] = new GeoPhysVol(flexPackageLogical);
371  // build up a volume of flex cables, starting in z at half a flex layer from the edge of the flex package volume
372  double flexZoffset = packagePars.zHalf - flexPars.zHalf;
373  for (int flexSheet = 0; flexSheet < 8; flexSheet++) {
374  GeoTube* hgtdFlexSolid = new GeoTube(rInner[flexSheet], flexPars.rMax, flexPars.zHalf);
375  GeoLogVol* hgtdFlexLogical = new GeoLogVol("HGTD::FlexTube"+std::to_string(flexSheet),
376  hgtdFlexSolid, m_materialMgr->getMaterial(flexPars.material));
377  GeoPhysVol* hgtdFlexPhysical = new GeoPhysVol(hgtdFlexLogical);
378  flexPackagePhysical[flexVolume]->add(new GeoTransform(GeoTrf::TranslateZ3D(flexZoffset)));
379  flexPackagePhysical[flexVolume]->add(hgtdFlexPhysical);
380  // print out a line for each flex layer
381  ATH_MSG_DEBUG( "Flex layer (" << (flexSheet ? "front" : "back") << ")" << flexSheet << ", Rmin = " << std::setw(5)
382  << rInner[flexSheet] << " mm, flexZoffset = " << flexZoffset << " mm" );
383  flexZoffset = flexZoffset - m_hgtdPars.flexSheetSpacing;
384  }
385  }
386 
388  // COOLING TUBES //
390 
391  // make list of radii of cooling tubes
392  std::vector<double> coolingTubeRadii;
393  double coolingTubeRadius = 130.;
394  coolingTubeRadii.push_back(coolingTubeRadius);
395 
396  // two-ring layout
397  if (m_geomVersion == 0) {
398  ATH_MSG_INFO("Will now calculate cooling-loop positions for the two-ring layout");
399  for (int i = 0; i < 18; i++) {
400  coolingTubeRadius += (418-130.)/18;
401  coolingTubeRadii.push_back(coolingTubeRadius);
402  }
403  for (int i = 0; i < 12; i++) {
404  coolingTubeRadius += (658-418.)/14;
405  coolingTubeRadii.push_back(coolingTubeRadius);
406  }
407  coolingTubeRadius = 710.;
408  coolingTubeRadii.push_back(coolingTubeRadius);
409  for (int i = 0; i < 7; i++) {
410  coolingTubeRadius += (890-710.)/6;
411  coolingTubeRadii.push_back(coolingTubeRadius);
412  }
413  }
414  else if (m_geomVersion == 1) {
415  ATH_MSG_INFO("Will now calculate cooling-loop positions for the three-ring layout");
416  // inner part, even spacing from 130 mm to 674 mm, 35 rings with 16 mm spacing (first one already placed above)
417  int numberOfLoops = 34;
418  float loopDistance = (674.-130.)/numberOfLoops; // in mm
419  for (int i = 0; i < numberOfLoops; i++) {
420  coolingTubeRadius += loopDistance;
421  coolingTubeRadii.push_back(coolingTubeRadius);
422  }
423  // outer part, even spacing from 720 mm to 900 mm, 7 rings with 30 mm spacing
424  coolingTubeRadius = 720;
425  coolingTubeRadii.push_back(coolingTubeRadius);
426  numberOfLoops = 6;
427  loopDistance = (900.-720.)/numberOfLoops;
428  for (int i = 0; i < numberOfLoops; i++) {
429  coolingTubeRadius += loopDistance;
430  coolingTubeRadii.push_back(coolingTubeRadius);
431  }
432  }
433  ATH_MSG_DEBUG( "Cooling tubes will be created at the following radii (" << coolingTubeRadii.size() << " in total):");
434  for (size_t i = 0; i < coolingTubeRadii.size(); i++) {
435  ATH_MSG_DEBUG( " R = " << coolingTubeRadii[i] << " mm" );
436  }
437 
439  // PERIPHERAL ELECTRONICS VOLUME //
441 
442  //build peripheral electronics
443  GeoCylVolParams periphElPars = m_cylVolPars["HGTD::PeriphElec"];
444  GeoTube* periphElec_solid = new GeoTube(periphElPars.rMin, periphElPars.rMax, periphElPars.zHalf);
445  GeoLogVol* periphElec_log = new GeoLogVol(periphElPars.name, periphElec_solid, m_materialMgr->getMaterial(periphElPars.material));
446  GeoPhysVol* periphElec_phys = new GeoPhysVol(periphElec_log);
447 
448  std::array< GeoPhysVol*, 4 > moduleLayerPhysical = {}; // array of pointers to the physical volumes for the module layers which need special care
449 
451  // BUILD UP ALL MAIN VOLUMES IN SEQUENCE //
453 
454  // now build up the volumes in the order specified in the vector
455  double zModuleLayerF = 0.;
456  double zModuleLayerB = 0.;
457  for (size_t vol = 0; vol < hgtdVolumes.size(); vol++) {
458 
459  std::string v = hgtdVolumes[vol];
460 
461  // calculate local z offsets for each main volume sequentially
462  if (vol == 0) // special treatment for the first one
463  m_cylVolPars[v].zOffsetLocal = motherHalfZ - m_cylVolPars[v].zHalf;
464 
465  // All but the InnerRCover, OuterRCover and peripheral cooling lines are placed relative to other components,
466  // but the zOffsetLocal parameter of these volumes is left as read from the db
467  else {
468  if (v.substr(9,8) != "erRCover" && v != "HGTD::PeripheralCoolingLines") {
469  std::string vPrev = hgtdVolumes[vol-1];
470  m_cylVolPars[v].zOffsetLocal = m_cylVolPars[vPrev].zOffsetLocal - m_cylVolPars[vPrev].zHalf - m_cylVolPars[v].zHalf;
471  }
472  }
473 
474  // skip the tolerances - we don't actually want to create volumes for the space
475  if (v.substr(0,15) == "HGTD::Tolerance") continue;
476 
477  float safety = 0.;
478  if (v.substr(0,17) == "HGTD::ModuleLayer")
479  safety = 10.;
480 
481  // a disk volume to hold 4 quadrants
482  GeoTube* hgtdSubVolumeSolid = new GeoTube(m_cylVolPars[v].rMin, m_cylVolPars[v].rMax+safety, m_cylVolPars[v].zHalf);
483  GeoLogVol* hgtdSubVolumeLogical = new GeoLogVol(m_cylVolPars[v].name, hgtdSubVolumeSolid, m_materialMgr->getMaterial(m_cylVolPars[v].material));
484  GeoPhysVol* hgtdSubVolumePhysical = new GeoPhysVol(hgtdSubVolumeLogical);
485 
486  // if building the cooling plate, also add peripheral electronics since position of those are relative to that of cooling plate
487  if (v == "HGTD::CoolingPlate") {
488  double zOffsetPeriphElec = m_cylVolPars[v].zHalf + periphElPars.zOffsetLocal + periphElPars.zHalf;
489  // place two, one on each side of cooling plate
490  for (int side = 0; side < 2; side++) {
491  HGTDparent->add(new GeoTransform(GeoTrf::TranslateZ3D(m_cylVolPars[v].zOffsetLocal + pow(-1, side)*zOffsetPeriphElec)));
492  HGTDparent->add(periphElec_phys);
493  }
494 
495  // and the CO2 cooling tubes inside the cooling plate
496  for (size_t i = 0; i < coolingTubeRadii.size(); i++) {
497  // the tube itself
498  GeoTorus* coolingTubeSolid = new GeoTorus(m_cylVolPars["HGTD::CoolingTubeFluid"].zHalf, m_cylVolPars["HGTD::CoolingTube"].zHalf,
499  coolingTubeRadii[i], 0, 2*M_PI);
500  GeoLogVol* coolingTubeLogical = new GeoLogVol("HGTD::CoolingTube", coolingTubeSolid,
501  m_materialMgr->getMaterial(m_cylVolPars["HGTD::CoolingTube"].material));
502  GeoPhysVol* coolingTubePhysical = new GeoPhysVol(coolingTubeLogical);
503  hgtdSubVolumePhysical->add(coolingTubePhysical); // no transformations needed, concentric with cooling plate and centered in z
504  // and the contents, i.e. the cooling fluid
505  GeoTorus* coolingFluidSolid = new GeoTorus(0, m_cylVolPars["HGTD::CoolingTubeFluid"].zHalf,
506  coolingTubeRadii[i], 0, 2*M_PI);
507  GeoLogVol* coolingFluidLogical = new GeoLogVol("HGTD::CoolingFluid", coolingFluidSolid,
508  m_materialMgr->getMaterial(m_cylVolPars["HGTD::CoolingTubeFluid"].material));
509  GeoPhysVol* coolingFluidPhysical = new GeoPhysVol(coolingFluidLogical);
510  hgtdSubVolumePhysical->add(coolingFluidPhysical); // no transformations needed, concentric with cooling plate and centered in z
511  }
512  }
513 
514  // module layer
515  if (v.substr(0,17) == "HGTD::ModuleLayer") {
516 
517  int layer = atoi(v.substr(17,1).c_str());
518 
519  // front and back side layers are treated differently: z position of flex and module layers, and rotation
520  double zFlex = 0.;
521  bool Lside = layer % 2;
522  if (Lside == 0) { // layers 0 and 2
523  zFlex = -modulePackageHalfZtot + m_cylVolPars["HGTD::FlexPackage"].zHalf;
524  zModuleLayerF = modulePackageHalfZtot - modulePackageHalfZ;
525  }
526  else { // layers 1 and 3
527  zFlex = modulePackageHalfZtot - m_cylVolPars["HGTD::FlexPackage"].zHalf;
528  zModuleLayerB = -modulePackageHalfZtot + modulePackageHalfZ;
529  }
530 
531  // place flex within module packages, at different positions depending on front or back or cooling plate
532  hgtdSubVolumePhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zFlex)));
533  hgtdSubVolumePhysical->add(flexPackagePhysical[(Lside ? 0 : 1)]);
534 
535  float diskRotation = layer <= 1 ? m_hgtdPars.disk1Rotation : m_hgtdPars.disk2Rotation;
536 
537  HGTDparent->add(new GeoTransform( GeoTrf::TranslateZ3D(m_cylVolPars[v].zOffsetLocal) *
538  GeoTrf::RotateZ3D(diskRotation*Gaudi::Units::deg)) );
539  // one needs to check this rotation against the "quadrot" will be used in the following
540 
541  HGTDparent->add( hgtdSubVolumePhysical );
542  moduleLayerPhysical[layer] = hgtdSubVolumePhysical;
543 
544  } // end of module package
545  else {
546  HGTDparent->add(new GeoTransform(GeoTrf::TranslateZ3D(m_cylVolPars[v].zOffsetLocal)));
547  HGTDparent->add(hgtdSubVolumePhysical);
548  }
549 
550  // print out info about each main volume
551  ATH_MSG_INFO( std::setw(20) << m_cylVolPars[v].name << " ( " << std::setw(20) << m_cylVolPars[v].material
552  << " ), local z = " << std::setw(6) << m_cylVolPars[v].zOffsetLocal
553  << " mm, Rmin = " << std::setw(4) << m_cylVolPars[v].rMin
554  << " mm, Rmax = " << std::setw(4) << m_cylVolPars[v].rMax
555  << " mm, DZ = " << std::setw(5) << m_cylVolPars[v].zHalf << " mm" );
556 
557  } // end loop over hgtdVolumes
558 
560  // MODULE VOLUMES //
562 
563  // components for the module
564  std::vector<std::string> moduleVolumes;
565  moduleVolumes.push_back("HGTD::GlueAsic");
566  moduleVolumes.push_back("HGTD::ASIC");
567  moduleVolumes.push_back("HGTD::LGADInactive");
568  moduleVolumes.push_back("SensorPlaceHolder"); // replaced below to get the numbered name right
569  moduleVolumes.push_back("HGTD::GlueSensor");
570  moduleVolumes.push_back("HGTD::Hybrid");
571  moduleVolumes.push_back("HGTD::ModuleSpace");
572 
573  int endcap = bPos ? +2 : -2;
574  double thickness = 2.*m_boxVolPars["HGTDSiSensor0"].zHalf;
575  InDetDD::HGTD_ModuleDesign* moduleDesign = createHgtdDesign( thickness );
576 
577  // create the module --> each for cell and with different names
578  // calculate the positions where modules should be placed in one quadrant
579 
580  int totMod = 0;
581  // this should be taken from DB or XML
582  unsigned int maxRows = 21;
583  if ( m_geomVersion == 0 ) maxRows = 18;
584 
585  std::array< PositionsInQuadrant, 4 > positions = prepareLayersFromQuadrants( maxRows ) ;
586  // inside m_geomVersion implicitly control 3-ring layout vs 2-ring
587 
588  mirrorPositionsAroundYaxis(positions);
589 
590  for (int layer = 0; layer < 4; layer++) {
591  if (m_outputIdfr) cout << "Layer #" << layer << std::endl;
592  // select from front vs back side of a disk
593  int Lside = layer % 2;
594 
595  std::vector<std::string> volumes = moduleVolumes;
596  if ( Lside != 0 ) reverse( volumes.begin(), volumes.end() ); // reverse order of components for backside modules
597 
598  std::string sensorName = std::string("HGTDSiSensor") + std::to_string(layer);
599  std::string moduleName = std::string("HGTDModule") + std::to_string(layer);
600 
601  // here we assumed all 4 layers share the same dimensions.
602  // As described at HGTD_DetectorFactory::reorderRows,
603  // the short edge of 4*2 cm module in the leading row is defined as local X/Width
604  // in ReadoutGeometry, this short edge is also defined as Eta, since the row is roughly along radius.
605  double moduleHalfWidth = m_boxVolPars[moduleName].xHalf; // 11m than 10 to hold wire bond
606  double moduleHalfHeight = m_boxVolPars[moduleName].yHalf;
607 
608  // loop over quadrants in the current layer
609  // take a prepared quadrant as protype
610  PositionsInQuadrant tmpQuadrant = positions[ layer ];
611  // The relative rotation between two disks is supposed to be defined/accounted within tmpQuadrant
612  for (int q = 0; q < 4; q++) {
613  float quadrot = q*90.;
614 
615  for ( unsigned int row = 0; row < maxRows; row ++ ) {
616  std::vector< ModulePosition > ModsPerRow = tmpQuadrant[ row ];
617 
618  // print #modules per row to fill HGTD_Identifier dictionary etc.
619  if ( m_outputIdfr && q == 0 ) std::cout << " Row #"<< row + 1 <<" :: " << ModsPerRow.size() << std::endl;
620 
621  for ( unsigned int mod = 0; mod < ModsPerRow.size(); mod ++ ) {
622  ModulePosition module = ModsPerRow[ mod ];
623 
624  double myx = -9999999.9 , myy = -9999999.9 , myrot = -9999999.9;
625  int myphi = -1 , myeta = - 1;
626  std::string module_string = formModuleName( layer, q, maxRows, row, mod, module, myx, myy, myrot, myphi, myeta );
627 
628  if ( module_string == "" || myrot == -9999999.9 || myeta == -1 )
629  ATH_MSG_WARNING ( " Please check the module at layer "<< layer <<" quadrant " << q <<" row "<< row <<" mod " << mod <<" not well retrieved ! " );
630 
631  // an hgtd module defined in the form of ( X, Y, Z )
632  GeoBox* moduleSolid = new GeoBox( moduleHalfWidth, moduleHalfHeight, modulePackageHalfZ);
633  GeoLogVol* moduleLogical = new GeoLogVol( moduleName + module_string, moduleSolid, m_materialMgr->getMaterial("std::Air"));
634  GeoFullPhysVol* modulePhysical = new GeoFullPhysVol( moduleLogical );
635 
636  // print out one module per layer
637  if ( q == 0 && row == 0 && mod == 0 )
638  ATH_MSG_DEBUG( "Will now build up an individual HGTD module of layer " << layer << " and quadrant " << q << " (" << module_string << ")" );
639 
640  // loop over components in module
641  for (size_t comp = 0; comp < volumes.size(); comp++) {
642  if (volumes[comp] == "SensorPlaceHolder") volumes[comp] = sensorName; // replace placeholder
643 
644  std::string c = volumes[comp];
645  // calculate local z offsets for each sensor component sequentially
646  if (comp == 0) // special treatment for the first one
647  m_boxVolPars[c].zOffsetLocal = modulePackageHalfZ - m_boxVolPars[c].zHalf;
648  else {
649  std::string cPrev = volumes[comp-1];
650  m_boxVolPars[c].zOffsetLocal = m_boxVolPars[cPrev].zOffsetLocal - m_boxVolPars[cPrev].zHalf - m_boxVolPars[c].zHalf;
651  }
652 
653  // skip the module space - we don't actually want to create volumes for the space
654  if (volumes[comp] == "HGTD::ModuleSpace") continue;
655 
656  double comp_halfx = m_boxVolPars[c].xHalf;
657  double comp_halfy = m_boxVolPars[c].yHalf;
658 
659  // and x offsets for those components that are smaller, to make room for wire bond of flex to ASIC which is larger than the sensor
660  double xOffsetLocal = moduleHalfWidth - comp_halfx;
661  // need tuning then dataBase : to make room for wire bond of flex to ASIC which is larger than the sensor
662 
663  GeoBox* sensorCompSolidVol = new GeoBox(comp_halfx, comp_halfy, m_boxVolPars[c].zHalf);
664  // No attachment?
665  std::string attach = (volumes[comp] == sensorName) ? "" : "_L" + std::to_string( layer ) + module_string;
666 
667  GeoLogVol* sensorCompLogicalVol = new GeoLogVol( m_boxVolPars[c].name+attach, sensorCompSolidVol,
669  GeoFullPhysVol* sensorCompPhysicalVol = new GeoFullPhysVol(sensorCompLogicalVol);
670 
671  if (volumes[comp] == sensorName) {
672  const HGTD_ID* hgtdId = dynamic_cast<const HGTD_ID*>( m_athComps->getIdHelper() );
673  Identifier idwafer = hgtdId->wafer_id( endcap, layer, myphi, myeta );
674 
675  // print only the first and last module of each row in the first quadrant
676  if ( q == 0 && ( mod == 0 || mod == ( ModsPerRow.size() - 1 ) ) && !m_outputIdfr ) {
677  ATH_MSG_DEBUG( " waferHash : " << hgtdId->wafer_hash( idwafer )
678  << " upon HGTD_ID => ec: " << endcap << ", layer: " << layer << ", quadrant: " << q
679  << ", row: " << myphi <<", module: "<< myeta );
680  ATH_MSG_DEBUG( " HGTD Module: " << m_boxVolPars[c].name+module_string << ", posX: " << myx << ", posY: " << myy << ", rot: " << quadrot + myrot );
681  }
682 
683  InDetDD::HGTD_DetectorElement* detElement = new InDetDD::HGTD_DetectorElement(idwafer, moduleDesign, sensorCompPhysicalVol, m_commonItems.get());
684  m_detectorManager->addDetectorElement( detElement );
685 
686  GeoTrf::Transform3D sensorTransform = GeoTrf::TranslateZ3D(m_boxVolPars[c].zOffsetLocal)*GeoTrf::TranslateX3D(xOffsetLocal);
687  GeoAlignableTransform* xform = new GeoAlignableTransform(sensorTransform);
688 
689  modulePhysical->add( xform );
690  modulePhysical->add( sensorCompPhysicalVol );
691 
692  totMod ++;
693  }
694  else {
695  modulePhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(m_boxVolPars[c].zOffsetLocal)*GeoTrf::TranslateX3D(xOffsetLocal)));
696  modulePhysical->add(sensorCompPhysicalVol);
697  }
698 
699  // print out each module component
700  if ( mod == 0 && q == 0 && volumes[comp] != sensorName )
701  ATH_MSG_DEBUG( std::setw(20) << m_boxVolPars[c].name << " ( " << std::setw(15) << m_boxVolPars[c].material
702  << " ), in-sensor-layer local z = " << std::setw(7) << m_boxVolPars[c].zOffsetLocal << " mm"
703  << ", DX = " << std::setw(5) << m_boxVolPars[c].xHalf << " mm"
704  << ", DY = " << std::setw(5) << m_boxVolPars[c].yHalf << " mm"
705  << ", DZ = " << std::setw(5) << m_boxVolPars[c].zHalf << " mm" );
706  } // end of components loop
707 
708  double zModule = ( Lside == 0 ? zModuleLayerF : zModuleLayerB );
709 
710  GeoTransform* moduleTransform = new GeoTransform( GeoTrf::TranslateZ3D(zModule) *
711  GeoTrf::TranslateX3D(myx) *
712  GeoTrf::TranslateY3D(myy) *
713  GeoTrf::RotateZ3D( ( quadrot + myrot )*Gaudi::Units::deg) );
714  moduleLayerPhysical[layer]->add( moduleTransform );
715  moduleLayerPhysical[layer]->add( modulePhysical );
716  } //end of modules loop
717  ATH_MSG_DEBUG( "Done placing modules for row " << row );
718  } // end of row loop
719  ATH_MSG_DEBUG( "Done placing modules for quadrant " << q );
720  } // end of quadrants loop
721  ATH_MSG_DEBUG( "Done placing modules for layer " << layer );
722  }
723 
724  ATH_MSG_INFO( "**************************************************" );
725  ATH_MSG_INFO( " Done building HGTD with " << totMod <<" modules " );
726  ATH_MSG_INFO( "**************************************************" );
727 
728  return HGTDparent;
729 }

◆ buildEndcapLogicalVolume()

GeoLogVol * HGTD_DetectorFactory::buildEndcapLogicalVolume ( bool  isPositiveSide)
private

Definition at line 281 of file HGTD_DetectorFactory.cxx.

281  {
282 
283  // build the solid volume
284  GeoTube* world_solid_hgtd = new GeoTube(m_cylVolPars["HGTD_mother"].rMin, m_cylVolPars["HGTD_mother"].rMax,
285  m_cylVolPars["HGTD_mother"].zHalf);
286 
287  // build the logical volume
288  std::string name = isPositiveSide ? "HGTD_PositiveEndcap" : "HGTD_NegativeEndcap";
289  GeoLogVol* world_logical_hgtd = new GeoLogVol( name.c_str(), world_solid_hgtd,
290  m_materialMgr->getMaterial( m_cylVolPars[ "HGTD_mother"].material) );
291 
292  return world_logical_hgtd;
293 }

◆ create()

void HGTD_DetectorFactory::create ( GeoPhysVol *  world)
overridevirtual

Definition at line 87 of file HGTD_DetectorFactory.cxx.

87  {
88 
89  ATH_MSG_INFO( "Building HGTD detector");
90 
91  // initialize the geometry parameters
92  // Originally taken from geometry db, but now fully hard-coded until move to GMX implementation
94 
95  // for now the position of the HGTD mother volumes is hardcoded - TODO: take from db!
96  float zMother = 3482.5;
97 
98  // build logical volumes for the two endcaps
99  const GeoLogVol* positiveEndcapLogicalVolume = buildEndcapLogicalVolume(true);
100  const GeoLogVol* negativeEndcapLogicalVolume = buildEndcapLogicalVolume(false);
101 
102  // create and place positive endcap
103  world->add(new GeoNameTag("HGTD_Pos"));
104  world->add(new GeoIdentifierTag(9));
105  ATH_MSG_INFO( "HGTD_Pos mother volume will be placed at z = " << zMother << " mm" );
106  world->add(new GeoTransform(GeoTrf::TranslateZ3D(zMother)));
107  GeoVPhysVol* endcapPos = build( positiveEndcapLogicalVolume, true);
108  world->add( endcapPos );
109  m_detectorManager->addTreeTop( endcapPos);
110 
111  // create and place negative endcap
112  world->add(new GeoNameTag("HGTD_Neg"));
113  world->add(new GeoIdentifierTag(-9));
114  ATH_MSG_INFO( "HGTD_Neg mother volume will be placed at z = " << -zMother << " mm" );
115  world->add(new GeoTransform(GeoTrf::TranslateZ3D(-zMother)));
116  world->add(new GeoTransform(GeoTrf::RotateY3D(180.0*Gaudi::Units::deg)));
117  GeoVPhysVol* endcapNeg = build( negativeEndcapLogicalVolume, false);
118  world->add( endcapNeg );
119  m_detectorManager->addTreeTop( endcapNeg );
120 
121  // Add SiCommonItems to HGTD_DetectorManager to hold and delete it.
123 
124  return;
125 }

◆ createHgtdDesign()

InDetDD::HGTD_ModuleDesign * HGTD_DetectorFactory::createHgtdDesign ( double  thickness)
private

Definition at line 1032 of file HGTD_DetectorFactory.cxx.

1032  {
1033 
1034  double phiPitch = 1.3; // mm
1035  double etaPitch = 1.3; // mm
1036 
1037  // for each module there are two ASICs connected, need further confirmation for below specifications
1038  // the "collumns" along module short edge align to a direction just following the EndOfCollumn(EoC) of each ASIC.
1039  int circuitsPerColumn = 1;
1040  int circuitsPerRow = 2; // along the long edge of module, tentatively following IBL descriptin
1041 
1042  // each ASIC just cover half ( 15*15 pixels ) of a module
1043  int cellColumnsPerCircuit = 15;
1044  int cellRowsPerCircuit = 15; // along module FULL length there are 2*15 rows
1045 
1046  int diodeColumnsPerCircuit = cellColumnsPerCircuit;
1047  int diodeRowsPerCircuit = cellRowsPerCircuit;
1048 
1049  std::shared_ptr<const PixelDiodeMatrix> normalCell = InDetDD::PixelDiodeMatrix::construct(phiPitch, etaPitch);
1050  std::shared_ptr<const PixelDiodeMatrix> singleRow = InDetDD::PixelDiodeMatrix::construct(InDetDD::PixelDiodeMatrix::phiDir, 0,
1051  normalCell, diodeColumnsPerCircuit, 0);
1052  std::shared_ptr<const PixelDiodeMatrix> fullMatrix = InDetDD::PixelDiodeMatrix::construct(InDetDD::PixelDiodeMatrix::etaDir, 0,
1053  singleRow, 2*diodeRowsPerCircuit, 0); // note 30 = 2*15 rows adopted
1054 
1056 
1058  circuitsPerColumn, circuitsPerRow,
1059  cellColumnsPerCircuit, cellRowsPerCircuit,
1060  diodeColumnsPerCircuit, diodeRowsPerCircuit,
1061  fullMatrix,
1062  InDetDD::CarrierType::electrons, 1, yDirection );
1063 
1064  return design;
1065 }

◆ detStore() [1/2]

StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( )
inlineinherited

Definition at line 27 of file InDetDetectorFactoryBase.h.

27 {return m_athenaComps->detStore();}

◆ detStore() [2/2]

const StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( ) const
inlineinherited

Definition at line 28 of file InDetDetectorFactoryBase.h.

28 {return std::as_const(*m_athenaComps).detStore();}

◆ formModuleName()

std::string HGTD_DetectorFactory::formModuleName ( int  layer,
int  quadrant,
unsigned int  maxrows,
int  row,
int  mod,
const ModulePosition module,
double &  myx,
double &  myy,
double &  myrot,
int &  phi,
int &  eta 
)
private

Definition at line 765 of file HGTD_DetectorFactory.cxx.

767  {
768 
769  std::string module_string = "";
770 
771  double x = module.x;
772  double y = module.y;
773  double myphi = atan(y/x);
774  double radius = std::sqrt(x*x+y*y);
775 
776  myx = radius*cos( quadrant*M_PI*0.5 + myphi );
777  myy = radius*sin( quadrant*M_PI*0.5 + myphi );
778 
779  // three-ring layout
780  if ( m_geomVersion == 1 ) {
781  myrot = module.phiRotation;
782  phi = quadrant*21 + row + 1; // quadrant is absent ( hidden into row ) in HGTD-Identifier
783  eta = mod + 1;
784  //module_string = "_R" + std::to_string(phi) + "_M" + std::to_string(eta); //This was the previous string, but doesn't match expectations of HGTDSensorSD
785  module_string = "_layer_" + std::to_string(layer) + "_" + std::to_string(phi) + "_" + std::to_string(eta);
786  }
787  // two-ring layout
788  else {
789  double rot = module.flipped ? 90. : 0.;
790  int myrow = module.row;
791  double moduleRotation = 0;
792  if ( layer > 1 ) {
793  myx = -myx;
794  // need to rotate 180 degrees some modules in q0 and q2
795  if ( quadrant%2 == 0 && myrow <= 15) moduleRotation = 180.;
796  else if (quadrant%2 == 1 && myrow > 15) moduleRotation = 180.;
797  }
798  eta = ( quadrant*maxrows ) + myrow;
799  phi = module.el_in_row;
800  myrot = moduleRotation + rot;
801  module_string = "_layer_" + std::to_string(layer) + "_" + std::to_string(phi) + "_" + std::to_string(eta);
802  }
803 
804  return module_string;
805 }

◆ geoDbTagSvc()

const IGeoDbTagSvc* InDetDD::DetectorFactoryBase::geoDbTagSvc ( ) const
inlineinherited

Definition at line 30 of file InDetDetectorFactoryBase.h.

30 {return std::as_const(*m_athenaComps).geoDbTagSvc();}

◆ geomDB()

const IGeometryDBSvc* InDetDD::DetectorFactoryBase::geomDB ( ) const
inlineinherited

Definition at line 34 of file InDetDetectorFactoryBase.h.

34 {return m_athenaComps->geomDB();}

◆ getAthenaComps()

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::getAthenaComps ( )
inlineinherited

Definition at line 42 of file InDetDetectorFactoryBase.h.

42 {return m_athenaComps;}

◆ getDetectorManager()

const HGTD_DetectorManager * HGTD_DetectorFactory::getDetectorManager ( ) const
overridevirtual

Definition at line 1067 of file HGTD_DetectorFactory.cxx.

1067  {
1068  return m_detectorManager;
1069 }

◆ initializeGeoParameters()

void HGTD_DetectorFactory::initializeGeoParameters ( )
private

Definition at line 128 of file HGTD_DetectorFactory.cxx.

128  {
129 
130  // retrieve the material manager (can't use ATH_CHECK macros within create(), it seems..)
131  StatusCode sc = detStore()->retrieve(m_materialMgr, std::string("MATERIALS"));
132  if (sc != StatusCode::SUCCESS) {
133  ATH_MSG_ERROR("Cannot retrieve material manager from DetStore");
134  }
135 
136  // temporarily hard-code custom materials - eventually will be defined in xml once HGTD migrates to GeoModelXML detector description
137 
138  GeoMaterial* CFRP = new GeoMaterial("hgtd::CFRP", 1.78*(CLHEP::gram / CLHEP::cm3)); // copy of sct::CFRP used in 21.9
139  CFRP->add(m_materialMgr->getElement("Carbon"), 0.92);
140  CFRP->add(m_materialMgr->getElement("Hydrogen"), 0.02);
141  CFRP->add(m_materialMgr->getElement("Oxygen"), 0.05);
142  m_materialMgr->addMaterial("hgtd", CFRP);
143 
144  GeoMaterial* Honeycomb = new GeoMaterial("hgtd::Honeycomb", 0.042*(CLHEP::gram / CLHEP::cm3)); // copy of muo::Honeycomb used in 21.9
145  Honeycomb->add(m_materialMgr->getElement("Carbon"), 0.88);
146  Honeycomb->add(m_materialMgr->getElement("Hydrogen"), 0.11);
147  m_materialMgr->addMaterial("hgtd", Honeycomb);
148 
149  GeoMaterial* Peek = new GeoMaterial("hgtd::Peek", 1.3*(CLHEP::gram / CLHEP::cm3)); // copy of pix::Peek used in 21.9
150  Peek->add(m_materialMgr->getElement("Hydrogen"), 0.04);
151  Peek->add(m_materialMgr->getElement("Carbon"), 0.79);
152  Peek->add(m_materialMgr->getElement("Oxygen"), 0.16);
153  m_materialMgr->addMaterial("hgtd", Peek);
154 
155  GeoMaterial* CO2_Liquid = new GeoMaterial("hgtd::CO2_Liquid", 1.032*(CLHEP::gram / CLHEP::cm3)); // copy of pix::CO2_Liquid used in 21.9
156  CO2_Liquid->add(m_materialMgr->getElement("Carbon"), 0.27);
157  CO2_Liquid->add(m_materialMgr->getElement("Oxygen"), 0.72);
158  m_materialMgr->addMaterial("hgtd", CO2_Liquid);
159 
160  GeoMaterial* CO2 = new GeoMaterial("hgtd::CO2", 0.001842*(CLHEP::gram / CLHEP::cm3)); // copy of trt::CO2 used in 21.9
161  CO2->add(m_materialMgr->getElement("Carbon"), 0.27);
162  CO2->add(m_materialMgr->getElement("Oxygen"), 0.72);
163  m_materialMgr->addMaterial("hgtd", CO2);
164 
165  GeoMaterial* CFiberSupport = new GeoMaterial("hgtd::CFiberSupport", 0.189*(CLHEP::gram / CLHEP::cm3)); // copy of sct::CFiberSupport used in 21.9
166  CFiberSupport->add(m_materialMgr->getElement("Carbon"), 1.0);
167  m_materialMgr->addMaterial("hgtd", CFiberSupport);
168 
169  GeoMaterial* CuKapton = new GeoMaterial("hgtd::CuKapton", 2.94*(CLHEP::gram / CLHEP::cm3)); // copy of sct::CuKapton used in 21.9
170  CuKapton->add(m_materialMgr->getElement("Copper"), 0.61);
171  CuKapton->add(m_materialMgr->getElement("Carbon"), 0.26);
172  CuKapton->add(m_materialMgr->getElement("Hydrogen"), 0.01);
173  CuKapton->add(m_materialMgr->getElement("Oxygen"), 0.08);
174  CuKapton->add(m_materialMgr->getElement("Nitrogen"), 0.02);
175  m_materialMgr->addMaterial("hgtd", CuKapton);
176 
177  GeoMaterial* BoratedPolyethelyne = new GeoMaterial("hgtd::BoratedPolyethelyne", 0.99*(CLHEP::gram / CLHEP::cm3)); // copy of LAr::BoratedPolyethelyne used in 21.9
178  BoratedPolyethelyne->add(m_materialMgr->getElement("Hydrogen"), 0.13);
179  BoratedPolyethelyne->add(m_materialMgr->getElement("Carbon"), 0.81);
180  BoratedPolyethelyne->add(m_materialMgr->getElement("Boron"), 0.05);
181  m_materialMgr->addMaterial("hgtd", BoratedPolyethelyne);
182 
183  GeoMaterial* FEBoards = new GeoMaterial("hgtd::FEBoards", 0.99*(CLHEP::gram / CLHEP::cm3)); // copy of LAr::FEBoards used in 21.9
184  FEBoards->add(m_materialMgr->getElement("Silicon"), 0.27);
185  FEBoards->add(m_materialMgr->getElement("Oxygen"), 0.34);
186  FEBoards->add(m_materialMgr->getElement("Copper"), 0.28);
187  FEBoards->add(m_materialMgr->getElement("Hydrogen"), 0.01);
188  FEBoards->add(m_materialMgr->getElement("Carbon"), 0.09);
189  m_materialMgr->addMaterial("hgtd", FEBoards);
190 
191  GeoMaterial* Epoxy = new GeoMaterial("hgtd::Epoxy", 1*(CLHEP::gram / CLHEP::cm3)); // copy of sct::Epoxy used in 21.9
192  Epoxy->add(m_materialMgr->getElement("Carbon"), 0.76);
193  Epoxy->add(m_materialMgr->getElement("Hydrogen"), 0.07);
194  Epoxy->add(m_materialMgr->getElement("Oxygen"), 0.16);
195  m_materialMgr->addMaterial("hgtd", Epoxy);
196 
197  // Hardcoded box parameters taken from geometry db:
198 
199  // Node: HGTDBox BOX DX DY DZ ZPOS MATERIAL
200  m_boxVolPars["HGTDModule0"] = {"HGTDModule0", 11, 20, 1.75, 0, "std::Air"};
201  m_boxVolPars["HGTDModule1"] = {"HGTDModule1", 11, 20, 1.75, 0, "std::Air"};
202  m_boxVolPars["HGTDModule2"] = {"HGTDModule2", 11, 20, 1.75, 0, "std::Air"};
203  m_boxVolPars["HGTDModule3"] = {"HGTDModule3", 11, 20, 1.75, 0, "std::Air"};
204  m_boxVolPars["HGTD::Hybrid"] = {"HGTD::Hybrid", 10.25, 20, .175, 0, "hgtd::CuKapton"};
205  m_boxVolPars["HGTD::GlueSensor"] = {"HGTD::GlueSensor", 10.25, 20, .04, 0, "hgtd::Epoxy"};
206  m_boxVolPars["HGTD::GlueAsic"] = {"HGTD::GlueAsic", 11, 20, .04, 0, "hgtd::Epoxy"};
207  m_boxVolPars["HGTDSiSensor0"] = {"HGTDSiSensor0", 10.25, 20, .025, 0, "std::Silicon"};
208  m_boxVolPars["HGTDSiSensor1"] = {"HGTDSiSensor1", 10.25, 20, .025, 0, "std::Silicon"};
209  m_boxVolPars["HGTDSiSensor2"] = {"HGTDSiSensor2", 10.25, 20, .025, 0, "std::Silicon"};
210  m_boxVolPars["HGTDSiSensor3"] = {"HGTDSiSensor3", 10.25, 20, .025, 0, "std::Silicon"};
211  m_boxVolPars["HGTD::LGADInactive"] = {"HGTD::LGADInactive", 10.25, 20, .1, 0, "std::Silicon"};
212  m_boxVolPars["HGTD::ASIC"] = {"HGTD::ASIC", 11, 20, .15, 0, "std::Silicon"};
213 
214  // Add a dummy entry that will be used to leave some space - no volume will actually be created for this
215  // needed after fix of ASIC thickness (and material) in HGTD-TDR-01 tag (ATLAS-P2-ITK-17-04-02 and later), compared to HGTD-TDR-00
216  double moduleSpaceHalfZ = 0.225;
217  m_boxVolPars["HGTD::ModuleSpace"] = {"HGTD::ModuleSpace", 11, 20, moduleSpaceHalfZ, 0, "std::Air"};
218 
219 
220 
221  // Node: HGTDTubs TUBE RMIN RMAX DZ ZPOS MATERIAL
222  m_cylVolPars["HGTD_mother"] = {"HGTD_mother", 100, 1100, 62.5, -3252, "std::Air"};
223  m_cylVolPars["HGTD::FrontCover"] = {"HGTD::FrontCover", 120, 1000, 7.5, 0, "hgtd::CFiberSupport"};
224  m_cylVolPars["HGTD::FlexPackage"] = {"HGTD::FlexPackage", 120, 660, 2, 0, "std::Air"};
225  m_cylVolPars["HGTD::FlexTube"] = {"HGTD::FlexTube", 120, 660, .175, 0, "hgtd::CuKapton"};
226  m_cylVolPars["HGTD::ModuleLayer0"] = {"HGTD::ModuleLayer0", 120, 660, 3.75, 0, "std::Air"};
227  m_cylVolPars["HGTD::ModuleLayer1"] = {"HGTD::ModuleLayer1", 120, 660, 3.75, 0, "std::Air"};
228  m_cylVolPars["HGTD::ModuleLayer2"] = {"HGTD::ModuleLayer2", 120, 660, 3.75, 0, "std::Air"};
229  m_cylVolPars["HGTD::ModuleLayer3"] = {"HGTD::ModuleLayer3", 120, 660, 3.75, 0, "std::Air"};
230  m_cylVolPars["HGTD::CoolingPlate"] = {"HGTD::CoolingPlate", 120, 920, 3, 0, "std::Aluminium"};
231  m_cylVolPars["HGTD::SupportPlate"] = {"HGTD::SupportPlate", 120, 660, .5, 0, "std::Aluminium"};
232  m_cylVolPars["HGTD::ToleranceFront"] = {"HGTD::ToleranceFront", 120, 660, 1, 0, "std::Air"};
233  m_cylVolPars["HGTD::ToleranceBack"] = {"HGTD::ToleranceBack", 120, 660, 1, 0, "std::Air"};
234  m_cylVolPars["HGTD::ToleranceMid"] = {"HGTD::ToleranceMid", 120, 660, 1, 0, "std::Air"};
235  m_cylVolPars["HGTD::ModeratorIn"] = {"HGTD::ModeratorIn", 120, 900, 15, 0, "hgtd::BoratedPolyethelyne"};
236  m_cylVolPars["HGTD::ModeratorOut"] = {"HGTD::ModeratorOut", 120, 1100, 10, 0, "hgtd::BoratedPolyethelyne"};
237  m_cylVolPars["HGTD::BackCover"] = {"HGTD::BackCover", 120, 1100, 4, 0, "hgtd::CFiberSupport"};
238  m_cylVolPars["HGTD::PeriphElec"] = {"HGTD::PeriphElec", 674, 900, 1, 2, "hgtd::FEBoards"};
239 
240  m_cylVolPars["HGTD::InnerRCover1"] = {"HGTD::InnerRCover1", 110., 111., 105./2, -10., "hgtd::CFRP"};
241  // the InnerRCover bulk should be 70% aerogel and 30% honeycomb made from "aradime" (not defined - using "hgtd::Honeycomb" for now)
242  // proportions should be 50/50 by weight, which is used for GeoMaterial fractions
243  // TODO: these should be double-checked, or at least that the density/weight matches engineering drawings
244  GeoMaterial* innerRCoverBulkMaterial = new GeoMaterial("hgtd::AerogelAndHoneycomb", 0.17*(CLHEP::gram / CLHEP::cm3));
245  innerRCoverBulkMaterial->add(m_materialMgr->getMaterial("std::Aerogel"), 0.5);
246  innerRCoverBulkMaterial->add(m_materialMgr->getMaterial("hgtd::Honeycomb"), 0.5);
247  m_materialMgr->addMaterial("hgtd", innerRCoverBulkMaterial);
248  m_cylVolPars["HGTD::InnerRCover2"] = {"HGTD::InnerRCover2", 111., 119., 105./2, -10., "hgtd::AerogelAndHoneycomb"};
249  m_cylVolPars["HGTD::InnerRCover3"] = {"HGTD::InnerRCover3", 119., 120., 105./2, -10., "hgtd::CFRP"};
250  m_cylVolPars["HGTD::OuterRCover"] = {"HGTD::OuterRCover", 980., 1000., 82./2, -6.5, "hgtd::Peek"};
251  m_cylVolPars["HGTD::PeripheralCoolingLines"] = {"HGTD::PeripheralCoolingLines", 920., 980., 3./2, 31., "std::SSteel"};
252  // TODO: outer cover should be 40% "hgtd::Peek" and 60% electrical connectors (unclear material)
253 
254  m_cylVolPars["HGTD::CoolingTube"] = {"HGTD::CoolingTubes", 0, 0, 2.0, 0, "std::Titanium"};
255  // Coolant should be 50% liquid and 50% gas CO2 ("hgtd::CO2")
256  GeoMaterial* coolantMaterial = new GeoMaterial("hgtd::CO2CoolantMix", 0.55*(CLHEP::gram / CLHEP::cm3));
257  coolantMaterial->add(m_materialMgr->getMaterial("hgtd::CO2_Liquid"), 0.5);
258  coolantMaterial->add(m_materialMgr->getMaterial("hgtd::CO2"), 0.5);
259  m_materialMgr->addMaterial("hgtd", coolantMaterial);
260  m_cylVolPars["HGTD::CoolingTubeFluid"] = {"HGTD::CoolingTubeFluid", 0, 0, 1.5, 0, "hgtd::CO2CoolantMix"};
261 
262 
263 
264  // These parameters were not in the db (they don't fit into the cylinder or box structures used above)
265  m_hgtdPars = { 320., // rMid
266  640., // rOuter - only used in one place, and there 20 mm is added to it...
267  0., // disk1Rotation (in degrees)
268  15., // disk2Rotation (in degrees)
269  1., // rowSpaceSide
270  4., // rowBacksideInnerShift
271  17., // rowBacksideOuterShift
272  1.5, // moduleSpaceInner
273  12.5, // moduleSpaceOuter
274  0.456 // flexSheetSpacing
275  };
276 
277  return;
278 }

◆ mirrorModulesInQuadrant()

PositionsInQuadrant HGTD_DetectorFactory::mirrorModulesInQuadrant ( PositionsInQuadrant  inquad)
private

Definition at line 830 of file HGTD_DetectorFactory.cxx.

830  {
831  PositionsInQuadrant rowsInQuad;
832  for (size_t row = 0; row < inquad.size(); row ++ ) {
833  std::vector<ModulePosition> modulePositions = inquad[ row ];
834  for ( size_t mod = 0; mod < modulePositions.size(); mod++ ) {
835  ModulePosition old = modulePositions[mod];
836  ModulePosition mirror = old;
837  mirror.x = old.y;
838  mirror.y = old.x;
839  mirror.phiRotation = ( old.phiRotation == 0. ? 90. : 0. );
840  modulePositions[mod] = mirror;
841  }
842  // keeping the order defined in HGTD_DetectorFactory::reorderRows
843  rowsInQuad[ inquad.size() - row - 1 ] = modulePositions;
844  }
845  return rowsInQuad;
846 }

◆ mirrorPositionsAroundYaxis()

void HGTD_DetectorFactory::mirrorPositionsAroundYaxis ( std::array< PositionsInQuadrant, 4 > &  arr)
private

Definition at line 1021 of file HGTD_DetectorFactory.cxx.

1021  {
1022  for (auto& layer : arr) {
1023  for (auto& row : layer) {
1024  for (auto& module : row) {
1025  module.x = -module.x;
1026  }
1027  }
1028  }
1029 }

◆ msg()

MsgStream& InDetDD::DetectorFactoryBase::msg ( MSG::Level  lvl) const
inlineinherited

Definition at line 37 of file InDetDetectorFactoryBase.h.

37 { return m_athenaComps->msg(lvl); }

◆ msgLvl()

bool InDetDD::DetectorFactoryBase::msgLvl ( MSG::Level  lvl)
inlineinherited

Definition at line 40 of file InDetDetectorFactoryBase.h.

40 { return m_athenaComps->msgLvl(lvl); }

◆ operator=()

HGTD_DetectorFactory& HGTD_DetectorFactory::operator= ( HGTD_DetectorFactory right)
private

◆ prepareLayersFromQuadrants()

std::array< PositionsInQuadrant, 4 > HGTD_DetectorFactory::prepareLayersFromQuadrants ( unsigned int  nRows)
private

Definition at line 733 of file HGTD_DetectorFactory.cxx.

733  {
734 
735  std::array< PositionsInQuadrant, 4 > positions;
736 
737  // three-ring layout
738  if ( m_geomVersion == 1 ) {
739  // the 1st disk
740  PositionsInQuadrant d0q0front = prepareQuadrantsFromRows( 0, nRows );
741  reorderRows( &d0q0front );
742  PositionsInQuadrant d0q0back = prepareQuadrantsFromRows( 1, nRows );
743  reorderRows( &d0q0back );
744 
745  // the 2nd disk is the same as the 1st, but mirrored
746  PositionsInQuadrant d1q0front = mirrorModulesInQuadrant( d0q0back );
747  PositionsInQuadrant d1q0back = mirrorModulesInQuadrant( d0q0front );
748 
749  positions[ 0 ] = d0q0front; // front-side module positions
750  positions[ 1 ] = d0q0back; // back-side module positions
751  positions[ 2 ] = d1q0front; // front-side module positions
752  positions[ 3 ] = d1q0back; // back-side module positions
753 
754  } else {
755  nRows = 18; // note 21-18 = 3 elements with positions of modules in rows are left empty
756  positions[0] = positions[2] = prepareQuadrantsFromRows(0, nRows ); // front-side module positions
757  positions[1] = positions[3] = prepareQuadrantsFromRows(1, nRows ); // back-side module positions
758  }
759  return positions;
760 }

◆ prepareModulePositionsInRowThreeRing()

std::vector< ModulePosition > HGTD_DetectorFactory::prepareModulePositionsInRowThreeRing ( int  row,
int  back = 0 
)
private

Definition at line 849 of file HGTD_DetectorFactory.cxx.

849  {
850 
851  // below parameters should be collected into xml or RDB
852  int index_XYcoord_change = 14;
853 
854  // height is the short edge of module, width is the longer edge
855  float halfWidth = .5*40., halfHeight = .5*21.8; // bare module
856  float midR = 230., midR2 = 470.5, maxRcut = 660., maxOuterR = 670.;
857  // special tweak needed to avoid overlapping holes on front and back
858  if (row == 21 and back==1) {
859  midR2 = 510.;
860  }
861  float readoutRowSpace = 1.0;
862  bool extrude = ( ( row == 6 || row == 18 ) && !back ) || // front side
863  ( ( row == 2 || row == 11 || row == 12 || row == 17 ) && back ); // back side
864 
865  // instead of attempting to re-calculate the leading module per row, just pick up from dataBase,
866  // numbers here taken from spreadsheet at https://cernbox.cern.ch/index.php/s/PPXEWSBnBjwI7UU
867  std::array< float, 22 > ModStarting = { 122., 122.7, 89.85, 123.5, 175.4, 257.4, 287.5, 298.4, 287.5, 304.5, 287.5, 304.5, 287.5, 0.0, 299.7,
868  130., 114.7, 131.45, 164.45, 216.35, 205.45, 257.35 };
869 
870  std::array< float, 22 > ModStartBack = { 130., 114.7, 97.85, 131.5, 164.5, 246.5, 298.4, 287.5, 298.4, 287.5, 304.5, 287.5, 304.5, 0.0, 287.5,
871  122., 122.7, 123.45, 172.45, 205.45, 216.35, 246.45 };
872  /* row == 13 will be skipped from outside, and, since row == 15 XY flip take place. */
873 
874  // this is a bit hacky for this layout, a db-based solution will help in the future
875  int useCorner = 0;
876  if ( ( ( row == 1 || row == 5 || row == 15 || row == 19 ) && ! back ) || // front side
877  ( ( row == 0 || row == 8 || row == 16 || row == 18 || row == 21 ) && back ) // back side
878  ) useCorner = 1;
879  if ( row == 17 ) useCorner = 2;
880  // in some exceptional cases the spacing will be smaller even though the module crossed the ring boundary
881  float backshift = 6.;
882 
883  // the new layout tune makes small adjustments (usually 2~3 mm) for the last modules of some rows.
884  // even though most of element is zero for most of modules, we store these adjustments in a 2D array for now
885  float tailModCorrection[ 22 ][ 19 ];
886  for ( int r = 0; r < 22; r ++ )
887  for ( int m = 0; m < 19; m ++ ) tailModCorrection[r][m] = 0.;
888  tailModCorrection[11][4] = tailModCorrection[12][2] = 10.;
889 
890  // TDR layout: spaceSmallR = 5.5 , spaceMediumR = 8.4 , spaceLargeR = 14.5
891  float spaceSmallR = 3.7 , spaceMediumR = 6.6, spaceLargeR = 12.7; // updated spacings from post-TDR developments
892 
893  float backsideSmallR = spaceSmallR;
894  float backsideMediumR = spaceMediumR;
895  float backsideLargeR = spaceLargeR;
896 
897  float extendedWidth = readoutRowSpace + 2.*halfWidth;
898 
899  float posRadius = 0.;
900  float posOfLastPlacedModule = 0.; // start with dummy position
901  int moduleCounter = 0;
902  std::vector< ModulePosition > rowModulePositions;
903 
904  float effectiveRow = row;
905  // note the flipping of effectiveRow, it is the cause of XY flipping in later occurrance
906  if ( row == index_XYcoord_change ) effectiveRow = 13;
907  if ( row > index_XYcoord_change ) effectiveRow -= ( index_XYcoord_change + 1 );
908 
909  // x coordinate for vertical rows
910  float rowCentPos = 0.5*extendedWidth*( 2*effectiveRow + 1 );
911 
912  if ( extrude ) maxRcut = maxOuterR;
913  while ( posRadius < maxRcut ) {
914  // horizontal rows need care (restart from other edge of quadrant), this variable helps get the inner radius right
915  // y coordinate for vertical rows, then x coordinate for modules
916  float modPos_row = -999.;
917 
918  // for the first module in each row, take the starting position from the arrays created earlier from the spreadsheet
919  if ( moduleCounter == 0 ) { // leading module per row
920  modPos_row = ( back ? ModStartBack[row] : ModStarting[row] );
921  modPos_row += halfHeight;
922  }
923  // the rest of the modules follow sequential, radius-dependent placement rules
924  else {
925  float prevX = rowModulePositions[ moduleCounter - 1 ].x;
926  float prevY = rowModulePositions[ moduleCounter - 1 ].y;
927  float spacing = back ? backsideSmallR : spaceSmallR;
928 
929  // increase the spacing by the ring it will fallin
930  float ringCrossRcorner = std::sqrt( ( prevY + halfHeight)*( prevY + halfHeight) +
931  ( prevX + halfWidth )*( prevX + halfWidth ) );
932  float ringCrossRcenter = std::sqrt( prevY*prevY + prevX*prevX );
933 
934  bool tuned_center = ( row == 3 && ( moduleCounter == 3 && !back ) ) || // front, row 3
935  ( row == 20 && moduleCounter == 8 && !back ) || // front, row 20
936  ( row == 21 && moduleCounter == 6 && back ); // back, row 21
937  if ( useCorner == 2 ) {
938  if ( ( moduleCounter == 3 && ! back ) || ( ( moduleCounter == 3 || moduleCounter == 4 ) && back ) ) {
939  ringCrossRcenter -= backshift;
940  if ( ringCrossRcenter > midR && ringCrossRcenter <= midR2 ) spacing = back ? backsideMediumR : spaceMediumR;
941  if ( ringCrossRcenter > midR2 ) spacing = back ? backsideLargeR : spaceLargeR;
942  }
943  else {
944  if ( ringCrossRcorner > midR && ringCrossRcorner <= midR2 ) spacing = back ? backsideMediumR : spaceMediumR;
945  if ( ringCrossRcorner > midR2 ) spacing = back ? backsideLargeR : spaceLargeR;
946  }
947  }
948  else if ( useCorner == 1 ) {
949  if ( ringCrossRcorner > midR && ringCrossRcorner <= midR2 ) spacing = back ? backsideMediumR : spaceMediumR;
950  if ( ringCrossRcorner > midR2 ) spacing = back ? backsideLargeR : spaceLargeR;
951  }
952  else {
953  if ( tuned_center ) ringCrossRcenter -= backshift;
954  if ( ringCrossRcenter > midR && ringCrossRcenter <= midR2 ) spacing = back ? backsideMediumR : spaceMediumR;
955  if ( ringCrossRcenter > midR2 ) spacing = back ? backsideLargeR : spaceLargeR;
956  }
957 
958  modPos_row = posOfLastPlacedModule + 2.*halfHeight + spacing;
959 
960  if ( back && moduleCounter < 19) modPos_row -= tailModCorrection[ row ][ moduleCounter ];
961 
962  } // endif non-leading module
963 
964  // check and limit the length of the row
965  posRadius = std::sqrt( ( rowCentPos + halfWidth )*( rowCentPos + halfWidth ) +
966  ( modPos_row + halfHeight)*( modPos_row + halfHeight ) );
967  if ( posRadius > maxRcut ) {
968  ATH_MSG_DEBUG(" row " << row <<" finished with " << moduleCounter <<" modules ");
969  break;
970  }
971 
972  // the X and Y coordinates need to be flipped if this row is horizontal,
973  // needed only for backwards compatibility for two-ring layout
974  ModulePosition modu = { modPos_row, rowCentPos, 0., false, row, moduleCounter };
975  ModulePosition moduFlipped = { rowCentPos, modPos_row, 90., true, row, moduleCounter };
976 
977  // eventually arrived at a module to append into this row
978  if ( row > index_XYcoord_change ) rowModulePositions.push_back( modu );
979  else rowModulePositions.push_back( moduFlipped );
980 
981  // the spreadsheet gave the center of bottom edge of a module, so an adjustment by halfHeight is needed
982  if ( m_outputIdfr ) ATH_MSG_DEBUG( " Row " << ( row <= index_XYcoord_change ? effectiveRow + 1 : 36 - row )
983  << " Module " << moduleCounter + 1 <<" at (x,y) : "
984  << ( row > index_XYcoord_change ? rowModulePositions.back().x - halfHeight : rowModulePositions.back().x ) << ", "
985  << ( row > index_XYcoord_change ? rowModulePositions.back().y : rowModulePositions.back().y - halfHeight ) );
986 
987  posOfLastPlacedModule = modPos_row;
988  moduleCounter ++;
989  } // endof while loop
990 
991  if ( m_outputIdfr ) std::cout << "Total #Module " << rowModulePositions.size() <<" at original row " << row << std::endl;
992 
993  return rowModulePositions;
994 }

◆ prepareModulePositionsInRowTwoRing()

std::vector< ModulePosition > HGTD_DetectorFactory::prepareModulePositionsInRowTwoRing ( int  row,
bool  back = false 
)
private

Definition at line 1072 of file HGTD_DetectorFactory.cxx.

1072  {
1073 
1074  unsigned int module = 0;
1075  std::vector<ModulePosition> modulePositions;
1076  double posOfLastPlacedModule = 0.;
1077 
1078  while (true) {
1079  //ATH_MSG_INFO) << "Will now place module " << module );
1080  // horizontal rows need care (restart from other edge of quadrant), this variable helps get the inner radius right
1081  // in quadrant 0 - ie top right quadrant
1082  // row 0 = bottom horizontal row. numbering grows upwards and counterclockwise; row 17=leftmost vertical row
1083  // rowForInnerRadius = 0-1 for vertical rows too
1084  int rowForInnerRadius = row; // because row 16-17 are equivalent to 0-1 regarding module placement
1085  if (row == 17) rowForInnerRadius = 0;
1086  if (row == 16) rowForInnerRadius = 1;
1087 
1088  // params needed frequently below
1089  double moduleWidth = m_boxVolPars["HGTDModule0"].yHalf*2;
1090  double moduleHeight = m_boxVolPars["HGTDModule0"].xHalf*2;
1091  double rInner = m_cylVolPars["HGTD::ModuleLayer0"].rMin;
1092  double rMid = m_hgtdPars.rMid;
1093  double rOuter = m_hgtdPars.rOuter;
1094  double rowSpaceSide = m_hgtdPars.rowSpaceSide;
1095 
1096  // x coordinate for vertical rows
1097  double rowCenterPos = (moduleWidth + rowSpaceSide)*(rowForInnerRadius + 0.5);
1098  // y coordinate for vertical rows
1099  double modulePosAlongRow = -99.; // mock value for now
1100  // for the first module, pick the right starting point
1101  if (module == 0) {
1102  // start at inner radius and include any offset for backside.
1103  if (rowForInnerRadius < 3) {
1104  modulePosAlongRow = std::sqrt( pow(rInner, 2) - pow((moduleWidth + rowSpaceSide)*rowForInnerRadius, 2) )
1105  + back*m_hgtdPars.rowBacksideInnerShift + moduleHeight/2;
1106  }
1107  else { // later modules start at 2*moduleWidth, with offset for the backside
1108  double backSpacing = m_hgtdPars.rowBacksideInnerShift;
1109  if (back && (rowCenterPos - moduleWidth/2 > rMid)) {
1110  backSpacing = m_hgtdPars.rowBacksideOuterShift;
1111  }
1112  modulePosAlongRow = 2*(moduleWidth + rowSpaceSide) + moduleHeight/2 + back*backSpacing;
1113  }
1114  }
1115  // the rest of the modules follow sequential, radius-dependent placement rules
1116  else {
1117  // cppcheck-suppress containerOutOfBounds; false positive
1118  ModulePosition prev = modulePositions.back();
1119  double spacing = m_hgtdPars.moduleSpaceInner;
1120  // if the previous module was completely outside rMid, increase the spacing
1121  // (+1 mm is a needed shift for full coverage - could need tweaking if layout parameters change!)
1122  float innermostCornerR = std::sqrt( pow(prev.y - moduleHeight/2, 2) + pow(prev.x - moduleWidth/2, 2) ) + 1.;
1123  if (innermostCornerR > rMid) {
1124  spacing = m_hgtdPars.moduleSpaceOuter;
1125  }
1126  // for the back the large spacing starts as soon as the space would entirely be outside R = 320 mm
1127  if (back) {
1128  double startOfSpaceAlongRow = std::sqrt( pow(prev.y + moduleHeight/2, 2) + pow(prev.x - moduleWidth/2, 2) ) - 2;
1129  if (startOfSpaceAlongRow > rMid) {
1130  spacing = m_hgtdPars.moduleSpaceOuter;
1131  }
1132  }
1133  // correction to the first two spaces on the front side, compensating for the 2 mm introduced at beginning of a row
1134  if (!back && rowForInnerRadius < 8 && module < 3) {
1135  spacing -= 1.; // should result in 3 mm instead of 4 mm for innermost spaces on rows starting at R = 120
1136  }
1137  // squeeze in a few more modules at the end of some rows
1138  double maxRcut = rOuter+20;
1139  if(row == 8 || row == 9 || row == 10) {
1140  maxRcut = 661;
1141  if(row == 8 && module > 12) spacing -= 4;
1142  }
1143  else if ( row == 11 && module > 9) {
1144  maxRcut = 662;
1145  spacing -= 6;
1146  }
1147  else if (row == 12 && back) {
1148  maxRcut = 665;
1149  }
1150  else if(row == 13 && module > 5) {
1151  maxRcut = 666;
1152  if (!back && module > 6 ) spacing -= 8.5;
1153  else if (back && module > 5) spacing -= 2;
1154  }
1155  else if (row == 14 && module > 3) {
1156  maxRcut = 665;
1157  spacing -= 5;
1158  }
1159  else if (row == 15) {
1160  maxRcut = 669;
1161  spacing -= 5.5;
1162  }
1163  modulePosAlongRow = posOfLastPlacedModule + moduleHeight + spacing;
1164  // stop if the next module will extend outside the max allowed radius
1165  // HC max radius is 665
1166  if ( std::sqrt( pow(rowCenterPos + moduleWidth/2, 2) + pow(modulePosAlongRow + moduleHeight/2, 2) ) > maxRcut) {
1167  break;
1168  }
1169  }
1170  ModulePosition m = {rowCenterPos, modulePosAlongRow, 0, true, row, (int)module};
1171  modulePositions.push_back(m);
1172  posOfLastPlacedModule = modulePosAlongRow;
1173  module += 1;
1174  } // end of loop over modules
1175 
1176  // finally, flip x and y for all modules if this row is horizontal
1177  if (row < 16) {
1178  // ATH_MSG_INFO) << "Flipping x and y for modules in row " << row );
1179  for (size_t i=0; i < modulePositions.size(); i++) {
1180  ModulePosition old = modulePositions[i];
1181  ModulePosition rotated = old;
1182  rotated.x = old.y;
1183  rotated.y = old.x;
1184  rotated.flipped = !old.flipped;
1185  rotated.row = old.row;
1186  rotated.el_in_row = old.el_in_row;
1187  modulePositions[i] = rotated;
1188  }
1189  }
1190 
1191  ATH_MSG_DEBUG( "row = " << row );
1192  for(size_t i=0; i < modulePositions.size(); i++) {
1193  ATH_MSG_DEBUG( "Module " << i << " at (x,y) = (" << modulePositions[i].x << "," << modulePositions[i].y << ")" );
1194  }
1195 
1196  return modulePositions;
1197 }

◆ prepareQuadrantsFromRows()

PositionsInQuadrant HGTD_DetectorFactory::prepareQuadrantsFromRows ( int  layer,
unsigned int  maxRow 
)
private

Definition at line 808 of file HGTD_DetectorFactory.cxx.

808  {
809 
810  PositionsInQuadrant rowsInQuad;
811  bool isBackside = (layer % 2);
812  // three-ring layout
813  if ( m_geomVersion == 1 ) {
814  for (size_t row = 0; row <= maxRow; row++) {
815  if ( row == 13 ) continue; // element #21 is tried since one row is skipped
816  std::vector<ModulePosition> rowModulePositions = prepareModulePositionsInRowThreeRing( row, isBackside );
817  rowsInQuad[ row > 13 ? row - 1 : row ] = rowModulePositions;
818  }
819  }
820  // two-ring layout
821  else {
822  for (size_t row = 0; row < maxRow; row++) {
823  std::vector<ModulePosition> rowModulePositions = prepareModulePositionsInRowTwoRing(row, isBackside);
824  rowsInQuad[ row ] = rowModulePositions;
825  }
826  }
827  return rowsInQuad;
828 }

◆ rdbAccessSvc()

IRDBAccessSvc* InDetDD::DetectorFactoryBase::rdbAccessSvc ( )
inlineinherited

Definition at line 32 of file InDetDetectorFactoryBase.h.

32 {return m_athenaComps->rdbAccessSvc();}

◆ reorderRows()

int HGTD_DetectorFactory::reorderRows ( PositionsInQuadrant quadrant)
private

Definition at line 1002 of file HGTD_DetectorFactory.cxx.

1002  {
1003 
1004  PositionsInQuadrant tmpQuadrant;
1005  int xchng = 0;
1006  unsigned int numrow = quadrant->size();
1007  for ( unsigned int r = 0; r < numrow; r ++ ) {
1008  unsigned int idx = r > 13 ? 13 + numrow - r : r;
1009  ATH_MSG_DEBUG( " original row " << ( r <= 12 ? r : r + 1 ) <<" new row " << idx + 1
1010  << " : "<< numrow );
1011  tmpQuadrant[ idx ] = quadrant->at( r );
1012  if ( idx != r ) xchng++;
1013  }
1014  // refill the quadrant
1015  for ( unsigned int r = 0; r < numrow; r++ )
1016  quadrant->at( r ) = tmpQuadrant[ numrow - 1 - r ];
1017 
1018  return xchng;
1019 }

◆ setPrintIdentifierDict()

void HGTD_DetectorFactory::setPrintIdentifierDict ( bool  print)

Definition at line 82 of file HGTD_DetectorFactory.cxx.

82  {
84  return;
85 }

Member Data Documentation

◆ m_athComps

HGTD_GeoModelAthenaComps* HGTD_DetectorFactory::m_athComps
private

Definition at line 112 of file HGTD_DetectorFactory.h.

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::m_athenaComps
privateinherited

Definition at line 46 of file InDetDetectorFactoryBase.h.

◆ m_boxVolPars

std::map<std::string,GeoBoxVolParams> HGTD_DetectorFactory::m_boxVolPars
private

Definition at line 121 of file HGTD_DetectorFactory.h.

◆ m_commonItems

std::unique_ptr<const InDetDD::SiCommonItems> HGTD_DetectorFactory::m_commonItems
private

Definition at line 124 of file HGTD_DetectorFactory.h.

◆ m_cylVolPars

std::map<std::string,GeoCylVolParams> HGTD_DetectorFactory::m_cylVolPars
private

Definition at line 120 of file HGTD_DetectorFactory.h.

◆ m_detectorManager

HGTD_DetectorManager* HGTD_DetectorFactory::m_detectorManager
private

Definition at line 111 of file HGTD_DetectorFactory.h.

◆ m_geomVersion

int HGTD_DetectorFactory::m_geomVersion
private

Definition at line 115 of file HGTD_DetectorFactory.h.

◆ m_hgtdPars

HgtdGeoParams HGTD_DetectorFactory::m_hgtdPars
private

Definition at line 122 of file HGTD_DetectorFactory.h.

◆ m_materialMgr

StoredMaterialManager* HGTD_DetectorFactory::m_materialMgr
private

Definition at line 113 of file HGTD_DetectorFactory.h.

◆ m_outputIdfr

bool HGTD_DetectorFactory::m_outputIdfr
private

Definition at line 118 of file HGTD_DetectorFactory.h.


The documentation for this class was generated from the following files:
plotting.yearwise_luminosity_vs_mu.comp
comp
Definition: yearwise_luminosity_vs_mu.py:24
query_example.row
row
Definition: query_example.py:24
beamspotman.r
def r
Definition: beamspotman.py:676
GeoCylVolParams::rMin
double rMin
Definition: HGTD_DetectorFactory.h:51
InDetDD::DetectorFactoryBase
Definition: InDetDetectorFactoryBase.h:20
HGTD_DetectorFactory::reorderRows
int reorderRows(PositionsInQuadrant *quadrant)
Definition: HGTD_DetectorFactory.cxx:1002
GeoCylVolParams::name
std::string name
Definition: HGTD_DetectorFactory.h:50
HGTD_DetectorFactory::build
GeoVPhysVol * build(const GeoLogVol *logicalEnvelope, bool bPos)
Definition: HGTD_DetectorFactory.cxx:296
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
HGTD_ID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: HGTD_ID.h:404
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
HgtdGeoParams::disk2Rotation
double disk2Rotation
Definition: HGTD_DetectorFactory.h:30
HGTD_DetectorFactory::m_athComps
HGTD_GeoModelAthenaComps * m_athComps
Definition: HGTD_DetectorFactory.h:112
GeoCylVolParams
Definition: HGTD_DetectorFactory.h:49
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ModulePosition::phiRotation
double phiRotation
Definition: HGTD_DetectorFactory.h:42
InDetDD::DetectorDesign::yAxis
@ yAxis
Definition: DetectorDesign.h:60
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
cm3
#define cm3
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
HGTD_DetectorFactory::m_cylVolPars
std::map< std::string, GeoCylVolParams > m_cylVolPars
Definition: HGTD_DetectorFactory.h:120
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDetDD::PixelDiodeMatrix::construct
static std::shared_ptr< const PixelDiodeMatrix > construct(double phiWidth, double etaWidth)
Construct method for just a single cell.
Definition: PixelDiodeMatrix.cxx:14
deg
#define deg
Definition: SbPolyhedron.cxx:17
HgtdGeoParams::rowSpaceSide
double rowSpaceSide
Definition: HGTD_DetectorFactory.h:31
InDetDD::DetectorDesign::Axis
Axis
Definition: DetectorDesign.h:59
python.SystemOfUnits.gram
int gram
Definition: SystemOfUnits.py:165
PositionsInQuadrant
std::array< std::vector< ModulePosition >, 21 > PositionsInQuadrant
Definition: HGTD_DetectorFactory.h:67
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
HGTD_DetectorFactory::m_geomVersion
int m_geomVersion
Definition: HGTD_DetectorFactory.h:115
HgtdGeoParams::moduleSpaceInner
double moduleSpaceInner
Definition: HGTD_DetectorFactory.h:34
HGTD_GeoModelAthenaComps::getIdHelper
const HGTD_ID * getIdHelper() const
Definition: HGTD_GeoModelAthenaComps.cxx:19
HgtdGeoParams::flexSheetSpacing
double flexSheetSpacing
Definition: HGTD_DetectorFactory.h:36
x
#define x
HGTD_DetectorFactory::prepareLayersFromQuadrants
std::array< PositionsInQuadrant, 4 > prepareLayersFromQuadrants(unsigned int)
Definition: HGTD_DetectorFactory.cxx:733
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
HGTD_ID::wafer_id
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
Definition: HGTD_ID.h:287
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
InDetDD::PixelDiodeMatrix::phiDir
@ phiDir
Definition: PixelDiodeMatrix.h:97
TRT::Hit::side
@ side
Definition: HitInfo.h:83
HGTD_DetectorFactory::m_commonItems
std::unique_ptr< const InDetDD::SiCommonItems > m_commonItems
Definition: HGTD_DetectorFactory.h:124
python.PyAthena.module
module
Definition: PyAthena.py:134
HGTD_DetectorFactory::buildEndcapLogicalVolume
GeoLogVol * buildEndcapLogicalVolume(bool isPositiveSide)
Definition: HGTD_DetectorFactory.cxx:281
ModulePosition
Definition: HGTD_DetectorFactory.h:39
HgtdGeoParams::moduleSpaceOuter
double moduleSpaceOuter
Definition: HGTD_DetectorFactory.h:35
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
HGTD_DetectorFactory::m_outputIdfr
bool m_outputIdfr
Definition: HGTD_DetectorFactory.h:118
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
InDetDD::DetectorFactoryBase::detStore
StoreGateSvc * detStore()
Definition: InDetDetectorFactoryBase.h:27
ModulePosition::y
double y
Definition: HGTD_DetectorFactory.h:41
HGTD_DetectorFactory::m_detectorManager
HGTD_DetectorManager * m_detectorManager
Definition: HGTD_DetectorFactory.h:111
lumiFormat.i
int i
Definition: lumiFormat.py:92
GeoCylVolParams::rMax
double rMax
Definition: HGTD_DetectorFactory.h:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
HGTD_DetectorManager::addTreeTop
void addTreeTop(PVConstLink treeTop)
Add a Tree top:
Definition: HGTD_DetectorManager.cxx:53
StoredMaterialManager::addMaterial
virtual void addMaterial(const std::string &space, GeoMaterial *material)=0
HGTD_DetectorFactory::prepareModulePositionsInRowTwoRing
std::vector< ModulePosition > prepareModulePositionsInRowTwoRing(int row, bool back=false)
Definition: HGTD_DetectorFactory.cxx:1072
HGTD_ID
Definition: HGTD_ID.h:47
ModulePosition::flipped
bool flipped
Definition: HGTD_DetectorFactory.h:44
HGTD_DetectorFactory::m_materialMgr
StoredMaterialManager * m_materialMgr
Definition: HGTD_DetectorFactory.h:113
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
ModulePosition::x
double x
Definition: HGTD_DetectorFactory.h:40
GeoCylVolParams::zHalf
double zHalf
Definition: HGTD_DetectorFactory.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
HGTD_DetectorManager::addDetectorElement
void addDetectorElement(InDetDD::HGTD_DetectorElement *element)
Add elememts.
Definition: HGTD_DetectorManager.cxx:94
HGTD_DetectorFactory::mirrorModulesInQuadrant
PositionsInQuadrant mirrorModulesInQuadrant(PositionsInQuadrant)
Definition: HGTD_DetectorFactory.cxx:830
HgtdGeoParams::rMid
double rMid
Definition: HGTD_DetectorFactory.h:27
HGTD_DetectorFactory::createHgtdDesign
InDetDD::HGTD_ModuleDesign * createHgtdDesign(double thickness)
Definition: HGTD_DetectorFactory.cxx:1032
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
HGTD_DetectorFactory::m_hgtdPars
HgtdGeoParams m_hgtdPars
Definition: HGTD_DetectorFactory.h:122
HGTD_DetectorFactory::prepareModulePositionsInRowThreeRing
std::vector< ModulePosition > prepareModulePositionsInRowThreeRing(int row, int back=0)
Definition: HGTD_DetectorFactory.cxx:849
GeoCylVolParams::material
std::string material
Definition: HGTD_DetectorFactory.h:55
HgtdGeoParams::disk1Rotation
double disk1Rotation
Definition: HGTD_DetectorFactory.h:29
GeoCylVolParams::zOffsetLocal
double zOffsetLocal
Definition: HGTD_DetectorFactory.h:54
ModulePosition::row
int row
Definition: HGTD_DetectorFactory.h:45
python.PyAthena.v
v
Definition: PyAthena.py:157
HGTD_DetectorFactory::m_boxVolPars
std::map< std::string, GeoBoxVolParams > m_boxVolPars
Definition: HGTD_DetectorFactory.h:121
y
#define y
InDetDD::AthenaComps::geomDB
const IGeometryDBSvc * geomDB() const
Definition: InDetDDAthenaComps.h:63
HgtdGeoParams::rowBacksideInnerShift
double rowBacksideInnerShift
Definition: HGTD_DetectorFactory.h:32
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
HGTD_DetectorManager::setCommonItems
void setCommonItems(std::unique_ptr< const InDetDD::SiCommonItems > &&commonItems)
Set SiCommonItems.
Definition: HGTD_DetectorManager.cxx:129
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
HGTD_DetectorFactory::initializeGeoParameters
void initializeGeoParameters()
Definition: HGTD_DetectorFactory.cxx:128
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
InDetDD::DetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetDetectorFactoryBase.h:46
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
HGTD_DetectorFactory::formModuleName
std::string formModuleName(int layer, int quadrant, unsigned int maxrows, int row, int mod, const ModulePosition &module, double &myx, double &myy, double &myrot, int &phi, int &eta)
Definition: HGTD_DetectorFactory.cxx:765
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
HGTD_DetectorFactory::prepareQuadrantsFromRows
PositionsInQuadrant prepareQuadrantsFromRows(int layer, unsigned int maxRow)
Definition: HGTD_DetectorFactory.cxx:808
extractSporadic.q
list q
Definition: extractSporadic.py:98
InDetDD::HGTD_ModuleDesign
Definition: HGTD_ModuleDesign.h:43
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDetDD::AthenaComps::detStore
const StoreGateSvc * detStore() const
Definition: InDetDDAthenaComps.h:53
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74
HgtdGeoParams::rOuter
double rOuter
Definition: HGTD_DetectorFactory.h:28
ModulePosition::el_in_row
int el_in_row
Definition: HGTD_DetectorFactory.h:46
HgtdGeoParams::rowBacksideOuterShift
double rowBacksideOuterShift
Definition: HGTD_DetectorFactory.h:33
python.compressB64.c
def c
Definition: compressB64.py:93
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
HGTD_DetectorFactory::mirrorPositionsAroundYaxis
void mirrorPositionsAroundYaxis(std::array< PositionsInQuadrant, 4 > &arr)
Definition: HGTD_DetectorFactory.cxx:1021
InDetDD::PixelDiodeMatrix::etaDir
@ etaDir
Definition: PixelDiodeMatrix.h:97