45 const std::vector<short>& badChannels,
47 typename T::const_iterator
begin = input.begin();
48 typename T::const_iterator
end = input.end();
50 edm::LogInfo(
"PixelThresholdClusterizerForBricked::clusterizeDetUnitT()");
55 <<
"@SUB=PixelThresholdClusterizerForBricked::clusterizeDetUnitT()"
56 <<
" No digis to clusterize";
79 for (
unsigned int i = 0;
i <
theSeeds.size();
i++) {
93 if (cluster.
charge() >= clusterThreshold) {
123 stack<SiPixelCluster::PixelPos, vector<SiPixelCluster::PixelPos> > dead_pixel_stack;
135 acluster.
add(pix, seed_adc);
138 bool dead_flag =
false;
139 while (!acluster.
empty()) {
141 auto curInd = acluster.
top();
146 int LowerAccLimity = 0;
147 int UpperAccLimity = 0;
149 if (
r % 2 ==
int(acluster.
x[curInd]) % 2) {
150 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - 1);
155 int parity_curr = int(acluster.
x[curInd]) % 2;
156 int parity_hit =
r % 2;
158 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - parity_hit);
167 for (
auto c = LowerAccLimity;
c < UpperAccLimity; ++
c) {
174 theBuffer.set_adc(newpix, 1);
193 bool have_second_cluster =
false;
194 while (!dead_pixel_stack.empty()) {
197 dead_pixel_stack.pop();
204 if (second_cluster.
charge() >= clusterThreshold && first_cluster.
charge() >= clusterThreshold) {
206 have_second_cluster =
true;
211 const std::vector<SiPixelCluster::Pixel>& branch_pixels = second_cluster.
pixels();
212 for (
unsigned int i = 0;
i < branch_pixels.size();
i++) {
213 int temp_x = branch_pixels[
i].x;
214 int temp_y = branch_pixels[
i].y;
215 int temp_adc = branch_pixels[
i].adc;
217 cluster.
add(newpix, temp_adc);
222 if (first_cluster.
charge() >= clusterThreshold && have_second_cluster) {
~PixelThresholdClusterizerForBricked() override
void push_back(data_type const &d)
SiPixelArrayBuffer theBuffer
Data storage.
const edm::EventSetup & c
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
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)
constexpr int col() const
unsigned int pxbLayer(const DetId &id) const
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
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
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
bool setup(const PixelGeomDetUnit *pixDet)
Private helper methods:
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
std::vector< SiPixelCluster::PixelPos > theSeeds
PixelThresholdClusterizerForBricked(edm::ParameterSet const &conf)
constexpr int row() const
const std::vector< Pixel > pixels() const
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.