CMS 3D CMS Logo

ALCARECOEcalPhiSym_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
4 # # PHISYM producer
5 from Calibration.EcalCalibAlgos.EcalPhiSymRecHitProducers_cfi import EcalPhiSymRecHitProducerRun, EcalPhiSymRecHitProducerLumi
6 
7 # Sum info by run or lumi sequences
8 ALCARECOEcalPhiSymRecHitProducerRun = EcalPhiSymRecHitProducerRun.clone()
9 ALCARECOEcalPhiSymRecHitProducerLumi = EcalPhiSymRecHitProducerLumi.clone()
10 
11 # # NANOAOD flat table producers
12 import Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi
13 ALCARECOecalPhiSymRecHitRunTableEB = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitRunTableEB
14 ALCARECOecalPhiSymRecHitRunTableEE = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitRunTableEE
15 ALCARECOecalPhiSymInfoRunTable = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymInfoRunTable
16 ALCARECOecalPhiSymRecHitLumiTableEB = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitLumiTableEB
17 ALCARECOecalPhiSymRecHitLumiTableEE = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitLumiTableEE
18 ALCARECOecalPhiSymInfoLumiTable = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymInfoLumiTable
19 
20 ALCARECOecalPhiSymRecHitRunTableEB.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun", "EB")
21 ALCARECOecalPhiSymRecHitRunTableEE.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun", "EE")
22 ALCARECOecalPhiSymInfoRunTable.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun")
23 ALCARECOecalPhiSymRecHitLumiTableEB.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi", "EB")
24 ALCARECOecalPhiSymRecHitLumiTableEE.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi", "EE")
25 ALCARECOecalPhiSymInfoLumiTable.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi")
26 
27 nmis = ALCARECOEcalPhiSymRecHitProducerRun.nMisCalib.value()
28 for imis in range(1, nmis+1):
29  # get the naming and indexing right.
30  if imis<nmis/2+1:
31  var_name = 'sumEt_m'+str(abs(int(imis-(nmis/2)-1)))
32  var = Var(f'sumEt({imis})', float, doc='ECAL PhiSym rechits: '+str(imis-(nmis/2)-1)+'*miscalib et', precision=23)
33  else:
34  var_name = 'sumEt_p'+str(int(imis-(nmis/2)))
35  var = Var(f'sumEt({imis})', float, doc='ECAL PhiSym rechits: '+str(imis-(nmis/2))+'*miscalib et', precision=23)
36 
37  setattr(ALCARECOecalPhiSymRecHitRunTableEB.variables, var_name, var)
38  setattr(ALCARECOecalPhiSymRecHitRunTableEE.variables, var_name, var)
39  setattr(ALCARECOecalPhiSymRecHitLumiTableEB.variables, var_name, var)
40  setattr(ALCARECOecalPhiSymRecHitLumiTableEE.variables, var_name, var)
41 
42 
43 seqALCARECOEcalPhiSymByRun = cms.Sequence( ALCARECOEcalPhiSymRecHitProducerRun *
44  ALCARECOecalPhiSymRecHitRunTableEB *
45  ALCARECOecalPhiSymRecHitRunTableEE *
46  ALCARECOecalPhiSymInfoRunTable )
47 seqALCARECOEcalPhiSymByLumi = cms.Sequence( ALCARECOEcalPhiSymRecHitProducerLumi *
48  ALCARECOecalPhiSymRecHitLumiTableEB *
49  ALCARECOecalPhiSymRecHitLumiTableEE *
50  ALCARECOecalPhiSymInfoLumiTable )
51 
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define str(s)