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

#include <GeoPixelSiCrystal.h>

Inheritance diagram for GeoPixelSiCrystal:
Collaboration diagram for GeoPixelSiCrystal:

Public Member Functions

 GeoPixelSiCrystal (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, bool isBLayer, bool isModule3D=false, bool even_odd_phi_design=false)
 
virtual GeoVPhysVol * Build () override
 
Identifier getID ()
 
bool GetModule3DFlag ()
 

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

Identifier m_id
 
unsigned int m_nPhiDesigns =1
 
std::array< const InDetDD::SiDetectorDesign *, 2 > m_design {nullptr,nullptr}
 
bool m_isBLayer = false
 
bool m_isModule3D = false
 

Detailed Description

Definition at line 19 of file GeoPixelSiCrystal.h.

Constructor & Destructor Documentation

◆ GeoPixelSiCrystal()

GeoPixelSiCrystal::GeoPixelSiCrystal ( 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,
bool  isBLayer,
bool  isModule3D = false,
bool  even_odd_phi_design = false 
)

Definition at line 44 of file GeoPixelSiCrystal.cxx.

50  : GeoVPixelFactory (ddmgr, mgr, sqliteReader, std::move(mapFPV), std::move(mapAX))
51 {
52  //
53  //Builds the design for this crystal
54  m_isBLayer = isBLayer;
55  m_isModule3D = isModule3D;
56 
57  // Dimensions
58  const double thickness = m_gmt_mgr->PixelBoardThickness(m_isModule3D);
61 
62  int circuitsPerPhi = m_gmt_mgr->DesignCircuitsPhi(m_isModule3D); // Warning col/row naming opposite to chip
63  int circuitsPerEta = m_gmt_mgr->DesignCircuitsEta(m_isModule3D); // Warning col/row naming opposite to chip
64  int cellRowPerCirc = m_gmt_mgr->DesignCellRowsPerCircuit(m_isModule3D);
65  int cellColPerCirc = m_gmt_mgr->DesignCellColumnsPerCircuit(m_isModule3D);
66  int rowsPerCircuit = m_gmt_mgr->DesignDiodeRowsPerCircuit(m_isModule3D);
67  int columnsPerCircuit = m_gmt_mgr->DesignDiodeColumnsPerCircuit(m_isModule3D);
68  int readoutSide = m_gmt_mgr->DesignReadoutSide(m_isModule3D);
69 
70  double pitchEtaLongEnd = m_gmt_mgr->DesignPitchZLongEnd(m_isModule3D);
71  double pitchEtaLong = m_gmt_mgr->DesignPitchZLong(m_isModule3D);
72  double pitchPhi = m_gmt_mgr->DesignPitchRP(m_isModule3D);
73  double pitchEta = m_gmt_mgr->DesignPitchZ(m_isModule3D);
74 
75  auto readoutTechnology = getPixelReadoutTechnology(rowsPerCircuit,columnsPerCircuit );
76  auto circuitsPerPhi_corr = circuitsPerPhi;
77  auto rowsPerCircuit_corr = rowsPerCircuit;
78  if (readoutTechnology==InDetDD::PixelReadoutTechnology::FEI3 && circuitsPerPhi==1 && rowsPerCircuit==328) {
79  // FEI3 has 2x8 circuits and 160 + 4 rows per circuit not 1x8 circuits with 328 rows
80  // without this correction it is not possible to use the attribute associated to sub-matrices
81  // to assign FE numbers to sub-matrices.
82  circuitsPerPhi_corr*=2;
83  rowsPerCircuit_corr/=2;
84  }
85 
86  // optionally create different module design for even and odd phi modules, because
87  // the front-ends are numbered differently
88  m_nPhiDesigns=even_odd_phi_design ? 2 : 1;
89  for (unsigned int design_i=0; design_i<m_nPhiDesigns ; ++design_i) {
90  // for endcap modules the design for even-phi indices uses a "mirrored" front-end numbering scheme.
91  // instead of from top left 0..7 to top right, then bottom right to bottom left 8..15 , the front
92  // ends are numbered from bottom left to top left i.e. bottom and top are swapped.
94 
98  readoutTechnology,
99  std::array<int,kNDirections>{circuitsPerPhi_corr,circuitsPerEta}, // [0]=phi/row, [1]=eta/column
100  std::array<int,kNDirections>{rowsPerCircuit_corr,columnsPerCircuit}, // [0]=phi/row, [1]=eta/column
101  std::array<std::array<double,kNDirections>,kNPixelLocations>{ // regular/central,longEnd/outer,long/inner
102  std::array<double,kNDirections>{pitchPhi,pitchEta},
103  std::array<double,kNDirections>{0.,pitchEtaLongEnd},
104  std::array<double,kNDirections>{0.,pitchEtaLong}},
105  fe_numbering);
106 
107  std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness,
108  circuitsPerPhi,
109  circuitsPerEta,
110  cellColPerCirc,
111  cellRowPerCirc,
112  columnsPerCircuit,
113  rowsPerCircuit,
114  std::move(diode_tree),
116  readoutSide,
117  false, /* 3D */
118  InDetDD::Undefined, /* detector type */
119  readoutTechnology);
120 
121  // Multiple connections (ganged pixels)
122  if (m_gmt_mgr->NumberOfEmptyRows() > 0) {
123  int minRow = m_gmt_mgr->EmptyRows(0);
124  int maxRow = minRow;
125  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
126  minRow = std::min(minRow, m_gmt_mgr->EmptyRows(iConnect));
127  minRow = std::min(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
128  maxRow = std::max(maxRow, m_gmt_mgr->EmptyRows(iConnect));
129  maxRow = std::max(maxRow, m_gmt_mgr->EmptyRowConnections(iConnect));
130  }
131 
132  std::vector <int> connections(maxRow-minRow+1);
133 
134  // We fill them all with a one to one correspondence first.
135  for (unsigned int iRow = 0; iRow < connections.size(); iRow++){
136  connections[iRow] = iRow + minRow;
137  }
138 
139  // Now make the connections.
140  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
141  connections[m_gmt_mgr->EmptyRows(iConnect)-minRow] = m_gmt_mgr->EmptyRowConnections(iConnect);
142  }
143 
144  p_barrelDesign2->addMultipleRowConnection(minRow, connections);
145 
146  } else {
147  // No empty rows.
148  if (!m_gmt_mgr->ibl()) {
149  m_gmt_mgr->msg(MSG::WARNING) << "GeoPixelSiCrystal: No ganged pixels" << endmsg;
150  } else {
151  if (m_gmt_mgr->msgLvl(MSG::DEBUG)) m_gmt_mgr->msg(MSG::DEBUG) << "GeoPixelSiCrystal: No ganged pixels" << endmsg;
152  }
153  }
154 
155  // Check that the active area seems reasonable
156 
161  m_gmt_mgr->msg(MSG::WARNING) << "GeoPixelSiCrystal: Active area not consistent with sensor size. Sensor: "
162  << width/Gaudi::Units::mm << " x " << length/Gaudi::Units::mm << ", Active: "
164  << endmsg;
165  } else {
167  << "GeoPixelSiCrystal: Sensor: "
168  << width/Gaudi::Units::mm << " x " << length/Gaudi::Units::mm << ", Active: "
170  << endmsg;
171  }
172 
173 
174  m_design.at(design_i) = m_DDmgr->addDesign(std::move(p_barrelDesign2));
175  }
176 
177 
178 }

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelSiCrystal::Build ( )
overridevirtual

