 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include <Acts/Clusterization/Clusterization.hpp>
24 int getCellColumn(
const StripClusteringTool::Cell&
cell)
31 int& getCellLabel(StripClusteringTool::Cell&
cell)
38 void clusterAddCell(StripClusteringTool::Cluster&
cl,
const StripClusteringTool::Cell&
cell)
40 cl.ids.push_back(
cell.id.get_compact());
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)
65 return StatusCode::SUCCESS;
81 return StatusCode::FAILURE;
84 return StatusCode::SUCCESS;
89 const RawDataCollection& RDOs,
92 std::vector<typename IStripClusteringTool::ClusterCollection>& collection)
const
96 bool goodModule =
true;
98 goodModule = stripDetElStatus.
isGood(idHash);
107 return StatusCode::SUCCESS;
113 unsigned int nFiredStrips = 0
u;
115 nFiredStrips += rdo->getGroupSize();
118 return StatusCode::SUCCESS;
121 std::optional<std::pair<typename IStripClusteringTool::CellCollection,bool>> unpckd
122 =
unpackRDOs(ctx, RDOs, stripDetElStatus, element);
124 if (not unpckd.has_value()) {
125 ATH_MSG_FATAL(
"Error encountered while unpacking strip RDOs!");
126 return StatusCode::FAILURE;
129 auto& [
cells, badStripOnModule] = *unpckd;
135 Acts::Ccl::createClusters<CellCollection, typename IStripClusteringTool::ClusterCollection, 1>(
cells);
136 collection.push_back( std::move(
clusters) );
138 return StatusCode::SUCCESS;
156 Eigen::Matrix<float,1,1> localCov(pitch * pitch *
ONE_TWELFTH);
170 ATH_MSG_FATAL(
"Exception thrown while creating xAOD::StripCluster:"
174 for (
const auto&
id :
cl.ids)
176 return StatusCode::FAILURE;
180 return StatusCode::SUCCESS;
185 Eigen::Matrix<float,1,1>,
186 Eigen::Matrix<float,3,1>>
187 computePosition(
const StripClusteringTool::Cluster& cluster,
203 pos = 0.5 * (
pos + backPos);
207 pos.xPhi(
pos.xPhi() + lorentzShift );
217 return std::make_pair(Eigen::Matrix<float,1,1>(
pos.xPhi()),
226 Eigen::Matrix<float,1,1>& localCov,
232 std::size_t
size = cluster.ids.size();
234 auto [localPos, globalPos]
235 = computePosition(cluster,
size, lorentzShift, stripID, element, design);
242 cl.setIdentifier( cluster.ids.front() );
245 cl.globalPosition() = globalPos;
247 cl.setChannelsInPhi(
size);
248 cl.setRDOlist(std::move(cluster.ids));
250 return StatusCode::SUCCESS;
271 if (stripDetElStatus) {
272 const int strip_i{stripID.
strip(stripId)};
283 std::optional<std::pair<typename IStripClusteringTool::CellCollection, bool>>
285 const RawDataCollection& RDOs,
291 CellCollection
cells;
294 bool badStripOnModule{
false};
301 bool cache_valid =
false;
310 std::bitset<3> timePattern(raw3->
getTimeBin());
323 if (!cache_valid || waferId_compact != waferId_compact_cache) {
324 waferId_compact_cache = waferId_compact;
329 std::size_t iFirstStrip =
static_cast<size_t>(
m_stripID->
strip(firstStripId));
332 iFirstStrip + raw->getGroupSize(),
336 for (
size_t i = iFirstStrip;
i < iMaxStrip;
i++) {
341 <<
", wafer is: " << waferId);
342 badStripOnModule =
true;
345 cells.emplace_back(
i, stripIdent, std::move(timePattern));
350 return std::make_pair(std::move(
cells), badStripOnModule);
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
Trk::Surface & surface()
Element Surface.
value_type get_compact() const
Get the compact id.
bool isCellGood(IdentifierHash hash, unsigned short cell_i) const
bool empty() const
Test if the key is blank.
@ u
Enums for curvilinear frames.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
#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
unsigned long long value_type
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.
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.