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()");
76 for (
unsigned int i = 0;
i <
theSeeds.size();
i++) {
90 if (cluster.
charge() >= clusterThreshold) {
120 stack<SiPixelCluster::PixelPos, vector<SiPixelCluster::PixelPos> > dead_pixel_stack;
132 acluster.
add(pix, seed_adc);
135 bool dead_flag =
false;
136 while (!acluster.
empty()) {
138 auto curInd = acluster.
top();
143 int LowerAccLimity = 0;
144 int UpperAccLimity = 0;
146 if (
r % 2 ==
int(acluster.
x[curInd]) % 2) {
147 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - 1);
152 int parity_curr = int(acluster.
x[curInd]) % 2;
153 int parity_hit =
r % 2;
155 LowerAccLimity =
std::max(0,
int(acluster.
y[curInd]) - parity_hit);
164 for (
auto c = LowerAccLimity;
c < UpperAccLimity; ++
c) {
171 theBuffer.set_adc(newpix, 1);
190 bool have_second_cluster =
false;
191 while (!dead_pixel_stack.empty()) {
194 dead_pixel_stack.pop();
201 if (second_cluster.
charge() >= clusterThreshold && first_cluster.
charge() >= clusterThreshold) {
203 have_second_cluster =
true;
208 const std::vector<SiPixelCluster::Pixel>& branch_pixels = second_cluster.
pixels();
209 for (
unsigned int i = 0;
i < branch_pixels.size();
i++) {
210 int temp_x = branch_pixels[
i].x;
211 int temp_y = branch_pixels[
i].y;
212 int temp_adc = branch_pixels[
i].adc;
214 cluster.
add(newpix, temp_adc);
219 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
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)
Log< level::Warning, false > LogWarning
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.