Implements GeoVPixelFactory.

Definition at line 179 of file GeoPixelSiCrystal.cxx.

179  {
180 
181  GeoFullPhysVol* siPhys{nullptr};
182  int brl_ec= m_gmt_mgr->isEndcap() ? 2*m_gmt_mgr->GetSide() : 0;
183 
184  if(m_sqliteReader) {
185  std::string siName ="SiPhys_" + 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());
186  siPhys = (*m_mapFPV)[siName];
187  }
188  else {
189  //(sar) code moved from c'tor..
190  const double thickness = m_gmt_mgr->PixelBoardThickness(m_isModule3D);
192  const double width = m_gmt_mgr->PixelBoardWidth(m_isModule3D);
193  //
194  std::string matName = m_gmt_mgr->getMaterialName("Sensor");
195  const GeoMaterial* siMat = m_mat_mgr->getMaterial(matName);
196  const GeoBox* siBox = new GeoBox(thickness*0.5,width*0.5,length*0.5);
197  std::string logname{"siLog"};
198  // There is not a strong need to give the blayer a different name but leave it for now.
199  if(m_isBLayer) logname = "siBLayLog";
200  auto *logVolume = new GeoLogVol(logname,siBox,siMat);
201  //(sar) ...to here
202 
203 
204  siPhys = new GeoFullPhysVol(logVolume);
205  }
206  // Build the Identifier for the silicon:
207  //
208  const PixelID * idHelper = m_gmt_mgr->getIdHelper();
209  m_id = idHelper->wafer_id(brl_ec,m_gmt_mgr->GetLD(),m_gmt_mgr->Phi(),m_gmt_mgr->Eta());
211 
212  // add the element to the manager
213  m_DDmgr->addDetectorElement(element);
214  return siPhys;
215 }

