 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include <Acts/Clusterization/Clusterization.hpp>
24 int getCellColumn(
const StripClusteringTool::Cell&
cell)
30 static inline void clusterReserve(StripClusteringTool::Cluster&
cl,
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
97 collection.emplace_back();
98 bool goodModule =
true;
100 goodModule = stripDetElStatus.
isGood(idHash);
109 return StatusCode::SUCCESS;
115 unsigned int nFiredStrips = 0
u;
117 nFiredStrips += rdo->getGroupSize();
120 return StatusCode::SUCCESS;
123 std::optional<std::pair<typename IStripClusteringTool::CellCollection,bool>> unpckd
124 =
unpackRDOs(ctx, RDOs, stripDetElStatus, element);
126 if (not unpckd.has_value()) {
127 ATH_MSG_FATAL(
"Error encountered while unpacking strip RDOs!");
128 return StatusCode::FAILURE;
131 auto& [
cells, badStripOnModule] = *unpckd;
137 Acts::Ccl::createClusters<CellCollection, typename IStripClusteringTool::ClusterCollection, 1>(
cells);
138 collection.back() = std::move(
clusters);
140 return StatusCode::SUCCESS;
158 Eigen::Matrix<float,1,1> localCov(pitch * pitch *
ONE_TWELFTH);
172 ATH_MSG_FATAL(
"Exception thrown while creating xAOD::StripCluster:"
176 for (
const auto&
id :
cl.ids)
178 return StatusCode::FAILURE;
182 return StatusCode::SUCCESS;
187 Eigen::Matrix<float,1,1>,
188 Eigen::Matrix<float,3,1>>
189 computePosition(
const StripClusteringTool::Cluster& cluster,
205 pos = 0.5 * (
pos + backPos);
209 pos.xPhi(
pos.xPhi() + lorentzShift );
219 return std::make_pair(Eigen::Matrix<float,1,1>(
pos.xPhi()),
228 Eigen::Matrix<float,1,1>& localCov,
234 std::size_t
size = cluster.ids.size();
236 auto [localPos, globalPos]
237 = computePosition(cluster,
size, lorentzShift, stripID, element, design);
244 cl.setIdentifier( cluster.ids.front() );
247 cl.globalPosition() = globalPos;
249 cl.setChannelsInPhi(
size);
250 cl.setRDOlist(std::move(cluster.ids));
252 return StatusCode::SUCCESS;
273 if (stripDetElStatus) {
274 const int strip_i{stripID.
strip(stripId)};
285 std::optional<std::pair<typename IStripClusteringTool::CellCollection, bool>>
287 const RawDataCollection& RDOs,
293 CellCollection
cells;
296 bool badStripOnModule{
false};
303 bool cache_valid =
false;
312 std::bitset<3> timePattern(raw3->
getTimeBin());
325 if (!cache_valid || waferId_compact != waferId_compact_cache) {
326 waferId_compact_cache = waferId_compact;
331 std::size_t iFirstStrip =
static_cast<size_t>(
m_stripID->
strip(firstStripId));
334 iFirstStrip + raw->getGroupSize(),
338 for (
size_t i = iFirstStrip;
i < iMaxStrip;
i++) {
343 <<
", wafer is: " << waferId);
344 badStripOnModule =
true;
347 cells.emplace_back(
i, stripIdent, std::move(timePattern));
352 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.