diff --git a/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h b/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h index 6d7e2dd900265..b29a875d9b67f 100644 --- a/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h +++ b/RecoLocalCalo/HGCalRecProducers/interface/HGCalImagingAlgo.h @@ -104,6 +104,7 @@ class HGCalImagingAlgo : public HGCalClusteringAlgoBase { iDesc.add("noises", descNestedNoises); edm::ParameterSetDescription descNestedNoiseMIP; descNestedNoiseMIP.add("scaleByDose", false); + descNestedNoiseMIP.add("scaleByDoseFactor", 1.); iDesc.add("scaleByDose", descNestedNoiseMIP); descNestedNoiseMIP.add("doseMap", ""); iDesc.add("doseMap", descNestedNoiseMIP); diff --git a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h index caf5faee1e374..45e9ce47c4643 100644 --- a/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h +++ b/RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.h @@ -98,6 +98,7 @@ class HGCalCLUEAlgoT : public HGCalClusteringAlgoBase { edm::ParameterSetDescription descNestedNoiseMIP; descNestedNoiseMIP.add("scaleByDose", false); descNestedNoiseMIP.add("scaleByDoseAlgo", 0); + descNestedNoiseMIP.add("scaleByDoseFactor", 1.); descNestedNoiseMIP.add("doseMap", ""); descNestedNoiseMIP.add("noise_MIP", 1. / 100.); iDesc.add("noiseMip", descNestedNoiseMIP); diff --git a/SimCalorimetry/HGCalSimAlgos/test/HGCSiNoiseMapAnalyzer.cc b/SimCalorimetry/HGCalSimAlgos/test/HGCSiNoiseMapAnalyzer.cc index b67fef8e2a256..61871b053c350 100644 --- a/SimCalorimetry/HGCalSimAlgos/test/HGCSiNoiseMapAnalyzer.cc +++ b/SimCalorimetry/HGCalSimAlgos/test/HGCSiNoiseMapAnalyzer.cc @@ -71,6 +71,7 @@ HGCSiNoiseMapAnalyzer::HGCSiNoiseMapAnalyzer(const edm::ParameterSet &iConfig) { //configure the dose map std::string doseMapURL(iConfig.getParameter("doseMap")); unsigned int doseMapAlgo(iConfig.getParameter("doseMapAlgo")); + double scaleByDoseFactor(iConfig.getParameter("scaleByDoseFactor")); std::vector ileakParam( iConfig.getParameter("ileakParam").template getParameter>("ileakParam")); std::vector cceParamFine( @@ -82,11 +83,14 @@ HGCSiNoiseMapAnalyzer::HGCSiNoiseMapAnalyzer(const edm::ParameterSet &iConfig) { noiseMaps_[DetId::HGCalEE] = std::unique_ptr(new HGCalSiNoiseMap); noiseMaps_[DetId::HGCalEE]->setDoseMap(doseMapURL, doseMapAlgo); + noiseMaps_[DetId::HGCalEE]->setFluenceScaleFactor(scaleByDoseFactor); + noiseMaps_[DetId::HGCalEE]->setIleakParam(ileakParam); noiseMaps_[DetId::HGCalEE]->setCceParam(cceParamFine, cceParamThin, cceParamThick); noiseMaps_[DetId::HGCalHSi] = std::unique_ptr(new HGCalSiNoiseMap); noiseMaps_[DetId::HGCalHSi]->setDoseMap(doseMapURL, doseMapAlgo); + noiseMaps_[DetId::HGCalHSi]->setFluenceScaleFactor(scaleByDoseFactor); noiseMaps_[DetId::HGCalHSi]->setIleakParam(ileakParam); noiseMaps_[DetId::HGCalHSi]->setCceParam(cceParamFine, cceParamThin, cceParamThick); diff --git a/SimCalorimetry/HGCalSimAlgos/test/hgcsiNoiseMapTester_cfg.py b/SimCalorimetry/HGCalSimAlgos/test/hgcsiNoiseMapTester_cfg.py index ccbf671e9e75a..d08579ac9428c 100644 --- a/SimCalorimetry/HGCalSimAlgos/test/hgcsiNoiseMapTester_cfg.py +++ b/SimCalorimetry/HGCalSimAlgos/test/hgcsiNoiseMapTester_cfg.py @@ -11,7 +11,7 @@ process = cms.Process("demo",eras.Phase2C8) process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.load('Configuration.Geometry.GeometryExtended2026D41Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff') from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '') @@ -20,6 +20,7 @@ from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import HGCAL_ileakParam_toUse, HGCAL_cceParams_toUse process.plotter_eol = cms.EDAnalyzer("HGCSiNoiseMapAnalyzer", + scaleByDoseFactor = cms.double(1.), doseMap = cms.string( options.doseMap ), doseMapAlgo = cms.uint32(0), ileakParam = HGCAL_ileakParam_toUse, diff --git a/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h b/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h index cabd4d315a0c9..4a8653a9a254b 100644 --- a/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h +++ b/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h @@ -137,6 +137,9 @@ class HGCDigitizerBase { //determines if the dose map should be used instead bool scaleByDose_; + //multiplicative fator to scale fluence map + double scaleByDoseFactor_; + //path to dose map std::string doseMapFile_; diff --git a/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py b/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py index 0d91100bde566..52a4c55a64806 100644 --- a/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py +++ b/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py @@ -32,13 +32,16 @@ cceParamFine_ttu800 = [1.5e+15, 3.35246e-17, 0.251679] #120 cceParamThin_ttu800 = [1.5e+15, -1.62096e-16, 0.293828] #200 cceParamThick_ttu800 = [6e+14, -5.95259e-16, 0.183929] #300 +# scaling the ddfz curve to match Timo's 800V measuremetn at 3.5E15 +cceParamFine_epi800 = [3.5e+15, -1.4285714e-17, 0.263812] #120 # line+log tdr 600V EPI -cceParamFine_epi600 = [3.5e+15, -9.73872e-19, 0.263812] #100 +cceParamFine_epi600 = [3.5e+15, -3.428571e-17, 0.263812] #120 - scaling the ddfz curve to match Timo's 600V measurement at 3.5E15 cceParamThin_epi600 = [1.5e+15, -3.09878e-16, 0.211207] #200 cceParamThick_epi600 = [6e+14, -7.96539e-16, 0.251751] #300 + HGCAL_cceParams_toUse = cms.PSet( - cceParamFine = cms.vdouble(cceParamFine_tdr600), + cceParamFine = cms.vdouble(cceParamFine_epi600), cceParamThin = cms.vdouble(cceParamThin_tdr600), cceParamThick = cms.vdouble(cceParamThick_tdr600) ) @@ -46,6 +49,7 @@ HGCAL_noise_fC = cms.PSet( scaleByDose = cms.bool(False), scaleByDoseAlgo = cms.uint32(0), + scaleByDoseFactor = cms.double(1), doseMap = cms.string(""), values = cms.vdouble( [x*fC_per_ele for x in nonAgedNoises] ), #100,200,300 um ) @@ -53,6 +57,7 @@ HGCAL_noise_heback = cms.PSet( scaleByDose = cms.bool(False), scaleByDoseAlgo = cms.uint32(0), + scaleByDoseFactor = cms.double(1), doseMap = cms.string(""), #empty dose map at begin-of-life noise_MIP = cms.double(1./100.) ) @@ -206,13 +211,35 @@ #function to set noise to aged HGCal endOfLifeCCEs = [0.5, 0.5, 0.7] endOfLifeNoises = [2400.0,2250.0,1750.0] -def HGCal_setEndOfLifeNoise(process,byDose=True,byDoseAlgo=0): +def HGCal_setEndOfLifeNoise(process,byDose=True,byDoseAlgo=0,byDoseFactor=1): """includes all effects from radiation and gain choice""" # byDoseAlgo is used as a collection of bits to toggle: FLUENCE, CCE, NOISE, PULSEPERGAIN, CACHEDOP (from lsb to Msb) - process=HGCal_setRealisticNoiseSi(process,byDose=byDose,byDoseAlgo=byDoseAlgo) - process=HGCal_setRealisticNoiseSci(process,byDose=byDose,byDoseAlgo=byDoseAlgo) + process=HGCal_setRealisticNoiseSi(process,byDose=byDose,byDoseAlgo=byDoseAlgo,byDoseFactor=byDoseFactor) + process=HGCal_setRealisticNoiseSci(process,byDose=byDose,byDoseAlgo=byDoseAlgo,byDoseFactor=byDoseFactor) return process +def HGCal_setEndOfLifeNoise_4000(process): + process.HGCAL_cceParams_toUse = cms.PSet( + cceParamFine = cms.vdouble(cceParamFine_epi800), + cceParamThin = cms.vdouble(cceParamThin_tdr800), + cceParamThick = cms.vdouble(cceParamThick_tdr800) + ) + process.HGCAL_ileakParam_toUse = cms.PSet( + ileakParam = cms.vdouble(ileakParam_800V) + ) + return HGCal_setEndOfLifeNoise(process,byDoseFactor=1.333) + +def HGCal_setEndOfLifeNoise_1500(process): + process.HGCAL_cceParams_toUse = cms.PSet( + cceParamFine = cms.vdouble(cceParamFine_epi600), + cceParamThin = cms.vdouble(cceParamThin_tdr600), + cceParamThick = cms.vdouble(cceParamThick_tdr600) + ) + process.HGCAL_ileakParam_toUse = cms.PSet( + ileakParam = cms.vdouble(ileakParam_600V) + ) + return HGCal_setEndOfLifeNoise(process,byDoseFactor=0.5) + def HGCal_ignoreFluence(process): """include all effects except fluence impact on leakage current and CCE""" # byDoseAlgo is used as a collection of bits to toggle: FLUENCE, CCE, NOISE, PULSEPERGAIN, CACHEDOP (from lsb to Msb) @@ -256,10 +283,11 @@ def HGCal_useCaching(process): doseMap = cms.string("SimCalorimetry/HGCalSimProducers/data/doseParams_3000fb_fluka-3.7.20.txt") -def HGCal_setRealisticNoiseSi(process,byDose=True,byDoseAlgo=0,byDoseMap=doseMap): +def HGCal_setRealisticNoiseSi(process,byDose=True,byDoseAlgo=0,byDoseMap=doseMap,byDoseFactor=1): process.HGCAL_noise_fC = cms.PSet( scaleByDose = cms.bool(byDose), scaleByDoseAlgo = cms.uint32(byDoseAlgo), + scaleByDoseFactor = cms.double(byDoseFactor), doseMap = byDoseMap, values = cms.vdouble( [x*fC_per_ele for x in endOfLifeNoises] ), #100,200,300 um ) @@ -271,10 +299,11 @@ def HGCal_setRealisticNoiseSi(process,byDose=True,byDoseAlgo=0,byDoseMap=doseMap ) return process -def HGCal_setRealisticNoiseSci(process,byDose=True,byDoseAlgo=0,byDoseMap=doseMap): +def HGCal_setRealisticNoiseSci(process,byDose=True,byDoseAlgo=0,byDoseMap=doseMap,byDoseFactor=1): process.HGCAL_noise_heback = cms.PSet( scaleByDose = cms.bool(byDose), scaleByDoseAlgo = cms.uint32(byDoseAlgo), + scaleByDoseFactor = cms.double(byDoseFactor), doseMap = byDoseMap, noise_MIP = cms.double(1./5.) #uses noise map ) @@ -284,12 +313,14 @@ def HGCal_disableNoise(process): process.HGCAL_noise_fC = cms.PSet( scaleByDose = cms.bool(False), scaleByDoseAlgo = cms.uint32(0), + scaleByDoseFactor = cms.double(1), doseMap = cms.string(""), values = cms.vdouble(0,0,0), #100,200,300 um ) process.HGCAL_noise_heback = cms.PSet( scaleByDose = cms.bool(False), scaleByDoseAlgo = cms.uint32(0), + scaleByDoseFactor = cms.double(1), doseMap = cms.string(""), noise_MIP = cms.double(0.) #zero noise ) diff --git a/SimCalorimetry/HGCalSimProducers/src/HGCDigitizerBase.cc b/SimCalorimetry/HGCalSimProducers/src/HGCDigitizerBase.cc index 243141cd20bf3..5d3ce7b758ed0 100644 --- a/SimCalorimetry/HGCalSimProducers/src/HGCDigitizerBase.cc +++ b/SimCalorimetry/HGCalSimProducers/src/HGCDigitizerBase.cc @@ -36,8 +36,10 @@ HGCDigitizerBase::HGCDigitizerBase(const edm::ParameterSet& ps) scaleByDose_ = myCfg_.getParameter("noise_fC").template getParameter("scaleByDose"); int scaleByDoseAlgo = myCfg_.getParameter("noise_fC").template getParameter("scaleByDoseAlgo"); + scaleByDoseFactor_ = myCfg_.getParameter("noise_fC").getParameter("scaleByDoseFactor"); doseMapFile_ = myCfg_.getParameter("noise_fC").template getParameter("doseMap"); scal_.setDoseMap(doseMapFile_, scaleByDoseAlgo); + scal_.setFluenceScaleFactor(scaleByDoseFactor_); } else { noise_fC_.resize(1, 1.f); } @@ -188,22 +190,25 @@ void HGCDigitizerBase::runSimple(std::unique_ptr& template void HGCDigitizerBase::updateOutput(std::unique_ptr& coll, const DFr& rawDataFrame) { + // 9th is the sample of hte intime amplitudes int itIdx(9); if (rawDataFrame.size() <= itIdx + 2) return; DFr dataFrame(rawDataFrame.id()); dataFrame.resize(5); - bool putInEvent(false); + + // if in time amplitude is above threshold + // , then don't push back the dataframe + if ((!rawDataFrame[itIdx].threshold())) { + return; + } + for (int it = 0; it < 5; it++) { dataFrame.setSample(it, rawDataFrame[itIdx - 2 + it]); - if (it == 2) - putInEvent = rawDataFrame[itIdx - 2 + it].threshold(); } - if (putInEvent) { - coll->push_back(dataFrame); - } + coll->push_back(dataFrame); } // cause the compiler to generate the appropriate code diff --git a/SimCalorimetry/HGCalSimProducers/src/HGCHEbackDigitizer.cc b/SimCalorimetry/HGCalSimProducers/src/HGCHEbackDigitizer.cc index a6ea19e346075..f6c7186bf39b6 100644 --- a/SimCalorimetry/HGCalSimProducers/src/HGCHEbackDigitizer.cc +++ b/SimCalorimetry/HGCalSimProducers/src/HGCHEbackDigitizer.cc @@ -20,6 +20,7 @@ HGCHEbackDigitizer::HGCHEbackDigitizer(const edm::ParameterSet& ps) : HGCDigitiz sipmMapFile_ = cfg.getParameter("sipmMap"); scaleByDose_ = cfg.getParameter("noise").getParameter("scaleByDose"); unsigned int scaleByDoseAlgo = cfg.getParameter("noise").getParameter("scaleByDoseAlgo"); + scaleByDoseFactor_ = cfg.getParameter("noise").getParameter("scaleByDoseFactor"); doseMapFile_ = cfg.getParameter("noise").getParameter("doseMap"); noise_MIP_ = cfg.getParameter("noise").getParameter("noise_MIP"); thresholdFollowsMIP_ = cfg.getParameter("thresholdFollowsMIP"); @@ -31,6 +32,7 @@ HGCHEbackDigitizer::HGCHEbackDigitizer(const edm::ParameterSet& ps) : HGCDigitiz sdPixels_ = cfg.getParameter("sdPixels"); scal_.setDoseMap(doseMapFile_, scaleByDoseAlgo); + scal_.setFluenceScaleFactor(scaleByDoseFactor_); scal_.setSipmMap(sipmMapFile_); }