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

#include <PixelDetectorDC1DC2.h>

Inheritance diagram for PixelGeoDC2::GeoPixelSiCrystal:
Collaboration diagram for PixelGeoDC2::GeoPixelSiCrystal:

Public Member Functions

 GeoPixelSiCrystal (InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr, bool isBLayer)
 
virtual GeoVPhysVol * Build () override
 
Identifier getID ()
 

Protected Attributes

PixelGeometryManagerm_gmt_mgr {}
 
StoredMaterialManagerm_mat_mgr {}
 
InDetDD::PixelDetectorManagerm_DDmgr {}
 
const double m_epsilon {}
 

Private Attributes

Identifier m_id
 
const InDetDD::SiDetectorDesignm_design {}
 
bool m_isBLayer {}
 

Detailed Description

Definition at line 310 of file PixelDetectorDC1DC2.h.

Constructor & Destructor Documentation

◆ GeoPixelSiCrystal()

GeoPixelSiCrystal::GeoPixelSiCrystal ( InDetDD::PixelDetectorManager ddmgr,
PixelGeometryManager mgr,
bool  isBLayer 
)

local-x/phi/row ^ big (1) .... normal pitch (columnsPerCircuit-2) ... big

Definition at line 1171 of file PixelDetectorDC1DC2.cxx.

1174  : GeoVPixelFactory (ddmgr, mgr)
1175 {
1176  //
1177  //Builds the design for this crystal
1178  m_isBLayer = isBLayer;
1179  //SiDetectorDesign::Axis etaAxis = SiDetectorDesign::zAxis;
1180  //SiDetectorDesign::Axis phiAxis = SiDetectorDesign::yAxis;
1181  //SiDetectorDesign::Axis depthAxis = SiDetectorDesign::xAxis;
1182  double thickness = m_gmt_mgr->PixelBoardThickness();
1183  int circuitsPerEta = m_gmt_mgr->DesignCircuitsPerColumn();
1184  int circuitsPerPhi = m_gmt_mgr->DesignCircuitsPerRow();
1185  int CellRowPerCirc = m_gmt_mgr->DesignCellRowsPerCircuit(isBLayer);
1186  int CellColPerCirc = m_gmt_mgr->DesignCellColumnsPerCircuit(isBLayer);
1187  int rowsPerCircuit = m_gmt_mgr->DesignDiodeRowsPerCircuit(isBLayer);
1188  int columnsPerCircuit = m_gmt_mgr->DesignDiodeColumnsPerCircuit(isBLayer);
1189 
1190  // Add the matrix in the same way as from AGDD...
1191  //
1192  //double startRP = -m_gmt_mgr->DesignRPActiveArea()/2.;
1193  //double startZ = -m_gmt_mgr->DesignZActiveArea()/2.;
1194  //double ColSize = m_gmt_mgr->DesignZActiveArea()/m_gmt_mgr->DesignCircuitsPerRow();
1195  double pitchEtaBig = m_gmt_mgr->DesignPitchZ(isBLayer) + m_gmt_mgr->DesignGapZ()/2;
1196  double pitchPhi = m_gmt_mgr->DesignPitchRP(isBLayer);
1197  double pitchEta = m_gmt_mgr->DesignPitchZ(isBLayer);
1198 
1199  // assumed layout
1200  // circuit :
1202  // | .
1203  // | .
1204  // | .
1205  // +---> local-y / eta/ column
1206  //
1207  // full matrix : matrix of n-circuits n | ... | N/2
1208  // with 2 rows ----------------
1209  // 0 | ... | N/2-1
1210 
1211  constexpr auto readoutTechnology = InDetDD::PixelReadoutTechnology::FEI3;
1215  readoutTechnology,
1216  std::array<int,kNDirections>{circuitsPerPhi,circuitsPerEta}, // [0]=phi/row, [1]=eta/column
1217  std::array<int,kNDirections>{rowsPerCircuit,columnsPerCircuit}, // [0]=phi/row, [1]=eta/column
1218  std::array<std::array<double,kNDirections>,kNPixelLocations>{ // regular/central,longEnd/outer,long/inner
1219  std::array<double,kNDirections>{pitchPhi,pitchEta},
1220  std::array<double,kNDirections>{0.,pitchEtaBig},
1221  std::array<double,kNDirections>{0.,pitchEtaBig}});
1222 
1223  std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness,
1224  circuitsPerEta,
1225  circuitsPerPhi,
1226  CellColPerCirc,
1227  CellRowPerCirc,
1228  columnsPerCircuit,
1229  rowsPerCircuit,
1230  std::move(diode_tree),
1232  -1, /* readout side */
1233  false, /* 3D */
1234  InDetDD::Undefined, /* detector type */
1235  readoutTechnology);
1236 
1237  // Multiple connections (ganged pixels)
1238  if (m_gmt_mgr->NumberOfEmptyRows() > 0) {
1239  int minRow = m_gmt_mgr->EmptyRows(0);
1240  int maxRow = minRow;
1241 
1242 
1243  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1244  minRow = std::min(minRow, m_gmt_mgr->EmptyRows(iConnect));
1245  minRow = std::min(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1246  maxRow = std::max(maxRow, m_gmt_mgr->EmptyRows(iConnect));
1247  maxRow = std::max(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1248  }
1249 
1250  std::vector <int> connections(maxRow-minRow+1);
1251 
1252  // We fill them all with a one to one correspondence first.
1253  for (unsigned int iRow = 0; iRow < connections.size(); iRow++){
1254  connections[iRow] = iRow + minRow;
1255  }
1256 
1257  // Now make the connections.
1258  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1259  connections[m_gmt_mgr->EmptyRows(iConnect)-minRow] = m_gmt_mgr->EmptyRowConnections(iConnect);
1260  }
1261 
1262  //std::cout << "MinRow = " << minRow << std::endl;
1263  //std::cout << "MaxRow = " << maxRow << std::endl;
1264  //for (unsigned int iRow = 0; iRow < connections.size(); iRow++){
1265  // std::cout << iRow << " " << connections[iRow] << std::endl;
1266  //}
1267 
1268  p_barrelDesign2->addMultipleRowConnection(minRow, connections);
1269 
1270  } else {
1271  // No empty rows.
1272  std::cout << "GeoPixelSiCrystal: Warning - No ganged pixels" << std::endl;
1273  }
1274 
1275 
1276  m_design = m_DDmgr->addDesign(std::move(p_barrelDesign2));
1277 
1278 }

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelSiCrystal::Build ( )
overridevirtual

