CMS 3D CMS Logo

ecalRecHit_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoLocalCalo.EcalRecAlgos.ecalCleaningAlgo import cleaningAlgoConfig
4 
5 # rechit producer
6 ecalRecHit = cms.EDProducer("EcalRecHitProducer",
7  EErechitCollection = cms.string('EcalRecHitsEE'),
8  EEuncalibRecHitCollection = cms.InputTag("ecalMultiFitUncalibRecHit","EcalUncalibRecHitsEE"),
9  EBuncalibRecHitCollection = cms.InputTag("ecalMultiFitUncalibRecHit","EcalUncalibRecHitsEB"),
10  EBrechitCollection = cms.string('EcalRecHitsEB'),
11  # db statuses to be exluded from reconstruction (some will be recovered)
12  ChannelStatusToBeExcluded = cms.vstring( 'kDAC',
13  'kNoisy',
14  'kNNoisy',
15  'kFixedG6',
16  'kFixedG1',
17  'kFixedG0',
18  'kNonRespondingIsolated',
19  'kDeadVFE',
20  'kDeadFE',
21  'kNoDataNoTP',),
22  # avoid propagation of dead channels other than after recovery
23  killDeadChannels = cms.bool(True),
24  algo = cms.string("EcalRecHitWorkerSimple"),
25  # define maximal and minimal values for the laser corrections
26 
27  EBLaserMIN = cms.double(0.5),
28  EELaserMIN = cms.double(0.5),
29 
30  EBLaserMAX = cms.double(3.0),
31  EELaserMAX = cms.double(8.0),
32 
33  # to select timing conditions record
34  timeCalibTag = cms.ESInputTag('', ''),
35  timeOffsetTag = cms.ESInputTag('', ''),
36 
37  # useful if time is not calculated, as at HLT
38  skipTimeCalib = cms.bool(False),
39 
40  # apply laser corrections
41  laserCorrection = cms.bool(True),
42 
43  # reco flags association to DB flag
44  flagsMapDBReco = cms.PSet(
45  kGood = cms.vstring('kOk','kDAC','kNoLaser','kNoisy'),
46  kNoisy = cms.vstring('kNNoisy','kFixedG6','kFixedG1'),
47  kNeighboursRecovered = cms.vstring('kFixedG0',
48  'kNonRespondingIsolated',
49  'kDeadVFE'),
50  kTowerRecovered = cms.vstring('kDeadFE'),
51  kDead = cms.vstring('kNoDataNoTP')
52  ),
53 
54  # for channel recovery
55  algoRecover = cms.string("EcalRecHitWorkerRecover"),
56  recoverEBIsolatedChannels = cms.bool(False),
57  recoverEEIsolatedChannels = cms.bool(False),
58  recoverEBVFE = cms.bool(False),
59  recoverEEVFE = cms.bool(False),
60  recoverEBFE = cms.bool(True),
61  recoverEEFE = cms.bool(True),
62  #db statuses for which recovery in EE/EB should not be attempted
63  dbStatusToBeExcludedEE = cms.vint32(
64  14, # dead, no TP
65  78, # dead, HV off
66  142, # dead,LV off
67  ),
68  dbStatusToBeExcludedEB = cms.vint32(
69  14, # dead, no TP
70  78, # dead, HV off
71  142, # dead,LV off
72  ),
73  # --- logWarnings for saturated DeadFEs
74  # 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)
75  # if you want to enable recovery but you don't wish to throw logWarnings put the logWarningThresholds very high e.g +1.e+9
76  # ~64 GeV is the TP saturation level
77  logWarningEtThreshold_EB_FE = cms.double(50),# in EB logWarningThreshold is actually in E (GeV)
78  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
79  ebDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebDetId"),
80  eeDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeDetId"),
81  ebFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebFE"),
82  eeFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeFE"),
83  singleChannelRecoveryMethod = cms.string("BDTG"),
84  singleChannelRecoveryThreshold = cms.double(0.70), #Threshold in GeV
85  sum8ChannelRecoveryThreshold = cms.double(0.), #Threshold in GeV
86  bdtWeightFileNoCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"),
87  bdtWeightFileCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"),
88  triggerPrimitiveDigiCollection = cms.InputTag("ecalDigis:EcalTriggerPrimitives"),
89  cleaningConfig=cleaningAlgoConfig,
90 
91  )
92 
93 from Configuration.Eras.Modifier_fastSim_cff import fastSim
94 # no flags for bad channels in FastSim
95 fastSim.toModify(ecalRecHit,
96  killDeadChannels = False,
97  recoverEBFE = False,
98  recoverEEFE = False,
99  recoverEBIsolatedChannels = False
100  )
101 
102 # use CC timing method for Run3 and Phase 2 (carried over from Run3 era)
103 from Configuration.ProcessModifiers.ecal_cctiming_cff import ecal_cctiming
104 ecal_cctiming.toModify(ecalRecHit,
105  timeCalibTag = ':CC',
106  timeOffsetTag = ':CC'
107 )
108 
109 # this overrides the modifications made by ecal_cctiming if both modifiers are active
110 from Configuration.ProcessModifiers.gpuValidationEcal_cff import gpuValidationEcal
111 gpuValidationEcal.toModify(ecalRecHit,
112  timeCalibTag = ':',
113  timeOffsetTag = ':'
114 )
115 
116 # Phase 2 modifications
117 from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
118 phase2_ecal_devel.toModify(ecalRecHit,
119  EBuncalibRecHitCollection = "ecalUncalibRecHitPhase2:EcalUncalibRecHitsEB",
120  EEuncalibRecHitCollection = "", # No EE input since there is no ECAL endcap in Phase 2
121  killDeadChannels = False,
122  recoverEBFE = False,
123  recoverEEFE = False,
124  recoverEBIsolatedChannels = False,
125  recoverEEIsolatedChannels = False
126 )
127