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

#include <GeoPixelDisk.h>

Inheritance diagram for GeoPixelDisk:
Collaboration diagram for GeoPixelDisk:

Public Member Functions

 GeoPixelDisk (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
 
double Thickness ()
 
double RMax ()
 
double RMin ()
 

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
 

Detailed Description

Definition at line 11 of file GeoPixelDisk.h.

Constructor & Destructor Documentation

◆ GeoPixelDisk()

GeoPixelDisk::GeoPixelDisk ( 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 26 of file GeoPixelDisk.cxx.

31  : GeoVPixelFactory (ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX))
32 {
33 }

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelDisk::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 35 of file GeoPixelDisk.cxx.

35  {
36 
37  int brl_ec=0;
38 
39  // Need to specify some eta. Assume all module the same
40  m_gmt_mgr->SetEta(0);
41  // angle between two adjacent modules on one side of the disk
42  // it is 360 deg / 24 modules = 15 deg
43  int nbECSector = m_gmt_mgr->PixelECNSectors1();
44  if(nbECSector==0){
45  return nullptr;
46  }
47 
48  std::ostringstream ostr;
49  ostr << m_gmt_mgr->GetLD();
50  const GeoLogVol* theDisk{nullptr};
51  if(!m_sqliteReader) {
52  //
53  // Dimensions from class methods.
54  //
55  double rmin = RMin();
56  double rmax = RMax();
57  double halflength = Thickness()*0.5;
58  const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air");
59  const GeoTube* diskTube = new GeoTube(rmin,rmax,halflength);
60  theDisk = new GeoLogVol("Disk"+ostr.str(),diskTube,air);
61  }
62  //
63  // Define the Sensor to be used here, so it will be the same for all the disk
65  if(m_sqliteReader && m_gmt_mgr->isEndcap() ) brl_ec = 2*m_gmt_mgr->GetSide();
66  GeoFullPhysVol* diskPhys = m_sqliteReader==nullptr ? new GeoFullPhysVol(theDisk) : nullptr;
67  //
68  // Place the disk sectors (on both sides):
69  //
70  // Need to specify some eta. Assume all module the same
72  double zpos = m_gmt_mgr->PixelECSiDz1()*0.5;
73  double deltaPhi = 360.*Gaudi::Units::deg/ (float) nbECSector;
74  // This is the start angle of the even modules (3.75 deg):
75  double startAngle = deltaPhi*0.25;
76  // Start angle could eventually come from the database...
77  // double startAngle = m_gmt_mgr->PixelECStartPhi();
78 
79  // This is the radius of the center of the active sensor (also center of the module)
80  double moduleRadius = m_gmt_mgr->PixelDiskRMin() + 0.5*m_gmt_mgr->PixelBoardActiveLength();
81 
82  // for compatibility with older geometries we have to incorrectly rotate modules in endcap C
83  bool oldGeometry = (m_gmt_mgr->dbVersion() < 1);
84 
85  // In Global coordinate system (X,Y,Z):
86  //--------------------------------------
87  // (for reference see GWG's June 20, 2005 Pixel Offline Mtg presentation, p.4)
88  // The module has X axis (depth axis) out of the plane pointing
89  // towards the chips. Z axis is the eta direction. To place it on
90  // the disk we rotate 90 deg around Y. This leaves the depth axis
91  // pointing in the -ve Z direction. For the back of the disk this is
92  // the correct orientation. For the front of the disk we rotate
93  // 180 deg around X.
94 
95 
96 
97  // Looking from IP at module at ~12:00 (+ve global Y)
98  //
99  // For side A, Global axes:
100  //
101  // Y ^
102  // |
103  // |
104  // X<--x
105  //
106  // Z axis into page
107  //
108 
109  // Module on front of disk (closest to IP)
110  // MCC side
111  //
112  // 0 F ^z
113  // . . |
114  // . . |
115  // . . <-- x Module ref system (Hit frame)
116  // 7 8 y
117 
118  // Module on back of disk (furthest from IP)
119  // Still looking from IP.
120  //
121  // Chip side
122  // F 0 ^z
123  // . . |
124  // . . |
125  // . . .--> Module ref system (Hit frame)
126  // 8 z y
127  //
128  //
129 
130  // Set numerology
131  m_gmt_mgr->SetEta(0);
134 
135  // Even modules (front of disk, delta z < 0)
136  // and Odd modules (back of disk, delta z > 0)
137  int pixelECNSectors1 = m_gmt_mgr->PixelECNSectors1();
138  for (int ii = 0; ii < pixelECNSectors1*2; ii++) {
139 
140  // Build both endcaps the same but re-number phiId in endcap C to get correct offline numbering.
141  // Endcap C is obtained by rotating endcap A by 180 around y axis. Numbering goes in opposite direction
142  // with module 0 becoming module 23. Mapping is 0<->23, 24<->47.
143 
144  // Add a test to get rid off division by zero coverity error
145  int phiId = 0;
146  if(pixelECNSectors1>0) phiId = (m_gmt_mgr->GetSide()>0) ? ii : (3*pixelECNSectors1-ii-1)%(pixelECNSectors1*2);
147 
148  m_gmt_mgr->SetPhi(phiId);
149 
150  if(m_sqliteReader) {
151  psd.Build();
152  std::string key="ModuleEC_"+ std::to_string(phiId)+"_"+std::to_string(m_gmt_mgr->GetLD())+"_"+std::to_string(m_gmt_mgr->Phi())+"_"+std::to_string(m_gmt_mgr->Eta());
153  Identifier id = theSensor.getID();
155  continue;
156  }
157 
158  double angle = ii*0.5*deltaPhi+startAngle;
159  //if ( m_gmt_mgr->GetSide()<0 ) angle = 360*Gaudi::Units::deg-(ii*deltaPhi+startAngle);
160  int diskSide = (ii%2) ? +1 : -1; // even: -1, odd +1
161 
162 
163  GeoTrf::Transform3D rmX(GeoTrf::Transform3D::Identity());
164  if (oldGeometry && m_gmt_mgr->GetSide()<0) {
165  if (diskSide > 0) rmX = GeoTrf::RotateX3D(180.*Gaudi::Units::deg); // This is for compatibilty with older geomtries.
166  } else {
167  if (diskSide < 0) rmX = GeoTrf::RotateX3D(180.*Gaudi::Units::deg); // depth axis points towards disk.
168  }
169  GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(angle) * rmX * GeoTrf::RotateY3D(90*Gaudi::Units::deg);
170  GeoTrf::Vector3D pos(moduleRadius,0.,diskSide*zpos);
171  pos = GeoTrf::RotateZ3D(angle)*pos;
172  GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rm);
173  GeoVPhysVol * modulePhys = psd.Build();
174  std::ostringstream nameTag;
175  nameTag << "ModuleEC" << phiId;
176  GeoNameTag * tag = new GeoNameTag(nameTag.str());
177  diskPhys->add(tag);
178  diskPhys->add(new GeoIdentifierTag(phiId));
179  diskPhys->add(xform);
180  diskPhys->add(modulePhys);
181 
182  // Now store the xform by identifier:
183  Identifier id = theSensor.getID();
184  m_DDmgr->addAlignableTransform(0,id,xform,modulePhys);
185  }
186 
187  if(m_sqliteReader) {
188  std::string key="PixelDisk_"+std::to_string(brl_ec)+"_"+std::to_string(m_gmt_mgr->GetLD())+"_"+std::to_string(m_gmt_mgr->Phi())+"_"+std::to_string(m_gmt_mgr->Eta());
189  diskPhys=(*m_mapFPV)[key];
190  }
191  else {
192  //
193  // Place the supports for the disks:
194  //
196  for(int ii =0; ii< pds.NCylinders(); ii++) {
197  pds.SetCylinder(ii);
198  GeoTransform* xform = new GeoTransform( GeoTrf::Translate3D(0, 0, pds.ZPos()) );
199  diskPhys->add(xform);
200  diskPhys->add(pds.Build() );
201  }
202  }
203 
204  // Extra Material
206  xMat.add(diskPhys,"PixelDisc");
207  //Defined above as:
208  // std::ostringstream ostr; ostr << m_gmt_mgr->GetLD();
209  xMat.add(diskPhys,"PixelDisc"+ostr.str());
210  if (m_gmt_mgr->GetSide()>0) { // EndcapA
211  xMat.add(diskPhys,"PixelDiscA");
212  xMat.add(diskPhys,"PixelDiscA"+ostr.str());
213  } else { // EndcapC
214  xMat.add(diskPhys,"PixelDiscC");
215  xMat.add(diskPhys,"PixelDiscC"+ostr.str());
216  }
217 
218 
219  return diskPhys;
220 }

