Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-08 02:05:42

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoLocalCalo.EcalRecAlgos.ecalCleaningAlgo import cleaningAlgoConfig 
0004 
0005 # rechit producer
0006 ecalRecHit = cms.EDProducer("EcalRecHitProducer",
0007     EErechitCollection = cms.string('EcalRecHitsEE'),
0008     EEuncalibRecHitCollection = cms.InputTag("ecalMultiFitUncalibRecHit","EcalUncalibRecHitsEE"),
0009     EBuncalibRecHitCollection = cms.InputTag("ecalMultiFitUncalibRecHit","EcalUncalibRecHitsEB"),
0010     EBrechitCollection = cms.string('EcalRecHitsEB'),
0011     # db statuses to be exluded from reconstruction (some will be recovered)
0012     ChannelStatusToBeExcluded = cms.vstring(   'kDAC',
0013                                                'kNoisy',
0014                                                'kNNoisy',
0015                                                'kFixedG6',
0016                                                'kFixedG1',
0017                                                'kFixedG0',
0018                                                'kNonRespondingIsolated',
0019                                                'kDeadVFE',
0020                                                'kDeadFE',
0021                                                'kNoDataNoTP',),
0022     # avoid propagation of dead channels other than after recovery
0023     killDeadChannels = cms.bool(True),
0024     algo = cms.string("EcalRecHitWorkerSimple"),
0025     # define maximal and minimal values for the laser corrections
0026     
0027     EBLaserMIN = cms.double(0.5),
0028     EELaserMIN = cms.double(0.5),
0029 
0030     EBLaserMAX = cms.double(3.0),
0031     EELaserMAX = cms.double(8.0),
0032 
0033     # to select timing conditions record
0034     timeCalibTag = cms.ESInputTag('', ''),
0035     timeOffsetTag = cms.ESInputTag('', ''),
0036 
0037     # useful if time is not calculated, as at HLT                        
0038     skipTimeCalib = cms.bool(False),                         
0039 
0040     # apply laser corrections
0041     laserCorrection = cms.bool(True),
0042                             
0043     # reco flags association to DB flag
0044     flagsMapDBReco = cms.PSet(
0045         kGood  = cms.vstring('kOk','kDAC','kNoLaser','kNoisy'),
0046         kNoisy = cms.vstring('kNNoisy','kFixedG6','kFixedG1'),
0047         kNeighboursRecovered = cms.vstring('kFixedG0',
0048                                            'kNonRespondingIsolated',
0049                                            'kDeadVFE'),
0050         kTowerRecovered = cms.vstring('kDeadFE'),
0051         kDead           = cms.vstring('kNoDataNoTP')
0052         ),                        
0053                             
0054     # for channel recovery
0055     algoRecover = cms.string("EcalRecHitWorkerRecover"),
0056     recoverEBIsolatedChannels = cms.bool(False),##default is false
0057     recoverEEIsolatedChannels = cms.bool(False),
0058     recoverEBVFE  = cms.bool(False),
0059     recoverEEVFE  = cms.bool(False),
0060     recoverEBFE = cms.bool(True),
0061     recoverEEFE = cms.bool(True),
0062     #db statuses for which recovery in EE/EB should not be attempted           
0063     dbStatusToBeExcludedEE = cms.vint32(
0064                                         14,  # dead, no TP
0065                                         78,  # dead, HV off
0066                                         142, # dead,LV off
0067                                         ), 
0068     dbStatusToBeExcludedEB = cms.vint32(
0069                                         14,  # dead, no TP
0070                                         78,  # dead, HV off
0071                                         142, # dead,LV off
0072                                         ), 
0073     # --- logWarnings for saturated DeadFEs
0074     # if the logWarningThreshold is negative the Algo will not try recovery (in EE is not tested we may need negative threshold e.g. -1.e+9)
0075     # if you want to enable recovery but you don't wish to throw logWarnings put the logWarningThresholds very high e.g +1.e+9
0076     #  ~64 GeV is the TP saturation level
0077     logWarningEtThreshold_EB_FE = cms.double(50),# in EB logWarningThreshold is actually in E (GeV)
0078     logWarningEtThreshold_EE_FE = cms.double(50),# in EE the energy should correspond to Et (GeV) but the recovered values of energies are not tested if make sense
0079     ebDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebDetId"),
0080     eeDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeDetId"),
0081     ebFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebFE"),
0082     eeFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeFE"),
0083     singleChannelRecoveryMethod = cms.string("BDTG"),
0084     singleChannelRecoveryThreshold = cms.double(0.70), #Threshold in GeV
0085     sum8ChannelRecoveryThreshold = cms.double(0.),     #Threshold in GeV
0086     bdtWeightFileNoCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"),
0087     bdtWeightFileCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"),
0088     triggerPrimitiveDigiCollection = cms.InputTag("ecalDigis:EcalTriggerPrimitives"),
0089     cleaningConfig=cleaningAlgoConfig,
0090 
0091     )
0092 
0093 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0094 # no flags for bad channels in FastSim
0095 fastSim.toModify(ecalRecHit, 
0096                  killDeadChannels = False,
0097                  recoverEBFE = False,
0098                  recoverEEFE = False,
0099                  recoverEBIsolatedChannels = False
0100                 )
0101 
0102 # use CC timing method for Run3 and Phase 2 (carried over from Run3 era)
0103 from Configuration.ProcessModifiers.ecal_cctiming_cff import ecal_cctiming
0104 ecal_cctiming.toModify(ecalRecHit,
0105     timeCalibTag = ':CC',
0106     timeOffsetTag = ':CC'
0107 )
0108 
0109 # this overrides the modifications made by ecal_cctiming if both modifiers are active
0110 from Configuration.ProcessModifiers.gpuValidationEcal_cff import gpuValidationEcal
0111 gpuValidationEcal.toModify(ecalRecHit,
0112     timeCalibTag = ':',
0113     timeOffsetTag = ':'
0114 )
0115 
0116 # Phase 2 modifications
0117 from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
0118 phase2_ecal_devel.toModify(ecalRecHit,
0119     EBuncalibRecHitCollection = "ecalUncalibRecHitPhase2:EcalUncalibRecHitsEB",
0120     EEuncalibRecHitCollection = "",  # No EE input since there is no ECAL endcap in Phase 2
0121     killDeadChannels = False,
0122     recoverEBFE = False,
0123     recoverEEFE = False,
0124     recoverEBIsolatedChannels = False,
0125     recoverEEIsolatedChannels = False
0126 )
0127