Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-17 02:41:47

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     toGet = cms.VPSet(
0028      cms.PSet(
0029         record = cms.string('EcalPedestalsRcd'),
0030         tag = cms.string('EcalPedestals_mc')
0031      ),
0032      cms.PSet(
0033         record = cms.string('EcalADCToGeVConstantRcd'),
0034         tag = cms.string('EcalADCToGeVConstant_mc')
0035      ),
0036      cms.PSet(
0037         record = cms.string('EcalChannelStatusRcd'),
0038         tag = cms.string('EcalChannelStatus_mc')
0039      ),
0040      cms.PSet(
0041         record = cms.string('EcalIntercalibConstantsRcd'),
0042         tag = cms.string('EcalIntercalibConstants_mc')
0043      ),
0044      cms.PSet(
0045         record = cms.string('EcalGainRatiosRcd'),
0046         tag = cms.string('EcalGainRatios_mc')
0047      ),
0048         cms.PSet(
0049             record = cms.string('EcalWeightXtalGroupsRcd'),
0050             tag = cms.string('EcalWeightXtalGroups_mc')
0051         ), 
0052         cms.PSet(
0053             record = cms.string('EcalTBWeightsRcd'),
0054             tag = cms.string('EcalTBWeights_mc')
0055         ))
0056 )
0057 
0058 
0059 
0060 #########################
0061 process.source = cms.Source("EmptySource")
0062 
0063 process.maxEvents = cms.untracked.PSet(
0064     input = cms.untracked.int32(1)
0065 )
0066 
0067 process.TPGParamProducer = cms.EDFilter("EcalTPGParamBuilder",
0068 
0069     #### inputs/ouputs control ####
0070     writeToDB  = cms.bool(False),
0071     allowDBEE  = cms.bool(False),
0072 
0073     DBsid   = cms.string('cms_omds_lb'),
0074     DBuser  = cms.string('cms_ecal_conf_test'),
0075     DBpass  = cms.string('*************'),
0076     DBport  = cms.uint32(10121),
0077 
0078     writeToFiles = cms.bool(False),
0079     outFile = cms.string('TPG_startupTest.txt'),
0080    #### TPG config tag and version (if not given it will be automatically given ) ####
0081     TPGtag = cms.string('CRAFT'),
0082     TPGversion = cms.uint32(1),
0083                                         
0084    #### TPG calculation parameters ####
0085     useTransverseEnergy = cms.bool(True),   ## true when TPG computes transverse energy, false for energy
0086     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)
0087     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)
0088 
0089     sliding = cms.uint32(0),                ## Parameter used for the FE data format, should'nt be changed
0090 
0091     weight_sampleMax = cms.uint32(3),       ## position of the maximum among the 5 samples used by the TPG amplitude filter
0092 
0093     forcedPedestalValue = cms.int32(160),   ## use this value instead of getting it from DB or MC (-1 means use DB or MC)
0094     forceEtaSlice = cms.bool(True),         ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0095 
0096     LUT_option = cms.string('Linear'),      ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0097     LUT_threshold_EB = cms.double(0.750),   ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0098     LUT_threshold_EE = cms.double(0.750),   ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0099     LUT_stochastic_EB = cms.double(0.03),   ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0100     LUT_noise_EB = cms.double(0.2),         ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0101     LUT_constant_EB = cms.double(0.005),    ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0102     LUT_stochastic_EE = cms.double(0.03),   ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0103     LUT_noise_EE = cms.double(0.2),         ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0104     LUT_constant_EE = cms.double(0.005),    ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0105 
0106     TTF_lowThreshold_EB = cms.double(0.6875),  ## EB Trigger Tower Flag low threshold in GeV
0107     TTF_highThreshold_EB = cms.double(0.6875), ## EB Trigger Tower Flag high threshold in GeV
0108     TTF_lowThreshold_EE = cms.double(0.6875),  ## EE Trigger Tower Flag low threshold in GeV
0109     TTF_highThreshold_EE = cms.double(0.6875), ## EE Trigger Tower Flag high threshold in GeV
0110 
0111     FG_lowThreshold_EB = cms.double(0.3125),   ## EB Fine Grain Et low threshold in GeV
0112     FG_highThreshold_EB = cms.double(0.3125),  ## EB Fine Grain Et high threshold in GeV
0113     FG_lowRatio_EB = cms.double(0.8),          ## EB Fine Grain low-ratio
0114     FG_highRatio_EB = cms.double(0.8),         ## EB Fine Grain high-ratio
0115     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0116     FG_Threshold_EE = cms.double(0.0),         ## EE Fine threshold in GeV
0117     FG_lut_strip_EE = cms.uint32(0),           ## EE Fine Grain strip Look-up table
0118     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0119 )
0120 
0121 process.p = cms.Path(process.TPGParamProducer)
0122