CMS 3D CMS Logo

Functions
aging Namespace Reference

Functions

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 hf_complete_aging (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

def aging.ageEcal (   process,
  lumi,
  instLumi 
)

Definition at line 117 of file aging.py.

References objects.autophobj.float, and createfilelist.int.

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

117 def ageEcal(process,lumi,instLumi):
118  if hasattr(process,'g4SimHits'):
119  #these lines need to be further activiated by tuning on 'complete' aging for ecal
120  process.g4SimHits.ECalSD.InstLuminosity = cms.double(instLumi)
121  process.g4SimHits.ECalSD.DelivLuminosity = cms.double(float(lumi))
122 
123  # available conditions
124  ecal_lumis = [300,1000,3000,4500]
125  ecal_conditions = [
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'],
131  ]
132 
133  # try to get conditions
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")
142  )
143  )
144 
145  return process
146 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def aging.ageHB (   process,
  turnon,
  scenarioHLLHC 
)

Definition at line 23 of file aging.py.

References getHcalDigitizer(), and setScenarioHLLHC().

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

23 def ageHB(process,turnon,scenarioHLLHC):
24  if turnon:
25  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import HBDarkeningEP
26  process.HBDarkeningEP = HBDarkeningEP
27  process.HBDarkeningEP = setScenarioHLLHC(process.HBDarkeningEP,scenarioHLLHC)
28  hcaldigi = getHcalDigitizer(process)
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)
32  return process
33 
def ageHB(process, turnon, scenarioHLLHC)
Definition: aging.py:23
def getHcalDigitizer(process)
Definition: aging.py:4
def setScenarioHLLHC(module, scenarioHLLHC)
Definition: aging.py:12
def aging.ageHcal (   process,
  lumi,
  instLumi,
  scenarioHLLHC 
)

Definition at line 61 of file aging.py.

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

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

61 def ageHcal(process,lumi,instLumi,scenarioHLLHC):
62  hcaldigi = getHcalDigitizer(process)
63  if hcaldigi is not None: hcaldigi.DelivLuminosity = cms.double(float(lumi)) # integrated lumi in fb-1
64 
65  # these lines need to be further activated by turning on 'complete' aging for HF
66  if hasattr(process,'g4SimHits'):
67  process.g4SimHits.HCalSD.InstLuminosity = cms.double(float(instLumi))
68  process.g4SimHits.HCalSD.DelivLuminosity = cms.double(float(lumi))
69 
70  # recalibration and darkening always together
71  if hasattr(process,'es_hardcode'):
72  process.es_hardcode.iLumi = cms.double(float(lumi))
73 
74  # functions to enable individual subdet aging
75  process = ageHB(process,True,scenarioHLLHC)
76  process = ageHE(process,True,scenarioHLLHC)
77  process = ageHF(process,True)
78  process = ageSiPM(process,True,lumi)
79 
80  return process
81 
def ageHB(process, turnon, scenarioHLLHC)
Definition: aging.py:23
def getHcalDigitizer(process)
Definition: aging.py:4
def ageSiPM(process, turnon, lumi)
Definition: aging.py:53
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def ageHF(process, turnon)
Definition: aging.py:45
def ageHE(process, turnon, scenarioHLLHC)
Definition: aging.py:34
def aging.ageHE (   process,
  turnon,
  scenarioHLLHC 
)

Definition at line 34 of file aging.py.

References getHcalDigitizer(), and setScenarioHLLHC().

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

34 def ageHE(process,turnon,scenarioHLLHC):
35  if turnon:
36  from CalibCalorimetry.HcalPlugins.HBHEDarkening_cff import HEDarkeningEP
37  process.HEDarkeningEP = HEDarkeningEP
38  process.HEDarkeningEP = setScenarioHLLHC(process.HEDarkeningEP,scenarioHLLHC)
39  hcaldigi = getHcalDigitizer(process)
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)
43  return process
44 
def getHcalDigitizer(process)
Definition: aging.py:4
def setScenarioHLLHC(module, scenarioHLLHC)
Definition: aging.py:12
def ageHE(process, turnon, scenarioHLLHC)
Definition: aging.py:34
def aging.ageHF (   process,
  turnon 
)

Definition at line 45 of file aging.py.

References getHcalDigitizer().

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

45 def ageHF(process,turnon):
46  hcaldigi = getHcalDigitizer(process)
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)
50  return process
51 
52 # needs lumi to set proper ZS thresholds (tbd)
def getHcalDigitizer(process)
Definition: aging.py:4
def ageHF(process, turnon)
Definition: aging.py:45
def aging.ageSiPM (   process,
  turnon,
  lumi 
)

Definition at line 53 of file aging.py.

Referenced by ageHcal(), and turn_off_SiPM_aging().

53 def ageSiPM(process,turnon,lumi):
54  process.es_hardcode.hbUpgrade.doRadiationDamage = turnon
55  process.es_hardcode.heUpgrade.doRadiationDamage = turnon
56 
57  # todo: determine ZS threshold adjustments
58 
59  return process
60 
def ageSiPM(process, turnon, lumi)
Definition: aging.py:53
def aging.customise_aging_1000 (   process)

Definition at line 159 of file aging.py.

References ageEcal(), and ageHcal().

Referenced by combinedCustoms.customise_aging_1000().

159 def customise_aging_1000(process):
160  process=ageHcal(process,1000,5.0e34,"nominal")
161  process=ageEcal(process,1000,5.0e34)
162  return process
163 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def customise_aging_1000(process)
Definition: aging.py:159
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def aging.customise_aging_300 (   process)

Definition at line 154 of file aging.py.

References ageEcal(), and ageHcal().

Referenced by combinedCustoms.customise_aging_300().

