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

Diamond Beam Monitor detector builder. More...

#include <DBM_Det.h>

Inheritance diagram for DBM_Det:
Collaboration diagram for DBM_Det:

Public Member Functions

 DBM_Det (InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * >> mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * >> mapAX)
 
virtual GeoVPhysVol * Build () override
 

Protected Attributes

PixelGeometryManagerm_gmt_mgr
 
InDetMaterialManagerm_mat_mgr
 
InDetDD::PixelDetectorManagerm_DDmgr
 
GeoModelIO::ReadGeoModel * m_sqliteReader
 
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
 
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
 
const double m_epsilon
 

Private Attributes

std::vector< double > m_module [4]
 

Detailed Description

Diamond Beam Monitor detector builder.

Definition at line 15 of file DBM_Det.h.

Constructor & Destructor Documentation

◆ DBM_Det()

DBM_Det::DBM_Det ( InDetDD::PixelDetectorManager ddmgr,
PixelGeometryManager mgr,
GeoModelIO::ReadGeoModel *  sqliteReader,
std::shared_ptr< std::map< std::string, GeoFullPhysVol * >>  mapFPV,
std::shared_ptr< std::map< std::string, GeoAlignableTransform * >>  mapAX 
)

Definition at line 20 of file DBM_Det.cxx.

25  : GeoVPixelFactory(ddmgr,mgr,sqliteReader, std::move(mapFPV), std::move(mapAX))
26 {
27  double Trans_Y = 0.;
28 
29  // Radius to beamline
30  // Hardcoded, so if change then change in DBM_module too
31  double trans_rad = 46.678*Gaudi::Units::mm + (m_gmt_mgr->DBMTelescopeY()) / 2.; // 10-Gaudi::Units::degree version
32 
33  // TRANS_X TRANS_Y TRANS_Z ROT_X ROT_Y ROT_Z
34  m_module[0].push_back(trans_rad); m_module[0].push_back(0); m_module[0].push_back(Trans_Y); m_module[0].push_back(0); m_module[0].push_back(0); m_module[0].push_back(270);
35  m_module[1].push_back(0); m_module[1].push_back(trans_rad); m_module[1].push_back(Trans_Y); m_module[1].push_back(0); m_module[1].push_back(0); m_module[1].push_back(0);
36  m_module[2].push_back(-trans_rad); m_module[2].push_back(0); m_module[2].push_back(Trans_Y); m_module[2].push_back(0); m_module[2].push_back(0); m_module[2].push_back(90);
37  m_module[3].push_back(0); m_module[3].push_back(-trans_rad); m_module[3].push_back(Trans_Y); m_module[3].push_back(0); m_module[3].push_back(0); m_module[3].push_back(180);
38 
39 }

Member Function Documentation

◆ Build()

GeoVPhysVol * DBM_Det::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 41 of file DBM_Det.cxx.

42 {
43  GeoFullPhysVol* Phys{nullptr};
44  if(!m_sqliteReader) {
45  double safety = 0.001;
46 
47  //create a cylinder 8mm smaller than the BPSS outer radius to place the 4 DBM telescopes
48  double rmin = 45.*Gaudi::Units::mm;//41.0*Gaudi::Units::mm;
49  double rmax = 150.*Gaudi::Units::mm; //244.*Gaudi::Units::mm;
50  double halflength = m_gmt_mgr->DBMTelescopeZ()/2.;//200.*Gaudi::Units::mm
51  GeoTube * Shape = new GeoTube(rmin,rmax,halflength);
52  const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air");
53  const GeoLogVol* Log = new GeoLogVol("OutsideDBM",Shape,air);
54  Phys = new GeoFullPhysVol(Log);
55 
56  // add PP0 board
58  GeoVPhysVol* pp0BoardPhys = pp0Board.Build();
59  GeoTrf::Translate3D pp0Pos(0., 0., -halflength + m_gmt_mgr->DBMPP0Thick()/2. + safety);
60  GeoTransform* pp0xform = new GeoTransform(pp0Pos);
61  GeoNameTag* pp0tag = new GeoNameTag("DBM_PP0");
62  Phys->add(pp0tag);
63  Phys->add(pp0xform);
64  Phys->add(pp0BoardPhys);
65  }
66 
67  //we are now adding four DBM telescopes
69  for(int i=0; i<4; i++)
70  {
71  m_gmt_mgr->SetEta(0);
72  m_gmt_mgr->SetPhi(i);
73  // Fixing swaping of module 0 and 2 on side C (-4)
74  // sinceDBM side C is 180deg rotation around global Y
75  if ((m_gmt_mgr->GetSide() < 0) && (i == 0)) m_gmt_mgr->SetPhi(2);
76  else if ((m_gmt_mgr->GetSide() < 0) && (i == 2)) m_gmt_mgr->SetPhi(0);
77 
78  //setting transformation
79  if(m_sqliteReader) {
80  dbm.Build();
81  }
82  else {
83  GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(m_module[i].at(5)*Gaudi::Units::deg)
84  * GeoTrf::RotateY3D(m_module[i].at(4)*Gaudi::Units::deg)
85  * GeoTrf::RotateX3D(m_module[i].at(3)*Gaudi::Units::deg);
86  GeoTrf::Translation3D pos(m_module[i].at(0), m_module[i].at(1), m_module[i].at(2));
87  GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm));
88 
89  GeoNameTag* tag = new GeoNameTag("DBM Module");
90  GeoVPhysVol* dbmModPhys = dbm.Build();
91  Phys->add(tag);
92  Phys->add(new GeoIdentifierTag(i));
93  Phys->add(xform);
94  Phys->add(dbmModPhys);
95  }
96  }
97 
98 
99  // Set numerology for the full DBM system
100 
101  if(m_DDmgr->numerology().numEndcapsDBM()==0){
102 
103  int numDisk=3;
104  int numPhiModules=4;
105  m_DDmgr->numerology().setNumDisksDBM(numDisk);
109  for(int disk=0; disk<numDisk; disk++){
110  m_DDmgr->numerology().setNumPhiModulesForDiskRingDBM(disk, 0, numPhiModules);
111  }
112  }
113 
114  if(m_sqliteReader) {
115  std::string key="DBM_Det_"+std::to_string(m_gmt_mgr->GetLD())+"_"+std::to_string(m_gmt_mgr->Phi())+"_"+std::to_string(m_gmt_mgr->Eta());
116  return (*m_mapFPV)[key];
117  }
118  else {
119  return Phys;
120  }
121 }

