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 # Get hardcoded conditions the same used for standard digitization before CMSSW_3_1_x
0019 ## process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi")
0020 # or Get DB parameters 
0021 # process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0022 # process.GlobalTag.globaltag = "GR09_31X_V2H::All"
0023 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0024 process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL'
0025 process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb'
0026 
0027 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0028                                           process.CondDBCommon,
0029                                           toGet = cms.VPSet(
0030          cms.PSet(
0031             record = cms.string('EcalPedestalsRcd'),
0032                     tag = cms.string('EcalPedestals_mc')
0033                  ),
0034               cms.PSet(
0035             record = cms.string('EcalADCToGeVConstantRcd'),
0036                     tag = cms.string('EcalADCToGeVConstant_MC_withBS2008_ideal')
0037                  ),
0038               cms.PSet(
0039             record = cms.string('EcalChannelStatusRcd'),
0040                     tag = cms.string('EcalChannelStatus_may2009_mc')
0041                  ),
0042               cms.PSet(
0043             record = cms.string('EcalIntercalibConstantsRcd'),
0044                     tag = cms.string('EcalIntercalibConstants_MC_withBS2008_ideal')
0045                  ),
0046               cms.PSet(
0047             record = cms.string('EcalGainRatiosRcd'),
0048                     tag = cms.string('EcalGainRatios_mc')
0049                  ),
0050               cms.PSet(
0051             record = cms.string('EcalWeightXtalGroupsRcd'),
0052                     tag = cms.string('EcalWeightXtalGroups_mc')
0053                  ),
0054               cms.PSet(
0055             record = cms.string('EcalTBWeightsRcd'),
0056                     tag = cms.string('EcalTBWeights_mc')
0057                  ),
0058           cms.PSet(
0059                 record = cms.string('EcalMappingElectronicsRcd'),
0060                                     tag = cms.string('EcalMappingElectronics_EEMap')
0061                                  )
0062                )
0063              )
0064 
0065 
0066 #########################
0067 process.source = cms.Source("EmptySource",
0068        firstRun = cms.untracked.uint32(100000000) ### need to use latest run to pick-up update values from DB 
0069 )
0070 
0071 
0072 process.maxEvents = cms.untracked.PSet(
0073     input = cms.untracked.int32(1)
0074 )
0075 
0076 process.TPGParamProducer = cms.EDFilter("EcalTPGParamBuilder",
0077 
0078     #### inputs/ouputs control ####
0079     writeToDB  = cms.bool(False),
0080     allowDBEE  = cms.bool(True),
0081 
0082     DBsid   = cms.string('cms_omds_lb'),
0083     DBuser  = cms.string('cms_ecal_conf_test'),
0084     DBpass  = cms.string('0r4cms_3c4l'),
0085     DBport  = cms.uint32(10121),
0086 
0087     TPGWritePed = cms.uint32(1),
0088     TPGWriteLin = cms.uint32(1),
0089     TPGWriteSli = cms.uint32(1),
0090     TPGWriteWei = cms.uint32(1),
0091     TPGWriteLut = cms.uint32(1),
0092     TPGWriteFgr = cms.uint32(1),
0093     TPGWriteBxt = cms.uint32(0),
0094     TPGWriteBtt = cms.uint32(0), #do not change
0095 
0096     writeToFiles = cms.bool(True),
0097     outFile = cms.string('TPG_beamv0_MC.txt'),
0098    #### TPG config tag and version (if not given it will be automatically given ) ####
0099     TPGtag = cms.string('BEAMV0_MC'),
0100     TPGversion = cms.uint32(1),
0101                                         
0102    #### TPG calculation parameters ####
0103     useTransverseEnergy = cms.bool(True),   ## true when TPG computes transverse energy, false for energy
0104     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)
0105     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)
0106 
0107     sliding = cms.uint32(0),                ## Parameter used for the FE data format, should'nt be changed
0108 
0109     weight_sampleMax = cms.uint32(3),       ## position of the maximum among the 5 samples used by the TPG amplitude filter
0110 
0111     forcedPedestalValue = cms.int32(-2),    ## use this value instead of getting it from DB or MC (-1 means use DB or MC. -2 used to cope with FENIX bug)
0112     forceEtaSlice = cms.bool(False),        ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0113 
0114     LUT_option = cms.string('Linear'),      ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0115     LUT_threshold_EB = cms.double(0.750),   ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0116     LUT_threshold_EE = cms.double(1.0625),  ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0117     LUT_stochastic_EB = cms.double(0.03),   ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0118     LUT_noise_EB = cms.double(0.2),         ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0119     LUT_constant_EB = cms.double(0.005),    ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0120     LUT_stochastic_EE = cms.double(0.03),   ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0121     LUT_noise_EE = cms.double(0.2),         ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0122     LUT_constant_EE = cms.double(0.005),    ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0123 
0124     TTF_lowThreshold_EB = cms.double(1.0),  ## EB Trigger Tower Flag low threshold in GeV
0125     TTF_highThreshold_EB = cms.double(2.0), ## EB Trigger Tower Flag high threshold in GeV
0126     TTF_lowThreshold_EE = cms.double(1.0),  ## EE Trigger Tower Flag low threshold in GeV
0127     TTF_highThreshold_EE = cms.double(2.0), ## EE Trigger Tower Flag high threshold in GeV
0128 
0129     FG_lowThreshold_EB = cms.double(0.3125),   ## EB Fine Grain Et low threshold in GeV
0130     FG_highThreshold_EB = cms.double(0.3125),  ## EB Fine Grain Et high threshold in GeV
0131     FG_lowRatio_EB = cms.double(0.8),          ## EB Fine Grain low-ratio
0132     FG_highRatio_EB = cms.double(0.8),         ## EB Fine Grain high-ratio
0133     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0134     FG_Threshold_EE = cms.double(0.0),         ## EE Fine threshold in GeV
0135     FG_lut_strip_EE = cms.uint32(0),           ## EE Fine Grain strip Look-up table
0136     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0137 )
0138 
0139 process.p = cms.Path(process.TPGParamProducer)
0140