CMS 3D CMS Logo

Functions
aging Namespace Reference

Functions

def agedHFNose (process, algo=0)
 
def agedHGCal (process, algo=0)
 
def ageEcal (process, lumi, instLumi)
 
def ageHB (process, turnon, scenarioHLLHC)
 
def ageHcal (process, lumi, instLumi, scenarioHLLHC)
 
def ageHE (process, turnon, scenarioHLLHC)
 
def ageHF (process, turnon)
 
def ageSiPM (process, turnon, lumi)
 
def customise_aging_1000 (process)
 
def customise_aging_300 (process)
 
def customise_aging_3000 (process)
 
def customise_aging_3000_ultimate (process)
 
def customise_aging_4500_ultimate (process)
 
def ecal_complete_aging (process)
 
def getHcalDigitizer (process)
 
def getHGCalDigitizer (process, section)
 
def hf_complete_aging (process)
 
def realisticHGCalStartup (process)
 
def setScenarioHLLHC (module, scenarioHLLHC)
 
def turn_off_HB_aging (process)
 
def turn_off_HE_aging (process)
 
def turn_off_HF_aging (process)
 
def turn_off_SiPM_aging (process)
 
def turn_on_HB_aging (process)
 
def turn_on_HE_aging (process)
 
def turn_on_HF_aging (process)
 

Function Documentation

◆ agedHFNose()

def aging.agedHFNose (   process,
  algo = 0 
)

Definition at line 64 of file aging.py.

64 def agedHFNose(process,algo=0):
65  from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import HFNose_setEndOfLifeNoise
66  process = HFNose_setEndOfLifeNoise(process,byDose=True,byDoseAlgo=algo)
67  return process
68 

References hgcalDigitizer_cfi.HFNose_setEndOfLifeNoise().

Referenced by customise_aging_3000(), customise_aging_3000_ultimate(), and customise_aging_4500_ultimate().

◆ agedHGCal()

def aging.agedHGCal (   process,
  algo = 0 
)

Definition at line 69 of file aging.py.

69 def agedHGCal(process,algo=0):
70  from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import HGCal_setEndOfLifeNoise
71  process = HGCal_setEndOfLifeNoise(process,byDose=True,byDoseAlgo=algo)
72  return process
73 

References hgcalDigitizer_cfi.HGCal_setEndOfLifeNoise().

Referenced by customise_aging_3000(), customise_aging_3000_ultimate(), and customise_aging_4500_ultimate().

◆ ageEcal()

def aging.ageEcal (   process,
  lumi,
  instLumi 
)

Definition at line 185 of file aging.py.

