 |
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)
60 return StatusCode::SUCCESS;
64 const std::string&
type,
const std::string&
name,
const IInterface*
parent)
74 const double lorentz_shift,
81 std::vector<float> chargeList;
82 if (calibData) chargeList.reserve(cluster.ids.size());
98 for (
size_t i = 0;
i < cluster.ids.size();
i++) {
110 int tot = cluster.tots.at(
i);
113 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
126 return StatusCode::FAILURE;
134 chargeList.push_back(
charge);
145 chargeList.push_back(
charge);
153 rowmax_diode = si_param;
157 rowmin_diode = si_param;
161 colmax_diode = si_param;
165 colmin_diode = si_param;
187 const int colWidth = colmax - colmin + 1;
188 const int rowWidth = rowmax - rowmin + 1;
190 double etaWidth = colmax_diode.xEtaMax() - colmin_diode.xEtaMin();
191 double phiWidth = rowmax_diode.xPhiMax() - rowmin_diode.xPhiMin();
198 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
199 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
200 double R [3] = {T(0,3),T(1,3),T(2,3)};
203 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]);
206 float width0, width1;
214 width1 = etaWidth / colWidth;
219 Eigen::Matrix<float,2,1> localPosition(locpos.x(), locpos.y());
221 localCovariance(0, 0) = width0 * width0 / 12.0f;
222 localCovariance(1, 1) = width1 * width1 / 12.0f;
224 xaodcluster.
setMeasurement<2>(moduleHash, localPosition, localCovariance);
226 xaodcluster.
setRDOlist(std::move(cluster.ids));
229 xaodcluster.
setToTlist(std::move(cluster.tots));
232 xaodcluster.
setLVL1A(cluster.lvl1min);
238 return StatusCode::SUCCESS;
243 const RawDataCollection& RDOs,
246 Acts::Ccl::ClusteringData&
data,
247 std::vector<ClusterCollection>& collection)
const
250 collection.emplace_back();
251 if ( not pixelDetElStatus.
isGood(idHash) ) {
255 return StatusCode::SUCCESS;
261 Acts::Ccl::createClusters<CellCollection, ClusterCollection, 2>
264 return StatusCode::SUCCESS;
280 calibData = calibDataHandle.
cptr();
284 return StatusCode::FAILURE;
310 return StatusCode::SUCCESS;
321 CellCollection
cells;
325 for (
const auto *
const rdo : RDOs) {
327 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
335 if (not pixelDetElStatus.
isChipGood(idHash, fe)) {
339 const int lvl1 = rdo->getLVL1A();
340 const int tot = rdo->getToT();
349 std::optional<Identifier> gangedID =
isGanged(rdoID, element);
350 if (gangedID.has_value()) {
355 gangedID->get_compact());
364 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)
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.
::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()