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
13 if scenarioHLLHC==
"nominal":
14 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import _years_LHC, _years_HLLHC_nominal
15 module.years = _years_LHC + _years_HLLHC_nominal
16 elif scenarioHLLHC==
"ultimate":
17 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import _years_LHC, _years_HLLHC_ultimate
18 module.years = _years_LHC + _years_HLLHC_ultimate
23 def ageHB(process,turnon,scenarioHLLHC):
25 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import HBDarkeningEP
26 process.HBDarkeningEP = HBDarkeningEP
27 process.HBDarkeningEP =
setScenarioHLLHC(process.HBDarkeningEP,scenarioHLLHC)
29 if hcaldigi
is not None: hcaldigi.HBDarkening = cms.bool(turnon)
30 if hasattr(process,
'es_hardcode'):
31 process.es_hardcode.HBRecalibration = cms.bool(turnon)
34 def ageHE(process,turnon,scenarioHLLHC):
36 from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff
import HEDarkeningEP
37 process.HEDarkeningEP = HEDarkeningEP
38 process.HEDarkeningEP =
setScenarioHLLHC(process.HEDarkeningEP,scenarioHLLHC)
40 if hcaldigi
is not None: hcaldigi.HEDarkening = cms.bool(turnon)
41 if hasattr(process,
'es_hardcode'):
42 process.es_hardcode.HERecalibration = cms.bool(turnon)
47 if hcaldigi
is not None: hcaldigi.HFDarkening = cms.bool(turnon)
48 if hasattr(process,
'es_hardcode'):
49 process.es_hardcode.HFRecalibration = cms.bool(turnon)
54 process.es_hardcode.hbUpgrade.doRadiationDamage = turnon
55 process.es_hardcode.heUpgrade.doRadiationDamage = turnon
61 def ageHcal(process,lumi,instLumi,scenarioHLLHC):
63 if hcaldigi
is not None: hcaldigi.DelivLuminosity = cms.double(
float(lumi))
66 if hasattr(process,
'g4SimHits'):
67 process.g4SimHits.HCalSD.InstLuminosity = cms.double(
float(instLumi))
68 process.g4SimHits.HCalSD.DelivLuminosity = cms.double(
float(lumi))
71 if hasattr(process,
'es_hardcode'):
72 process.es_hardcode.iLumi = cms.double(
float(lumi))
75 process =
ageHB(process,
True,scenarioHLLHC)
76 process =
ageHE(process,
True,scenarioHLLHC)
77 process =
ageHF(process,
True)
78 process =
ageSiPM(process,
True,lumi)
83 process =
ageHB(process,
True,
"")
87 process =
ageHB(process,
False,
"")
91 process =
ageHE(process,
True,
"")
95 process =
ageHE(process,
False,
"")
99 process =
ageHF(process,
True)
103 process =
ageHF(process,
False)
107 process =
ageSiPM(process,
False,0.0)
111 if hasattr(process,
'g4SimHits'):
112 process.g4SimHits.HCalSD.HFDarkening = cms.untracked.bool(
True)
114 if hcaldigi
is not None: hcaldigi.HFDarkening = cms.untracked.bool(
False)
118 if hasattr(process,
'g4SimHits'):
120 process.g4SimHits.ECalSD.InstLuminosity = cms.double(instLumi)
121 process.g4SimHits.ECalSD.DelivLuminosity = cms.double(
float(lumi))
124 ecal_lumis = [300,1000,3000,4500]
126 [
'EcalIntercalibConstantsRcd',
'EcalIntercalibConstants_TL{:d}_upgrade_8deg_mc'],
127 [
'EcalIntercalibConstantsMCRcd',
'EcalIntercalibConstantsMC_TL{:d}_upgrade_8deg_mc'],
128 [
'EcalLaserAPDPNRatiosRcd',
'EcalLaserAPDPNRatios_TL{:d}_upgrade_8deg_mc'],
129 [
'EcalPedestalsRcd',
'EcalPedestals_TL{:d}_upgradeTIA_8deg_mc'],
130 [
'EcalTPGLinearizationConstRcd',
'EcalTPGLinearizationConst_TL{:d}_upgrade_8deg_mc'],
134 if int(lumi)
in ecal_lumis:
135 if not hasattr(process.GlobalTag,
'toGet'):
136 process.GlobalTag.toGet=cms.VPSet()
137 for ecal_condition
in ecal_conditions:
138 process.GlobalTag.toGet.append(cms.PSet(
139 record = cms.string(ecal_condition[0]),
140 tag = cms.string(ecal_condition[1].
format(
int(lumi))),
141 connect = cms.string(
"frontier://FrontierProd/CMS_CONDITIONS")
148 if hasattr(process,
'g4SimHits'):
149 process.g4SimHits.ECalSD.AgeingWithSlopeLY = cms.untracked.bool(
True)
150 if hasattr(process,
'ecal_digi_parameters'):
151 process.ecal_digi_parameters.UseLCcorrection = cms.untracked.bool(
False)
155 process=
ageHcal(process,300,5.0e34,
"nominal")
156 process=
ageEcal(process,300,5.0e34)
160 process=
ageHcal(process,1000,5.0e34,
"nominal")
161 process=
ageEcal(process,1000,5.0e34)
165 process=
ageHcal(process,3000,5.0e34,
"nominal")
166 process=
ageEcal(process,3000,5.0e34)
170 process=
ageHcal(process,3000,7.5e34,
"ultimate")
171 process=
ageEcal(process,3000,7.5e34)
175 process=
ageHcal(process,4500,7.5e34,
"ultimate")
176 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 getHcalDigitizer(process)
def turn_off_HF_aging(process)
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)