File indexing completed on 2024-04-06 11:58:40
0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003
0004
0005 from Calibration.EcalCalibAlgos.EcalPhiSymRecHitProducers_cfi import EcalPhiSymRecHitProducerRun, EcalPhiSymRecHitProducerLumi
0006
0007
0008 ALCARECOEcalPhiSymRecHitProducerRun = EcalPhiSymRecHitProducerRun.clone()
0009 ALCARECOEcalPhiSymRecHitProducerLumi = EcalPhiSymRecHitProducerLumi.clone()
0010
0011
0012 import Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi
0013 ALCARECOecalPhiSymRecHitRunTableEB = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitRunTableEB
0014 ALCARECOecalPhiSymRecHitRunTableEE = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitRunTableEE
0015 ALCARECOecalPhiSymInfoRunTable = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymInfoRunTable
0016 ALCARECOecalPhiSymRecHitLumiTableEB = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitLumiTableEB
0017 ALCARECOecalPhiSymRecHitLumiTableEE = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymRecHitLumiTableEE
0018 ALCARECOecalPhiSymInfoLumiTable = Calibration.EcalCalibAlgos.EcalPhiSymFlatTableProducers_cfi.ecalPhiSymInfoLumiTable
0019
0020 ALCARECOecalPhiSymRecHitRunTableEB.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun", "EB")
0021 ALCARECOecalPhiSymRecHitRunTableEE.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun", "EE")
0022 ALCARECOecalPhiSymInfoRunTable.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerRun")
0023 ALCARECOecalPhiSymRecHitLumiTableEB.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi", "EB")
0024 ALCARECOecalPhiSymRecHitLumiTableEE.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi", "EE")
0025 ALCARECOecalPhiSymInfoLumiTable.src = cms.InputTag("ALCARECOEcalPhiSymRecHitProducerLumi")
0026
0027 nmis = ALCARECOEcalPhiSymRecHitProducerRun.nMisCalib.value()
0028 for imis in range(1, nmis+1):
0029
0030 if imis<nmis/2+1:
0031 var_name = 'sumEt_m'+str(abs(int(imis-(nmis/2)-1)))
0032 var = Var(f'sumEt({imis})', float, doc='ECAL PhiSym rechits: '+str(imis-(nmis/2)-1)+'*miscalib et', precision=23)
0033 else:
0034 var_name = 'sumEt_p'+str(int(imis-(nmis/2)))
0035 var = Var(f'sumEt({imis})', float, doc='ECAL PhiSym rechits: '+str(imis-(nmis/2))+'*miscalib et', precision=23)
0036
0037 setattr(ALCARECOecalPhiSymRecHitRunTableEB.variables, var_name, var)
0038 setattr(ALCARECOecalPhiSymRecHitRunTableEE.variables, var_name, var)
0039 setattr(ALCARECOecalPhiSymRecHitLumiTableEB.variables, var_name, var)
0040 setattr(ALCARECOecalPhiSymRecHitLumiTableEE.variables, var_name, var)
0041
0042
0043 seqALCARECOEcalPhiSymByRun = cms.Sequence( ALCARECOEcalPhiSymRecHitProducerRun *
0044 ALCARECOecalPhiSymRecHitRunTableEB *
0045 ALCARECOecalPhiSymRecHitRunTableEE *
0046 ALCARECOecalPhiSymInfoRunTable )
0047 seqALCARECOEcalPhiSymByLumi = cms.Sequence( ALCARECOEcalPhiSymRecHitProducerLumi *
0048 ALCARECOecalPhiSymRecHitLumiTableEB *
0049 ALCARECOecalPhiSymRecHitLumiTableEE *
0050 ALCARECOecalPhiSymInfoLumiTable )
0051