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

#include <GeoPixelEndCap.h>

Inheritance diagram for GeoPixelEndCap:
Collaboration diagram for GeoPixelEndCap:

Public Member Functions

 GeoPixelEndCap (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, GeoPixelServices *pixServices)
 
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

GeoPixelServicesm_pixServices
 

Detailed Description

Definition at line 11 of file GeoPixelEndCap.h.

Constructor & Destructor Documentation

◆ GeoPixelEndCap()

GeoPixelEndCap::GeoPixelEndCap ( 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,
GeoPixelServices pixServices 
)

Definition at line 27 of file GeoPixelEndCap.cxx.

33  : GeoVPixelFactory(ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX)),
34  m_pixServices(pixServices)
35 {}

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelEndCap::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 37 of file GeoPixelEndCap.cxx.

37  {
38 
39  GeoFullPhysVol* ecPhys{nullptr};
40  if(!m_sqliteReader) {
41  //
42  // create the Barrel Mother volume
43  //
44  double rmin = m_gmt_mgr->PixelEndcapRMin();
45  double rmax = m_gmt_mgr->PixelEndcapRMax();
46  double halflength = (m_gmt_mgr->PixelEndcapZMax()-m_gmt_mgr->PixelEndcapZMin())/2.;
47  const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air");
48  const GeoTube* ecTube = new GeoTube(rmin,rmax,halflength);
49  const GeoLogVol* ecLog = new GeoLogVol("EndCap",ecTube,air);
50  ecPhys = new GeoFullPhysVol(ecLog);
51  }
52 
53  int ndisks = m_gmt_mgr->PixelEndcapNDisk();
54  m_gmt_mgr->msg(MSG::DEBUG) << "Number of disks is " << ndisks << endmsg;
55 
56  // Set numerology
57  m_DDmgr->numerology().setNumDisks(ndisks);
58 
59  // position of the endcap
60  double endcapZOffset = 0.5* (m_gmt_mgr->PixelEndcapZMax()+m_gmt_mgr->PixelEndcapZMin());
61 
62  //
63  // Place the disks and cables on both sides
64  //
67  for(int idisk = 0; idisk < ndisks; idisk++) {
68  m_gmt_mgr->SetCurrentLD(idisk);
69  // Some method is accessing the eta before the disk is built so we set it
70  // to a valid value.
71  m_gmt_mgr->SetEta(0);
72  if(m_gmt_mgr->isLDPresent()) {
73  if(m_sqliteReader) {
74  pd->Build();
75  int brl_ec = 2*m_gmt_mgr->GetSide();
76  Identifier id = m_gmt_mgr->getIdHelper()->wafer_id(brl_ec,idisk,0,0);
77  std::string key="Disk_"+std::to_string(brl_ec)+"_"+std::to_string(idisk)+"_"+std::to_string(m_gmt_mgr->GetLD())+"_"+std::to_string(m_gmt_mgr->Phi())+"_"+std::to_string(m_gmt_mgr->Eta());
79  }
80  else {
81 
82  //
83  // The position is given w.r.t to the center of the detector!
84  //
85  //position of the disk
86  double zdisk = m_gmt_mgr->PixelDiskZPosition()-endcapZOffset;
87  // place the disk
88  std::ostringstream nameTag;
89  nameTag << "Disk" << idisk;
90  GeoNameTag * tag = new GeoNameTag(nameTag.str());
91  GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zdisk));
92 
93  GeoVPhysVol * diskPhys = pd->Build();
94  ecPhys->add(tag);
95  ecPhys->add(new GeoIdentifierTag(idisk));
96  ecPhys->add(xform);
97  ecPhys->add(diskPhys);
98 
99  // Store the alignable transform
100  int brl_ec = 2*m_gmt_mgr->GetSide();
101  Identifier id = m_gmt_mgr->getIdHelper()->wafer_id(brl_ec,idisk,0,0);
102  m_DDmgr->addAlignableTransform(1, id, xform, diskPhys);
103 
104  //
105  // place the cables twice for the two active parts
106  //
107  double dz = pd->Thickness()/2. + m_gmt_mgr->PixelECCablesDistance() ;
108  GeoTransform * xformCablesPlus = new GeoTransform(GeoTrf::TranslateZ3D(zdisk+dz));
109  ecPhys->add(xformCablesPlus);
110  ecPhys->add(pecc->Build() );
111  GeoTransform * xformCablesMinus = new GeoTransform(GeoTrf::TranslateZ3D(zdisk-dz));
112  ecPhys->add(xformCablesMinus);
113  ecPhys->add(pecc->Build() );
114  }
115  } else {
116  if(m_gmt_mgr->msgLvl(MSG::DEBUG)) m_gmt_mgr->msg(MSG::DEBUG) << "Disk " << idisk << " not built" << endmsg;
117  }
118  }
119  delete pd;
120  delete pecc;
121 
122  std::string region = m_gmt_mgr->GetSide()>0 ? "A" : "C";
123 
124  if(m_sqliteReader) {
125  std::ostringstream ename;
126  ename << "EndCap" << region;
127  ecPhys = (*m_mapFPV)[ename.str()];
128  }
129  else if(m_pixServices) {
130  //
131  // Add the Endcap services inide the EC volume
132  //
133  m_pixServices->getBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
135  m_pixServices->getServMatBuilder()->buildAndPlace(region, ecPhys, endcapZOffset);
136  }
137  }
138 
139  {
140  // Extra Material
142  xMat.add(ecPhys,"PixelEndcap",endcapZOffset);
143  if (m_gmt_mgr->GetSide()>0) { // EndcapA
144  xMat.add(ecPhys,"PixelEndcapA",endcapZOffset);
145  } else { // EndcapC
146  xMat.add(ecPhys,"PixelEndcapC",endcapZOffset);
147  }
148  }
149 
150  return ecPhys;
151 }

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_pixServices

