|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    6 #include <Acts/Clusterization/Clusterization.hpp> 
   15 #include <unordered_set> 
   25   static inline int getCellRow(
const typename PixelClusteringTool::Cell& 
cell) { 
return cell.ROW; }
 
   26   static inline int getCellColumn(
const typename PixelClusteringTool::Cell& 
cell) { 
return cell.COL; }
 
   27   static inline void clusterReserve(PixelClusteringTool::Cluster& 
cl,
 
   33   static inline void clusterAddCell(PixelClusteringTool::Cluster& 
cl,
 
   34                     const PixelClusteringTool::Cell& 
cell)
 
   37     cl.tots.push_back(
cell.TOT);
 
   38     if (
cell.LVL1 < 
cl.lvl1min)
 
   61   return StatusCode::SUCCESS;
 
   65     const std::string& 
type, 
const std::string& 
name, 
const IInterface* 
parent)
 
   71                  PixelClusteringTool::Cluster &cluster,
 
   82   std::vector<float> chargeList;
 
   83   if (calibData) chargeList.reserve(cluster.ids.size());
 
   99   for (
size_t i = 0; 
i < cluster.ids.size(); 
i++) {
 
  111     int tot = cluster.tots.at(
i);
 
  114     std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
 
  123     return StatusCode::FAILURE;
 
  137         chargeList.push_back(
charge);
 
  150         chargeList.push_back(
charge);
 
  158        rowmax_diode = si_param;
 
  162        rowmin_diode = si_param;
 
  166        colmax_diode = si_param;
 
  170        colmin_diode = si_param;
 
  192   const int colWidth = colmax - colmin + 1;
 
  193   const int rowWidth = rowmax - rowmin + 1;
 
  195   double etaWidth = colmax_diode.xEtaMax() - colmin_diode.xEtaMin(); 
 
  196   double phiWidth = rowmax_diode.xPhiMax() - rowmin_diode.xPhiMin(); 
 
  204   double Ax[3] = {T(0,0),T(1,0),T(2,0)};
 
  205   double Ay[3] = {T(0,1),T(1,1),T(2,1)};
 
  206   double R [3] = {T(0,3),T(1,3),T(2,3)};
 
  209   Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
 
  212   float width0, width1;
 
  220       width1 = etaWidth / colWidth;
 
  225   Eigen::Matrix<float,2,1> localPosition(locpos.x(), locpos.y());
 
  227   localCovariance(0, 0) = width0 * width0 / 12.0f; 
 
  228   localCovariance(1, 1) = width1 * width1 / 12.0f;
 
  230   xaodcluster.
setMeasurement<2>(moduleHash, localPosition, localCovariance);
 
  232   xaodcluster.
setRDOlist(std::move(cluster.ids));
 
  235   xaodcluster.
setToTlist(std::move(cluster.tots));
 
  238   xaodcluster.
setLVL1A(cluster.lvl1min);
 
  244   return StatusCode::SUCCESS;
 
  249                 const RawDataCollection& RDOs,
 
  252         Acts::Ccl::ClusteringData& 
data,
 
  253                 std::vector<ClusterCollection>& collection)
 const 
  256   collection.emplace_back();
 
  257   if ( not pixelDetElStatus.
isGood(idHash) ) {
 
  261     return StatusCode::SUCCESS;
 
  267   Acts::Ccl::createClusters<CellCollection, ClusterCollection, 2>
 
  270   return StatusCode::SUCCESS;
 
  286     calibData = calibDataHandle.
cptr();
 
  290       return StatusCode::FAILURE;
 
  314   return StatusCode::SUCCESS;
 
  325   CellCollection 
cells;
 
  329   for (
const auto *
const rdo : RDOs) {
 
  331     std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
 
  339     if (not pixelDetElStatus.
isChipGood(idHash, fe)) {
 
  343     const int lvl1 = rdo->getLVL1A();
 
  344     const int tot = rdo->getToT();
 
  353       std::optional<Identifier> gangedID = 
isGanged(rdoID, element);
 
  354       if (gangedID.has_value()) {
 
  359                            gangedID->get_compact());
 
  368 inline std::optional<Identifier>
 
  
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
char data[hepevt_bytes_allocation_ATLAS]
void setTotalCharge(float totalCharge)
Sets the total charge.
int phi_index(const Identifier &id) const
SiCellId connectedCell(const SiCellId cellId, int number) const
Get the cell ids sharing the readout for this cell.
const Vector2D & position() const
get the cached position of this diode
bool isChipGood(IdentifierHash hash, unsigned int chip) const
Eigen::Matrix< double, 2, 1 > Vector2D
int computeTotalToT(const SG::AuxElement &cluster)
Trk::Surface & surface()
Element Surface.
value_type get_compact() const
Get the compact id.
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
void setChargelist(const std::vector< float > &charges)
Sets the list of charges of the channels building the cluster.
void setIsSplit(bool isSplit)
Sets if the cluster is split or not.
const std::string & key() const
Return the StoreGate ID for the referenced object.
void setWidthInEta(float widthInEta)
Sets the width of the cluster in eta (y) direction.
bool empty() const
Test if the key is blank.
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
PixelDiodeTree::DiodeProxy diodeProxyFromIdx(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
PixelDiodeTree::DiodeProxyWithPosition diodeProxyFromIdxCachePosition(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
void setTotalToT(int totalToT)
Sets the total ToT.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
static InDetDD::PixelDiodeType getDiodeType(const PixelDiodeTree::DiodeProxy &diode_proxy)
void setSplitProbabilities(float prob1, float prob2)
Sets the splitting probabilities for the cluster.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
A diode proxy which caches the position of a diode.
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
int numberOfConnectedCells(const SiCellId cellId) const
Test if readout cell has more than one diode associated with it.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
Eigen::Affine3d Transform3D
void setToTlist(const std::vector< int > &tots)
Sets the list of ToT of the channels building the cluster.
int eta_index(const Identifier &id) const
CalibrationStrategy getCalibrationStrategy(unsigned int moduleHash) const
void setLVL1A(int lvl1a)
Sets the LVL1 accept.
float computeTotalCharge(const SG::AuxElement &cluster)
bool isGood(IdentifierHash hash) const
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
double charge(const T &p)
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
PixelReadoutTechnology getReadoutTechnology() const
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
Helper class to access parameters of a diode.
void setChannelsInPhiEta(int channelsInPhi, int channelsInEta)
Sets the dimensions of the cluster in numbers of channels in phi (x) and eta (y) directions.
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
const_pointer_type cptr()