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

#include <GeoPixelBarrel.h>

Inheritance diagram for GeoPixelBarrel:
Collaboration diagram for GeoPixelBarrel:

Public Member Functions

 GeoPixelBarrel (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 GeoPixelBarrel.h.

Constructor & Destructor Documentation

◆ GeoPixelBarrel()

GeoPixelBarrel::GeoPixelBarrel ( 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 33 of file GeoPixelBarrel.cxx.

39  : GeoVPixelFactory (ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX)),
40  m_pixServices(pixServices)
41 {}

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelBarrel::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 43 of file GeoPixelBarrel.cxx.

43  {
44 
45  GeoFullPhysVol* barrelPhys{nullptr};
46 
47  if(m_sqliteReader) {
48  barrelPhys = (*m_mapFPV)["Barrel"];
49  }
50  else {
51  //
52  // create the Barrel Mother volume
53  //
54  double rmin = m_gmt_mgr->PixelBarrelRMin();
55  double rmax = m_gmt_mgr->PixelBarrelRMax();
56  double halflength = m_gmt_mgr->PixelBarrelHalfLength();
57  const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air");
58  const GeoTube* barrelTube = new GeoTube(rmin,rmax,halflength);
59  const GeoLogVol* barrelLog = new GeoLogVol("Barrel",barrelTube,air);
60  barrelPhys = new GeoFullPhysVol(barrelLog);
61  }
62 
63  // Set numerology
65 
66  // In case of IBL stave detailed description -> add stave ring support and emdblocks
68  bool bAddIBLStaveRings = m_gmt_mgr->ibl()&&m_gmt_mgr->PixelStaveLayout()>3&&m_gmt_mgr->PixelStaveLayout()<7;
69 
70  //
71  // Build the layers inside
72  //
74  for(int ii = 0; ii < m_gmt_mgr->PixelBarrelNLayer(); ii++){
75  //cout << "Layer" << ii << endl;
77  if(m_gmt_mgr->isLDPresent()){
78  std::ostringstream lname;
79  lname << "Layer" << ii;
80 
81  Identifier id = m_gmt_mgr->getIdHelper()->wafer_id(0,ii,0,0);
82 
83  if(m_sqliteReader) {
84  GeoAlignableTransform* xform = (*m_mapAX)[lname.str()];
85  layer.Build();
86  GeoFullPhysVol* layerFPV = (*m_mapFPV) [lname.str()];
87  // Store the transform (at level 1)
88  m_DDmgr->addAlignableTransform(1, id, xform, layerFPV);
89 
90  // Extra Material.
91  // From Marilena: I don't think there is much room but we provide the hooks anyway
92  // NB this has been taken from the GeoPixelLayer class .. needed to be moved here cause here
93  // we have the GeoFullPhysVol available from the SQLite DB
95  xMat.add(layerFPV,"PixelLayer");
96  std::ostringstream ostr; ostr << m_gmt_mgr->GetLD();
97  xMat.add(layerFPV,"PixelLayer"+ostr.str());
98  }
99  else {
100  // IBL layer shift ( 2mm shift issue )
101  double layerZshift = m_gmt_mgr->PixelLayerGlobalShift();
102  GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Translate3D(0.,0.,layerZshift));
103  GeoVPhysVol* layerphys = layer.Build();
104  GeoNameTag *tag = new GeoNameTag(lname.str());
105  barrelPhys->add(tag);
106  barrelPhys->add(new GeoIdentifierTag(ii));
107  barrelPhys->add(xform);
108  barrelPhys->add(layerphys);
109 
110  // Store the transform (at level 1)
111  m_DDmgr->addAlignableTransform(1, id, xform, layerphys);
112 
113  // IBL stave ring service area ( ring + endblocks + flexes + pipe + ...)
114  if(m_pixServices&&bAddIBLStaveRings&&ii==0)
115  {
116  // ----------- end of stave services (side A)
117  GeoNameTag * tagSupportA = new GeoNameTag("StaveRingAndEndblocks_A");
118  GeoTransform *xformSupportA = layer.getSupportTrfA();
119  GeoPhysVol *supportPhys_A = layer.getSupportA();
120  barrelPhys->add(tagSupportA);
121  barrelPhys->add(xformSupportA);
122  barrelPhys->add(supportPhys_A);
123 
124  // ----------- end of stave services (side C)
125  GeoNameTag * tagSupportC = new GeoNameTag("StaveRingAndEndblocks_C");
126  GeoTransform *xformSupportC = layer.getSupportTrfC();
127  GeoPhysVol *supportPhys_C = layer.getSupportC();
128  barrelPhys->add(tagSupportC);
129  barrelPhys->add(xformSupportC);
130  barrelPhys->add(supportPhys_C);
131 
132  // ----------- middle of stave services
133  if(m_gmt_mgr->PixelStaveAxe()==0) {
134  GeoNameTag *tagM = new GeoNameTag("Brl0M_StaveRing");
135  GeoTransform *xformSupportMidRing = layer.getSupportTrfMidRing();
136  GeoVPhysVol *supportPhysMidRing = layer.getSupportMidRing();
137  barrelPhys->add(tagM);
138  barrelPhys->add(xformSupportMidRing);
139  barrelPhys->add(supportPhysMidRing);
140  }
141 
142  // ----------- end of stave PP0 services (insde barrel)
143 
146  iFlexSrv.Build();
147 
148  GeoNameTag * tagFlexA = new GeoNameTag("PP0Flex_A");
149  GeoTransform *xformFlexA = iFlexSrv.getSupportTrfA();
150  GeoPhysVol *flexPhys_A = iFlexSrv.getSupportA();
151  barrelPhys->add(tagFlexA);
152  barrelPhys->add(xformFlexA);
153  barrelPhys->add(flexPhys_A);
154 
155  GeoNameTag * tagFlexC = new GeoNameTag("PP0Flex_C");
156  GeoTransform *xformFlexC = iFlexSrv.getSupportTrfC();
157  GeoPhysVol *flexPhys_C = iFlexSrv.getSupportC();
158  barrelPhys->add(tagFlexC);
159  barrelPhys->add(xformFlexC);
160  barrelPhys->add(flexPhys_C);
161  }
162  }
163  }
164  }
165  else
166  {
167  if(m_gmt_mgr->msgLvl(MSG::DEBUG)) m_gmt_mgr->msg(MSG::DEBUG) << "Layer " << ii << " not built" << endmsg;
168  }
169  }
170 
171  if(!m_sqliteReader && m_pixServices) {
172  //
173  // Add the services inside the barrel volume
174  //
175  m_pixServices->getBuilder()->buildAndPlace("B", barrelPhys);
177  m_pixServices->getServMatBuilder()->buildAndPlace("B", barrelPhys);
178  }
179 
180  //
181  // Add the pixel frame inside the barrel volume
182  // In recent versions this taken care of in the general services.
183  if (m_gmt_mgr->oldFrame()) {
185  frame.BuildInBarrel(barrelPhys);
186  }
187  }
188 
189  // Extra Material
191  xMat.add(barrelPhys,"PixelBarrel");
192 
193  return barrelPhys;
194 }

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* GeoPixelBarrel::m_pixServices
private

