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 
)

Definition at line 1169 of file PixelDetectorDC1DC2.cxx.

1172  : GeoVPixelFactory (ddmgr, mgr)
1173 {
1174  //
1175  //Builds the design for this crystal
1176  m_isBLayer = isBLayer;
1177  //SiDetectorDesign::Axis etaAxis = SiDetectorDesign::zAxis;
1178  //SiDetectorDesign::Axis phiAxis = SiDetectorDesign::yAxis;
1179  //SiDetectorDesign::Axis depthAxis = SiDetectorDesign::xAxis;
1180  double thickness = m_gmt_mgr->PixelBoardThickness();
1181  int CircPerCol = m_gmt_mgr->DesignCircuitsPerColumn();
1182  int CircPerRow = m_gmt_mgr->DesignCircuitsPerRow();
1183  int CellRowPerCirc = m_gmt_mgr->DesignCellRowsPerCircuit(isBLayer);
1184  int CellColPerCirc = m_gmt_mgr->DesignCellColumnsPerCircuit(isBLayer);
1185  int DiodeRowPerCirc = m_gmt_mgr->DesignDiodeRowsPerCircuit(isBLayer);
1186  int DiodeColPerCirc = m_gmt_mgr->DesignDiodeColumnsPerCircuit(isBLayer);
1187 
1188  // Add the matrix in the same way as from AGDD...
1189  //
1190  //double startRP = -m_gmt_mgr->DesignRPActiveArea()/2.;
1191  //double startZ = -m_gmt_mgr->DesignZActiveArea()/2.;
1192  //double ColSize = m_gmt_mgr->DesignZActiveArea()/m_gmt_mgr->DesignCircuitsPerRow();
1193  double bigEtaPitch = m_gmt_mgr->DesignPitchZ(isBLayer) + m_gmt_mgr->DesignGapZ()/2;
1194  double phiPitch = m_gmt_mgr->DesignPitchRP(isBLayer);
1195  double etaPitch = m_gmt_mgr->DesignPitchZ(isBLayer);
1196 
1197 
1198  std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
1199  std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, bigEtaPitch);
1200 
1201  std::shared_ptr<const PixelDiodeMatrix> singleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
1202  bigCell,
1203  normalCell,
1204  DiodeColPerCirc-2,
1205  bigCell);
1206 
1207  std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
1208  nullptr, singleChipRow, CircPerRow, nullptr);
1209 
1210  std::shared_ptr<const PixelDiodeMatrix> fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
1211  nullptr, singleRow, DiodeRowPerCirc, nullptr);
1212 
1213  std::unique_ptr<PixelModuleDesign> p_barrelDesign2 = std::make_unique<PixelModuleDesign>(thickness,
1214  CircPerCol,
1215  CircPerRow,
1216  CellColPerCirc,
1217  CellRowPerCirc,
1218  DiodeColPerCirc,
1219  DiodeRowPerCirc,
1220  fullMatrix,
1222 
1223  // Multiple connections (ganged pixels)
1224  if (m_gmt_mgr->NumberOfEmptyRows() > 0) {
1225  int minRow = m_gmt_mgr->EmptyRows(0);
1226  int maxRow = minRow;
1227 
1228 
1229  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1230  minRow = std::min(minRow, m_gmt_mgr->EmptyRows(iConnect));
1231  minRow = std::min(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1232  maxRow = std::max(maxRow, m_gmt_mgr->EmptyRows(iConnect));
1233  maxRow = std::max(minRow, m_gmt_mgr->EmptyRowConnections(iConnect));
1234  }
1235 
1236  std::vector <int> connections(maxRow-minRow+1);
1237 
1238  // We fill them all with a one to one correspondence first.
1239  for (unsigned int iRow = 0; iRow < connections.size(); iRow++){
1240  connections[iRow] = iRow + minRow;
1241  }
1242 
1243  // Now make the connections.
1244  for (int iConnect = 0; iConnect < m_gmt_mgr->NumberOfEmptyRows(); iConnect++){
1245  connections[m_gmt_mgr->EmptyRows(iConnect)-minRow] = m_gmt_mgr->EmptyRowConnections(iConnect);
1246  }
1247 
1248  //std::cout << "MinRow = " << minRow << std::endl;
1249  //std::cout << "MaxRow = " << maxRow << std::endl;
1250  //for (unsigned int iRow = 0; iRow < connections.size(); iRow++){
1251  // std::cout << iRow << " " << connections[iRow] << std::endl;
1252  //}
1253 
1254  p_barrelDesign2->addMultipleRowConnection(minRow, connections);
1255 
1256  } else {
1257  // No empty rows.
1258  std::cout << "GeoPixelSiCrystal: Warning - No ganged pixels" << std::endl;
1259  }
1260 
1261 
1262  m_design = m_DDmgr->addDesign(std::move(p_barrelDesign2));
1263 
1264 }

Member Function Documentation

◆ Build()

GeoVPhysVol * GeoPixelSiCrystal::Build ( )
overridevirtual

Implements PixelGeoDC2::GeoVPixelFactory.

Definition at line 1265 of file PixelDetectorDC1DC2.cxx.

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

◆ 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:
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
max
#define max(a, b)
Definition: cfImp.cxx:41
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:1536
PixelGeoDC2::PixelGeometryManager::EmptyRowConnections
virtual int EmptyRowConnections(int index)=0
PixelGeoDC2::GeoVPixelFactory::m_mat_mgr
StoredMaterialManager * m_mat_mgr
Definition: PixelDetectorDC1DC2.h:52
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:364
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
min
#define min(a, b)
Definition: cfImp.cxx:40
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::PixelModuleDesign::addMultipleRowConnection
void addMultipleRowConnection(const int lowerRow, const std::vector< int > &connections)
Add a new multiple connection for rows: lower diode row for which the connection scheme is given vect...
Definition: PixelModuleDesign.h:266
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:121
PixelGeoDC2::PixelGeometryManager::DesignPitchZ
virtual double DesignPitchZ(bool isBLayer)=0