Member Data Documentation

◆ m_DDmgr

InDetDD::PixelDetectorManager* GeoVPixelFactory::m_DDmgr
protectedinherited

Definition at line 45 of file GeoVPixelFactory.h.

◆ m_epsilon

const double GeoVPixelFactory::m_epsilon
protectedinherited

Definition at line 49 of file GeoVPixelFactory.h.

◆ m_gmt_mgr

PixelGeometryManager* GeoVPixelFactory::m_gmt_mgr
protectedinherited

Definition at line 43 of file GeoVPixelFactory.h.

◆ m_mapAX

std::shared_ptr<std::map<std::string, GeoAlignableTransform*> > GeoVPixelFactory::m_mapAX
protectedinherited

Definition at line 48 of file GeoVPixelFactory.h.

◆ m_mapFPV

std::shared_ptr<std::map<std::string, GeoFullPhysVol*> > GeoVPixelFactory::m_mapFPV
protectedinherited

Definition at line 47 of file GeoVPixelFactory.h.

◆ m_mat_mgr

InDetMaterialManager* GeoVPixelFactory::m_mat_mgr
protectedinherited

Definition at line 44 of file GeoVPixelFactory.h.

◆ m_module

std::vector<double> DBM_Det::m_module[4]
private

Definition at line 25 of file DBM_Det.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* GeoVPixelFactory::m_sqliteReader
protectedinherited

Definition at line 46 of file GeoVPixelFactory.h.


The documentation for this class was generated from the following files:
PixelGeometryManager::SetEta
virtual void SetEta(int eta)=0
PixelGeometryManager::DBMTelescopeZ
virtual double DBMTelescopeZ()=0
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
InDetDD::SiNumerology::numEndcapsDBM
int numEndcapsDBM() const
DBM_Det::m_module
std::vector< double > m_module[4]
Definition: DBM_Det.h:25
deg
#define deg
Definition: SbPolyhedron.cxx:17
PixelGeometryManager::GetSide
virtual int GetSide()=0
GeoVPixelFactory::m_mapAX
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
Definition: GeoVPixelFactory.h:48
GeoVPixelFactory::m_sqliteReader
GeoModelIO::ReadGeoModel * m_sqliteReader
Definition: GeoVPixelFactory.h:46
PixelGeometryManager::DBMTelescopeY
virtual double DBMTelescopeY()=0
GeoVPixelFactory::m_DDmgr
InDetDD::PixelDetectorManager * m_DDmgr
Definition: GeoVPixelFactory.h:45
GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: GeoVPixelFactory.h:43
InDetDD::SiNumerology::setNumDisksDBM
void setNumDisksDBM(int nDisks)
Definition: SiNumerology.cxx:108
DBM_Telescope
Diamond Beam Monitor telescope builder.
Definition: DBM_Telescope.h:16
GeoVPixelFactory::m_mapFPV
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
Definition: GeoVPixelFactory.h:47
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
lumiFormat.i
int i
Definition: lumiFormat.py:85
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
PixelGeometryManager::Eta
virtual int Eta()=0
PixelGeometryManager::SetPhi
virtual void SetPhi(int phi)=0
GeoVPixelFactory::GeoVPixelFactory
GeoVPixelFactory(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, GeoModelIO::ReadGeoModel *sqliteReader, std::shared_ptr< std::map< std::string, GeoFullPhysVol * >> mapFPV, std::shared_ptr< std::map< std::string, GeoAlignableTransform * >> mapAX)
Definition: GeoVPixelFactory.cxx:11
InDetDD::SiNumerology::setNumBarrelDBM
void setNumBarrelDBM(int nBarrel)
Definition: SiNumerology.cxx:125
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
PixelGeometryManager::DBMPP0Thick
virtual double DBMPP0Thick()=0
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
DBM_PP0
Definition: DBM_Services.h:18
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDetDD::SiNumerology::setNumPhiModulesForDiskRingDBM
void setNumPhiModulesForDiskRingDBM(int disk, int ring, int nPhiModules)
Definition: SiNumerology.cxx:130
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
InDetMaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Get material. First looks for locally defined material and if not found looks in GeoModel material ma...
Definition: InDetMaterialManager.cxx:96
InDetDD::SiNumerology::addEndcapDBM
void addEndcapDBM(int id)
Definition: SiNumerology.cxx:136
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
PixelGeometryManager::GetLD
virtual int GetLD()=0
PixelGeometryManager::Phi
virtual int Phi()=0