185 def ageEcal(process,lumi,instLumi):
186  if hasattr(process,'g4SimHits'):
187  #these lines need to be further activiated by tuning on 'complete' aging for ecal
188  process.g4SimHits.ECalSD.InstLuminosity = cms.double(instLumi)
189  process.g4SimHits.ECalSD.DelivLuminosity = cms.double(float(lumi))
190 
191  # available conditions
192  ecal_lumis = [300,1000,3000,4500]
193  ecal_conditions = [
194  ['EcalIntercalibConstantsRcd','EcalIntercalibConstants_TL{:d}_upgrade_8deg_v2_mc'],
195  ['EcalIntercalibConstantsMCRcd','EcalIntercalibConstantsMC_TL{:d}_upgrade_8deg_v2_mc'],
196  ['EcalLaserAPDPNRatiosRcd','EcalLaserAPDPNRatios_TL{:d}_upgrade_8deg_mc'],
197  ['EcalPedestalsRcd','EcalPedestals_TL{:d}_upgradeTIA_8deg_mc'],
198  ['EcalTPGLinearizationConstRcd','EcalTPGLinearizationConst_TL{:d}_upgrade_8deg_mc'],
199  ]
200 
201  # update PF thresholds, based on https://indico.cern.ch/event/653123/contributions/2659235/attachments/1491385/2318364/170711_upsg_ledovskoy.pdf
202  ecal_thresholds = {
203  300 : 0.103,
204  1000 : 0.175,
205  3000 : 0.435,
206  4500 : 0.707,
207  }
208  ecal_seed_multiplier = 2.5
209 
210  # try to get conditions
211  if int(lumi) in ecal_lumis:
212  if not hasattr(process.GlobalTag,'toGet'):
213  process.GlobalTag.toGet=cms.VPSet()
214  for ecal_condition in ecal_conditions:
215  process.GlobalTag.toGet.append(cms.PSet(
216  record = cms.string(ecal_condition[0]),
217  tag = cms.string(ecal_condition[1].format(int(lumi))),
218  connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS")
219  )
220  )
221  if hasattr(process,"particleFlowClusterECALUncorrected"):
222  _seeds = process.particleFlowClusterECALUncorrected.seedFinder.thresholdsByDetector
223  for iseed in range(0,len(_seeds)):
224  if _seeds[iseed].detector.value()=="ECAL_BARREL":
225  _seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[int(lumi)]*ecal_seed_multiplier)
226  _clusters = process.particleFlowClusterECALUncorrected.initialClusteringStep.thresholdsByDetector
227  for icluster in range(0,len(_clusters)):
228  if _clusters[icluster].detector.value()=="ECAL_BARREL":
229  _clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[int(lumi)])
230 
231  return process
232 

References dqmMemoryStats.float, createfilelist.int, and FastTimerService_cff.range.

Referenced by customise_aging_1000(), customise_aging_300(), customise_aging_3000(), customise_aging_3000_ultimate(), and customise_aging_4500_ultimate().

◆ ageHB()

def aging.ageHB (   process,
  turnon,
  scenarioHLLHC 
)

Definition at line 35 of file aging.py.

35 def ageHB(process,turnon,scenarioHLLHC):
36  if turnon:
37  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import HBDarkeningEP
38  process.HBDarkeningEP = HBDarkeningEP
39  process.HBDarkeningEP = setScenarioHLLHC(process.HBDarkeningEP,scenarioHLLHC)
40  hcaldigi = getHcalDigitizer(process)
41  if hcaldigi is not None: hcaldigi.HBDarkening = cms.bool(turnon)
42  if hasattr(process,'es_hardcode'):
43  process.es_hardcode.HBRecalibration = cms.bool(turnon)
44  return process
45 

References getHcalDigitizer(), and setScenarioHLLHC().

Referenced by ageHcal(), turn_off_HB_aging(), and turn_on_HB_aging().

◆ ageHcal()

def aging.ageHcal (   process,
  lumi,
  instLumi,
  scenarioHLLHC 
)

Definition at line 129 of file aging.py.

129 def ageHcal(process,lumi,instLumi,scenarioHLLHC):
130  hcaldigi = getHcalDigitizer(process)
131  if hcaldigi is not None: hcaldigi.DelivLuminosity = cms.double(float(lumi)) # integrated lumi in fb-1
132 
133  # these lines need to be further activated by turning on 'complete' aging for HF
134  if hasattr(process,'g4SimHits'):
135  process.g4SimHits.HCalSD.InstLuminosity = cms.double(float(instLumi))
136  process.g4SimHits.HCalSD.DelivLuminosity = cms.double(float(lumi))
137 
138  # recalibration and darkening always together
139  if hasattr(process,'es_hardcode'):
140  process.es_hardcode.iLumi = cms.double(float(lumi))
141 
142  # functions to enable individual subdet aging
143  process = ageHB(process,True,scenarioHLLHC)
144  process = ageHE(process,True,scenarioHLLHC)
145  process = ageHF(process,True)
146  process = ageSiPM(process,True,lumi)
147 
148  return process
149 

References ageHB(), ageHE(), ageHF(), ageSiPM(), dqmMemoryStats.float, and getHcalDigitizer().

