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_v5_online')
0033                     tag = cms.string('EcalPedestals_2009runs_hlt') ### obviously diff w.r.t previous
0034                  ),
0035               cms.PSet(
0036             record = cms.string('EcalADCToGeVConstantRcd'),
0037                     #tag = cms.string('EcalADCToGeVConstant_EBg50_EEnoB_new')
0038                     tag = cms.string('EcalADCToGeVConstant_2009runs_express') ### the 2 ADCtoGEV in EB and EE are diff w.r.t previous
0039                  ),
0040               cms.PSet(
0041             record = cms.string('EcalIntercalibConstantsRcd'),
0042                     #tag = cms.string('EcalIntercalibConstants_EBg50_EEnoB_new')
0043                     tag = cms.string('EcalIntercalibConstants_2009runs_express') ### differs from previous
0044                  ),
0045               cms.PSet(
0046             record = cms.string('EcalGainRatiosRcd'),
0047                     #tag = cms.string('EcalGainRatios_TestPulse_online')
0048                     tag = cms.string('EcalGainRatios_TestPulse_express') ### no diff w.r.t previous
0049                  ),
0050               cms.PSet(
0051                 record = cms.string('EcalMappingElectronicsRcd'),
0052                     tag = cms.string('EcalMappingElectronics_EEMap')
0053                  )
0054                )
0055              )
0056 
0057 
0058 #########################
0059 process.source = cms.Source("EmptySource",
0060        firstRun = cms.untracked.uint32(100000000) ### need to use latest run to pick-up update values from DB 
0061 )
0062 
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(True),
0073 
0074     DBsid   = cms.string('cms_omds_lb'),
0075     ## P5 online DB
0076     DBuser  = cms.string('cms_ecal_conf'),
0077     DBpass  = cms.string('0r4cms_3c4lc0nf'),
0078     ## test DB
0079     ##DBuser  = cms.string('cms_ecal_conf_test'),
0080     ##DBpass  = cms.string('0r4cms_3c4l'),
0081     DBport  = cms.uint32(10121),
0082 
0083     TPGWritePed = cms.uint32(1),
0084     TPGWriteLin = cms.uint32(1),
0085     TPGWriteSli = cms.uint32(1),
0086     TPGWriteWei = cms.uint32(1),
0087     TPGWriteLut = cms.uint32(1),
0088     TPGWriteFgr = cms.uint32(1),
0089     TPGWriteBxt = cms.uint32(0),
0090     TPGWriteBtt = cms.uint32(0), #do not change
0091 
0092     writeToFiles = cms.bool(True),
0093     outFile = cms.string('TPG_beamv3WithAPDGain10.txt'),
0094    #### TPG config tag and version (if not given it will be automatically given ) ####
0095     TPGtag = cms.string('BEAMV3WITHAPDGAIN10'),
0096     TPGversion = cms.uint32(1),
0097                                         
0098    #### TPG calculation parameters ####
0099 
0100     ##########################################################
0101     # Warning: APD Gain = 10 (i.e. nominal gain50/5)         #
0102     #  ==> All numbers in GeV below must be multiplied by 5  #
0103     #  ==> All numbers in ADC below must be divided by 5     # 
0104     #      for the real energy correspondance                #
0105     ##########################################################
0106 
0107                                         
0108     useTransverseEnergy = cms.bool(True),    ## true when TPG computes transverse energy, false for energy
0109     Et_sat_EB = cms.double(320.0),            ## Saturation value (in GeV) of the TPG before the compressed-LUT (rem: with 35.84 the TPG_LSB = crystal_LSB)
0110     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)
0111 
0112     sliding = cms.uint32(0),                 ## Parameter used for the FE data format, should'nt be changed
0113 
0114     weight_timeShift = cms.double(0.),       ## weights are computed shifting the timing of the shape by this amount in ns: val>0 => shape shifted to the right
0115     weight_sampleMax = cms.uint32(3),        ## position of the maximum among the 5 samples used by the TPG amplitude filter
0116     weight_unbias_recovery = cms.bool(True), ## true if weights after int conversion are forced to have sum=0. Pb, in that case it can't have sum f*w = 1
0117 
0118     forcedPedestalValue = cms.int32(-3),     ## use this value instead of getting it from DB or MC
0119                                              ## -1: means use value from DB or MC.
0120                                              ## -2: ped12 = 0 used to cope with FENIX bug
0121                                              ## -3: used with sFGVB: baseline subtracted is pedestal-offset*sin(theta)/G with G=mult*2^-(shift+2) 
0122     pedestal_offset =  cms.uint32(60),      ## pedestal offset used with option forcedPedestalValue = -3
0123 
0124     useInterCalibration = cms.bool(True),    ## use or not values from DB. If not, 1 is assumed
0125 
0126     SFGVB_Threshold = cms.uint32(10),        ## used with option forcedPedestalValue = -3
0127     SFGVB_lut = cms.uint32(0xfffefee8),      ## used with option forcedPedestalValue = -3                                
0128 
0129     forceEtaSlice = cms.bool(False),         ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0130 
0131     LUT_option = cms.string('Linear'),       ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0132     LUT_threshold_EB = cms.double(1.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0133     LUT_threshold_EE = cms.double(0.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0134     LUT_stochastic_EB = cms.double(0.03),    ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0135     LUT_noise_EB = cms.double(0.2),          ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0136     LUT_constant_EB = cms.double(0.005),     ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0137     LUT_stochastic_EE = cms.double(0.03),    ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0138     LUT_noise_EE = cms.double(0.2),          ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0139     LUT_constant_EE = cms.double(0.005),     ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0140 
0141     TTF_lowThreshold_EB = cms.double(5.0),   ## EB Trigger Tower Flag low threshold in GeV
0142     TTF_highThreshold_EB = cms.double(10.0), ## EB Trigger Tower Flag high threshold in GeV
0143     TTF_lowThreshold_EE = cms.double(1.0),   ## EE Trigger Tower Flag low threshold in GeV
0144     TTF_highThreshold_EE = cms.double(2.0),  ## EE Trigger Tower Flag high threshold in GeV
0145 
0146     FG_lowThreshold_EB = cms.double(19.5),     ## EB Fine Grain Et low threshold in GeV
0147     FG_highThreshold_EB = cms.double(19.5),    ## EB Fine Grain Et high threshold in GeV
0148     FG_lowRatio_EB = cms.double(0.9),          ## EB Fine Grain low-ratio
0149     FG_highRatio_EB = cms.double(0.9),         ## EB Fine Grain high-ratio
0150     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0151     FG_Threshold_EE = cms.double(18.75),       ## EE Fine threshold in GeV
0152     FG_lut_strip_EE = cms.uint32(0xfffefee8),  ## EE Fine Grain strip Look-up table
0153     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0154 )
0155 
0156 process.p = cms.Path(process.TPGParamProducer)
0157