1 import FWCore.ParameterSet.Config
as cms
5 if hasattr(process,
'mixData'):
7 if hasattr(process,
'mix')
and hasattr(process.mix,
'digitizers')
and hasattr(process.mix.digitizers,
'hcal'):
8 return process.mix.digitizers.hcal
12 if hasattr(process,
'mix')
and hasattr(process.mix,
'digitizers'):
13 if section ==
'EE' and hasattr(process.mix.digitizers,
'hgceeDigitizer'):
14 return process.mix.digitizers.hgceeDigitizer
15 elif section ==
'FH' and hasattr(process.mix.digitizers,
'hgchefrontDigitizer'):
16 return process.mix.digitizers.hgchefrontDigitizer
17 elif section ==
'BH' and hasattr(process.mix.digitizers,
'hgchebackDigitizer'):
18 return process.mix.digitizers.hgchebackDigitizer
23 if scenarioHLLHC==
"nominal":
24 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import _years_LHC, _years_HLLHC_nominal
25 module.years = _years_LHC + _years_HLLHC_nominal
26 elif scenarioHLLHC==
"ultimate":
27 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import _years_LHC, _years_HLLHC_ultimate
28 module.years = _years_LHC + _years_HLLHC_ultimate
33 def ageHB(process,turnon,scenarioHLLHC):
35 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import HBDarkeningEP
36 process.HBDarkeningEP = HBDarkeningEP
37 process.HBDarkeningEP =
setScenarioHLLHC(process.HBDarkeningEP,scenarioHLLHC)
39 if hcaldigi
is not None: hcaldigi.HBDarkening = cms.bool(turnon)
40 if hasattr(process,
'es_hardcode'):
41 process.es_hardcode.HBRecalibration = cms.bool(turnon)
44 def ageHE(process,turnon,scenarioHLLHC):
46 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import HEDarkeningEP
47 process.HEDarkeningEP = HEDarkeningEP
48 process.HEDarkeningEP =
setScenarioHLLHC(process.HEDarkeningEP,scenarioHLLHC)
50 if hcaldigi
is not None: hcaldigi.HEDarkening = cms.bool(turnon)
51 if hasattr(process,
'es_hardcode'):
52 process.es_hardcode.HERecalibration = cms.bool(turnon)
57 if hcaldigi
is not None: hcaldigi.HFDarkening = cms.bool(turnon)
58 if hasattr(process,
'es_hardcode'):
59 process.es_hardcode.HFRecalibration = cms.bool(turnon)
64 for subdet
in [
'EE',
'FH',
'BH']:
71 process.es_hardcode.hbUpgrade.doRadiationDamage = turnon
72 process.es_hardcode.heUpgrade.doRadiationDamage = turnon
78 def ageHcal(process,lumi,instLumi,scenarioHLLHC):
80 if hcaldigi
is not None: hcaldigi.DelivLuminosity = cms.double(
float(lumi))
83 if hasattr(process,
'g4SimHits'):
84 process.g4SimHits.HCalSD.InstLuminosity = cms.double(
float(instLumi))
85 process.g4SimHits.HCalSD.DelivLuminosity = cms.double(
float(lumi))
88 if hasattr(process,
'es_hardcode'):
89 process.es_hardcode.iLumi = cms.double(
float(lumi))
92 process =
ageHB(process,
True,scenarioHLLHC)
93 process =
ageHE(process,
True,scenarioHLLHC)
94 process =
ageHF(process,
True)
95 process =
ageSiPM(process,
True,lumi)
100 process =
ageHB(process,
True,
"")
104 process =
ageHB(process,
False,
"")
108 process =
ageHE(process,
True,
"")
112 process =
ageHE(process,
False,
"")
116 process =
ageHF(process,
True)
120 process =
ageHF(process,
False)
124 process =
ageSiPM(process,
False,0.0)
128 if hasattr(process,
'g4SimHits'):
129 process.g4SimHits.HCalSD.HFDarkening = cms.untracked.bool(
True)
131 if hcaldigi
is not None: hcaldigi.HFDarkening = cms.untracked.bool(
False)
135 if hasattr(process,
'g4SimHits'):
137 process.g4SimHits.ECalSD.InstLuminosity = cms.double(instLumi)
138 process.g4SimHits.ECalSD.DelivLuminosity = cms.double(
float(lumi))
141 ecal_lumis = [300,1000,3000,4500]
143 [
'EcalIntercalibConstantsRcd',
'EcalIntercalibConstants_TL{:d}_upgrade_8deg_v2_mc'],
144 [
'EcalIntercalibConstantsMCRcd',
'EcalIntercalibConstantsMC_TL{:d}_upgrade_8deg_v2_mc'],
145 [
'EcalLaserAPDPNRatiosRcd',
'EcalLaserAPDPNRatios_TL{:d}_upgrade_8deg_mc'],
146 [
'EcalPedestalsRcd',
'EcalPedestals_TL{:d}_upgradeTIA_8deg_mc'],
147 [
'EcalTPGLinearizationConstRcd',
'EcalTPGLinearizationConst_TL{:d}_upgrade_8deg_mc'],
157 ecal_seed_multiplier = 2.5
160 if int(lumi)
in ecal_lumis:
161 if not hasattr(process.GlobalTag,
'toGet'):
162 process.GlobalTag.toGet=cms.VPSet()
163 for ecal_condition
in ecal_conditions:
164 process.GlobalTag.toGet.append(cms.PSet(
165 record = cms.string(ecal_condition[0]),
166 tag = cms.string(ecal_condition[1].
format(
int(lumi))),
167 connect = cms.string(
"frontier://FrontierProd/CMS_CONDITIONS")
170 if hasattr(process,
"particleFlowClusterECALUncorrected"):
171 _seeds = process.particleFlowClusterECALUncorrected.seedFinder.thresholdsByDetector
172 for iseed
in range(0,len(_seeds)):
173 if _seeds[iseed].detector.value()==
"ECAL_BARREL":
174 _seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[
int(lumi)]*ecal_seed_multiplier)
175 _clusters = process.particleFlowClusterECALUncorrected.initialClusteringStep.thresholdsByDetector
176 for icluster
in range(0,len(_clusters)):
177 if _clusters[icluster].detector.value()==
"ECAL_BARREL":
178 _clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[
int(lumi)])
183 if hasattr(process,
'g4SimHits'):
184 process.g4SimHits.ECalSD.AgeingWithSlopeLY = cms.untracked.bool(
True)
185 if hasattr(process,
'ecal_digi_parameters'):
186 process.ecal_digi_parameters.UseLCcorrection = cms.untracked.bool(
False)
190 process=
ageHcal(process,300,5.0e34,
"nominal")
191 process=
ageEcal(process,300,5.0e34)
195 process=
ageHcal(process,1000,5.0e34,
"nominal")
196 process=
ageEcal(process,1000,5.0e34)
200 process=
ageHcal(process,3000,5.0e34,
"nominal")
201 process=
ageEcal(process,3000,5.0e34)
206 process=
ageHcal(process,3000,7.5e34,
"ultimate")
207 process=
ageEcal(process,3000,7.5e34)
212 process=
ageHcal(process,4500,7.5e34,
"ultimate")
213 process=
ageEcal(process,4500,7.5e34)
def ageEcal(process, lumi, instLumi)
def ageHB(process, turnon, scenarioHLLHC)
def customise_aging_4500_ultimate(process)
def turn_off_HE_aging(process)
def getHGCalDigitizer(process, section)
def getHcalDigitizer(process)
def turn_off_HF_aging(process)
def HGCal_setEndOfLifeNoise(digitizer)
def turn_on_HB_aging(process)
def turn_off_SiPM_aging(process)
def customise_aging_1000(process)
def customise_aging_3000_ultimate(process)
def setScenarioHLLHC(module, scenarioHLLHC)
def customise_aging_300(process)
def ageSiPM(process, turnon, lumi)
def ecal_complete_aging(process)
def turn_off_HB_aging(process)
def hf_complete_aging(process)
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
def ageHF(process, turnon)
def ageHE(process, turnon, scenarioHLLHC)
def turn_on_HF_aging(process)
def customise_aging_3000(process)
def turn_on_HE_aging(process)