Referenced by customise_aging_1000(), customise_aging_300(), customise_aging_3000(), customise_aging_3000_ultimate(), and customise_aging_4500_ultimate().

◆ ageHE()

def aging.ageHE (   process,
  turnon,
  scenarioHLLHC 
)

Definition at line 46 of file aging.py.

46 def ageHE(process,turnon,scenarioHLLHC):
47  if turnon:
48  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import HEDarkeningEP
49  process.HEDarkeningEP = HEDarkeningEP
50  process.HEDarkeningEP = setScenarioHLLHC(process.HEDarkeningEP,scenarioHLLHC)
51  hcaldigi = getHcalDigitizer(process)
52  if hcaldigi is not None: hcaldigi.HEDarkening = cms.bool(turnon)
53  if hasattr(process,'es_hardcode'):
54  process.es_hardcode.HERecalibration = cms.bool(turnon)
55  return process
56 

References getHcalDigitizer(), and setScenarioHLLHC().

Referenced by ageHcal(), turn_off_HE_aging(), and turn_on_HE_aging().

◆ ageHF()

def aging.ageHF (   process,
  turnon 
)

Definition at line 57 of file aging.py.

57 def ageHF(process,turnon):
58  hcaldigi = getHcalDigitizer(process)
59  if hcaldigi is not None: hcaldigi.HFDarkening = cms.bool(turnon)
60  if hasattr(process,'es_hardcode'):
61  process.es_hardcode.HFRecalibration = cms.bool(turnon)
62  return process
63 

References getHcalDigitizer().

Referenced by ageHcal(), turn_off_HF_aging(), and turn_on_HF_aging().

◆ ageSiPM()

def aging.ageSiPM (   process,
  turnon,
  lumi 
)

Definition at line 80 of file aging.py.

80 def ageSiPM(process,turnon,lumi):
81  process.es_hardcode.hbUpgrade.doRadiationDamage = turnon
82  process.es_hardcode.heUpgrade.doRadiationDamage = turnon
83 
84  # todo: determine ZS threshold adjustments
85 
86  # adjust PF thresholds for increased noise
87  # based on: https://baylor.box.com/s/w32ja75krcbxcycyifexu28dwlgrj7wg
88  hcal_lumis = [300, 1000, 3000, 4500, 1e10]
89  hcal_thresholds = {
90  300: {
91  "seed": [0.5, 0.625, 0.75, 0.75],
92  "rec": [0.4, 0.5, 0.6, 0.6],
93  },
94  1000: {
95  "seed": [1.0, 1.5, 1.5, 1.5],
96  "rec": [0.8, 1.2, 1.2, 1.2],
97  },
98  3000: {
99  "seed": [1.25, 2.5, 2.5, 2.5],
100  "rec": [1.0, 2.0, 2.0, 2.0],
101  },
102  4500: {
103  "seed": [1.5, 3.0, 3.0, 3.0],
104  "rec": [1.25, 2.5, 2.5, 2.5],
105  },
106  }
107  ctmodules = ['calotowermaker','caloTowerForTrk','caloTowerForTrkPreSplitting','towerMaker','towerMakerWithHO']
108  for ilumi, hcal_lumi in enumerate(hcal_lumis[:-1]):
109  if lumi >= hcal_lumi and lumi < hcal_lumis[ilumi+1]:
110  if hasattr(process,'particleFlowClusterHBHE'):
111  process.particleFlowClusterHBHE.seedFinder.thresholdsByDetector[0].seedingThreshold = hcal_thresholds[hcal_lumi]["seed"]
112  process.particleFlowClusterHBHE.initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = hcal_thresholds[hcal_lumi]["rec"]
113  process.particleFlowClusterHBHE.pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = hcal_thresholds[hcal_lumi]["rec"]
114  process.particleFlowClusterHBHE.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
115  process.particleFlowClusterHBHE.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
116  if hasattr(process,'particleFlowClusterHCAL'):
117  process.particleFlowClusterHCAL.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
118  if hasattr(process,'particleFlowRecHitHBHE'):
119  process.particleFlowRecHitHBHE.producers[0].qualityTests[0].cuts[0].threshold = hcal_thresholds[hcal_lumi]["rec"]
120  for ctmod in ctmodules:
121  if hasattr(process,ctmod):
122  getattr(process,ctmod).HBThreshold1 = hcal_thresholds[hcal_lumi]["rec"][0]
123  getattr(process,ctmod).HBThreshold2 = hcal_thresholds[hcal_lumi]["rec"][1]
124  getattr(process,ctmod).HBThreshold = hcal_thresholds[hcal_lumi]["rec"][-1]
125  break
126 
127  return process
128 