Implements PixelGeoDC2::GeoVPixelFactory.

Definition at line 1279 of file PixelDetectorDC1DC2.cxx.

1279  {
1280  //
1281  // Dimensions
1282  //
1283  double length = m_gmt_mgr->PixelBoardLength();
1284  double thickness = m_gmt_mgr->PixelBoardThickness();
1285  double width = m_gmt_mgr->PixelBoardWidth();
1286  const GeoMaterial* siMat = m_mat_mgr->getMaterial("std::Silicon");
1287  const GeoBox* siBox = new GeoBox(thickness/2.,width/2.,length/2.);
1288  std::string logname;
1289  if(m_isBLayer) logname = "siBLayLog";
1290  else logname = "siLog";
1291  GeoLogVol* theSi = new GeoLogVol(logname,siBox,siMat);
1292  GeoFullPhysVol* siPhys = new GeoFullPhysVol(theSi);
1293  //
1294  // Add this to the list of detector elements:
1295  //
1296  int brl_ec=0;
1297  //
1298  // Build the Identifier for the silicon:
1299  //
1300  if(m_gmt_mgr->isBarrel() ) brl_ec = 0;
1301  if(m_gmt_mgr->isEndcap() ) brl_ec = 2*m_gmt_mgr->GetSide();
1302  const PixelID *ppp = m_gmt_mgr->getIdHelper();
1303  Identifier idwafer;
1304  if(brl_ec == 0) {
1305  idwafer = ppp->wafer_id(brl_ec,m_gmt_mgr->GetLD(),m_gmt_mgr->Phi(),m_gmt_mgr->Eta());
1306  } else {
1307  int phimod;
1308  //
1309  // This is evaluating the phimod. It's a bit complicated as I have to
1310  // assign the numbers corresponding to a counter-clockwise rotation
1311  // in the disk reference frame. For the (eta) positive endcap I just
1312  // have to match the start position with the start of the rotation.
1313  //
1314  if(brl_ec == 2) {
1315  phimod = m_gmt_mgr->Phi()*2 + m_gmt_mgr->Eta();
1316  } else {
1317  //
1318  // The (eta) negative) endcap is more complicated, as there is an extra
1319  // rotation of the endcap as a whole around Y
1320  //
1321  phimod = 48-m_gmt_mgr->Phi()*2-m_gmt_mgr->Eta()-2;
1322  if (phimod == -1) phimod = 47;
1323  }
1324 
1325  idwafer = ppp->wafer_id(brl_ec,m_gmt_mgr->GetLD(),phimod,0);
1326  }
1327  m_id=idwafer;
1328 
1329  SiDetectorElement * element = new SiDetectorElement(idwafer, m_design, siPhys, m_gmt_mgr->commonItems());
1330  // Add conditions: (do it here as eventually they will come from the cond DB)
1331  //SiliconConditions conditions(m_gmt_mgr->Temperature(m_isBLayer), m_gmt_mgr->Voltage(m_isBLayer), 0.);
1332  //element->setSiliconConditions(conditions);
1333  // Pass on G3ComptibleDigits option.
1334  // NO LONGER POSSIBLE. DC1 not supported anyway.
1335  // element->setG3CompatibleOrientation(m_gmt_mgr->G3CompatibleDigits());
1336  // add the element to the manager
1337  m_DDmgr->addDetectorElement(element);
1338  return siPhys;
1339 }