◆ getID()

Identifier GeoPixelSiCrystal::getID ( )
inline

Definition at line 28 of file GeoPixelSiCrystal.h.

28 {return m_id;}

◆ GetModule3DFlag()

bool GeoPixelSiCrystal::GetModule3DFlag ( )
inline

Definition at line 30 of file GeoPixelSiCrystal.h.

30 { return m_isModule3D; };

Member Data Documentation

◆ m_DDmgr

InDetDD::PixelDetectorManager* GeoVPixelFactory::m_DDmgr
protectedinherited

Definition at line 45 of file GeoVPixelFactory.h.

◆ m_design

std::array<const InDetDD::SiDetectorDesign*,2> GeoPixelSiCrystal::m_design {nullptr,nullptr}
private

Definition at line 39 of file GeoPixelSiCrystal.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_id

Identifier GeoPixelSiCrystal::m_id
private

Definition at line 33 of file GeoPixelSiCrystal.h.

◆ m_isBLayer

bool GeoPixelSiCrystal::m_isBLayer = false
private

Definition at line 40 of file GeoPixelSiCrystal.h.

◆ m_isModule3D

bool GeoPixelSiCrystal::m_isModule3D = false
private

Definition at line 41 of file GeoPixelSiCrystal.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_nPhiDesigns

unsigned int GeoPixelSiCrystal::m_nPhiDesigns =1
private