Definition at line 21 of file GeoPixelBarrel.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::PixelLayerGlobalShift
virtual double PixelLayerGlobalShift()=0
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
PixelGeometryManager::PixelBarrelRMin
virtual double PixelBarrelRMin()=0
PixelGeometryManager::msg
MsgStream & msg(MSG::Level lvl) const
Definition: PixelGeometryManager.h:611
InDetDD::SiNumerology::setNumLayers
void setNumLayers(int nLayers)
Definition: SiNumerology.cxx:27
PixelGeometryManager::ibl
virtual bool ibl() const =0
PixelGeometryManager::msgLvl
bool msgLvl(MSG::Level lvl) const
Definition: PixelGeometryManager.h:614
PixelGeometryManager::PixelBarrelRMax
virtual double PixelBarrelRMax()=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
GeoPixelOldFrame
Definition: GeoPixelOldFrame.h:14
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
GeoPixelBarrel::m_pixServices
GeoPixelServices * m_pixServices
Definition: GeoPixelBarrel.h:21
GeoPixelIFlexServices
Definition: GeoPixelIFlexServices.h:17
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
GeoPixelLayer
Definition: GeoPixelLayer.h:14
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
PixelGeometryManager::PixelBarrelHalfLength
virtual double PixelBarrelHalfLength()=0
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:262
PixelGeometryManager::oldFrame
virtual bool oldFrame()=0
PixelGeometryManager::PixelStaveLayout
virtual int PixelStaveLayout()=0
PixelGeometryManager::SetCurrentLD
virtual void SetCurrentLD(int i)=0
PixelGeometryManager::PixelBarrelNLayer
virtual int PixelBarrelNLayer()=0
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
PixelGeometryManager::PixelStaveAxe
virtual int PixelStaveAxe()=0
GeoPixelServices::getServMatBuilder
InDetDD::VolumeBuilder * getServMatBuilder()
Definition: GeoPixelServices.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
PixelGeometryManager::IBLFlexAndWingDefined
virtual bool IBLFlexAndWingDefined()=0
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
PixelGeometryManager::GetLD
virtual int GetLD()=0
Identifier
Definition: IdentifierFieldParser.cxx:14