◆ getID()

Identifier GeoPixelSiCrystal::getID ( )
inline

Definition at line 326 of file PixelDetectorDC1DC2.h.

326 {return m_id;}

Member Data Documentation

◆ m_DDmgr

InDetDD::PixelDetectorManager* PixelGeoDC2::GeoVPixelFactory::m_DDmgr {}
protectedinherited

Definition at line 53 of file PixelDetectorDC1DC2.h.

◆ m_design

const InDetDD::SiDetectorDesign* PixelGeoDC2::GeoPixelSiCrystal::m_design {}
private

Definition at line 319 of file PixelDetectorDC1DC2.h.

◆ m_epsilon

const double PixelGeoDC2::GeoVPixelFactory::m_epsilon {}
protectedinherited

Definition at line 54 of file PixelDetectorDC1DC2.h.

◆ m_gmt_mgr

PixelGeometryManager* PixelGeoDC2::GeoVPixelFactory::m_gmt_mgr {}
protectedinherited

Definition at line 51 of file PixelDetectorDC1DC2.h.

◆ m_id

Identifier PixelGeoDC2::GeoPixelSiCrystal::m_id
private

Definition at line 318 of file PixelDetectorDC1DC2.h.

◆ m_isBLayer

bool PixelGeoDC2::GeoPixelSiCrystal::m_isBLayer {}
private

Definition at line 320 of file PixelDetectorDC1DC2.h.

◆ m_mat_mgr

StoredMaterialManager* PixelGeoDC2::GeoVPixelFactory::m_mat_mgr {}
protectedinherited

Definition at line 52 of file PixelDetectorDC1DC2.h.