Definition at line 38 of file GeoPixelSiCrystal.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::DesignCellRowsPerCircuit
virtual int DesignCellRowsPerCircuit(bool isModule3D=false)=0
PixelGeometryManager::NumberOfEmptyRows
virtual int NumberOfEmptyRows(bool isModule3D=false)=0
InDetDD::PixelDiodeTree
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
Definition: PixelDiodeTree.h:33
GeoPixelSiCrystal::m_id
Identifier m_id
Definition: GeoPixelSiCrystal.h:30
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
PixelGeometryManager::msg
MsgStream & msg(MSG::Level lvl) const
Definition: PixelGeometryManager.h:611
PixelGeometryManager::DesignDiodeColumnsPerCircuit
virtual int DesignDiodeColumnsPerCircuit(bool isModule3D=false)=0
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDetDD::detail::kNPixelLocations
@ kNPixelLocations
Definition: PixelGeoUtils.h:21
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
PixelGeometryManager::DesignPitchZLongEnd
virtual double DesignPitchZLongEnd(bool isModule3D=false)=0
PixelGeometryManager::ibl
virtual bool ibl() const =0
GeoPixelSiCrystal::m_isModule3D
bool m_isModule3D
Definition: GeoPixelSiCrystal.h:41
PixelGeometryManager::DesignCircuitsEta
virtual int DesignCircuitsEta(bool isModule3D=false)=0
PixelGeometryManager::DesignZActiveArea
virtual double DesignZActiveArea(bool isModule3D=false)=0
InDetDD::PixelReadoutTechnology::FEI3
@ FEI3
InDetDD::SiDetectorManager::addDesign
const SiDetectorDesign * addDesign(std::unique_ptr< const SiDetectorDesign > &&)
Access to module design; returns an observer pointer.
Definition: SiDetectorManager.cxx:134
PixelGeometryManager::msgLvl
bool msgLvl(MSG::Level lvl) const
Definition: PixelGeometryManager.h:614
PixelGeometryManager::EmptyRowConnections
virtual int EmptyRowConnections(int index)=0
PixelGeometryManager::GetSide
virtual int GetSide()=0
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:74
GeoVPixelFactory::m_sqliteReader
GeoModelIO::ReadGeoModel * m_sqliteReader
Definition: GeoVPixelFactory.h:46
PixelGeometryManager::DesignPitchZ
virtual double DesignPitchZ(bool isModule3D=false)=0
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:360
GeoVPixelFactory::m_DDmgr
InDetDD::PixelDetectorManager * m_DDmgr
Definition: GeoVPixelFactory.h:45
GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: GeoVPixelFactory.h:43
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
InDetDD::detail::makePixelDiodeTree
PixelDiodeTree makePixelDiodeTree(T_MsgParent *gmt_mgr, InDetDD::PixelReadoutTechnology readoutTechnology, const std::array< int, kNDirections > &circuits, const std::array< int, kNDirections > &dimPerCircuit, const std::array< std::array< double, kNDirections >, kNPixelLocations > &pitch, FENumbering fe_numbering)
Definition: PixelGeoUtils.h:54
GeoPixelSiCrystal::m_nPhiDesigns
unsigned int m_nPhiDesigns
Definition: GeoPixelSiCrystal.h:38
PixelGeometryManager::DesignRPActiveArea
virtual double DesignRPActiveArea(bool isModule3D=false)=0
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
PixelGeometryManager::DesignDiodeRowsPerCircuit
virtual int DesignDiodeRowsPerCircuit(bool isModule3D=false)=0
PixelGeometryManager::PixelBoardThickness
virtual double PixelBoardThickness(bool isModule3D=false)=0
InDetDD::detail::FENumbering
FENumbering
Definition: PixelGeoUtils.h:24
PixelGeometryManager::Eta
virtual int Eta()=0
PixelGeometryManager::DesignCircuitsPhi
virtual int DesignCircuitsPhi(bool isModule3D=false)=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::DesignPitchZLong
virtual double DesignPitchZLong(bool isModule3D=false)=0
InDetDD::detail::FENumbering::kRegular
@ kRegular
PixelGeometryManager::isEndcap
virtual bool isEndcap()=0
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
GeoVPixelFactory::m_mat_mgr
InDetMaterialManager * m_mat_mgr
Definition: GeoVPixelFactory.h:44
PixelGeometryManager::DesignReadoutSide
virtual int DesignReadoutSide(bool isModule3D=false)=0
InDetDD::detail::FENumbering::kMirror
@ kMirror
PixelGeometryManager::PixelBoardLength
virtual double PixelBoardLength(bool isModule3D=false)=0
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
DEBUG
#define DEBUG
Definition: page_access.h:11
GeoPixelSiCrystal::m_design
std::array< const InDetDD::SiDetectorDesign *, 2 > m_design
Definition: GeoPixelSiCrystal.h:39
PixelGeometryManager::getIdHelper
virtual const PixelID * getIdHelper()=0
PixelGeometryManager::PixelBoardWidth
virtual double PixelBoardWidth(bool isModule3D=false)=0
PixelGeometryManager::getMaterialName
virtual std::string getMaterialName(const std::string &volumeName, int layerdisk=0, int typenum=0)=0
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
PixelGeometryManager::commonItems
virtual InDetDD::SiCommonItems * commonItems()=0
InDetDD::detail::kNDirections
@ kNDirections
Definition: PixelGeoUtils.h:22
PixelGeometryManager::EmptyRows
virtual int EmptyRows(int index)=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:100
PixelID
Definition: PixelID.h:67
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
PixelGeometryManager::DesignPitchRP
virtual double DesignPitchRP(bool isModule3D=false)=0
MakeSliceSet.logname
logname
Definition: MakeSliceSet.py:34
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:128
PixelGeometryManager::DesignCellColumnsPerCircuit
virtual int DesignCellColumnsPerCircuit(bool isModule3D=false)=0
GeoPixelSiCrystal::m_isBLayer
bool m_isBLayer
Definition: GeoPixelSiCrystal.h:40
PixelGeometryManager::GetLD
virtual int GetLD()=0
PixelGeometryManager::Phi
virtual int Phi()=0