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 26 of file GeoPixelEndCap.cxx.

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

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelEndCap::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 36 of file GeoPixelEndCap.cxx.

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

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
GeoPixelDisk::Thickness
double Thickness()
Definition: GeoPixelDisk.cxx:229
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
GeoPixelDisk::Build
virtual GeoVPhysVol * Build() override
Definition: GeoPixelDisk.cxx:34
PixelGeometryManager::PixelEndcapRMin
virtual double PixelEndcapRMin()=0
PixelGeometryManager::msgLvl
bool msgLvl(MSG::Level lvl) const
Definition: PixelGeometryManager.h:614
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:20
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
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:9
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