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  # useful if time is not calculated, as at HLT
34  skipTimeCalib = cms.bool(False),
35 
36  # apply laser corrections
37  laserCorrection = cms.bool(True),
38 
39  # reco flags association to DB flag
40  flagsMapDBReco = cms.PSet(
41  kGood = cms.vstring('kOk','kDAC','kNoLaser','kNoisy'),
42  kNoisy = cms.vstring('kNNoisy','kFixedG6','kFixedG1'),
43  kNeighboursRecovered = cms.vstring('kFixedG0',
44  'kNonRespondingIsolated',
45  'kDeadVFE'),
46  kTowerRecovered = cms.vstring('kDeadFE'),
47  kDead = cms.vstring('kNoDataNoTP')
48  ),
49 
50  # for channel recovery
51  algoRecover = cms.string("EcalRecHitWorkerRecover"),
52  recoverEBIsolatedChannels = cms.bool(False),##default is false
53  recoverEEIsolatedChannels = cms.bool(False),
54  recoverEBVFE = cms.bool(False),
55  recoverEEVFE = cms.bool(False),
56  recoverEBFE = cms.bool(True),
57  recoverEEFE = cms.bool(True),
58  #db statuses for which recovery in EE/EB should not be attempted
59  dbStatusToBeExcludedEE = cms.vint32(
60  14, # dead, no TP
61  78, # dead, HV off
62  142, # dead,LV off
63  ),
64  dbStatusToBeExcludedEB = cms.vint32(
65  14, # dead, no TP
66  78, # dead, HV off
67  142, # dead,LV off
68  ),
69  # --- logWarnings for saturated DeadFEs
70  # 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)
71  # if you want to enable recovery but you don't wish to throw logWarnings put the logWarningThresholds very high e.g +1.e+9
72  # ~64 GeV is the TP saturation level
73  logWarningEtThreshold_EB_FE = cms.double(50),# in EB logWarningThreshold is actually in E (GeV)
74  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
75  ebDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebDetId"),
76  eeDetIdToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeDetId"),
77  ebFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:ebFE"),
78  eeFEToBeRecovered = cms.InputTag("ecalDetIdToBeRecovered:eeFE"),
79  singleChannelRecoveryMethod = cms.string("BDTG"),
80  singleChannelRecoveryThreshold = cms.double(0.70), #Threshold in GeV
81  sum8ChannelRecoveryThreshold = cms.double(0.), #Threshold in GeV
82  bdtWeightFileNoCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"),
83  bdtWeightFileCracks = cms.FileInPath("RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"),
84  triggerPrimitiveDigiCollection = cms.InputTag("ecalDigis:EcalTriggerPrimitives"),
85  cleaningConfig=cleaningAlgoConfig,
86 
87  )
88 
89 from Configuration.Eras.Modifier_fastSim_cff import fastSim
90 # no flags for bad channels in FastSim
91 fastSim.toModify(ecalRecHit,
92  killDeadChannels = False,
93  recoverEBFE = False,
94  recoverEEFE = False,
95  recoverEBIsolatedChannels = False
96  )