The documentation for this class was generated from the following files:
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
PixelGeoDC2::GeoVPixelFactory::m_gmt_mgr
PixelGeometryManager * m_gmt_mgr
Definition: PixelDetectorDC1DC2.h:51
PixelGeoDC2::PixelGeometryManager::EmptyRows
virtual int EmptyRows(int index)=0
PixelGeoDC2::PixelGeometryManager::DesignCellColumnsPerCircuit
virtual int DesignCellColumnsPerCircuit(bool isBLayer)=0
PixelGeoDC2::PixelGeometryManager::DesignCircuitsPerRow
virtual int DesignCircuitsPerRow()=0
PixelGeoDC2::GeoVPixelFactory::m_DDmgr
InDetDD::PixelDetectorManager * m_DDmgr
Definition: PixelDetectorDC1DC2.h:53
PixelGeoDC2::GeoPixelSiCrystal::m_isBLayer
bool m_isBLayer
Definition: PixelDetectorDC1DC2.h:320
PixelGeoDC2::GeoVPixelFactory::GeoVPixelFactory
GeoVPixelFactory(InDetDD::PixelDetectorManager *ddmgr, PixelGeometryManager *mgr)
Definition: PixelDetectorDC1DC2.cxx:1550
PixelGeoDC2::PixelGeometryManager::EmptyRowConnections
virtual int EmptyRowConnections(int index)=0
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDetDD::detail::kNPixelLocations
@ kNPixelLocations
Definition: PixelGeoUtils.h:19
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
PixelGeoDC2::GeoVPixelFactory::m_mat_mgr
StoredMaterialManager * m_mat_mgr
Definition: PixelDetectorDC1DC2.h:52
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
PixelGeoDC2::GeoPixelSiCrystal::m_design
const InDetDD::SiDetectorDesign * m_design
Definition: PixelDetectorDC1DC2.h:319
PixelGeoDC2::PixelGeometryManager::commonItems
virtual InDetDD::SiCommonItems * commonItems()=0
PixelGeoDC2::PixelGeometryManager::isEndcap
virtual bool isEndcap()=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
PixelGeoDC2::PixelGeometryManager::Phi
virtual int Phi()=0
PixelGeoDC2::PixelGeometryManager::DesignPitchRP
virtual double DesignPitchRP(bool isBLayer)=0
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
PixelGeoDC2::GeoPixelSiCrystal::m_id
Identifier m_id
Definition: PixelDetectorDC1DC2.h:318
PixelGeoDC2::PixelGeometryManager::GetSide
virtual int GetSide()=0
PixelGeoDC2::PixelGeometryManager::PixelBoardLength
virtual double PixelBoardLength()=0
PixelGeoDC2::PixelGeometryManager::PixelBoardWidth
virtual double PixelBoardWidth()=0
PixelGeoDC2::PixelGeometryManager::DesignGapZ
virtual double DesignGapZ()=0
CaloSwCorrections.phimod
def phimod(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:203
PixelGeoDC2::PixelGeometryManager::getIdHelper
virtual const PixelID * getIdHelper()=0
PixelGeoDC2::PixelGeometryManager::DesignCircuitsPerColumn
virtual int DesignCircuitsPerColumn()=0
PixelGeoDC2::PixelGeometryManager::GetLD
virtual int GetLD()=0
PixelGeoDC2::PixelGeometryManager::DesignCellRowsPerCircuit
virtual int DesignCellRowsPerCircuit(bool isBLayer)=0
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelGeoDC2::PixelGeometryManager::DesignDiodeRowsPerCircuit
virtual int DesignDiodeRowsPerCircuit(bool isBLayer)=0
PixelGeoDC2::PixelGeometryManager::Eta
virtual int Eta()=0
PixelGeoDC2::PixelGeometryManager::NumberOfEmptyRows
virtual int NumberOfEmptyRows()=0
PixelGeoDC2::PixelGeometryManager::PixelBoardThickness
virtual double PixelBoardThickness()=0
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
PixelGeoDC2::PixelGeometryManager::isBarrel
virtual bool isBarrel()=0
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
InDetDD::detail::kNDirections
@ kNDirections
Definition: PixelGeoUtils.h:20
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)
Definition: PixelGeoUtils.h:46
PixelID
Definition: PixelID.h:67
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
MakeSliceSet.logname
logname
Definition: MakeSliceSet.py:34
PixelGeoDC2::PixelGeometryManager::DesignDiodeColumnsPerCircuit
virtual int DesignDiodeColumnsPerCircuit(bool isBLayer)=0
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:128
PixelGeoDC2::PixelGeometryManager::DesignPitchZ
virtual double DesignPitchZ(bool isBLayer)=0
Identifier
Definition: IdentifierFieldParser.cxx:14