Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up SiPixel digitizer and clusterizer code removing variables used for pre-phase2 TDR studies #24546

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Expand Up @@ -239,8 +239,6 @@ def customiseForPR24339HybridFormatSiStripZS(process):
# Adding some parameters to the pixel clusterizer
def customiseFor24329(process):
for producer in producers_by_type(process, "SiPixelClusterProducer"):
producer.AdcFullScaleStack = cms.int32(255)
producer.FirstStackLayer = cms.int32(5)
producer.ElectronPerADCGain = cms.double(135.)
producer.Phase2Calibration = cms.bool(False)
producer.Phase2ReadoutMode = cms.int32(-1)
Expand Down
Expand Up @@ -51,8 +51,6 @@ PixelThresholdClusterizer::PixelThresholdClusterizer
theConversionFactor_L1( conf.getParameter<int>("VCaltoElectronGain_L1") ),
theOffset( conf.getParameter<int>("VCaltoElectronOffset") ),
theOffset_L1( conf.getParameter<int>("VCaltoElectronOffset_L1") ),
theStackADC( conf.getParameter<int>("AdcFullScaleStack") ),
theFirstStack( conf.getParameter<int>("FirstStackLayer") ),
theElectronPerADCGain( conf.getParameter<double>("ElectronPerADCGain") ),
doPhase2Calibration( conf.getParameter<bool>("Phase2Calibration") ),
thePhase2ReadoutMode( conf.getParameter<int>("Phase2ReadoutMode") ),
Expand Down Expand Up @@ -87,8 +85,6 @@ PixelThresholdClusterizer::fillDescriptions(edm::ConfigurationDescriptions& desc
desc.add<int>("ClusterThreshold_L1", 4000);
desc.add<int>("ClusterThreshold", 4000);
desc.add<int>("maxNumberOfClusters", -1);
desc.add<int>("AdcFullScaleStack", 255);
desc.add<int>("FirstStackLayer", 5);
desc.add<double>("ElectronPerADCGain", 135.);
desc.add<bool>("Phase2Calibration", false);
desc.add<int>("Phase2ReadoutMode", -1);
Expand Down Expand Up @@ -261,19 +257,10 @@ void PixelThresholdClusterizer::copy_to_buffer( DigiIterator begin, DigiIterator
} else {
int i=0;
const float gain = theElectronPerADCGain; // default: 1 ADC = 135 electrons
const int maxADC8bitVal_ = 255;
for(DigiIterator di = begin; di != end; ++di) {
auto adc = di->adc();
const float pedestal = 0.; //
electron[i] = int(adc * gain + pedestal);
if (theLayer>=theFirstStack) {
if (theStackADC==1&&adc==1) {
electron[i] = int(maxADC8bitVal_*gain); // Arbitrarily use overflow value.
}
if (theStackADC>1&&theStackADC!=maxADC8bitVal_&&adc>=1){
electron[i] = int((adc-1) * gain * maxADC8bitVal_/float(theStackADC-1));
}
}
++i;
}
assert(i==(end-begin));
Expand Down Expand Up @@ -414,18 +401,7 @@ int PixelThresholdClusterizer::calibrate(int adc, int col, int row)
// Simple (default) linear gain
const float gain = theElectronPerADCGain; // default: 1 ADC = 135 electrons
const float pedestal = 0.; //
const int maxADC8bitVal_ = 255;
electrons = int(adc * gain + pedestal);
if (theLayer>=theFirstStack) {
if (theStackADC==1&&adc==1)
{
electrons = int(maxADC8bitVal_*gain); // Arbitrarily use overflow value.
}
if (theStackADC>1&&theStackADC!=maxADC8bitVal_&&adc>=1)
{
electrons = int((adc-1) * gain * maxADC8bitVal_/float(theStackADC-1));
}
}
}

return electrons;
Expand Down
Expand Up @@ -104,8 +104,6 @@ class dso_hidden PixelThresholdClusterizer final : public PixelClusterizerBase {
const int theOffset; // adc to electron conversion offset
const int theOffset_L1; // adc to electron conversion offset for Layer 1

const int theStackADC; // The maximum ADC count for the stack layers
const int theFirstStack; // The index of the first stack layer
const double theElectronPerADCGain; // ADC to electrons conversion

const bool doPhase2Calibration; // The ADC --> electrons calibration is for phase-2 tracker
Expand Down
Expand Up @@ -26,8 +26,6 @@
# **************************************
maxNumberOfClusters = cms.int32(-1), # -1 means no limit.
ElectronPerADCGain = cms.double(135.0),
AdcFullScaleStack = cms.int32(255),
FirstStackLayer = cms.int32(5),
Phase2Calibration = cms.bool(False),
Phase2ReadoutMode = cms.int32(-1),
Phase2DigiBaseline = cms.double(1200.),
Expand Down
2 changes: 0 additions & 2 deletions SimGeneral/MixingModule/python/SiPixelSimParameters_cfi.py
Expand Up @@ -77,8 +77,6 @@ def _modifyPixelDigitizerForPhase1Pixel( digitizer ) :
ElectronPerAdc = cms.double(135.0),
TofUpperCut = cms.double(12.5),
AdcFullScale = cms.int32(255),
AdcFullScaleStack = cms.int32(255),
FirstStackLayer = cms.int32(5),
TofLowerCut = cms.double(-12.5),
TanLorentzAnglePerTesla_FPix = cms.double(0.106),
TanLorentzAnglePerTesla_BPix = cms.double(0.106),
Expand Down
10 changes: 0 additions & 10 deletions SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc
Expand Up @@ -189,7 +189,6 @@ SiPixelDigitizerAlgorithm::SiPixelDigitizerAlgorithm(const edm::ParameterSet& co
// ADC saturation value, 255(8bit adc.
//theAdcFullScale(conf.getUntrackedParameter<int>("AdcFullScale",255)),
theAdcFullScale(conf.getParameter<int>("AdcFullScale")),
theAdcFullScaleStack(conf.exists("AdcFullScaleStack")?conf.getParameter<int>("AdcFullScaleStack"):255),

// Noise in electrons:
// Pixel cell noise, relevant for generating noisy pixels
Expand Down Expand Up @@ -1414,15 +1413,6 @@ void SiPixelDigitizerAlgorithm::make_digis(float thePixelThresholdInE,
adc = int( signalInElectrons / theElectronPerADC ); // calibrate gain
}
adc = std::min(adc, theAdcFullScale); // Check maximum value
// Calculate layerIndex
if (theAdcFullScale!=theAdcFullScaleStack){
if(pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2OTB) { // Phase 2 OT Barrel only
// Set to 1 if over the threshold
if (theAdcFullScaleStack==1) {adc=1;}
// Make it a linear fit to the full scale of the normal adc count. Start new adc from 1 not zero.
if (theAdcFullScaleStack!=1&&theAdcFullScaleStack!=theAdcFullScale) {adc = int (1 + adc * (theAdcFullScaleStack-1)/float(theAdcFullScale) );}
}
} // Only enter this if the Adc changes for the outer layers
#ifdef TP_DEBUG
LogDebug ("Pixel Digitizer")
<< (*i).first << " " << (*i).second << " " << signalInElectrons
Expand Down
Expand Up @@ -341,7 +341,6 @@ class SiPixelDigitizerAlgorithm {
//-- make_digis
const float theElectronPerADC; // Gain, number of electrons per adc count.
const int theAdcFullScale; // Saturation count, 255=8bit.
const int theAdcFullScaleStack; // Saturation count for stack layers, 1=1bit.
const float theNoiseInElectrons; // Noise (RMS) in units of electrons.
const float theReadoutNoise; // Noise of the readount chain in elec,
//inludes DCOL-Amp,TBM-Amp, Alt, AOH,OptRec.
Expand Down