154 def customise_aging_300(process):
155  process=ageHcal(process,300,5.0e34,"nominal")
156  process=ageEcal(process,300,5.0e34)
157  return process
158 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def customise_aging_300(process)
Definition: aging.py:154
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def aging.customise_aging_3000 (   process)

Definition at line 164 of file aging.py.

References ageEcal(), and ageHcal().

Referenced by combinedCustoms.customise_aging_3000().

164 def customise_aging_3000(process):
165  process=ageHcal(process,3000,5.0e34,"nominal")
166  process=ageEcal(process,3000,5.0e34)
167  return process
168 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def customise_aging_3000(process)
Definition: aging.py:164
def aging.customise_aging_3000_ultimate (   process)

Definition at line 169 of file aging.py.

References ageEcal(), and ageHcal().

170  process=ageHcal(process,3000,7.5e34,"ultimate")
171  process=ageEcal(process,3000,7.5e34)
172  return process
173 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def customise_aging_3000_ultimate(process)
Definition: aging.py:169
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def aging.customise_aging_4500_ultimate (   process)

Definition at line 174 of file aging.py.

References ageEcal(), and ageHcal().

175  process=ageHcal(process,4500,7.5e34,"ultimate")
176  process=ageEcal(process,4500,7.5e34)
177  return process
178 
def ageEcal(process, lumi, instLumi)
Definition: aging.py:117
def customise_aging_4500_ultimate(process)
Definition: aging.py:174
def ageHcal(process, lumi, instLumi, scenarioHLLHC)
Definition: aging.py:61
def aging.ecal_complete_aging (   process)

Definition at line 147 of file aging.py.

Referenced by combinedCustoms.ecal_complete_aging().

147 def ecal_complete_aging(process):
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)
152  return process
153 
def ecal_complete_aging(process)
Definition: aging.py:147
def aging.getHcalDigitizer (   process)

Definition at line 4 of file aging.py.

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

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 
11 # change assumptions about lumi rate
def getHcalDigitizer(process)
Definition: aging.py:4
def aging.hf_complete_aging (   process)

Definition at line 110 of file aging.py.

References getHcalDigitizer().

Referenced by combinedCustoms.hf_complete_aging().

110 def hf_complete_aging(process):
111  if hasattr(process,'g4SimHits'):
112  process.g4SimHits.HCalSD.HFDarkening = cms.untracked.bool(True)
113  hcaldigi = getHcalDigitizer(process)
114  if hcaldigi is not None: hcaldigi.HFDarkening = cms.untracked.bool(False)
115  return process
116 
def getHcalDigitizer(process)
Definition: aging.py:4
def hf_complete_aging(process)
Definition: aging.py:110
def aging.setScenarioHLLHC (   module,
  scenarioHLLHC 
)

Definition at line 12 of file aging.py.

Referenced by ageHB(), and ageHE().

12 def setScenarioHLLHC(module,scenarioHLLHC):
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
19  return module
20 
21 # turnon = True enables default, False disables
22 # recalibration and darkening always together
def setScenarioHLLHC(module, scenarioHLLHC)
Definition: aging.py:12
def aging.turn_off_HB_aging (   process)

Definition at line 86 of file aging.py.

References ageHB().

86 def turn_off_HB_aging(process):
87  process = ageHB(process,False,"")
88  return process
89 
def ageHB(process, turnon, scenarioHLLHC)
Definition: aging.py:23
def turn_off_HB_aging(process)
Definition: aging.py:86
def aging.turn_off_HE_aging (   process)

Definition at line 94 of file aging.py.

References ageHE().

Referenced by combinedCustoms.turn_off_HE_aging().

94 def turn_off_HE_aging(process):
95  process = ageHE(process,False,"")
96  return process
97 
def turn_off_HE_aging(process)
Definition: aging.py:94
def ageHE(process, turnon, scenarioHLLHC)
Definition: aging.py:34
def aging.turn_off_HF_aging (   process)

Definition at line 102 of file aging.py.

References ageHF().

Referenced by combinedCustoms.turn_off_HF_aging().

102 def turn_off_HF_aging(process):
103  process = ageHF(process,False)
104  return process
105 
def turn_off_HF_aging(process)
Definition: aging.py:102
def ageHF(process, turnon)
Definition: aging.py:45
def aging.turn_off_SiPM_aging (   process)

Definition at line 106 of file aging.py.

References ageSiPM().

106 def turn_off_SiPM_aging(process):
107  process = ageSiPM(process,False,0.0)
108  return process
109 
def turn_off_SiPM_aging(process)
Definition: aging.py:106
def ageSiPM(process, turnon, lumi)
Definition: aging.py:53
def aging.turn_on_HB_aging (   process)

Definition at line 82 of file aging.py.

References ageHB().

82 def turn_on_HB_aging(process):
83  process = ageHB(process,True,"")
84  return process
85 
def ageHB(process, turnon, scenarioHLLHC)
Definition: aging.py:23
def turn_on_HB_aging(process)
Definition: aging.py:82
def aging.turn_on_HE_aging (   process)

Definition at line 90 of file aging.py.

References ageHE().

90 def turn_on_HE_aging(process):
91  process = ageHE(process,True,"")
92  return process
93 
def ageHE(process, turnon, scenarioHLLHC)
Definition: aging.py:34
def turn_on_HE_aging(process)
Definition: aging.py:90
def aging.turn_on_HF_aging (   process)

Definition at line 98 of file aging.py.

References ageHF().

98 def turn_on_HF_aging(process):
99  process = ageHF(process,True)
100  return process
101 
def ageHF(process, turnon)
Definition: aging.py:45
def turn_on_HF_aging(process)
Definition: aging.py:98