|
|
Go to the documentation of this file.
45 thePixelThreshold(conf.getParameter<
int>(
"ChannelThreshold")),
46 theSeedThreshold(conf.getParameter<
int>(
"SeedThreshold")),
47 theClusterThreshold(conf.getParameter<
int>(
"ClusterThreshold")),
48 theClusterThreshold_L1(conf.getParameter<
int>(
"ClusterThreshold_L1")),
49 theConversionFactor(conf.getParameter<
int>(
"VCaltoElectronGain")),
50 theConversionFactor_L1(conf.getParameter<
int>(
"VCaltoElectronGain_L1")),
51 theOffset(conf.getParameter<
int>(
"VCaltoElectronOffset")),
52 theOffset_L1(conf.getParameter<
int>(
"VCaltoElectronOffset_L1")),
53 theElectronPerADCGain(conf.getParameter<double>(
"ElectronPerADCGain")),
54 doPhase2Calibration(conf.getParameter<
bool>(
"Phase2Calibration")),
55 thePhase2ReadoutMode(conf.getParameter<
int>(
"Phase2ReadoutMode")),
56 thePhase2DigiBaseline(conf.getParameter<double>(
"Phase2DigiBaseline")),
57 thePhase2KinkADC(conf.getParameter<
int>(
"Phase2KinkADC")),
62 doMissCalibrate(conf.getParameter<
bool>(
"MissCalibrate")),
63 doSplitClusters(conf.getParameter<
bool>(
"SplitClusters")) {
71 desc.add<
int>(
"ChannelThreshold", 1000);
72 desc.add<
bool>(
"MissCalibrate",
true);
73 desc.add<
bool>(
"SplitClusters",
false);
74 desc.add<
int>(
"VCaltoElectronGain", 65);
75 desc.add<
int>(
"VCaltoElectronGain_L1", 65);
76 desc.add<
int>(
"VCaltoElectronOffset", -414);
77 desc.add<
int>(
"VCaltoElectronOffset_L1", -414);
78 desc.add<
int>(
"SeedThreshold", 1000);
79 desc.add<
int>(
"ClusterThreshold_L1", 4000);
80 desc.add<
int>(
"ClusterThreshold", 4000);
81 desc.add<
double>(
"ElectronPerADCGain", 135.);
82 desc.add<
bool>(
"Phase2Calibration",
false);
83 desc.add<
int>(
"Phase2ReadoutMode", -1);
84 desc.add<
double>(
"Phase2DigiBaseline", 1200.);
85 desc.add<
int>(
"Phase2KinkADC", 8);
97 int nrows = topol.
nrows();
122 template <
typename T>
126 const std::vector<short>& badChannels,
128 typename T::const_iterator begin =
input.begin();
129 typename T::const_iterator
end =
input.end();
153 for (
unsigned int i = 0;
i <
theSeeds.size();
i++) {
201 for (
int i = 0;
i < ci->size(); ++
i) {
213 #ifdef PIXELREGRESSION
214 static std::atomic<int> s_ic = 0;
235 (*theSiPixelGainCalibrationService_)
244 auto adc = di->adc();
254 #ifdef PIXELREGRESSION
255 static std::atomic<int> eqD = 0;
259 int col = di->column();
262 #ifdef PIXELREGRESSION
266 std::cout <<
"VI " << eqD <<
' ' << ic <<
' ' <<
end - begin <<
' ' <<
i <<
' ' << di->adc() <<
' ' <<
adc <<
' '
267 << adcOld << std::endl;
291 for (
int i = 0;
i < ci->size(); ++
i) {
323 const int dualslope =
int(dualslopeparam <= 1 ? 1. :
pow(2, dualslopeparam - 1));
350 float DBpedestal =
pedestal * DBgain;
356 float vcal =
adc * DBgain - DBpedestal;
394 stack<SiPixelCluster::PixelPos, vector<SiPixelCluster::PixelPos> > dead_pixel_stack;
418 acluster.
add(pix, seed_adc);
421 bool dead_flag =
false;
422 while (!acluster.
empty()) {
424 auto curInd = acluster.
top();
426 for (
auto c =
std::max(0,
int(acluster.
y[curInd]) - 1);
429 for (
auto r =
std::max(0,
int(acluster.
x[curInd]) - 1);
478 bool have_second_cluster =
false;
479 while (!dead_pixel_stack.empty()) {
482 dead_pixel_stack.pop();
490 output.push_back(second_cluster);
491 have_second_cluster =
true;
496 const std::vector<SiPixelCluster::Pixel>& branch_pixels = second_cluster.
pixels();
497 for (
unsigned int i = 0;
i < branch_pixels.size();
i++) {
498 int temp_x = branch_pixels[
i].x;
499 int temp_y = branch_pixels[
i].y;
500 int temp_adc = branch_pixels[
i].adc;
502 cluster.
add(newpix, temp_adc);
508 output.push_back(first_cluster);
edm::DetSet< PixelDigi >::const_iterator DigiIterator
static const std::string input
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
bool setup(const PixelGeomDetUnit *pixDet)
Private helper methods:
void set_adc(int row, int col, int adc)
int theNumOfRows
Geometry-related information.
virtual bool isDead(const uint32_t &detID, const int &col, const int &row)=0
uint16_t *__restrict__ uint16_t const *__restrict__ adc
virtual float getGain(const uint32_t &detID, const int &col, const int &row)=0
const int theClusterThreshold_L1
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
const int theClusterThreshold
std::vector< SiPixelCluster::PixelPos > theSeeds
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 thePhase2KinkADC
Pixel cluster – collection of neighboring pixels above threshold.
void copy_to_buffer(DigiIterator begin, DigiIterator end)
Copy adc counts from PixelDigis into the buffer, identify seeds.
unsigned int pxbLayer(const DetId &id) const
~PixelThresholdClusterizer() override
void add(const PixelPos &pix, int adc)
virtual int ncolumns() const =0
PixelThresholdClusterizer(edm::ParameterSet const &conf)
const double thePhase2DigiBaseline
const int thePhase2ReadoutMode
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...
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
const int thePixelThreshold
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
void clear_buffer(DigiIterator begin, DigiIterator end)
Clear the internal buffer array.
void add_adc(int row, int col, int adc)
const int theConversionFactor
const int theConversionFactor_L1
const bool doSplitClusters
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
constexpr int row() const
const bool doPhase2Calibration
Power< A, B >::type pow(const A &a, const B &b)
const std::vector< Pixel > pixels() const
virtual float getPedestal(const uint32_t &detID, const int &col, const int &row)=0
void setSize(int rows, int cols)
const bool doMissCalibrate
const int theSeedThreshold
virtual int nrows() const =0
SiPixelArrayBuffer theBuffer
Data storage.
int calibrate(int adc, int col, int row)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
const double theElectronPerADCGain
constexpr int col() const
virtual bool isNoisy(const uint32_t &detID, const int &col, const int &row)=0