16 params_(conf), SeedVector_(0)
33 std::map<uint32_t, CTPPSPixelROCAnalysisMask>
const &
mask = maskera->
analysisMask;
34 std::map<uint32_t, CTPPSPixelROCAnalysisMask>::const_iterator mask_it = mask.find(detId);
36 std::set<std::pair<unsigned char, unsigned char> > maskedPixels;
37 if( mask_it != mask.end()) maskedPixels = mask_it->second.maskedPixels;
52 uint8_t row = RPdit.row();
53 uint8_t column = RPdit.column();
54 if( row > maxRow || column > maxCol)
56 <<
" row = " << row <<
" column = "<<column;
58 std::pair<unsigned char, unsigned char>
pixel = std::make_pair(row,column);
59 unsigned short adc = RPdit.adc();
63 const bool is_in = maskedPixels.find(pixel) != maskedPixels.end();
66 electrons =
calibrate(detId,adc,row,column,pcalibrations);
92 while ( ! atempCluster.
empty()) {
94 auto curInd = atempCluster.
top();
102 if(!atempCluster.
addPixel(
r,
c,(*RPCDit2).electrons() )) {
104 clusters.push_back(acluster);
119 clusters.push_back(cluster);
133 gain = DetCalibs.
getGain(col,row)*highRangeCal/lowRangeCal;
134 pedestal = DetCalibs.
getPed(col,row);
141 electrons =
int(adc*gain-pedestal);
145 if(
verbosity_)
edm::LogInfo(
"RPixCalibration") <<
"calibrate: adc = " << adc <<
" electrons = " << electrons <<
" gain = " << gain <<
" pedestal = " <<
pedestal ;
149 electrons =
int(adc*gain-pedestal);
150 if(
verbosity_)
edm::LogInfo(
"RPixCalibration") <<
"calibrate: adc = " << adc <<
" electrons = " << electrons <<
" ElectronADCGain = " << gain <<
" pedestal = " <<
pedestal ;
153 edm::LogInfo(
"RPixCalibration") <<
"RPixDetClusterizer::calibrate: *** electrons < 0 *** --> " << electrons <<
" --> electrons = 0";
int adc(sample_type sample)
get the ADC sample (12 bits)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned short adc[MAXSIZE]
std::map< uint32_t, CTPPSPixelROCAnalysisMask > analysisMask
bool doSingleCalibration_
RPixDetClusterizer(edm::ParameterSet const &conf)
std::set< RPixCalibDigi > calib_rpix_digi_set_
int row() const
Access to digi information.
std::vector< RPixCalibDigi > SeedVector_
uint32_t getDetId() const
void make_cluster(RPixCalibDigi const &aSeed, std::vector< CTPPSPixelCluster > &clusters)
int VcaltoElectronOffset_
std::set< CTPPSPixelDigi > rpix_digi_set_
unsigned short SeedADCThreshold_
static constexpr uint8_t MAXROW
CTPPSPixelGainCalibration getGainCalibration(const uint32_t &detid) const
static constexpr uint8_t MAXCOL
unsigned short ADCThreshold_
bool addPixel(unsigned char myrow, unsigned char mycol, unsigned short const iadc)
int calibrate(unsigned int, int, int, int, const CTPPSPixelGainCalibrations *pcalibration)
float getPed(const int &col, const int &row) const
void buildClusters(unsigned int detId, const std::vector< CTPPSPixelDigi > &digi, std::vector< CTPPSPixelCluster > &clusters, const CTPPSPixelGainCalibrations *pcalibration, const CTPPSPixelAnalysisMask *mask)
unsigned short top() const
float getGain(const int &col, const int &row) const