CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
PixelThresholdClusterizer Class Reference

An explicit threshold-based clustering algorithm. More...

#include <PixelThresholdClusterizer.h>

Inheritance diagram for PixelThresholdClusterizer:
PixelClusterizerBase

Public Member Functions

void clusterizeDetUnit (const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, 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 around each seed pixel. Input and output data stored in DetSet. More...
 
 PixelThresholdClusterizer (edm::ParameterSet const &conf)
 
 ~PixelThresholdClusterizer ()
 
- Public Member Functions inherited from PixelClusterizerBase
void setSiPixelGainCalibrationService (SiPixelGainCalibrationServiceBase *in)
 
virtual ~PixelClusterizerBase ()
 

Private Member Functions

int calibrate (int adc, int col, int row)
 
void clear_buffer (DigiIterator begin, DigiIterator end)
 Clear the internal buffer array. More...
 
void copy_to_buffer (DigiIterator begin, DigiIterator end)
 Copy adc counts from PixelDigis into the buffer, identify seeds. More...
 
SiPixelCluster make_cluster (const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)
 The actual clustering algorithm: group the neighboring pixels around the seed. More...
 
bool setup (const PixelGeomDetUnit *pixDet)
 Private helper methods: More...
 

Private Attributes

bool bufferAlreadySet
 
edm::ParameterSet conf_
 
bool dead_flag
 
uint32_t detid_
 
bool doMissCalibrate
 
bool doSplitClusters
 
SiPixelArrayBuffer theBuffer
 Data storage. More...
 
std::vector< SiPixelClustertheClusters
 
float theClusterThreshold
 
float theClusterThresholdInNoiseUnits
 
int theConversionFactor
 
int theFirstStack_
 
int theNumOfCols
 
int theNumOfRows
 Geometry-related information. More...
 
int theOffset
 
int thePixelThreshold
 
float thePixelThresholdInNoiseUnits
 Clustering-related quantities: More...
 
std::vector
< SiPixelCluster::PixelPos
theSeeds
 
int theSeedThreshold
 
float theSeedThresholdInNoiseUnits
 
int theStackADC_
 

Additional Inherited Members

- Public Types inherited from PixelClusterizerBase
typedef edm::DetSet< PixelDigi >
::const_iterator 
DigiIterator
 
- Protected Attributes inherited from PixelClusterizerBase
SiPixelGainCalibrationServiceBasetheSiPixelGainCalibrationService_
 

Detailed Description

An explicit threshold-based clustering algorithm.

A specific threshold-based pixel clustering algorithm.

A threshold-based clustering algorithm which clusters SiPixelDigis into SiPixelClusters for each DetUnit. The algorithm is straightforward and purely topological: the clustering process starts with seed pixels and continues by adding adjacent pixels above the pixel threshold. Once the cluster is made, it has to be above the cluster threshold as well.

The clusterization is performed on a matrix with size equal to the size of the pixel detector, each cell containing the ADC count of the corresponding pixel. The matrix is reset after each clusterization.

The search starts from seed pixels, i.e. pixels with sufficiently large amplitudes, found at the time of filling of the matrix and stored in a

At this point the noise and dead channels are ignored, but soon they won't be.

SiPixelCluster contains a barrycenter, but it should be noted that that information is largely useless. One must use a PositionEstimator class to compute the RecHit position and its error for every given cluster.

Author
Largely copied from NewPixelClusterizer in ORCA written by Danek Kotlinski (PSI). Ported to CMSSW by Petar Maksimovic (JHU). DetSetVector data container implemented by V.Chiochia (Uni Zurich)

Sets the PixelArrayBuffer dimensions and pixel thresholds. Makes clusters and stores them in theCache if the option useCache has been set.

General logic of PixelThresholdClusterizer:

The clusterization is performed on a matrix with size equal to the size of the pixel detector, each cell containing the ADC count of the corresponding pixel. The matrix is reset after each clusterization.

The search starts from seed pixels, i.e. pixels with sufficiently large amplitudes, found at the time of filling of the matrix and stored in a SiPixelArrayBuffer.

Translate the pixel charge to electrons, we are suppose to do the calibrations ADC->electrons here. Modify the thresholds to be in electrons, convert adc to electrons. d.k. 20/3/06 Get rid of the noiseVector. d.k. 28/3/06

Definition at line 56 of file PixelThresholdClusterizer.h.

Constructor & Destructor Documentation

PixelThresholdClusterizer::PixelThresholdClusterizer ( edm::ParameterSet const &  conf)

Constructor: Initilize the buffer to hold pixels from a detector module. This is a vector of 44k ints, stays valid all the time.

Definition at line 44 of file PixelThresholdClusterizer.cc.

References edm::ParameterSet::getParameter().

44  :
46 {
47  // Get thresholds in electrons
49  conf_.getParameter<int>("ChannelThreshold");
51  conf_.getParameter<int>("SeedThreshold");
53  conf_.getParameter<double>("ClusterThreshold");
55  conf_.getParameter<int>("VCaltoElectronGain");
56  theOffset =
57  conf_.getParameter<int>("VCaltoElectronOffset");
58  if ( conf_.exists("AdcFullScaleStack") ) theStackADC_=conf_.getParameter<int>("AdcFullScaleStack");
59  else
60  theStackADC_=255;
61  if ( conf_.exists("FirstStackLayer") ) theFirstStack_=conf_.getParameter<int>("FirstStackLayer");
62  else
64 
65  // Get the constants for the miss-calibration studies
66  doMissCalibrate=conf_.getUntrackedParameter<bool>("MissCalibrate",true);
67  doSplitClusters = conf.getParameter<bool>("SplitClusters");
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
SiPixelArrayBuffer theBuffer
Data storage.
bool exists(std::string const &parameterName) const
checks if a parameter exists
tuple conf
Definition: dbtoconf.py:185
int theNumOfRows
Geometry-related information.
void setSize(int rows, int cols)
PixelThresholdClusterizer::~PixelThresholdClusterizer ( )

Definition at line 71 of file PixelThresholdClusterizer.cc.

71 {}

Member Function Documentation

int PixelThresholdClusterizer::calibrate ( int  adc,
int  col,
int  row 
)
private

Definition at line 245 of file PixelThresholdClusterizer.cc.

References HI_PhotonSkim_cff::electrons, PXBDetId::layer(), and EcalCondDBWriter_cfi::pedestal.

246 {
247  int electrons = 0;
248  int layer= 0;
249  if (DetId(detid_).subdetId()==1){ layer = PXBDetId(detid_).layer();}
250 
251  if ( doMissCalibrate )
252  {
253  // do not perform calibration if pixel is dead!
254 
257  {
258 
259  // Linear approximation of the TANH response
260  // Pixel(0,0,0)
261  //const float gain = 2.95; // 1 ADC = 2.95 VCALs (1/0.339)
262  //const float pedestal = -83.; // -28/0.339
263  // Roc-0 average
264  //const float gain = 1./0.357; // 1 ADC = 2.80 VCALs
265  //const float pedestal = -28.2 * gain; // -79.
266 
267  float DBgain = theSiPixelGainCalibrationService_->getGain(detid_, col, row);
268  float DBpedestal = theSiPixelGainCalibrationService_->getPedestal(detid_, col, row) * DBgain;
269 
270 
271  // Roc-6 average
272  //const float gain = 1./0.313; // 1 ADC = 3.19 VCALs
273  //const float pedestal = -6.2 * gain; // -19.8
274  //
275  float vcal = adc * DBgain - DBpedestal;
276 
277  // atanh calibration
278  // Roc-6 average
279  //const float p0 = 0.00492;
280  //const float p1 = 1.998;
281  //const float p2 = 90.6;
282  //const float p3 = 134.1;
283  // Roc-6 average
284  //const float p0 = 0.00382;
285  //const float p1 = 0.886;
286  //const float p2 = 112.7;
287  //const float p3 = 113.0;
288  //float vcal = ( atanh( (adc-p3)/p2) + p1)/p0;
289 
290  electrons = int( vcal * theConversionFactor + theOffset);
291  }
292  }
293  else
294  { // No misscalibration in the digitizer
295  // Simple (default) linear gain
296  const float gain = 135.; // 1 ADC = 135 electrons
297  const float pedestal = 0.; //
298  electrons = int(adc * gain + pedestal);
299  if (layer>=theFirstStack_) {
300  if (theStackADC_==1&&adc==1)
301  {
302  electrons = int(255*135); // Arbitrarily use overflow value.
303  }
304  if (theStackADC_>1&&theStackADC_!=255&&adc>=1)
305  {
306  const float gain = 135.; // 1 ADC = 135 electrons
307  electrons = int((adc-1) * gain * 255/float(theStackADC_-1));
308  }
309  }
310  }
311 
312  return electrons;
313 }
int adc(sample_type sample)
get the ADC sample (12 bits)
virtual bool isDead(const uint32_t &detID, const int &col, const int &row)=0
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
virtual float getPedestal(const uint32_t &detID, const int &col, const int &row)=0
Definition: DetId.h:18
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
virtual float getGain(const uint32_t &detID, const int &col, const int &row)=0
virtual bool isNoisy(const uint32_t &detID, const int &col, const int &row)=0
int col
Definition: cuy.py:1008
void PixelThresholdClusterizer::clear_buffer ( DigiIterator  begin,
DigiIterator  end 
)
private

Clear the internal buffer array.

Pixels which are not part of recognized clusters are NOT ERASED during the cluster finding. Erase them now.

TO DO: ask Danek... wouldn't it be faster to simply memcopy() zeros into the whole buffer array?

Definition at line 177 of file PixelThresholdClusterizer.cc.

References end.

178 {
179  for(DigiIterator di = begin; di != end; ++di )
180  {
181  theBuffer.set_adc( di->row(), di->column(), 0 ); // reset pixel adc to 0
182  }
183 }
SiPixelArrayBuffer theBuffer
Data storage.
void set_adc(int row, int col, int adc)
edm::DetSet< PixelDigi >::const_iterator DigiIterator
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
void PixelThresholdClusterizer::clusterizeDetUnit ( const edm::DetSet< PixelDigi > &  input,
const PixelGeomDetUnit pixDet,
const std::vector< short > &  badChannels,
edmNew::DetSetVector< SiPixelCluster >::FastFiller &  output 
)
virtual

Cluster pixels. This method operates on a matrix of pixels and finds the largest contiguous cluster around each seed pixel. Input and output data stored in DetSet.

Implements PixelClusterizerBase.

Definition at line 111 of file PixelThresholdClusterizer.cc.

References begin, edm::DetSet< T >::begin(), SiPixelCluster::charge(), edm::DetSet< T >::detId(), end, edm::DetSet< T >::end(), i, edmNew::DetSetVector< T >::FastFiller::push_back(), and HcalObjRepresent::setup().

114  {
115 
116  DigiIterator begin = input.begin();
117  DigiIterator end = input.end();
118 
119  // Do not bother for empty detectors
120  //if (begin == end) cout << " PixelThresholdClusterizer::clusterizeDetUnit - No digis to clusterize";
121 
122  // Set up the clusterization on this DetId.
123  if ( !setup(pixDet) )
124  return;
125 
126  detid_ = input.detId();
127 
128  // Copy PixelDigis to the buffer array; select the seed pixels
129  // on the way, and store them in theSeeds.
130  copy_to_buffer(begin, end);
131 
132  // At this point we know the number of seeds on this DetUnit, and thus
133  // also the maximal number of possible clusters, so resize theClusters
134  // in order to make vector<>::push_back() efficient.
135  // output.reserve ( theSeeds.size() ); //GPetruc: It is better *not* to reserve, with the new DetSetVector!
136 
137 
138  // Loop over all seeds. TO DO: wouldn't using iterators be faster?
139  // edm::LogError("PixelThresholdClusterizer") << "Starting clusterizing" << endl;
140  for (unsigned int i = 0; i < theSeeds.size(); i++)
141  {
142 
143  // Gavril : The charge of seeds that were already inlcuded in clusters is set to 1 electron
144  // so we don't want to call "make_cluster" for these cases
145  if ( theBuffer(theSeeds[i]) >= theSeedThreshold )
146  { // Is this seed still valid?
147  // Make a cluster around this seed
148  SiPixelCluster && cluster = make_cluster( theSeeds[i] , output);
149 
150  // Check if the cluster is above threshold
151  // (TO DO: one is signed, other unsigned, gcc warns...)
152  if ( cluster.charge() >= theClusterThreshold)
153  {
154  // std::cout << "putting in this cluster " << i << " " << cluster.charge() << " " << cluster.pixelADC().size() << endl;
155  output.push_back( std::move(cluster) );
156  }
157  }
158  }
159 
160  // Erase the seeds.
161  theSeeds.clear();
162 
163  // Need to clean unused pixels from the buffer array.
164  clear_buffer(begin, end);
165 
166 }
iterator end()
Definition: DetSet.h:60
int i
Definition: DBlmapReader.cc:9
float charge() const
void push_back(data_type const &d)
SiPixelArrayBuffer theBuffer
Data storage.
det_id_type detId() const
Definition: DetSet.h:72
SiPixelCluster make_cluster(const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)
The actual clustering algorithm: group the neighboring pixels around the seed.
edm::DetSet< PixelDigi >::const_iterator DigiIterator
#define end
Definition: vmac.h:37
iterator begin()
Definition: DetSet.h:59
void clear_buffer(DigiIterator begin, DigiIterator end)
Clear the internal buffer array.
Pixel cluster – collection of neighboring pixels above threshold.
#define begin
Definition: vmac.h:30
bool setup(const PixelGeomDetUnit *pixDet)
Private helper methods:
std::vector< SiPixelCluster::PixelPos > theSeeds
void copy_to_buffer(DigiIterator begin, DigiIterator end)
Copy adc counts from PixelDigis into the buffer, identify seeds.
void PixelThresholdClusterizer::copy_to_buffer ( DigiIterator  begin,
DigiIterator  end 
)
private

Copy adc counts from PixelDigis into the buffer, identify seeds.

Definition at line 188 of file PixelThresholdClusterizer.cc.

References ecalMGPA::adc(), begin, cuy::col, gather_cfg::cout, metsig::electron, end, i, PXBDetId::layer(), EcalCondDBWriter_cfi::pedestal, and DetId::subdetId().

189 {
190  static int ic=0;
191  if (ic==0) {
192  // std::cout << (doMissCalibrate ? "VI from db" : "VI linear") << std::endl;
193  }
194  ic++;
195  int electron[end-begin];
196  if ( doMissCalibrate ) {
197  (*theSiPixelGainCalibrationService_).calibrate(detid_,begin,end,theConversionFactor, theOffset,electron);
198  } else {
199  int layer = (DetId(detid_).subdetId()==1) ? PXBDetId(detid_).layer() : 0;
200  int i=0;
201  for(DigiIterator di = begin; di != end; ++di) {
202  auto adc = di->adc();
203  const float gain = 135.; // 1 ADC = 135 electrons
204  const float pedestal = 0.; //
205  electron[i] = int(adc * gain + pedestal);
206  if (layer>=theFirstStack_) {
207  if (theStackADC_==1&&adc==1) {
208  electron[i] = int(255*135); // Arbitrarily use overflow value.
209  }
210  if (theStackADC_>1&&theStackADC_!=255&&adc>=1){
211  const float gain = 135.; // 1 ADC = 135 electrons
212  electron[i] = int((adc-1) * gain * 255/float(theStackADC_-1));
213  }
214  }
215  ++i;
216  }
217  assert(i==(end-begin));
218  }
219 
220  int i=0;
221 #ifdef PIXELREGRESSION
222  static int eqD=0;
223 #endif
224  for(DigiIterator di = begin; di != end; ++di) {
225  int row = di->row();
226  int col = di->column();
227  int adc = electron[i++];
228 #ifdef PIXELREGRESSION
229  int adcOld = calibrate(di->adc(),col,row);
230  //assert(adc==adcOld);
231  if (adc!=adcOld) std::cout << "VI " << eqD <<' '<< ic <<' '<< end-begin <<' '<< i <<' '<< di->adc() <<' ' << adc <<' '<< adcOld << std::endl; else ++eqD;
232 #endif
233  if ( adc >= thePixelThreshold) {
234  theBuffer.set_adc( row, col, adc);
235  if ( adc >= theSeedThreshold) theSeeds.push_back( SiPixelCluster::PixelPos(row,col) );
236  }
237  }
238  assert(i==(end-begin));
239 
240 }
int adc(sample_type sample)
get the ADC sample (12 bits)
int i
Definition: DBlmapReader.cc:9
SiPixelArrayBuffer theBuffer
Data storage.
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
void set_adc(int row, int col, int adc)
edm::DetSet< PixelDigi >::const_iterator DigiIterator
#define end
Definition: vmac.h:37
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
#define begin
Definition: vmac.h:30
tuple cout
Definition: gather_cfg.py:121
int calibrate(int adc, int col, int row)
int col
Definition: cuy.py:1008
std::vector< SiPixelCluster::PixelPos > theSeeds
SiPixelCluster PixelThresholdClusterizer::make_cluster ( const SiPixelCluster::PixelPos pix,
edmNew::DetSetVector< SiPixelCluster >::FastFiller &  output 
)
private

The actual clustering algorithm: group the neighboring pixels around the seed.

Definition at line 351 of file PixelThresholdClusterizer.cc.

References SiPixelCluster::add(), trackerHits::c, SiPixelCluster::charge(), SiPixelCluster::PixelPos::col(), i, bookConverter::max, min(), SiPixelCluster::pixels(), edmNew::DetSetVector< T >::FastFiller::push_back(), alignCSCRings::r, and SiPixelCluster::PixelPos::row().

353 {
354 
355  //First we acquire the seeds for the clusters
356  int seed_adc;
357  stack<SiPixelCluster::PixelPos, vector<SiPixelCluster::PixelPos> > dead_pixel_stack;
358 
359  //The individual modules have been loaded into a buffer.
360  //After each pixel has been considered by the clusterizer, we set the adc count to 1
361  //to mark that we have already considered it.
362  //The only difference between dead/noisy pixels and standard ones is that for dead/noisy pixels,
363  //We consider the charge of the pixel to always be zero.
364 
365  /* this is not possible as dead and noisy pixel cannot make it into a seed...
366  if ( doMissCalibrate &&
367  (theSiPixelGainCalibrationService_->isDead(detid_,pix.col(),pix.row()) ||
368  theSiPixelGainCalibrationService_->isNoisy(detid_,pix.col(),pix.row())) )
369  {
370  std::cout << "IMPOSSIBLE" << std::endl;
371  seed_adc = 0;
372  theBuffer.set_adc(pix, 1);
373  }
374  else {
375  */
376  seed_adc = theBuffer(pix.row(), pix.col());
377  theBuffer.set_adc( pix, 1);
378  // }
379 
380  AccretionCluster acluster;
381  acluster.add(pix, seed_adc);
382 
383  //Here we search all pixels adjacent to all pixels in the cluster.
384  bool dead_flag = false;
385  while ( ! acluster.empty())
386  {
387  //This is the standard algorithm to find and add a pixel
388  auto curInd = acluster.top(); acluster.pop();
389  for ( auto c = std::max(0,int(acluster.y[curInd])-1); c < std::min(int(acluster.y[curInd])+2,theBuffer.columns()) ; ++c) {
390  for ( auto r = std::max(0,int(acluster.x[curInd])-1); r < std::min(int(acluster.x[curInd])+2,theBuffer.rows()); ++r) {
391  if ( theBuffer(r,c) >= thePixelThreshold) {
392  SiPixelCluster::PixelPos newpix(r,c);
393  if (!acluster.add( newpix, theBuffer(r,c))) goto endClus;
394  theBuffer.set_adc( newpix, 1);
395  }
396 
397 
398  /* //Commenting out the addition of dead pixels to the cluster until further testing -- dfehling 06/09
399  //Check on the bounds of the module; this is to keep the isDead and isNoisy modules from returning errors
400  else if(r>= 0 && c >= 0 && (r <= (theNumOfRows-1.)) && (c <= (theNumOfCols-1.))){
401  //Check for dead/noisy pixels check that the buffer is not -1 (already considered). Check whether we want to split clusters separated by dead pixels or not.
402  if((theSiPixelGainCalibrationService_->isDead(detid_,c,r) || theSiPixelGainCalibrationService_->isNoisy(detid_,c,r)) && theBuffer(r,c) != 1){
403 
404  //If a pixel is dead or noisy, check to see if we want to split the clusters or not.
405  //Push it into a dead pixel stack in case we want to split the clusters. Otherwise add it to the cluster.
406  //If we are splitting the clusters, we will iterate over the dead pixel stack later.
407 
408  SiPixelCluster::PixelPos newpix(r,c);
409  if(!doSplitClusters){
410 
411  cluster.add(newpix, theBuffer(r,c));}
412  else if(doSplitClusters){
413  dead_pixel_stack.push(newpix);
414  dead_flag = true;}
415 
416  theBuffer.set_adc(newpix, 1);
417  }
418 
419  }
420  */
421 
422 
423 
424  }
425  }
426 
427  } // while accretion
428  endClus:
429  SiPixelCluster cluster(acluster.isize,acluster.adc, acluster.x,acluster.y, acluster.xmin,acluster.ymin);
430  //Here we split the cluster, if the flag to do so is set and we have found a dead or noisy pixel.
431 
432  if (dead_flag && doSplitClusters)
433  {
434  //Set the first cluster equal to the existing cluster.
435  SiPixelCluster first_cluster = cluster;
436  bool have_second_cluster = false;
437  while ( !dead_pixel_stack.empty() )
438  {
439  //consider each found dead pixel
440  SiPixelCluster::PixelPos deadpix = dead_pixel_stack.top(); dead_pixel_stack.pop();
441  theBuffer.set_adc(deadpix, 1);
442 
443  //Clusterize the split cluster using the dead pixel as a seed
444  SiPixelCluster second_cluster = make_cluster(deadpix, output);
445 
446  //If both clusters would normally have been found by the clusterizer, put them into output
447  if ( second_cluster.charge() >= theClusterThreshold &&
448  first_cluster.charge() >= theClusterThreshold )
449  {
450  output.push_back( second_cluster );
451  have_second_cluster = true;
452  }
453 
454  //We also want to keep the merged cluster in data and let the RecHit algorithm decide which set to keep
455  //This loop adds the second cluster to the first.
456  const std::vector<SiPixelCluster::Pixel>& branch_pixels = second_cluster.pixels();
457  for ( unsigned int i = 0; i<branch_pixels.size(); i++)
458  {
459  int temp_x = branch_pixels[i].x;
460  int temp_y = branch_pixels[i].y;
461  int temp_adc = branch_pixels[i].adc;
462  SiPixelCluster::PixelPos newpix(temp_x, temp_y);
463  cluster.add(newpix, temp_adc);}
464  }
465 
466  //Remember to also add the first cluster if we added the second one.
467  if ( first_cluster.charge() >= theClusterThreshold && have_second_cluster)
468  {
469  output.push_back( first_cluster );
470  }
471  }
472 
473  return cluster;
474 }
int i
Definition: DBlmapReader.cc:9
float charge() const
void push_back(data_type const &d)
SiPixelArrayBuffer theBuffer
Data storage.
SiPixelCluster make_cluster(const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)
The actual clustering algorithm: group the neighboring pixels around the seed.
void set_adc(int row, int col, int adc)
T min(T a, T b)
Definition: MathUtil.h:58
Pixel cluster – collection of neighboring pixels above threshold.
const std::vector< Pixel > pixels() const
bool PixelThresholdClusterizer::setup ( const PixelGeomDetUnit pixDet)
private

Private helper methods:

Prepare the Clusterizer to work on a particular DetUnit. Re-init the size of the panel/plaquette (so update nrows and ncols),

Definition at line 77 of file PixelThresholdClusterizer.cc.

References PixelTopology::ncolumns(), PixelTopology::nrows(), and PixelGeomDetUnit::specificTopology().

78 {
79  // Cache the topology.
80  const PixelTopology & topol = pixDet->specificTopology();
81 
82  // Get the new sizes.
83  int nrows = topol.nrows(); // rows in x
84  int ncols = topol.ncolumns(); // cols in y
85 
86  theNumOfRows = nrows; // Set new sizes
87  theNumOfCols = ncols;
88 
89  if ( nrows > theBuffer.rows() ||
90  ncols > theBuffer.columns() )
91  { // change only when a larger is needed
92  //if( nrows != theNumOfRows || ncols != theNumOfCols ) {
93  //cout << " PixelThresholdClusterizer: pixel buffer redefined to "
94  // << nrows << " * " << ncols << endl;
95  //theNumOfRows = nrows; // Set new sizes
96  //theNumOfCols = ncols;
97  // Resize the buffer
98  theBuffer.setSize(nrows,ncols); // Modify
99  bufferAlreadySet = true;
100  }
101 
102  return true;
103 }
SiPixelArrayBuffer theBuffer
Data storage.
virtual int ncolumns() const =0
virtual int nrows() const =0
int theNumOfRows
Geometry-related information.
void setSize(int rows, int cols)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.

Member Data Documentation

bool PixelThresholdClusterizer::bufferAlreadySet
private

Definition at line 76 of file PixelThresholdClusterizer.h.

edm::ParameterSet PixelThresholdClusterizer::conf_
private

Definition at line 72 of file PixelThresholdClusterizer.h.

bool PixelThresholdClusterizer::dead_flag
private

Definition at line 95 of file PixelThresholdClusterizer.h.

uint32_t PixelThresholdClusterizer::detid_
private

Definition at line 94 of file PixelThresholdClusterizer.h.

bool PixelThresholdClusterizer::doMissCalibrate
private

Definition at line 96 of file PixelThresholdClusterizer.h.

bool PixelThresholdClusterizer::doSplitClusters
private

Definition at line 97 of file PixelThresholdClusterizer.h.

SiPixelArrayBuffer PixelThresholdClusterizer::theBuffer
private

Data storage.

Definition at line 75 of file PixelThresholdClusterizer.h.

std::vector<SiPixelCluster> PixelThresholdClusterizer::theClusters
private

Definition at line 78 of file PixelThresholdClusterizer.h.

float PixelThresholdClusterizer::theClusterThreshold
private

Definition at line 87 of file PixelThresholdClusterizer.h.

float PixelThresholdClusterizer::theClusterThresholdInNoiseUnits
private

Definition at line 83 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theConversionFactor
private

Definition at line 88 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theFirstStack_
private

Definition at line 107 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theNumOfCols
private

Definition at line 93 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theNumOfRows
private

Geometry-related information.

Definition at line 92 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theOffset
private

Definition at line 89 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::thePixelThreshold
private

Definition at line 85 of file PixelThresholdClusterizer.h.

float PixelThresholdClusterizer::thePixelThresholdInNoiseUnits
private

Clustering-related quantities:

Definition at line 81 of file PixelThresholdClusterizer.h.

std::vector<SiPixelCluster::PixelPos> PixelThresholdClusterizer::theSeeds
private

Definition at line 77 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theSeedThreshold
private

Definition at line 86 of file PixelThresholdClusterizer.h.

float PixelThresholdClusterizer::theSeedThresholdInNoiseUnits
private

Definition at line 82 of file PixelThresholdClusterizer.h.

int PixelThresholdClusterizer::theStackADC_
private

Definition at line 106 of file PixelThresholdClusterizer.h.