 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include <Acts/Clusterization/Clusterization.hpp>
26 int getCellColumn(
const StripClusteringTool::Cell&
cell)
32 static inline void clusterReserve(StripClusteringTool::Cluster&
cl,
40 void clusterAddCell(StripClusteringTool::Cluster&
cl,
const StripClusteringTool::Cell&
cell)
42 cl.ids.push_back(
cell.id.get_compact());
43 if (
cl.ids.size() < (
sizeof(
cl.hitsInThirdTimeBin) * 8)) {
44 cl.hitsInThirdTimeBin |=
cell.timeBits.test(0) <<
cl.ids.size();
49 const std::string&
type,
const std::string&
name,
const IInterface*
parent)
75 return StatusCode::SUCCESS;
91 return StatusCode::FAILURE;
94 return StatusCode::SUCCESS;
99 const RawDataCollection& RDOs,
102 Acts::Ccl::ClusteringData&
data,
103 std::vector<typename IStripClusteringTool::ClusterCollection>& collection)
const
108 collection.emplace_back();
109 bool goodModule =
true;
111 goodModule = stripDetElStatus.
isGood(idHash);
120 return StatusCode::SUCCESS;
126 unsigned int nFiredStrips = 0
u;
128 nFiredStrips += rdo->getGroupSize();
131 return StatusCode::SUCCESS;
134 std::optional<std::pair<typename IStripClusteringTool::CellCollection,bool>> unpckd
135 =
unpackRDOs(ctx, RDOs, stripDetElStatus, element);
137 if (not unpckd.has_value()) {
138 ATH_MSG_FATAL(
"Error encountered while unpacking strip RDOs!");
139 return StatusCode::FAILURE;
142 auto& [
cells, badStripOnModule] = *unpckd;
147 Acts::Ccl::createClusters<CellCollection, typename IStripClusteringTool::ClusterCollection, 1>(
data,
cells, collection.back());
149 return StatusCode::SUCCESS;
169 Eigen::Matrix<float,1,1> localCov(pitch * pitch *
ONE_TWELFTH);
183 ATH_MSG_FATAL(
"Exception thrown while creating xAOD::StripCluster:"
187 for (
const auto&
id :
cl.ids)
189 return StatusCode::FAILURE;
193 return StatusCode::SUCCESS;
198 Eigen::Matrix<float,1,1>,
199 Eigen::Matrix<float,3,1>>
200 computePosition(
const StripClusteringTool::Cluster& cluster,
217 pos = 0.5 * (
pos + backPos);
221 pos.xPhi(
pos.xPhi() + lorentzShift );
224 if ((not element.
isBarrel()) and isITk) {
232 return std::make_pair(Eigen::Matrix<float,1,1>(
pos.xPhi()),
241 Eigen::Matrix<float,1,1>& localCov,
247 std::size_t
size = cluster.ids.size();
249 auto [localPos, globalPos]
250 = computePosition(cluster,
size, lorentzShift, stripID, element, design,
m_isITk);
277 cl.setIdentifier( cluster.ids.front() );
280 cl.globalPosition() = globalPos;
282 cl.setChannelsInPhi(
size);
283 cl.setRDOlist(std::move(cluster.ids));
285 return StatusCode::SUCCESS;
306 if (stripDetElStatus) {
307 const int strip_i{stripID.
strip(stripId)};
318 std::optional<std::pair<typename IStripClusteringTool::CellCollection, bool>>
320 const RawDataCollection& RDOs,
326 CellCollection
cells;
329 bool badStripOnModule{
false};
337 bool cache_valid =
false;
345 std::bitset<3> timePattern(raw3->
getTimeBin());
358 if (!cache_valid || waferId_compact != waferId_compact_cache) {
359 waferId_compact_cache = waferId_compact;
364 std::size_t iFirstStrip =
static_cast<size_t>(
m_stripID->
strip(firstStripId));
367 iFirstStrip + raw->getGroupSize(),
371 for (
size_t i = iFirstStrip;
i < iMaxStrip;
i++) {
376 <<
", wafer is: " << waferId);
377 badStripOnModule =
true;
380 cells.emplace_back(
i, stripIdent, std::move(timePattern));
385 return std::make_pair(std::move(
cells), badStripOnModule);
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
char data[hepevt_bytes_allocation_ATLAS]
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.
constexpr float twoStripSF
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.
constexpr float oneStripSF
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.