Referenced by ageHcal(), and turn_off_SiPM_aging().

◆ customise_aging_1000()

def aging.customise_aging_1000 (   process)

Definition at line 245 of file aging.py.

245 def customise_aging_1000(process):
246  process=ageHcal(process,1000,5.0e34,"nominal")
247  process=turn_off_HE_aging(process) #avoid conflict between HGCal and Hcal in phase2 geom configuration
248  process=ageEcal(process,1000,5.0e34)
249  return process
250 

References ageEcal(), ageHcal(), and turn_off_HE_aging().

◆ customise_aging_300()

def aging.customise_aging_300 (   process)

Definition at line 240 of file aging.py.

240 def customise_aging_300(process):
241  process=ageHcal(process,300,5.0e34,"nominal")
242  process=ageEcal(process,300,5.0e34)
243  return process
244 

References ageEcal(), and ageHcal().

◆ customise_aging_3000()

def aging.customise_aging_3000 (   process)

Definition at line 251 of file aging.py.

251 def customise_aging_3000(process):
252  process=ageHcal(process,3000,5.0e34,"nominal")
253  process=turn_off_HE_aging(process) #avoid conflict between HGCal and Hcal in phase2 geom configuration
254  process=ageEcal(process,3000,5.0e34)
255  process=agedHGCal(process)
256  process=agedHFNose(process)
257  return process
258 

References agedHFNose(), agedHGCal(), ageEcal(), ageHcal(), and turn_off_HE_aging().

◆ customise_aging_3000_ultimate()

def aging.customise_aging_3000_ultimate (   process)

Definition at line 259 of file aging.py.

259 def customise_aging_3000_ultimate(process):
260  process=ageHcal(process,3000,7.5e34,"ultimate")
261  process=turn_off_HE_aging(process) #avoid conflict between HGCal and Hcal in phase2 geom configuration
262  process=ageEcal(process,3000,7.5e34)
263  process=agedHGCal(process)
264  process=agedHFNose(process)
265  return process
266 

References agedHFNose(), agedHGCal(), ageEcal(), ageHcal(), and turn_off_HE_aging().

◆ customise_aging_4500_ultimate()

def aging.customise_aging_4500_ultimate (   process)

Definition at line 267 of file aging.py.

267 def customise_aging_4500_ultimate(process):
268  process=ageHcal(process,4500,7.5e34,"ultimate")
269  process=turn_off_HE_aging(process) #avoid conflict between HGCal and Hcal in phase2 geom configuration
270  process=ageEcal(process,4500,7.5e34)
271  process=agedHGCal(process)
272  process=agedHFNose(process)
273  return process

References agedHFNose(), agedHGCal(), ageEcal(), ageHcal(), and turn_off_HE_aging().

◆ ecal_complete_aging()

def aging.ecal_complete_aging (   process)

Definition at line 233 of file aging.py.

233 def ecal_complete_aging(process):
234  if hasattr(process,'g4SimHits'):
235  process.g4SimHits.ECalSD.AgeingWithSlopeLY = cms.untracked.bool(True)
236  if hasattr(process,'ecal_digi_parameters'):
237  process.ecal_digi_parameters.UseLCcorrection = cms.untracked.bool(False)
238  return process
239 

