Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:18:47

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     # useful if time is not calculated, as at HLT                        
0034     skipTimeCalib = cms.bool(False),                         
0035 
0036     # apply laser corrections
0037     laserCorrection = cms.bool(True),
0038                             
0039     # reco flags association to DB flag
0040     flagsMapDBReco = cms.PSet(
0041         kGood  = cms.vstring('kOk','kDAC','kNoLaser','kNoisy'),
0042         kNoisy = cms.vstring('kNNoisy','kFixedG6','kFixedG1'),
0043         kNeighboursRecovered = cms.vstring('kFixedG0',
0044                                            'kNonRespondingIsolated',
0045                                            'kDeadVFE'),
0046         kTowerRecovered = cms.vstring('kDeadFE'),
0047         kDead           = cms.vstring('kNoDataNoTP')
0048         ),                        
0049                             
0050     # for channel recovery
0051     algoRecover = cms.string("EcalRecHitWorkerRecover"),
0052     recoverEBIsolatedChannels = cms.bool(False),##default is false
0053     recoverEEIsolatedChannels = cms.bool(False),
0054     recoverEBVFE  = cms.bool(False),
0055     recoverEEVFE  = cms.bool(False),
0056     recoverEBFE = cms.bool(True),
0057     recoverEEFE = cms.bool(True),
0058     #db statuses for which recovery in EE/EB should not be attempted           
0059     dbStatusToBeExcludedEE = cms.vint32(
0060                                         14,  # dead, no TP
0061                                         78,  # dead, HV off
0062                                         142, # dead,LV off
0063                                         ), 
0064     dbStatusToBeExcludedEB = cms.vint32(
0065                                         14,  # dead, no TP
0066                                         78,  # dead, HV off
0067                                         142, # dead,LV off
0068                                         ), 
0069     # --- logWarnings for saturated DeadFEs
0070     # 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)
0071     # if you want to enable recovery but you don't wish to throw logWarnings put the logWarningThresholds very high e.g +1.e+9
0072     #  ~64 GeV is the TP saturation level
0073     logWarningEtThreshold_EB_FE = cms.double(50),# in EB logWarningThreshold is actually in E (GeV)
0074     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
0075     ebDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebDetId"),
0076     eeDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeDetId"),
0077     ebFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebFE"),
0078     eeFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeFE"),
0079     singleChannelRecoveryMethod = cms.string("BDTG"),
0080     singleChannelRecoveryThreshold = cms.double(0.70), #Threshold in GeV
0081     sum8ChannelRecoveryThreshold = cms.double(0.),     #Threshold in GeV
0082     bdtWeightFileNoCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"),
0083     bdtWeightFileCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"),
0084     triggerPrimitiveDigiCollection = cms.InputTag("ecalDigis:EcalTriggerPrimitives"),
0085     cleaningConfig=cleaningAlgoConfig,
0086 
0087     )
0088 
0089 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0090 # no flags for bad channels in FastSim
0091 fastSim.toModify(ecalRecHit, 
0092                  killDeadChannels = False,
0093                  recoverEBFE = False,
0094                  recoverEEFE = False,
0095                  recoverEBIsolatedChannels = False
0096                 )
0097 
0098 # Phase 2 modifications
0099 from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
0100 phase2_ecal_devel.toModify(ecalRecHit,
0101     EBuncalibRecHitCollection = "ecalUncalibRecHitPhase2:EcalUncalibRecHitsEB",
0102     EEuncalibRecHitCollection = "",  # No EE input since there is no ECAL endcap in Phase 2
0103     killDeadChannels = False,
0104     recoverEBFE = False,
0105     recoverEEFE = False,
0106     recoverEBIsolatedChannels = False,
0107     recoverEEIsolatedChannels = False
0108 )
0109