diff --git a/DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h b/DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h index 18ab43f6b77a4..3ccab6c5f68d0 100644 --- a/DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h +++ b/DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h @@ -26,6 +26,7 @@ class HGCalTriggerDetId : public DetId { public: + enum waferType { HGCalHD120 = 0, HGCalLD200 = 1, HGCalLD300 = 2, HGCalHD200 = 3 }; static const int HGCalTriggerCell = 4; /** Create a null cellid*/ @@ -46,6 +47,8 @@ class HGCalTriggerDetId : public DetId { /// get the type int type() const { return (id_ >> kHGCalTypeOffset) & kHGCalTypeMask; } + bool lowDensity() const { return ((type() == HGCalLD200) || (type() == HGCalLD300)); } + bool highDensity() const { return ((type() == HGCalHD120) || (type() == HGCalHD200)); } /// get the z-side of the cell (1/-1) int zside() const { return (((id_ >> kHGCalZsideOffset) & kHGCalZsideMask) ? -1 : 1); } diff --git a/DataFormats/ForwardDetId/interface/HGCalTriggerModuleDetId.h b/DataFormats/ForwardDetId/interface/HGCalTriggerModuleDetId.h index a3c3ffbebce50..c22459d1e906c 100644 --- a/DataFormats/ForwardDetId/interface/HGCalTriggerModuleDetId.h +++ b/DataFormats/ForwardDetId/interface/HGCalTriggerModuleDetId.h @@ -18,6 +18,7 @@ [19:20] Type (0 fine divisions of wafer with 120 mum thick silicon 1 coarse divisions of wafer with 200 mum thick silicon 2 coarse divisions of wafer with 300 mum thick silicon + 3 fine divisions of wafer with 200 mum thick silicon 0 fine divisions of scintillators 1 coarse divisions of scintillators) @@ -30,6 +31,8 @@ class HGCalTriggerModuleDetId : public DetId { public: + enum siliconType { HGCalHD120 = 0, HGCalLD200 = 1, HGCalLD300 = 2, HGCalHD200 = 3 }; + enum tileGranularity { HGCalTileNormal = 0, HGCalTileFine = 1 }; /** Create a null module id*/ HGCalTriggerModuleDetId(); /** Create module id from raw id (0=invalid id) */ @@ -72,6 +75,15 @@ class HGCalTriggerModuleDetId : public DetId { /// get the scintillator panel phi int phi() const { return moduleV(); } + bool isSiliconLowDensity() const { + return (!isHScintillator() && ((type() == HGCalLD200) || (type() == HGCalLD300))); + } + bool isSiliconHighDensity() const { + return (!isHScintillator() && ((type() == HGCalHD120) || (type() == HGCalHD200))); + } + bool isScintillatorFine() const { return (isHScintillator() && (type() == HGCalTileFine)); } + bool isScintillatorCoarse() const { return (isHScintillator() && (type() == HGCalTileNormal)); } + /// consistency check : no bits left => no overhead bool isHFNose() const { return (triggerSubdetId() == HFNoseTrigger); } bool isEE() const { return (triggerSubdetId() == HGCalEETrigger); } diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHitL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHitL1Seeded_cfi.py index 941e7d9fa1f5a..02d89bf6604d3 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHitL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHitL1Seeded_cfi.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hltHGCalRecHitL1Seeded = cms.EDProducer("HGCalRecHitProducer", @@ -60,3 +61,10 @@ thicknessCorrection = HGCAL_reco_constants.thicknessCorrection, thicknessNoseCorrection = cms.vdouble(1.132, 1.092, 1.084) ) + +phase2_hgcalV19.toModify(hltHGCalRecHitL1Seeded, + HGCEE_fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4], + HGCHEF_fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8], + HGCHFNose_fCPerMIP = [1.25, 2.57, 3.88, 2.57], + + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHit_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHit_cfi.py index 9cf431061b954..7e6a568b5bb51 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHit_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalRecHit_cfi.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hltHGCalRecHit = cms.EDProducer("HGCalRecHitProducer", HGCEE_cce = cms.PSet( @@ -59,3 +60,9 @@ thicknessCorrection = HGCAL_reco_constants.thicknessCorrection, thicknessNoseCorrection = cms.vdouble(1.132, 1.092, 1.084) ) + +phase2_hgcalV19.toModify(hltHGCalRecHit, + HGCEE_fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4], + HGCHEF_fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8], + HGCHFNose_fCPerMIP = [1.25, 2.57, 3.88, 2.57], + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHitL1Seeded_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHitL1Seeded_cfi.py index 5d9d933b0d410..9b99c1506fcb8 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHitL1Seeded_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHitL1Seeded_cfi.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hltHGCalUncalibRecHitL1Seeded = cms.EDProducer("HGCalUncalibRecHitProducer", HGCEEConfig = cms.PSet( @@ -60,3 +61,20 @@ from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 ticl_v5.toModify(hltHGCalUncalibRecHitL1Seeded, computeLocalTime = cms.bool(True)) + +_modifiedHGCEEConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCEEConfig.clone( + fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4] +) +_modifiedHGCHEFConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCHEFConfig.clone( + fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8] +) +_modifiedHGCHFNoseConfig_v19 = hltHGCalUncalibRecHitL1Seeded.HGCHFNoseConfig.clone( + fCPerMIP = [1.25, 2.57, 3.88, 2.57] +) + +phase2_hgcalV19.toModify( + hltHGCalUncalibRecHitL1Seeded, + HGCEEConfig = _modifiedHGCEEConfig_v19, + HGCHEFConfig = _modifiedHGCHEFConfig_v19, + HGCHFNoseConfig = _modifiedHGCHFNoseConfig_v19 +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHit_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHit_cfi.py index 1cec533eaf6a4..2f9abdd33dd0e 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHit_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltHGCalUncalibRecHit_cfi.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hltHGCalUncalibRecHit = cms.EDProducer("HGCalUncalibRecHitProducer", @@ -61,3 +62,21 @@ from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 ticl_v5.toModify(hltHGCalUncalibRecHit, computeLocalTime = cms.bool(True)) + + +_modifiedHGCEEConfig_v19 = hltHGCalUncalibRecHit.HGCEEConfig.clone( + fCPerMIP = HGCAL_reco_constants.fcPerMip[0:4] +) +_modifiedHGCHEFConfig_v19 = hltHGCalUncalibRecHit.HGCHEFConfig.clone( + fCPerMIP = HGCAL_reco_constants.fcPerMip[4:8] +) +_modifiedHGCHFNoseConfig_v19 = hltHGCalUncalibRecHit.HGCHFNoseConfig.clone( + fCPerMIP = [1.25, 2.57, 3.88, 2.57] +) + +phase2_hgcalV19.toModify( + hltHGCalUncalibRecHit, + HGCEEConfig = _modifiedHGCEEConfig_v19, + HGCHEFConfig = _modifiedHGCHEFConfig_v19, + HGCHFNoseConfig = _modifiedHGCHFNoseConfig_v19 +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_chargeCollectionEfficiencies_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_chargeCollectionEfficiencies_cfi.py index f1bb474d6a5ff..019aef25fd9fe 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_chargeCollectionEfficiencies_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_chargeCollectionEfficiencies_cfi.py @@ -1,5 +1,8 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 HGCAL_chargeCollectionEfficiencies = cms.PSet( values = cms.vdouble(1.0, 1.0, 1.0) -) \ No newline at end of file +) + +phase2_hgcalV19.toModify(HGCAL_chargeCollectionEfficiencies, values = [1.0, 1.0,1.0,1.0]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_noise_fC_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_noise_fC_cfi.py index 096153fba220a..dbd3cc24d9b13 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_noise_fC_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/HGCAL_noise_fC_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 HGCAL_noise_fC = cms.PSet( doseMap = cms.string(''), @@ -6,4 +7,6 @@ scaleByDoseAlgo = cms.uint32(0), scaleByDoseFactor = cms.double(1), values = cms.vdouble(0.32041011999999996, 0.384492144, 0.32041011999999996) -) \ No newline at end of file +) + +phase2_hgcalV19.toModify(HGCAL_noise_fC , values = [0.32041011999999996, 0.384492144, 0.32041011999999996, 0.384492144]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/hgcal_reco_constants_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/hgcal_reco_constants_cfi.py index e7addc12131b5..74e0c92bbd047 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/hgcal_reco_constants_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/hgcal_reco_constants_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 HGCAL_reco_constants = cms.PSet( dEdXweights = cms.vdouble( @@ -38,6 +39,23 @@ referenceXtalk = cms.double(-1), noise_MIP = cms.double(0.01) ), + numberOfThicknesses = cms.uint32(3) ) + + +phase2_hgcalV19.toModify(HGCAL_reco_constants, + thicknessCorrection = [0.75, 0.76, 0.75, 0.76, 0.85, 0.85, 0.84, 0.85] , #CEE_12_HD, CEE_200_LD, CEE_300_LD, CEE_200_HD,CEH_12_HD, CEH_200_LD, CEH_300_LD, CEH_200_HD, + fcPerMip = + [2.06, 3.43, 5.15, 3.43, 2.06, 3.43, + 5.15, 3.43] + , + noises = + [2000.0, 2400.0, 2000.0, 2400.0, 2000.0, 2400.0, + 2000.0, 2400.] + , + numberOfThicknesses = 4, + maxNumberOfThickIndices = 8, + thresholdW0 = [2.9, 2.9, 2.9, 2.9], + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/hgceeDigitizer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/hgceeDigitizer_cfi.py index ae36c9d0689b8..d7432f2d947bc 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/hgceeDigitizer_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/hgceeDigitizer_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hgceeDigitizer = cms.PSet( NoiseGeneration_Method = cms.bool(True), @@ -63,4 +64,6 @@ tofDelay = cms.double(5), useAllChannels = cms.bool(True), verbosity = cms.untracked.uint32(0) -) \ No newline at end of file +) + +phase2_hgcalV19.toModify(hgceeDigitizer.digiCfg.feCfg, tdcForToAOnset_fC= [12.,12.,12.,12.]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/hgchebackDigitizer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/hgchebackDigitizer_cfi.py index 41c24581277ca..c63c172d87fcf 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/hgchebackDigitizer_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/hgchebackDigitizer_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hgchebackDigitizer = cms.PSet( NoiseGeneration_Method = cms.bool(True), @@ -61,4 +62,6 @@ tofDelay = cms.double(1), useAllChannels = cms.bool(True), verbosity = cms.untracked.uint32(0) -) \ No newline at end of file +) + +phase2_hgcalV19.toModify(hgchebackDigitizer.digiCfg.feCfg, tdcForToAOnset_fC = [12.,12.,12.,12.]) diff --git a/HLTrigger/Configuration/python/HLT_75e33/psets/hgchefrontDigitizer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/psets/hgchefrontDigitizer_cfi.py index cddd9d53be941..c435ec12c5439 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/psets/hgchefrontDigitizer_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/psets/hgchefrontDigitizer_cfi.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 hgchefrontDigitizer = cms.PSet( NoiseGeneration_Method = cms.bool(True), @@ -62,4 +63,6 @@ tofDelay = cms.double(5), useAllChannels = cms.bool(True), verbosity = cms.untracked.uint32(0) -) \ No newline at end of file +) + +phase2_hgcalV19.toModify(hgchefrontDigitizer.digiCfg.feCfg, tdcForToAOnset_fC = [12.,12.,12.,12.]) diff --git a/L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h b/L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h index 5dbce5e91860a..b0aa287121cef 100644 --- a/L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h +++ b/L1Trigger/L1THGCal/interface/HGCalCoarseTriggerCellMapping.h @@ -13,8 +13,11 @@ class HGCalCoarseTriggerCellMapping { std::vector getConstituentTriggerCells(uint32_t ctcId) const; GlobalPoint getCoarseTriggerCellPosition(uint32_t ctcId) const; uint32_t getCoarseTriggerCellId(uint32_t detid) const; - void checkSizeValidity(int ctcSize) const; - void setGeometry(const HGCalTriggerGeometryBase* const geom) { triggerTools_.setGeometry(geom); } + void checkSizeValidity() const; + void setGeometry(const HGCalTriggerGeometryBase* const geom) { + triggerTools_.setGeometry(geom); + checkSizeValidity(); + } static constexpr int kCTCsizeCoarse_ = 16; static constexpr int kCTCsizeMid_ = 8; @@ -26,7 +29,6 @@ class HGCalCoarseTriggerCellMapping { static const std::map kSplit_; static const std::map kSplit_Scin_; static constexpr int kSTCidMaskInv_ = ~0xf; - static constexpr int kNThicknesses_ = 4; static constexpr int kNHGCalLayersMax_ = 52; static constexpr int kSplit_Coarse_ = 0; diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h b/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h index 60b4f4e1f1fa0..69b0ff81d8ce4 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerTools.h @@ -42,6 +42,7 @@ class HGCalTriggerTools { GlobalPoint getTCPosition(const DetId& id) const; unsigned layers(ForwardSubdetector type) const; unsigned layers(DetId::Detector type) const; + unsigned nSiWaferTypes() const; unsigned layer(const DetId&) const; unsigned layerWithOffset(const DetId&) const; bool isEm(const DetId&) const; @@ -49,6 +50,8 @@ class HGCalTriggerTools { bool isSilicon(const DetId&) const; bool isScintillator(const DetId& id) const { return !isSilicon(id); } bool isNose(const DetId&) const; + bool isSiliconHighDensity(const DetId&) const; + bool isSiliconLowDensity(const DetId&) const; int zside(const DetId&) const; int thicknessIndex(const DetId&) const; @@ -84,8 +87,6 @@ class HGCalTriggerTools { DetId simToReco(const DetId&, const HGCalTopology&) const; unsigned triggerLayer(const unsigned id) const { return geom_->triggerLayer(id); } - static constexpr unsigned kScintillatorPseudoThicknessIndex_ = 3; - enum SubDetectorType { hgcal_silicon_CEE, hgcal_silicon_CEH, @@ -100,6 +101,7 @@ class HGCalTriggerTools { unsigned bhLayers_; unsigned noseLayers_; unsigned totalLayers_; + unsigned scintillatorPseudoThicknessIndex_; }; #endif diff --git a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorCoarsenerImpl.h b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorCoarsenerImpl.h index c61a5ec7814d7..77b42618ab54c 100644 --- a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorCoarsenerImpl.h +++ b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorCoarsenerImpl.h @@ -23,7 +23,6 @@ class HGCalConcentratorCoarsenerImpl { HGCalTriggerTools triggerTools_; bool fixedDataSizePerHGCROC_; HGCalCoarseTriggerCellMapping coarseTCmapping_; - static constexpr int kHighDensityThickness_ = 0; HGCalTriggerCellCalibration calibration_; HGCalVFECompressionImpl vfeCompression_; diff --git a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h index f810816c5dc48..1ab8341bc3dca 100644 --- a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h +++ b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h @@ -33,7 +33,6 @@ class HGCalConcentratorProcessorSelection : public HGCalConcentratorProcessorBas bool fixedDataSizePerHGCROC_; bool allTrigCellsInTrigSums_; std::vector coarsenTriggerCells_; - static constexpr int kHighDensityThickness_ = 0; static constexpr int kNSubDetectors_ = 3; std::vector selectionType_; diff --git a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h index e18692e8b8988..df1001360892b 100644 --- a/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h +++ b/L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSuperTriggerCellImpl.h @@ -34,7 +34,6 @@ class HGCalConcentratorSuperTriggerCellImpl { }; EnergyDivisionType energyDivisionType_; - static constexpr int kHighDensityThickness_ = 0; static constexpr int kOddNumberMask_ = 1; HGCalTriggerTools triggerTools_; diff --git a/L1Trigger/L1THGCal/interface/veryfrontend/HGCalVFESummationImpl.h b/L1Trigger/L1THGCal/interface/veryfrontend/HGCalVFESummationImpl.h index c53e1c1ae3d74..2cf3358ad7d02 100644 --- a/L1Trigger/L1THGCal/interface/veryfrontend/HGCalVFESummationImpl.h +++ b/L1Trigger/L1THGCal/interface/veryfrontend/HGCalVFESummationImpl.h @@ -5,6 +5,7 @@ #include "DataFormats/DetId/interface/DetId.h" #include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h" +#include #include #include #include @@ -13,7 +14,11 @@ class HGCalVFESummationImpl { public: HGCalVFESummationImpl(const edm::ParameterSet& conf); - void setGeometry(const HGCalTriggerGeometryBase* const geom) { triggerTools_.setGeometry(geom); } + void setGeometry(const HGCalTriggerGeometryBase* const geom) { + triggerTools_.setGeometry(geom); + checkSizeValidity(); + } + void checkSizeValidity() const; void triggerCellSums(const std::vector >&, std::unordered_map&); private: diff --git a/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc b/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc index 67a667b4239ff..f1b80e81d0f1d 100644 --- a/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc +++ b/L1Trigger/L1THGCal/plugins/concentrator/HGCalConcentratorProcessorSelection.cc @@ -89,11 +89,11 @@ void HGCalConcentratorProcessorSelection::run(const edm::Handle trigSumsVecOutput; std::vector ae_EncodedLayerOutput; - int thickness = triggerTools_.thicknessIndex(module_trigcell.second.at(0).detId()); + bool isHighDensity = triggerTools_.isSiliconHighDensity(module_trigcell.second.at(0).detId()); HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(module_trigcell.second.at(0).detId()); - if (coarsenTriggerCells_[subdet] || (fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_)) { + if (coarsenTriggerCells_[subdet] || (fixedDataSizePerHGCROC_ && !isHighDensity)) { coarsenerImpl_->coarsen(module_trigcell.second, trigCellVecCoarsened); switch (selectionType_[subdet]) { diff --git a/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc b/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc index df66eb7a81f9a..b426296242fd5 100644 --- a/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc +++ b/L1Trigger/L1THGCal/plugins/veryfrontend/HGCalVFEProcessorSums.cc @@ -59,11 +59,10 @@ void HGCalVFEProcessorSums::run(const HGCalDigiCollection& digiColl, if (dataframes.empty()) return; - constexpr int kHighDensityThickness = 0; bool isSilicon = triggerTools_.isSilicon(dataframes[0].id()); bool isEM = triggerTools_.isEm(dataframes[0].id()); bool isNose = triggerTools_.isNose(dataframes[0].id()); - int thickness = triggerTools_.thicknessIndex(dataframes[0].id()); + bool isHighDensity = triggerTools_.isSiliconHighDensity(dataframes[0].id()); // Linearization of ADC and TOT values to the same LSB if (isSilicon) { vfeLinearizationSiImpl_->linearize(dataframes, linearized_dataframes); @@ -73,7 +72,7 @@ void HGCalVFEProcessorSums::run(const HGCalDigiCollection& digiColl, // Sum of sensor cells into trigger cells vfeSummationImpl_->triggerCellSums(linearized_dataframes, tc_payload); // Compression of trigger cell charges to a floating point format - if (thickness == kHighDensityThickness) { + if (isHighDensity) { vfeCompressionHDMImpl_->compress(tc_payload, tc_compressed_payload); } else { vfeCompressionLDMImpl_->compress(tc_payload, tc_compressed_payload); diff --git a/L1Trigger/L1THGCal/python/l1tHGCalConcentratorProducer_cfi.py b/L1Trigger/L1THGCal/python/l1tHGCalConcentratorProducer_cfi.py index 1cd76de59426d..5ef7a0ba9e167 100644 --- a/L1Trigger/L1THGCal/python/l1tHGCalConcentratorProducer_cfi.py +++ b/L1Trigger/L1THGCal/python/l1tHGCalConcentratorProducer_cfi.py @@ -1,5 +1,6 @@ import FWCore.ParameterSet.Config as cms import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam +from HLTrigger.Configuration.HLT_75e33.psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants # Digitization parameters adcSaturationBH_MIP = digiparam.hgchebackDigitizer.digiCfg.feCfg.adcSaturation_fC @@ -7,11 +8,14 @@ # MAX_LAYERS should be equal to kNHGCalLayersMax_ defined in interface/HGCalCoarseTriggerCellMapping.h # MAX_LAYERS can be larger than the actual number of layers -# CTC / STC sizes vectors should have a length of 4*MAX_LAYERS, 4 = 3 different silicon thicknesses + scintillator portion +# CTC / STC sizes vectors should have a length of (N_THICKNESSES+1)*MAX_LAYERS +# =V19: 4 different silicon thicknesses/types (HD120, LD200, LD300, HD200) + scintillator portion MAX_LAYERS = 52 -CTC_2_SIZES = cms.vuint32( [2]*(MAX_LAYERS+1)*4 ) -STC_4_AND_16_SIZES = cms.vuint32( [4]*(MAX_LAYERS+1)+ [16]*(MAX_LAYERS+1)*3 ) -STC_4_AND_8_SIZES = cms.vuint32( [4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*3 ) +N_THICKNESSES = HGCAL_reco_constants.numberOfThicknesses.value() +CTC_2_SIZES = cms.vuint32( [2]*(MAX_LAYERS+1)*(N_THICKNESSES+1) ) +STC_4_AND_16_SIZES = cms.vuint32( [4]*(MAX_LAYERS+1)+ [16]*(MAX_LAYERS+1)*N_THICKNESSES ) +STC_4_AND_8_SIZES = cms.vuint32( [4]*(MAX_LAYERS+1)+ [8]*(MAX_LAYERS+1)*N_THICKNESSES ) threshold_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), Method = cms.vstring(['thresholdSelect']*3), @@ -23,6 +27,7 @@ ctcSize = CTC_2_SIZES, ) + # Column is Nlinks, Row is NWafers # Requested size = 8(links)x8(wafers) # Values taken from https://indico.cern.ch/event/747610/contributions/3155360/, slide 13 @@ -96,6 +101,7 @@ superTCCalibration_nose = vfe_proc.calibrationCfg_nose.clone(), ) + custom_conc_proc = cms.PSet(ProcessorName = cms.string('HGCalConcentratorProcessorSelection'), Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'), NData = cms.vuint32(bestchoice_ndata_decentralized), diff --git a/L1Trigger/L1THGCal/python/l1tHGCalVFEProducer_cfi.py b/L1Trigger/L1THGCal/python/l1tHGCalVFEProducer_cfi.py index 5d83b3fb6df66..abcab3c9af385 100644 --- a/L1Trigger/L1THGCal/python/l1tHGCalVFEProducer_cfi.py +++ b/L1Trigger/L1THGCal/python/l1tHGCalVFEProducer_cfi.py @@ -4,7 +4,7 @@ import RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi as recoparam import RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi as recocalibparam from . import hgcalLayersCalibrationCoefficients_cfi as layercalibparam - +from HLTrigger.Configuration.HLT_75e33.psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants feCfg_si = digiparam.hgceeDigitizer.digiCfg.feCfg feCfg_sc = digiparam.hgchebackDigitizer.digiCfg.feCfg @@ -71,7 +71,12 @@ thicknessCorrectionSc = recocalibparam.HGCalRecHit.sciThicknessCorrection thicknessCorrectionNose = recocalibparam.HGCalRecHit.thicknessNoseCorrection -NTHICKNESS = 3 +NTHICKNESS = HGCAL_reco_constants.numberOfThicknesses.value() +# Silicon thickness correction in HGCalRecHit_cfi.py is in the form: +# [CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um] +# While here there are two different sets for CE-E and CE-H +# Additionally there are four values for each set, in order to follow the four detid silicon types [HD120um, LD200um, LD300um, HD200um] +# The thickness correction value for HD200um is copied from LD200um calibration_params_ee = cms.PSet( lsb = cms.double(triggerCellLsbBeforeCompression_si), fCperMIP = fCperMIPee, @@ -133,15 +138,13 @@ chargeCollectionEfficiency = cms.PSet(refToPSet_ = cms.string("HGCAL_chargeCollectionEfficiencies")), ) - - l1tHGCalVFEProducer = cms.EDProducer( - "HGCalVFEProducer", - eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'), - fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'), - bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'), - ProcessorParameters = vfe_proc.clone() - ) + "HGCalVFEProducer", + eeDigis = cms.InputTag('simHGCalUnsuppressedDigis:EE'), + fhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEfront'), + bhDigis = cms.InputTag('simHGCalUnsuppressedDigis:HEback'), + ProcessorParameters = vfe_proc.clone() +) l1tHFnoseVFEProducer = cms.EDProducer( "HFNoseVFEProducer", diff --git a/L1Trigger/L1THGCal/src/HGCalCoarseTriggerCellMapping.cc b/L1Trigger/L1THGCal/src/HGCalCoarseTriggerCellMapping.cc index 370d350fef533..05053d9142ed1 100644 --- a/L1Trigger/L1THGCal/src/HGCalCoarseTriggerCellMapping.cc +++ b/L1Trigger/L1THGCal/src/HGCalCoarseTriggerCellMapping.cc @@ -2,16 +2,7 @@ #include "DataFormats/ForwardDetId/interface/HGCalTriggerDetId.h" HGCalCoarseTriggerCellMapping::HGCalCoarseTriggerCellMapping(const std::vector& ctcSize) - : ctcSize_(!ctcSize.empty() ? ctcSize - : std::vector{kNHGCalLayersMax_ * kNThicknesses_, kCTCsizeVeryFine_}) { - if (ctcSize_.size() != (kNHGCalLayersMax_ + 1) * kNThicknesses_) { - throw cms::Exception("HGCTriggerParameterError") - << "Inconsistent size of coarse trigger cell size vector " << ctcSize_.size(); - } - - for (auto ctc : ctcSize_) - checkSizeValidity(ctc); -} + : ctcSize_(ctcSize) {} const std::map HGCalCoarseTriggerCellMapping::kSplit_ = { {kCTCsizeIndividual_, kSplit_Individual_}, @@ -29,12 +20,19 @@ const std::map HGCalCoarseTriggerCellMapping::kSplit_Scin_ = { {kCTCsizeCoarse_, kSplit_Scin_Coarse_}, }; -void HGCalCoarseTriggerCellMapping::checkSizeValidity(int ctcSize) const { - if (ctcSize != kCTCsizeFine_ && ctcSize != kCTCsizeCoarse_ && ctcSize != kCTCsizeMid_ && - ctcSize != kCTCsizeVeryFine_ && ctcSize != kCTCsizeIndividual_) { +void HGCalCoarseTriggerCellMapping::checkSizeValidity() const { + unsigned nThickness = triggerTools_.nSiWaferTypes() + 1; // +1 for scintillator + if (ctcSize_.size() != (kNHGCalLayersMax_ + 1) * nThickness) { throw cms::Exception("HGCTriggerParameterError") - << "Coarse Trigger Cell should be of size " << kCTCsizeIndividual_ << " or " << kCTCsizeVeryFine_ << " or " - << kCTCsizeFine_ << " or " << kCTCsizeMid_ << " or " << kCTCsizeCoarse_; + << "Inconsistent size of coarse trigger cell size vector " << ctcSize_.size(); + } + for (auto ctcSize : ctcSize_) { + if (ctcSize != kCTCsizeFine_ && ctcSize != kCTCsizeCoarse_ && ctcSize != kCTCsizeMid_ && + ctcSize != kCTCsizeVeryFine_ && ctcSize != kCTCsizeIndividual_) { + throw cms::Exception("HGCTriggerParameterError") + << "Coarse Trigger Cell should be of size " << kCTCsizeIndividual_ << " or " << kCTCsizeVeryFine_ << " or " + << kCTCsizeFine_ << " or " << kCTCsizeMid_ << " or " << kCTCsizeCoarse_; + } } } diff --git a/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc b/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc index 240ae9bb3c008..13cb80d69696c 100644 --- a/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc +++ b/L1Trigger/L1THGCal/src/HGCalTriggerTools.cc @@ -46,6 +46,7 @@ void HGCalTriggerTools::setGeometry(const HGCalTriggerGeometryBase* const geom) bhLayers_ = geom_->hscTopology().dddConstants().layers(true); totalLayers_ = eeLayers_ + fhLayers_; + scintillatorPseudoThicknessIndex_ = nSiWaferTypes() + 1; } GlobalPoint HGCalTriggerTools::getTCPosition(const DetId& id) const { @@ -105,6 +106,8 @@ unsigned HGCalTriggerTools::layers(DetId::Detector type) const { return layers; } +unsigned HGCalTriggerTools::nSiWaferTypes() const { return geom_->eeTopology().dddConstants().waferTypes(); } + unsigned HGCalTriggerTools::layer(const DetId& id) const { unsigned int layer = std::numeric_limits::max(); if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) { @@ -185,6 +188,52 @@ bool HGCalTriggerTools::isSilicon(const DetId& id) const { return silicon; } +bool HGCalTriggerTools::isSiliconHighDensity(const DetId& id) const { + if (isScintillator(id)) { + return false; + } + unsigned det = id.det(); + bool hd = false; + if (det == DetId::HGCalEE || det == DetId::HGCalHSi) { + hd = HGCSiliconDetId(id).highDensity(); + } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) { + hd = (HFNoseDetId(id).type() == HFNoseDetId::HFNoseFine); + } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) { + hd = HGCalTriggerModuleDetId(id).isSiliconHighDensity(); + } else if (id.det() == DetId::HGCalTrigger && + (HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HGCalEETrigger || + HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HGCalHSiTrigger)) { + hd = HGCalTriggerDetId(id).highDensity(); + } else if (id.det() == DetId::HGCalTrigger && + HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HFNoseTrigger) { + hd = (HFNoseDetId(id).type() == HFNoseDetId::HFNoseFine); + } + return hd; +} + +bool HGCalTriggerTools::isSiliconLowDensity(const DetId& id) const { + if (isScintillator(id)) { + return false; + } + unsigned det = id.det(); + bool ld = false; + if (det == DetId::HGCalEE || det == DetId::HGCalHSi) { + ld = HGCSiliconDetId(id).lowDensity(); + } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) { + ld = (HFNoseDetId(id).type() != HFNoseDetId::HFNoseFine); + } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) { + ld = HGCalTriggerModuleDetId(id).isSiliconLowDensity(); + } else if (id.det() == DetId::HGCalTrigger && + (HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HGCalEETrigger || + HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HGCalHSiTrigger)) { + ld = HGCalTriggerDetId(id).lowDensity(); + } else if (id.det() == DetId::HGCalTrigger && + HGCalTriggerDetId(id).subdet() == HGCalTriggerSubdetector::HFNoseTrigger) { + ld = (HFNoseDetId(id).type() != HFNoseDetId::HFNoseFine); + } + return ld; +} + HGCalTriggerTools::SubDetectorType HGCalTriggerTools::getSubDetectorType(const DetId& id) const { SubDetectorType subdet; if (!isScintillator(id)) { @@ -220,7 +269,7 @@ int HGCalTriggerTools::zside(const DetId& id) const { int HGCalTriggerTools::thicknessIndex(const DetId& id) const { if (isScintillator(id)) { - return kScintillatorPseudoThicknessIndex_; + return scintillatorPseudoThicknessIndex_; } unsigned det = id.det(); int thickness = 0; diff --git a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorCoarsenerImpl.cc b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorCoarsenerImpl.cc index 1fb904f985bfd..8174e2cfd253f 100644 --- a/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorCoarsenerImpl.cc +++ b/L1Trigger/L1THGCal/src/concentrator/HGCalConcentratorCoarsenerImpl.cc @@ -39,9 +39,9 @@ void HGCalConcentratorCoarsenerImpl::coarsen(const std::vector kHighDensityThickness_) || coarsenTriggerCells_[subdet]) && + if (((fixedDataSizePerHGCROC_ && !isHighDensity) || coarsenTriggerCells_[subdet]) && (id != coarseTCmapping_.getRepresentativeDetId(id))) { continue; } @@ -95,14 +95,14 @@ void HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosit uint32_t compressed_value = getCompressedSTCEnergy(stc); HGCalTriggerTools::SubDetectorType subdet = triggerTools_.getSubDetectorType(c.detId()); - int thickness = triggerTools_.thicknessIndex(c.detId()); + bool isHighDensity = triggerTools_.isSiliconHighDensity(c.detId()); bool isSilicon = triggerTools_.isSilicon(c.detId()); bool isEM = triggerTools_.isEm(c.detId()); bool isNose = triggerTools_.isNose(c.detId()); GlobalPoint point; - if ((fixedDataSizePerHGCROC_ && thickness > kHighDensityThickness_) || coarsenTriggerCells_[subdet]) { + if ((fixedDataSizePerHGCROC_ && !isHighDensity) || coarsenTriggerCells_[subdet]) { point = coarseTCmapping_.getCoarseTriggerCellPosition(coarseTCmapping_.getCoarseTriggerCellId(c.detId())); } else { point = triggerTools_.getTCPosition(c.detId()); diff --git a/L1Trigger/L1THGCal/src/veryfrontend/HGCalVFESummationImpl.cc b/L1Trigger/L1THGCal/src/veryfrontend/HGCalVFESummationImpl.cc index fb9ea31a4fc91..d74a3bfeab89d 100644 --- a/L1Trigger/L1THGCal/src/veryfrontend/HGCalVFESummationImpl.cc +++ b/L1Trigger/L1THGCal/src/veryfrontend/HGCalVFESummationImpl.cc @@ -1,15 +1,11 @@ #include "L1Trigger/L1THGCal/interface/veryfrontend/HGCalVFESummationImpl.h" +#include HGCalVFESummationImpl::HGCalVFESummationImpl(const edm::ParameterSet& conf) : lsb_silicon_fC_(conf.getParameter("siliconCellLSB_fC")), lsb_scintillator_MIP_(conf.getParameter("scintillatorCellLSB_MIP")) { - constexpr unsigned nThickness = 3; thresholds_silicon_ = conf.getParameter("noiseSilicon").getParameter>("values"); - if (thresholds_silicon_.size() != nThickness) { - throw cms::Exception("Configuration") << thresholds_silicon_.size() << " silicon thresholds are given instead of " - << nThickness << " (the number of sensor thicknesses)"; - } threshold_scintillator_ = conf.getParameter("noiseScintillator").getParameter("noise_MIP"); const auto threshold = conf.getParameter("noiseThreshold"); std::transform( @@ -19,6 +15,14 @@ HGCalVFESummationImpl::HGCalVFESummationImpl(const edm::ParameterSet& conf) threshold_scintillator_ *= threshold; } +void HGCalVFESummationImpl::checkSizeValidity() const { + unsigned nThickness = triggerTools_.nSiWaferTypes(); + if (thresholds_silicon_.size() != nThickness) { + throw cms::Exception("Configuration") << thresholds_silicon_.size() << " silicon thresholds are given instead of " + << nThickness << " (the number of sensor thicknesses)"; + } +} + void HGCalVFESummationImpl::triggerCellSums(const std::vector>& input_dataframes, std::unordered_map& triggercells) { if (input_dataframes.empty()) diff --git a/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_multialgo_V19_cfg.py b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_multialgo_V19_cfg.py new file mode 100644 index 0000000000000..905d3e0fc8561 --- /dev/null +++ b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_multialgo_V19_cfg.py @@ -0,0 +1,117 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Phase2C26I13M9_cff import Phase2C26I13M9 +process = cms.Process('DIGI',Phase2C26I13M9) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtendedRun4D120Reco_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.Digi_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.DigiToRaw_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(5) +) + +# Input source +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring('file:step2.root'), + inputCommands=cms.untracked.vstring( + 'keep *', + ) + ) + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.20 $'), + annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), + name = cms.untracked.string('Applications') +) + +# Output definition +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("ntuple.root") + ) + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '') + +# load HGCAL TPG simulation +process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff') +process.load('L1Trigger.L1THGCalUtilities.HGC3DClusterGenMatchSelector_cff') +process.load('L1Trigger.L1THGCalUtilities.hgcalTriggerNtuples_cff') +from L1Trigger.L1THGCalUtilities.hgcalTriggerChains import HGCalTriggerChains +import L1Trigger.L1THGCalUtilities.vfe as vfe +import L1Trigger.L1THGCalUtilities.concentrator as concentrator +import L1Trigger.L1THGCalUtilities.clustering2d as clustering2d +import L1Trigger.L1THGCalUtilities.clustering3d as clustering3d +import L1Trigger.L1THGCalUtilities.selectors as selectors +import L1Trigger.L1THGCalUtilities.customNtuples as ntuple + + +chains = HGCalTriggerChains() +# Register algorithms +## VFE +chains.register_vfe("Floatingpoint", vfe.CreateVfe()) +## ECON +chains.register_concentrator("Supertriggercell", concentrator.CreateSuperTriggerCell()) +chains.register_concentrator("Threshold", concentrator.CreateThreshold()) +chains.register_concentrator("Bestchoice", concentrator.CreateBestChoice()) +chains.register_concentrator("Mixed", concentrator.CreateMixedFeOptions()) +## BE1 +chains.register_backend1("Dummy", clustering2d.CreateDummy()) +## BE2 +chains.register_backend2("Histomax", clustering3d.CreateHistoMax()) +# Register selector +chains.register_selector("Genmatch", selectors.CreateGenMatch()) + + +# Register ntuples +ntuple_list = ['event', 'gen', 'multiclusters'] +chains.register_ntuple("Genclustersntuple", ntuple.CreateNtuple(ntuple_list)) + +# Register trigger chains +concentrator_algos = ['Supertriggercell', 'Threshold', 'Bestchoice', 'Mixed'] +backend_algos = ['Histomax'] +## Make cross product fo ECON and BE algos +import itertools +for cc,be in itertools.product(concentrator_algos,backend_algos): + chains.register_chain('Floatingpoint', cc, 'Dummy', be, 'Genmatch', 'Genclustersntuple') + +process = chains.create_sequences(process) + +# Remove towers from sequence +process.L1THGCalTriggerPrimitives.remove(process.L1THGCalTowerMap) +process.L1THGCalTriggerPrimitives.remove(process.L1THGCalTower) + +process.hgcl1tpg_step = cms.Path(process.L1THGCalTriggerPrimitives) +process.selector_step = cms.Path(process.L1THGCalTriggerSelector) +process.ntuple_step = cms.Path(process.L1THGCalTriggerNtuples) + +# Schedule definition +process.schedule = cms.Schedule(process.hgcl1tpg_step, process.selector_step, process.ntuple_step) + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion + diff --git a/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc b/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc index 2e5dd718e9cae..efcb8e14ca139 100644 --- a/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc +++ b/RecoLocalCalo/HGCalRecAlgos/src/RecHitTools.cc @@ -222,8 +222,7 @@ std::float_t RecHitTools::getSiThickness(const DetId& id) const { std::float_t thick(0.37); if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) { const HGCSiliconDetId hid(id); - auto ddd = get_ddd(geom, hid); - thick = ddd->cellThickness(hid.layer(), hid.waferU(), hid.waferV()); + thick = hid.depletion(); } else if (id.det() == DetId::Forward && id.subdetId() == static_cast(HFNose)) { const HFNoseDetId hid(id); auto ddd = get_ddd(geom, hid); diff --git a/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py b/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py index 282d50d3f99a2..9b18c144faeb4 100644 --- a/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py +++ b/RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py @@ -3,6 +3,7 @@ from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import * from Configuration.Eras.Modifier_phase2_hgcalV16_cff import phase2_hgcalV16 +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 # There is no layer zero, while no average is taken for the last layer dummy_weight = 0.0 @@ -212,3 +213,7 @@ def calcWeights(weightsPerLayer): res = [sum(wei)/2. for wei in zip(weightsPerLa sciThicknessCorrection = 0.69, layerWeights = dEdX_v16.weights) +phase2_hgcalV19.toModify(HGCalRecHit, + thicknessCorrection = [0.75, 0.76, 0.75, 0.76, 0.85, 0.85, 0.84, 0.85] , + sciThicknessCorrection = 0.69, + layerWeights = dEdX_v16.weights) diff --git a/RecoLocalCalo/HGCalRecProducers/python/HGCalUncalibRecHit_cfi.py b/RecoLocalCalo/HGCalRecProducers/python/HGCalUncalibRecHit_cfi.py index 91ead51c5c2e1..61a035b839519 100644 --- a/RecoLocalCalo/HGCalRecProducers/python/HGCalUncalibRecHit_cfi.py +++ b/RecoLocalCalo/HGCalRecProducers/python/HGCalUncalibRecHit_cfi.py @@ -3,8 +3,10 @@ from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHitProducer_cfi import HGCalUncalibRecHitProducer from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer -fCPerMIP_mpv = cms.vdouble(1.25,2.57,3.88) #120um, 200um, 300um -fCPerMIP_mean = cms.vdouble(2.06,3.43,5.15) #120um, 200um, 300um +fCPerMIP_mpv = cms.vdouble(1.25,2.57,3.88) #HD120um, LD200um, LD300um +fCPerMIP_mean = cms.vdouble(2.06,3.43,5.15) #HD120um, LD200um, LD300um +fCPerMIP_mpv_V19 = cms.vdouble(1.25,2.57,3.88, 2.57) #HD120um, LD200um, LD300um, HD200um +fCPerMIP_mean_V19 = cms.vdouble(2.06,3.43,5.15, 3.43) #HD120um, LD200um, LD300um, HD200um # HGCAL producer of rechits starting from digis HGCalUncalibRecHit = HGCalUncalibRecHitProducer.clone( @@ -74,11 +76,18 @@ phase2_hgcalV16.toModify( HGCalUncalibRecHit.HGCEEConfig , fCPerMIP = fCPerMIP_mean ) phase2_hgcalV16.toModify( HGCalUncalibRecHit.HGCHEFConfig , fCPerMIP = fCPerMIP_mean ) +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 +phase2_hgcalV19.toModify( HGCalUncalibRecHit.HGCEEConfig , fCPerMIP = fCPerMIP_mean_V19) +phase2_hgcalV19.toModify( HGCalUncalibRecHit.HGCHEFConfig , fCPerMIP = fCPerMIP_mean_V19) + from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose phase2_hfnose.toModify( HGCalUncalibRecHit.HGCHFNoseConfig , isSiFE = True , fCPerMIP = fCPerMIP_mean ) +phase2_hgcalV19.toModify( HGCalUncalibRecHit.HGCHFNoseConfig , + fCPerMIP = fCPerMIP_mean_V19 +) from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 ticl_v5.toModify(HGCalUncalibRecHit, computeLocalTime = cms.bool(True)) diff --git a/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h b/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h index 20bcdec5d5b4f..6a94268864614 100644 --- a/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h +++ b/SimCalorimetry/HGCalSimProducers/interface/HGCDigitizerBase.h @@ -21,6 +21,9 @@ #include "Geometry/HGCalGeometry/interface/HGCalGeometry.h" #include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h" +#include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h" +#include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h" + #include "SimCalorimetry/HGCalSimAlgos/interface/HGCalSiNoiseMap.h" namespace hgc = hgc_digi; @@ -80,7 +83,7 @@ class HGCDigitizerBase { float keV2fC() const { return keV2fC_; } bool toaModeByEnergy() const { return (myFEelectronics_->toaMode() == HGCFEElectronics::WEIGHTEDBYE); } float tdcOnset() const { return myFEelectronics_->getTDCOnset(); } - std::array tdcForToAOnset() const { return myFEelectronics_->getTDCForToAOnset(); } + std::vector tdcForToAOnset() const { return myFEelectronics_->getTDCForToAOnset(); } DetId::Detector det() const { return det_; } ForwardSubdetector subdet() const { return subdet_; } diff --git a/SimCalorimetry/HGCalSimProducers/interface/HGCFEElectronics.h b/SimCalorimetry/HGCalSimProducers/interface/HGCFEElectronics.h index 86c8cc01c1e1a..99644084e33a9 100644 --- a/SimCalorimetry/HGCalSimProducers/interface/HGCFEElectronics.h +++ b/SimCalorimetry/HGCalSimProducers/interface/HGCFEElectronics.h @@ -103,7 +103,7 @@ class HGCFEElectronics { float getMaxADC() { return adcSaturation_fC_; } float getMaxTDC() { return tdcSaturation_fC_; } float getTDCOnset() { return tdcOnset_fC_; } - std::array getTDCForToAOnset() { return tdcForToAOnset_fC_; } + std::vector getTDCForToAOnset() { return tdcForToAOnset_fC_; } void setADClsb(float newLSB) { adcLSB_fC_ = newLSB; } void setTDCfsc(float newTDCfsc) { tdcSaturation_fC_ = newTDCfsc; @@ -193,12 +193,12 @@ class HGCFEElectronics { //private members uint32_t fwVersion_; hgc_digi::FEADCPulseShape adcPulse_, pulseAvgT_; - std::array tdcForToAOnset_fC_; + std::vector tdcForToAOnset_fC_; std::vector tdcChargeDrainParameterisation_; float adcSaturation_fC_, adcLSB_fC_, tdcLSB_fC_, tdcSaturation_fC_, adcThreshold_fC_, tdcOnset_fC_, toaLSB_ns_, tdcResolutionInNs_; uint32_t targetMIPvalue_ADC_; - std::array jitterNoise_ns_, jitterConstant_ns_, eventTimeOffset_ns_; + std::vector jitterNoise_ns_, jitterConstant_ns_, eventTimeOffset_ns_; std::vector noise_fC_; uint32_t toaMode_; uint32_t tdcNbits_; diff --git a/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizer.cc b/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizer.cc index 16118aa39a15e..f6111ab0c7d0b 100644 --- a/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizer.cc +++ b/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizer.cc @@ -119,7 +119,7 @@ namespace { const float minCharge, const float maxCharge, bool setIfZero, - const std::array& tdcForToAOnset, + const std::vector& tdcForToAOnset, const bool minbiasFlag, std::unordered_map& hitOrder_monitor, const unsigned int thisBx) { diff --git a/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizerBase.cc b/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizerBase.cc index 0ee55509db47f..db9b17548dda9 100644 --- a/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizerBase.cc +++ b/SimCalorimetry/HGCalSimProducers/plugins/HGCDigitizerBase.cc @@ -28,8 +28,7 @@ HGCDigitizerBase::HGCDigitizerBase(const edm::ParameterSet& ps) } if (myCfg_.existsAs("noise_fC")) { - noise_fC_.reserve(1); - noise_fC_.push_back(myCfg_.getParameter("noise_fC")); + noise_fC_.resize(4, myCfg_.getParameter("noise_fC")); } else if (myCfg_.existsAs>("noise_fC")) { const auto& noises = myCfg_.getParameter>("noise_fC"); noise_fC_ = std::vector(noises.begin(), noises.end()); @@ -47,7 +46,7 @@ HGCDigitizerBase::HGCDigitizerBase(const edm::ParameterSet& ps) scalHFNose_.setDoseMap(doseMapFile_, scaleByDoseAlgo); scalHFNose_.setFluenceScaleFactor(scaleByDoseFactor_); } else { - noise_fC_.resize(1, 1.f); + noise_fC_.resize(4, 1.f); } if (myCfg_.existsAs("ileakParam")) { scal_.setIleakParam( @@ -144,7 +143,6 @@ void HGCDigitizerBase::runSimple(std::unique_ptr& coll, uint32_t thrADC(std::floor(myFEelectronics_->getTargetMipValue() / 2)); uint32_t gainIdx = 0; std::array& adcPulse = myFEelectronics_->getDefaultADCPulse(); - double tdcOnsetAuto = -1; if (scaleByDose_) { if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) { diff --git a/SimCalorimetry/HGCalSimProducers/python/hgcROCParameters_cfi.py b/SimCalorimetry/HGCalSimProducers/python/hgcROCParameters_cfi.py index a0d35fff4d05f..9ea4b75a45973 100644 --- a/SimCalorimetry/HGCalSimProducers/python/hgcROCParameters_cfi.py +++ b/SimCalorimetry/HGCalSimProducers/python/hgcROCParameters_cfi.py @@ -41,5 +41,13 @@ -919.13, 365.36, -14.10, 0.2, -21.85, 49.39, 22.21, 0.8, -0.28, 27.14, 43.95, - 3.89048 ) + 3.89048 ), + eventTimeOffset_ns = cms.vdouble(0.2,0.2,0.2) ) + +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 +phase2_hgcalV19.toModify(hgcROCSettings, tdcForToAOnset_fC = [12., 12., 12., 12.]) +phase2_hgcalV19.toModify(hgcROCSettings, jitterNoise_ns = [5., 5., 5., 5.]) +phase2_hgcalV19.toModify(hgcROCSettings, jitterConstant_ns = [0.2,0.2,0.2,0.2]) +phase2_hgcalV19.toModify(hgcROCSettings, eventTimeOffset_ns = [0.2,0.2,0.2,0.2]) + diff --git a/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py b/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py index 538685ad89357..1097f81f19c6a 100644 --- a/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py +++ b/SimCalorimetry/HGCalSimProducers/python/hgcalDigitizer_cfi.py @@ -2,13 +2,17 @@ from SimCalorimetry.HGCalSimProducers.hgcROCParameters_cfi import hgcROCSettings from SimCalorimetry.HGCalSimAlgos.hgcSensorOpParams_cfi import hgcSiSensorIleak,hgcSiSensorCCE +from Configuration.Eras.Modifier_phase2_hgcalV19_cff import phase2_hgcalV19 # Base configurations for HGCal digitizers eV_per_eh_pair = 3.62 fC_per_ele = 1.6020506e-4 -nonAgedCCEs = [1.0, 1.0, 1.0] -nonAgedNoises = [2100.0,2100.0,1600.0] #100,200,300 um (in electrons) -nonAgedNoises_v9 = [2000.0,2400.0,2000.0] # 120,200,300 um (in electrons) +nonAgedCCEs = [1.0, 1.0, 1.0] # HD120, LD200, LD300, HD120 um (in electrons) - the last entry will be ignored for v::HGCFEElectronics(const edm::ParameterSet& ps) tdcOnset_fC_ = ps.getParameter("tdcOnset_fC"); if (ps.exists("tdcForToAOnset_fC")) { auto temp = ps.getParameter >("tdcForToAOnset_fC"); + tdcForToAOnset_fC_.resize(temp.size()); if (temp.size() == tdcForToAOnset_fC_.size()) { std::copy_n(temp.begin(), temp.size(), tdcForToAOnset_fC_.begin()); } else { @@ -94,20 +95,31 @@ HGCFEElectronics::HGCFEElectronics(const edm::ParameterSet& ps) if (ps.exists("jitterNoise_ns")) { auto temp = ps.getParameter >("jitterNoise_ns"); + jitterNoise_ns_.resize(temp.size()); if (temp.size() == jitterNoise_ns_.size()) { std::copy_n(temp.begin(), temp.size(), jitterNoise_ns_.begin()); } else { - throw cms::Exception("BadConfiguration") << " HGCFEElectronics wrong size for ToA jitterNoise "; + throw cms::Exception("BadConfiguration") << " HGCFEElectronics wrong size for ToA jitterNoise"; } } if (ps.exists("jitterConstant_ns")) { auto temp = ps.getParameter >("jitterConstant_ns"); + jitterConstant_ns_.resize(temp.size()); if (temp.size() == jitterConstant_ns_.size()) { std::copy_n(temp.begin(), temp.size(), jitterConstant_ns_.begin()); } else { throw cms::Exception("BadConfiguration") << " HGCFEElectronics wrong size for ToA jitterConstant "; } } + if (ps.exists("eventTimeOffset_ns")) { + auto temp = ps.getParameter >("eventTimeOffset_ns"); + eventTimeOffset_ns_.resize(temp.size()); + if (temp.size() == eventTimeOffset_ns_.size()) { + std::copy_n(temp.begin(), temp.size(), eventTimeOffset_ns_.begin()); + } else { + throw cms::Exception("BadConfiguration") << " HGCFEElectronics wrong size for event time offset"; + } + } } // @@ -398,15 +410,19 @@ void HGCFEElectronics::runShaperWithToT(DFr& dataFrame, << " (raw=" << finalToA << ") ns "; //last fC (tdcOnset) are dissipated trough pulse - if (it + busyBxs < (int)(newCharge_.size())) { - const float deltaT2nextBx((busyBxs * 25 - integTime)); - const float tdcOnsetLeakage(tdcOnset * vdt::fast_expf(-deltaT2nextBx / tdcChargeDrainParameterisation_[11])); + int ft = it + busyBxs; + constexpr size_t tdcLeakageTauIdx_ = 11; + if (ft > it && ft < static_cast(newCharge_.size()) && + tdcChargeDrainParameterisation_.size() > tdcLeakageTauIdx_) { + const float deltaT2nextBx((busyBxs * 25.0f - integTime)); + const float tdcOnsetLeakage(tdcOnset * + vdt::fast_expf(-deltaT2nextBx / tdcChargeDrainParameterisation_[tdcLeakageTauIdx_])); if (debug) edm::LogVerbatim("HGCFE") << "\t Leaking remainder of TDC onset " << tdcOnset << " fC, to be dissipated in " << deltaT2nextBx << " DeltaT/tau=" << deltaT2nextBx << " / " - << tdcChargeDrainParameterisation_[11] << " ns, adds " << tdcOnsetLeakage << " fC @ " - << it + busyBxs << " bx (first free bx)"; - newCharge_[it + busyBxs] += tdcOnsetLeakage; + << tdcChargeDrainParameterisation_[tdcLeakageTauIdx_] << " ns, adds " + << tdcOnsetLeakage << " fC @ " << it + busyBxs << " bx (first free bx)"; + newCharge_[ft] += tdcOnsetLeakage; } }