GeoPixelServices* GeoPixelEndCap::m_pixServices
private

Definition at line 21 of file GeoPixelEndCap.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::distortedMatManager
virtual InDetDD::DistortedMaterialManager * distortedMatManager()=0
PixelGeometryManager::PixelDiskZPosition
virtual double PixelDiskZPosition()=0
PixelGeometryManager::SetEta
virtual void SetEta(int eta)=0
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
PixelGeometryManager::PixelEndcapZMax
virtual double PixelEndcapZMax()=0
PixelGeometryManager::msg
MsgStream & msg(MSG::Level lvl) const
Definition: PixelGeometryManager.h:611
GeoPixelDisk
Definition: GeoPixelDisk.h:11
PixelGeometryManager::PixelEndcapRMin
virtual double PixelEndcapRMin()=0
PixelGeometryManager::msgLvl
bool msgLvl(MSG::Level lvl) const
Definition: PixelGeometryManager.h:614
makeDTCalibBlob_pickPhase.pd
pd
Definition: makeDTCalibBlob_pickPhase.py:342
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
GeoPixelECCable::Build
virtual GeoVPhysVol * Build() override
Definition: GeoPixelECCable.cxx:22
InDetDD::VolumeBuilder::buildAndPlace
void buildAndPlace(const std::string &region, GeoPhysVol *parent, double zcenter=0)
Definition: VolumeBuilder.cxx:83
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
GeoVPixelFactory::m_DDmgr
InDetDD::PixelDetectorManager * m_DDmgr
Definition: GeoVPixelFactory.h:45
GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: GeoVPixelFactory.h:43
GeoVPixelFactory::m_mapFPV
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
Definition: GeoVPixelFactory.h:47
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
PixelGeometryManager::PixelEndcapNDisk
virtual int PixelEndcapNDisk()=0
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
PixelGeometryManager::PixelECCablesDistance
virtual double PixelECCablesDistance()=0
PixelGeometryManager::Eta
virtual int Eta()=0
GeoPixelEndCap::m_pixServices
GeoPixelServices * m_pixServices
Definition: GeoPixelEndCap.h:21
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::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:262
InDetDD::SiNumerology::setNumDisks
void setNumDisks(int nDisks)
Definition: SiNumerology.cxx:41
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
PixelGeometryManager::PixelEndcapRMax
virtual double PixelEndcapRMax()=0
PixelGeometryManager::SetCurrentLD
virtual void SetCurrentLD(int i)=0
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
PixelGeometryManager::PixelEndcapZMin
virtual double PixelEndcapZMin()=0
GeoPixelServices::getServMatBuilder
InDetDD::VolumeBuilder * getServMatBuilder()
Definition: GeoPixelServices.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
GeoPixelECCable
Definition: GeoPixelECCable.h:11
PixelGeometryManager::getIdHelper
virtual const PixelID * getIdHelper()=0
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
PixelGeometryManager::isLDPresent
virtual bool isLDPresent()=0
InDetDD::ExtraMaterial
Definition: ExtraMaterial.h:23
GeoPixelServices::getBuilder
InDetDD::VolumeBuilder * getBuilder()
Definition: GeoPixelServices.h:31
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
PixelGeometryManager::GetLD
virtual int GetLD()=0
PixelGeometryManager::Phi
virtual int Phi()=0
Identifier
Definition: IdentifierFieldParser.cxx:14