◆ getHcalDigitizer()

def aging.getHcalDigitizer (   process)

Definition at line 4 of file aging.py.

4 def getHcalDigitizer(process):
5  if hasattr(process,'mixData'):
6  return process.mixData
7  if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
8  return process.mix.digitizers.hcal
9  return None
10 

Referenced by ageHB(), ageHcal(), ageHE(), ageHF(), and hf_complete_aging().

◆ getHGCalDigitizer()

def aging.getHGCalDigitizer (   process,
  section 
)

Definition at line 11 of file aging.py.

11 def getHGCalDigitizer(process,section):
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
19  elif section == 'HFNose' and hasattr(process.mix.digitizers,'hfnoseDigitizer'):
20  return process.mix.digitizers.hfnoseDigitizer
21  return None
22 
23 # change assumptions about lumi rate

◆ hf_complete_aging()

def aging.hf_complete_aging (   process)

Definition at line 178 of file aging.py.

178 def hf_complete_aging(process):
179  if hasattr(process,'g4SimHits'):
180  process.g4SimHits.HCalSD.HFDarkening = cms.untracked.bool(True)
181  hcaldigi = getHcalDigitizer(process)
182  if hcaldigi is not None: hcaldigi.HFDarkening = cms.untracked.bool(False)
183  return process
184 

References getHcalDigitizer().

◆ realisticHGCalStartup()

def aging.realisticHGCalStartup (   process)

Definition at line 74 of file aging.py.

74 def realisticHGCalStartup(process):
75  from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import HGCal_setRealisticStartupNoise
76  process = HGCal_setRealisticStartupNoise(process)
77  return process
78 
79 # needs lumi to set proper ZS thresholds (tbd)

References hgcalDigitizer_cfi.HGCal_setRealisticStartupNoise().

◆ setScenarioHLLHC()

def aging.setScenarioHLLHC (   module,
  scenarioHLLHC 
)

Definition at line 24 of file aging.py.

24 def setScenarioHLLHC(module,scenarioHLLHC):
25  if scenarioHLLHC=="nominal":
26  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import _years_LHC, _years_HLLHC_nominal
27  module.years = _years_LHC + _years_HLLHC_nominal
28  elif scenarioHLLHC=="ultimate":
29  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import _years_LHC, _years_HLLHC_ultimate
30  module.years = _years_LHC + _years_HLLHC_ultimate
31  return module
32 
33 # turnon = True enables default, False disables
34 # recalibration and darkening always together

Referenced by ageHB(), and ageHE().

◆ turn_off_HB_aging()

def aging.turn_off_HB_aging (   process)

Definition at line 154 of file aging.py.

154 def turn_off_HB_aging(process):
155  process = ageHB(process,False,"")
156  return process
157 

References ageHB().

◆ turn_off_HE_aging()

def aging.turn_off_HE_aging (   process)

Definition at line 162 of file aging.py.

162 def turn_off_HE_aging(process):
163  process = ageHE(process,False,"")
164  return process
165 

References ageHE().

Referenced by customise_aging_1000(), customise_aging_3000(), customise_aging_3000_ultimate(), and customise_aging_4500_ultimate().

◆ turn_off_HF_aging()

def aging.turn_off_HF_aging (   process)

Definition at line 170 of file aging.py.

170 def turn_off_HF_aging(process):
171  process = ageHF(process,False)
172  return process
173 

References ageHF().

◆ turn_off_SiPM_aging()

def aging.turn_off_SiPM_aging (   process)

Definition at line 174 of file aging.py.

174 def turn_off_SiPM_aging(process):
175  process = ageSiPM(process,False,0.0)
176  return process
177 

References ageSiPM().

◆ turn_on_HB_aging()

def aging.turn_on_HB_aging (   process)

Definition at line 150 of file aging.py.

