46 const std::vector<short>& badChannels,
48 typename T::const_iterator begin =
input.begin();
49 typename T::const_iterator
end =
input.end();
51 edm::LogInfo(
"PixelThresholdClusterizerForBricked::clusterizeDetUnitT()");
56 <<
"@SUB=PixelThresholdClusterizerForBricked::clusterizeDetUnitT()" 57 <<
" No digis to clusterize";
80 for (
unsigned int i = 0;
i <
theSeeds.size();
i++) {
123 std::stack<SiPixelCluster::PixelPos, std::vector<SiPixelCluster::PixelPos> > dead_pixel_stack;
138 acluster.
add(pix, seed_adc);
141 bool dead_flag =
false;
142 while (!acluster.
empty()) {
144 auto curInd = acluster.
top();
149 int LowerAccLimity = 0;
150 int UpperAccLimity = 0;
152 if (
r % 2 ==
int(acluster.
x[curInd]) % 2) {
153 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - 1);
158 int parity_curr =
int(acluster.
x[curInd]) % 2;
159 int parity_hit =
r % 2;
161 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - parity_hit);
170 for (
auto c = LowerAccLimity;
c < UpperAccLimity; ++
c) {
174 if (!acluster.
add(newpix, newpix_adc))
197 bool have_second_cluster =
false;
198 while (!dead_pixel_stack.empty()) {
201 dead_pixel_stack.pop();
209 output.push_back(second_cluster);
210 have_second_cluster =
true;
215 const std::vector<SiPixelCluster::Pixel>& branch_pixels = second_cluster.
pixels();
216 for (
unsigned int i = 0;
i < branch_pixels.size();
i++) {
217 auto const temp_x = branch_pixels[
i].x;
218 auto const temp_y = branch_pixels[
i].y;
219 auto const temp_adc = branch_pixels[
i].adc;
221 cluster.
add(newpix, temp_adc);
227 output.push_back(first_cluster);
~PixelThresholdClusterizerForBricked() override
unsigned int pxbLayer(const DetId &id) const
SiPixelArrayBuffer theBuffer
Data storage.
const int theClusterThreshold_L1
SiPixelCluster make_cluster(const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)
The actual clustering algorithm: group the neighboring pixels around the seed.
const int thePixelThreshold
Log< level::Error, false > LogError
void set_adc(int row, int col, int adc)
static std::string const input
const int theSeedThreshold
const std::vector< Pixel > pixels() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void add(const PixelPos &pix, int adc)
Log< level::Info, false > LogInfo
void clusterizeDetUnitT(const T &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)
Cluster pixels. This method operates on a matrix of pixels and finds the largest contiguous cluster a...
void clear_buffer(DigiIterator begin, DigiIterator end)
Clear the internal buffer array.
std::vector< bool > theFakePixels
const int theClusterThreshold
SiPixelCluster make_cluster_bricked(const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output, bool isbarrel)
The actual clustering algorithm: group the neighboring pixels around the seed.
Pixel cluster – collection of neighboring pixels above threshold.
const bool doSplitClusters
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
constexpr int row() const
bool setup(const PixelGeomDetUnit *pixDet)
Private helper methods:
constexpr int col() const
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
std::vector< SiPixelCluster::PixelPos > theSeeds
PixelThresholdClusterizerForBricked(edm::ParameterSet const &conf)
void copy_to_buffer(DigiIterator begin, DigiIterator end)
Copy adc counts from PixelDigis into the buffer, identify seeds.
A specific threshold-based pixel clustering algorithm.