Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include <Acts/Clusterization/Clusterization.hpp>
31 int& getCellLabel(StripClusteringTool::Cell&
cell)
38 void clusterAddCell(StripClusteringTool::Cluster&
cl,
const StripClusteringTool::Cell&
cell)
41 if (
cl.ids.size() < (
sizeof(
cl.hitsInThirdTimeBin) * 8)) {
42 cl.hitsInThirdTimeBin |=
cell.timeBits.test(0) <<
cl.ids.size();
47 const std::string&
type,
const std::string&
name,
const IInterface*
parent)
63 return StatusCode::SUCCESS;
79 return StatusCode::FAILURE;
82 return StatusCode::SUCCESS;
94 std::stringstream
msg;
96 throw std::runtime_error(
msg.str());
104 const IDHelper& stripID,
105 const EventContext& ctx,
106 ClusterContainer& container)
const
112 bool goodModule =
true;
114 if (stripDetElStatus !=
nullptr) {
115 goodModule = stripDetElStatus->
isGood(idHash);
127 return StatusCode::SUCCESS;
133 unsigned int nFiredStrips = 0
u;
135 nFiredStrips += rdo->getGroupSize();
138 return StatusCode::SUCCESS;
144 if (stripDetEle ==
nullptr) {
146 return StatusCode::FAILURE;
157 Eigen::Matrix<float,1,1> localCov(pitch * pitch *
ONE_TWELFTH);
160 std::optional<std::pair<CellCollection,bool>> unpckd
161 =
unpackRDOs(RDOs, stripID, stripDetElStatus, ctx);
162 if (not unpckd.has_value()) {
163 ATH_MSG_FATAL(
"Error encountered while unpacking strip RDOs!");
164 return StatusCode::FAILURE;
167 auto& [
cells, badStripOnModule] = *unpckd;
170 Acts::Ccl::createClusters<CellCollection, ClusterCollection, 1>(
cells);
173 std::size_t previousSizeContainer = container.size();
175 std::vector<xAOD::StripCluster*> toAddCollection;
176 toAddCollection.reserve(
clusters.size());
179 container.insert(container.end(), toAddCollection.begin(), toAddCollection.end());
200 *container[previousSizeContainer+
i]));
202 ATH_MSG_FATAL(
"Exception thrown while creating xAOD::StripCluster:"
208 return StatusCode::FAILURE;
212 return StatusCode::SUCCESS;
218 Eigen::Matrix<float,1,1>,
219 Eigen::Matrix<float,3,1>>
226 std::size_t
size = cluster.ids.size();
233 pos = 0.5 * (
pos + backPos);
237 pos.xPhi(
pos.xPhi() + lorentzShift );
246 return std::make_pair(Eigen::Matrix<float,1,1>(
pos.xPhi()),
255 Eigen::Matrix<float,1,1>& localCov,
261 auto [localPos, globalPos]
262 = computePosition(cluster, lorentzShift, stripID, element, design);
268 cl.setMeasurement<1>(element->
identifyHash(), localPos, localCov);
269 cl.setIdentifier( cluster.ids.front().get_compact() );
270 cl.globalPosition() = globalPos;
271 cl.setRDOlist(cluster.ids);
272 cl.setChannelsInPhi(cluster.ids.size());
274 return StatusCode::SUCCESS;
295 if (stripDetElStatus) {
296 const int strip_i{stripID.
strip(stripId)};
307 std::optional<std::pair<StripClusteringTool::CellCollection, bool>>
311 const EventContext& ctx)
const
316 bool badStripOnModule{
false};
325 std::bitset<3> timePattern(raw3->
getTimeBin());
334 size_t iFirstStrip =
static_cast<size_t>(stripID.
strip(firstStripId));
336 iFirstStrip + raw->getGroupSize(),
337 static_cast<size_t>(stripID.
strip_max(waferId)) + 1
340 for (
size_t i = iFirstStrip;
i < iMaxStrip;
i++) {
342 if (
isBadStrip(ctx, stripDetElStatus, stripID, waferHash, stripIdent)) {
345 <<
", wafer is: " << waferId);
346 badStripOnModule =
true;
349 cells.emplace_back(
i, stripIdent, std::move(timePattern));
353 return std::make_pair(std::move(
cells), badStripOnModule);
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
unsigned int value() const
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
Trk::Surface & surface()
Element Surface.
bool isCellGood(IdentifierHash hash, unsigned short cell_i) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
@ u
Enums for curvilinear frames.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
::StatusCode StatusCode
StatusCode definition for legacy code.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isGood(IdentifierHash hash) const
StatusCode initialize(bool used=true)
#define ATH_MSG_WARNING(x)
int strip(const Identifier &id) const
int strip_max(const Identifier &id) const
constexpr double ONE_TWELFTH
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
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):
SiLocalPosition localPositionOfCellPC(const SiCellId &cellId) const
This is for debugging only.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
virtual double phiPitch() const =0
Pitch in phi direction.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
virtual Identifier identify() const override final
identifier of this detector element (inline)
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.