◆ RMax()

double GeoPixelDisk::RMax ( )

Definition at line 226 of file GeoPixelDisk.cxx.

226  {
227  return m_gmt_mgr->PixelECCarbonRMax("Outer");
228 }

◆ RMin()

double GeoPixelDisk::RMin ( )

Definition at line 222 of file GeoPixelDisk.cxx.

222  {
223  return m_gmt_mgr->PixelECCarbonRMin("Inner");
224 }

◆ Thickness()

double GeoPixelDisk::Thickness ( )

Definition at line 230 of file GeoPixelDisk.cxx.

230  {
231  //
232  // This can be calculated as the minimum thickness possible
233  // as for the layers I use a number which is enough to contain
234  // the inner part of the detector.
235  //
236  // 7-1 I switch to the minimum thickness possible as the cables are right
237  // outside this volume.
238  //
239  // return 10*Gaudi::Units::mm;
240  // GWG. It would be nice to get these numbers from the module itself to
241  // ensure consistency.
242  double safety = 0.01* Gaudi::Units::mm; // This is the safety added to the module.
243  double zClearance = 0.5 * Gaudi::Units::mm; // Clearance for misalignments
244  double tck = 2*(safety + 0.5*m_gmt_mgr->PixelBoardThickness()
247  );
249  tck += 2.*zClearance;
250  // TO DO: Add some safety (N.B. I think the module is slightly bigger because of some safety added there)
251  return tck;
252 }

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_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:
InDetDD::SiNumerology::setNumRingsForDisk
void setNumRingsForDisk(int disk, int nRings)
Definition: SiNumerology.cxx:48
PixelGeometryManager::distortedMatManager
virtual InDetDD::DistortedMaterialManager * distortedMatManager()=0
PixelGeometryManager::PixelChipThickness
virtual double PixelChipThickness(bool isModule3D=false)=0
PixelGeometryManager::PixelBoardActiveLength
virtual double PixelBoardActiveLength(bool isModule3D=false)=0
PixelGeometryManager::PixelECCarbonRMin
virtual double PixelECCarbonRMin(std::string)=0
PixelGeometryManager::SetEta
virtual void SetEta(int eta)=0
GeoPixelDisk::Thickness
double Thickness()
Definition: GeoPixelDisk.cxx:230
PixelGeometryManager::PixelECCarbonRMax
virtual double PixelECCarbonRMax(std::string)=0
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
deg
#define deg
Definition: SbPolyhedron.cxx:17
PixelGeometryManager::GetSide
virtual int GetSide()=0
PixelGeometryManager::PixelChipGap
virtual double PixelChipGap(bool isModule3D=false)=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::PixelHybridThickness
virtual double PixelHybridThickness(bool isModule3D=false)=0
GeoPixelDisk::RMin
double RMin()
Definition: GeoPixelDisk.cxx:222
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
GeoPixelSiCrystal
Definition: GeoPixelSiCrystal.h:20
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
PixelGeometryManager::PixelBoardThickness
virtual double PixelBoardThickness(bool isModule3D=false)=0
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
PixelGeometryManager::PixelECSiDz1
virtual double PixelECSiDz1()=0
PixelGeometryManager::isEndcap
virtual bool isEndcap()=0
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::setNumPhiModulesForDiskRing
void setNumPhiModulesForDiskRing(int disk, int ring, int nPhiModules)
Definition: SiNumerology.cxx:55
GeoPixelDiskSupports
Definition: GeoPixelDiskSupports.h:11
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
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
GeoPixelDisk::RMax
double RMax()
Definition: GeoPixelDisk.cxx:226
PixelGeometryManager::PixelECSiDz2
virtual double PixelECSiDz2()=0
GeoPixelModule
Definition: GeoPixelModule.h:14
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
PixelGeometryManager::PixelECNSectors1
virtual int PixelECNSectors1()=0
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::dbVersion
virtual int dbVersion()=0
InDetDD::ExtraMaterial
Definition: ExtraMaterial.h:23
readCCLHist.float
float
Definition: readCCLHist.py:83
PixelGeometryManager::PixelDiskRMin
virtual double PixelDiskRMin()=0
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
PixelGeometryManager::GetLD
virtual int GetLD()=0
PixelGeometryManager::Phi
virtual int Phi()=0
Identifier
Definition: IdentifierFieldParser.cxx:14