Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:07

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("ProdTPGParam")
0004 
0005 # Calo geometry service model
0006 process.load("Geometry.CaloEventSetup.CaloGeometry_cfi")
0007 process.load("Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi")
0008 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0009 
0010 # ecal mapping
0011 process.load("Geometry.EcalMapping.EcalMapping_cfi")
0012 process.eegeom = cms.ESSource("EmptyESSource",
0013     recordName = cms.string('EcalMappingRcd'),
0014     iovIsRunNotTime = cms.bool(True),
0015     firstValid = cms.vuint32(1)
0016 )
0017 
0018 # to read from orcon
0019 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0020 #process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_ECAL'
0021 process.CondDBCommon.connect = 'sqlite_file:DB.db'
0022 process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/xiezhen/conddb'
0023  
0024  
0025 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0026     process.CondDBCommon,
0027     timetype = cms.untracked.string('runnumber'),
0028     toGet = cms.VPSet(
0029      cms.PSet(
0030         record = cms.string('EcalPedestalsRcd'),
0031         tag = cms.string('EcalPedestals_mc')
0032      ),
0033      cms.PSet(
0034         record = cms.string('EcalADCToGeVConstantRcd'),
0035         tag = cms.string('EcalADCToGeVConstant_mc')
0036      ),
0037      cms.PSet(
0038         record = cms.string('EcalChannelStatusRcd'),
0039         tag = cms.string('EcalChannelStatus_mc')
0040      ),
0041      cms.PSet(
0042         record = cms.string('EcalIntercalibConstantsRcd'),
0043         tag = cms.string('EcalIntercalibConstants_mc')
0044      ),
0045      cms.PSet(
0046         record = cms.string('EcalGainRatiosRcd'),
0047         tag = cms.string('EcalGainRatios_mc')
0048      ),
0049         cms.PSet(
0050             record = cms.string('EcalWeightXtalGroupsRcd'),
0051             tag = cms.string('EcalWeightXtalGroups_mc')
0052         ), 
0053         cms.PSet(
0054             record = cms.string('EcalTBWeightsRcd'),
0055             tag = cms.string('EcalTBWeights_mc')
0056         ))
0057 )
0058 
0059 
0060 
0061 #########################
0062 process.source = cms.Source("EmptySource")
0063 
0064 process.maxEvents = cms.untracked.PSet(
0065     input = cms.untracked.int32(1)
0066 )
0067 
0068 process.TPGParamProducer = cms.EDFilter("EcalTPGParamBuilder",
0069 
0070     #### inputs/ouputs control ####
0071     writeToDB  = cms.bool(False),
0072     allowDBEE  = cms.bool(False),
0073 
0074     DBsid   = cms.string('cms_omds_lb'),
0075     DBuser  = cms.string('cms_ecal_conf_test'),
0076     DBpass  = cms.string('*************'),
0077     DBport  = cms.uint32(10121),
0078 
0079     writeToFiles = cms.bool(False),
0080     outFile = cms.string('TPG_startupTest.txt'),
0081    #### TPG config tag and version (if not given it will be automatically given ) ####
0082     TPGtag = cms.string('CRAFT'),
0083     TPGversion = cms.uint32(1),
0084                                         
0085    #### TPG calculation parameters ####
0086     useTransverseEnergy = cms.bool(True),   ## true when TPG computes transverse energy, false for energy
0087     Et_sat_EB = cms.double(64.0),           ## Saturation value (in GeV) of the TPG before the compressed-LUT (rem: with 35.84 the TPG_LSB = crystal_LSB)
0088     Et_sat_EE = cms.double(64.0),           ## Saturation value (in GeV) of the TPG before the compressed-LUT (rem: with 35.84 the TPG_LSB = crystal_LSB)
0089 
0090     sliding = cms.uint32(0),                ## Parameter used for the FE data format, should'nt be changed
0091 
0092     weight_sampleMax = cms.uint32(3),       ## position of the maximum among the 5 samples used by the TPG amplitude filter
0093 
0094     forcedPedestalValue = cms.int32(160),   ## use this value instead of getting it from DB or MC (-1 means use DB or MC)
0095     forceEtaSlice = cms.bool(True),         ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0096 
0097     LUT_option = cms.string('Linear'),      ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0098     LUT_threshold_EB = cms.double(0.750),   ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0099     LUT_threshold_EE = cms.double(0.750),   ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0100     LUT_stochastic_EB = cms.double(0.03),   ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0101     LUT_noise_EB = cms.double(0.2),         ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0102     LUT_constant_EB = cms.double(0.005),    ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0103     LUT_stochastic_EE = cms.double(0.03),   ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0104     LUT_noise_EE = cms.double(0.2),         ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0105     LUT_constant_EE = cms.double(0.005),    ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0106 
0107     TTF_lowThreshold_EB = cms.double(0.6875),  ## EB Trigger Tower Flag low threshold in GeV
0108     TTF_highThreshold_EB = cms.double(0.6875), ## EB Trigger Tower Flag high threshold in GeV
0109     TTF_lowThreshold_EE = cms.double(0.6875),  ## EE Trigger Tower Flag low threshold in GeV
0110     TTF_highThreshold_EE = cms.double(0.6875), ## EE Trigger Tower Flag high threshold in GeV
0111 
0112     FG_lowThreshold_EB = cms.double(0.3125),   ## EB Fine Grain Et low threshold in GeV
0113     FG_highThreshold_EB = cms.double(0.3125),  ## EB Fine Grain Et high threshold in GeV
0114     FG_lowRatio_EB = cms.double(0.8),          ## EB Fine Grain low-ratio
0115     FG_highRatio_EB = cms.double(0.8),         ## EB Fine Grain high-ratio
0116     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0117     FG_Threshold_EE = cms.double(0.0),         ## EE Fine threshold in GeV
0118     FG_lut_strip_EE = cms.uint32(0),           ## EE Fine Grain strip Look-up table
0119     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0120 )
0121 
0122 process.p = cms.Path(process.TPGParamProducer)
0123