150 def turn_on_HB_aging(process):
151  process = ageHB(process,True,"")
152  return process
153 

References ageHB().

◆ turn_on_HE_aging()

def aging.turn_on_HE_aging (   process)

Definition at line 158 of file aging.py.

158 def turn_on_HE_aging(process):
159  process = ageHE(process,True,"")
160  return process
161 

References ageHE().

◆ turn_on_HF_aging()

def aging.turn_on_HF_aging (   process)

Definition at line 166 of file aging.py.

166 def turn_on_HF_aging(process):
167  process = ageHF(process,True)
168  return process
169 

References ageHF().

aging.turn_off_HF_aging
def turn_off_HF_aging(process)
Definition: aging.py:170
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
hgcalDigitizer_cfi
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
aging.turn_on_HB_aging
def turn_on_HB_aging(process)
Definition: aging.py:150
aging.turn_off_HB_aging
def turn_off_HB_aging(process)
Definition: aging.py:154
aging.ageHB
def ageHB(process, turnon, scenarioHLLHC)
Definition: aging.py:35
aging.hf_complete_aging
def hf_complete_aging(process)
Definition: aging.py:178
hgcalDigitizer_cfi.HFNose_setEndOfLifeNoise
def HFNose_setEndOfLifeNoise(process, byDose=True, byDoseAlgo=0, byDoseFactor=1)
Definition: hgcalDigitizer_cfi.py:337
aging.customise_aging_4500_ultimate
def customise_aging_4500_ultimate(process)
Definition: aging.py:267
aging.ageHE
def ageHE(process, turnon, scenarioHLLHC)
Definition: aging.py:46
aging.setScenarioHLLHC
def setScenarioHLLHC(module, scenarioHLLHC)
Definition: aging.py:24
aging.turn_on_HF_aging
def turn_on_HF_aging(process)
Definition: aging.py:166
aging.ageHcal
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:129
aging.realisticHGCalStartup
def realisticHGCalStartup(process)
Definition: aging.py:74
aging.ageHF
def ageHF(process, turnon)
Definition: aging.py:57
aging.agedHFNose
def agedHFNose(process, algo=0)
Definition: aging.py:64
hgcalDigitizer_cfi.HGCal_setEndOfLifeNoise
def HGCal_setEndOfLifeNoise(process, byDose=True, byDoseAlgo=0, byDoseFactor=1)
Definition: hgcalDigitizer_cfi.py:214
aging.agedHGCal
def agedHGCal(process, algo=0)
Definition: aging.py:69
aging.ageEcal
def ageEcal(process, lumi, instLumi)
Definition: aging.py:185
createfilelist.int
int
Definition: createfilelist.py:10
aging.ageSiPM
def ageSiPM(process, turnon, lumi)
Definition: aging.py:80
aging.customise_aging_3000_ultimate
def customise_aging_3000_ultimate(process)
Definition: aging.py:259
aging.ecal_complete_aging
def ecal_complete_aging(process)
Definition: aging.py:233
aging.customise_aging_300
def customise_aging_300(process)
Definition: aging.py:240
aging.turn_on_HE_aging
def turn_on_HE_aging(process)
Definition: aging.py:158
hgcalDigitizer_cfi.HGCal_setRealisticStartupNoise
def HGCal_setRealisticStartupNoise(process)
Definition: hgcalDigitizer_cfi.py:251
format
aging.customise_aging_1000
def customise_aging_1000(process)
Definition: aging.py:245
aging.turn_off_HE_aging
def turn_off_HE_aging(process)
Definition: aging.py:162
aging.getHGCalDigitizer
def getHGCalDigitizer(process, section)
Definition: aging.py:11
aging.getHcalDigitizer
def getHcalDigitizer(process)
Definition: aging.py:4
aging.customise_aging_3000
def customise_aging_3000(process)
Definition: aging.py:251
aging.turn_off_SiPM_aging
def turn_off_SiPM_aging(process)
Definition: aging.py:174