Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:48:00

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.HcalCommonData.hcalDDConstants_cff")
0009 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
0010 
0011 # ecal mapping
0012 process.load("Geometry.EcalMapping.EcalMapping_cfi")
0013 process.eegeom = cms.ESSource("EmptyESSource",
0014     recordName = cms.string('EcalMappingRcd'),
0015     iovIsRunNotTime = cms.bool(True),
0016     firstValid = cms.vuint32(1)
0017 )
0018 
0019 # Get hardcoded conditions the same used for standard digitization before CMSSW_3_1_x
0020 ## process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi")
0021 # or Get DB parameters 
0022 # process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0023 # process.GlobalTag.globaltag = "GR09_31X_V2H::All"
0024 process.load("CondCore.CondDB.CondDB_cfi")
0025 #process.CondDB.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL' ##P5 stuff
0026 #process.CondDB.connect = 'oracle://cms_orcon_adg/CMS_COND_31X_ECAL' ##lxplus DBv1 obsolete
0027 process.CondDB.connect = 'oracle://cms_orcon_adg/CMS_CONDITIONS' ##lxplus DBv2
0028 #process.CondDB.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb' ###P5 stuff
0029 process.CondDB.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb' ##lxplus
0030 
0031 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0032                                           process.CondDB,
0033                                           timetype = cms.untracked.string('runnumber'),
0034                                           toGet = cms.VPSet(
0035               cms.PSet(
0036             record = cms.string('EcalPedestalsRcd'),
0037                     #tag = cms.string('EcalPedestals_v5_online')
0038                     #tag = cms.string('EcalPedestals_2009runs_hlt') ### obviously diff w.r.t previous
0039                     tag = cms.string('EcalPedestals_hlt'), ### modif-alex 22/02/2011
0040                  ),
0041               cms.PSet(
0042             record = cms.string('EcalADCToGeVConstantRcd'),
0043                     #tag = cms.string('EcalADCToGeVConstant_EBg50_EEnoB_new')
0044                     tag = cms.string('EcalADCToGeVConstant_2009runs_express') ### the 2 ADCtoGEV in EB and EE are diff w.r.t previous
0045                  ),
0046               cms.PSet(
0047             record = cms.string('EcalIntercalibConstantsRcd'),
0048                     #tag = cms.string('EcalIntercalibConstants_EBg50_EEnoB_new')
0049                     tag = cms.string('EcalIntercalibConstants_2009runs_express') ### differs from previous
0050                  ),
0051               cms.PSet(
0052             record = cms.string('EcalGainRatiosRcd'),
0053                     #tag = cms.string('EcalGainRatios_TestPulse_online')
0054                     tag = cms.string('EcalGainRatios_TestPulse_express') ### no diff w.r.t previous
0055                  ),
0056               cms.PSet(
0057                 record = cms.string('EcalMappingElectronicsRcd'),
0058                     tag = cms.string('EcalMappingElectronics_EEMap')
0059                  ),
0060               cms.PSet(
0061                 record = cms.string('EcalLaserAlphasRcd'),
0062                 tag = cms.string('EcalLaserAlphas_EB_sic1_btcp152_EE_sic1_btcp116')
0063               )
0064                )
0065              )
0066 
0067 
0068 #########################
0069 process.source = cms.Source("EmptySource",
0070        ##firstRun = cms.untracked.uint32(100000000) ### need to use latest run to pick-up update values from DB 
0071        firstRun = cms.untracked.uint32(161310)
0072 )
0073 
0074 
0075 process.maxEvents = cms.untracked.PSet(
0076     input = cms.untracked.int32(1)
0077 )
0078 
0079 ##process.TPGParamProducer = cms.EDFilter("EcalTPGParamBuilder",
0080 process.TPGParamProducer = cms.EDAnalyzer("EcalTPGParamBuilder",
0081 
0082     #### inputs/ouputs control ####
0083     writeToDB  = cms.bool(False),
0084     allowDBEE  = cms.bool(True),
0085 
0086 #    DBsid   = cms.string('cms_omds_lb'), ## real DB 
0087     DBsid   = cms.string('cms_orcon_adg'), ## real DB on lxplus
0088     ##DBsid   = cms.string('int2r'), ## test DB
0089     ## P5 online DB
0090 #    DBuser  = cms.string('cms_ecal_conf'),
0091 #    DBpass  = cms.string('0r4cms_3c4lc0nf'),
0092     DBuser  = cms.string('cms_ecal_r'),
0093     DBpass  = cms.string('3c4l_r34d3r'),
0094     ##DBpass  = cms.string('*******'),
0095     ## test DB
0096     ##DBuser  = cms.string('cms_ecal_conf_test'),
0097     DBport  = cms.uint32(10121),
0098 
0099     TPGWritePed = cms.uint32(1), # can be 1=load ped from offline DB  0=use previous ped NN=use ped from ped_conf_id=NN
0100     TPGWriteLin = cms.uint32(1),
0101     TPGWriteSli = cms.uint32(1),
0102     TPGWriteWei = cms.uint32(1),
0103     TPGWriteLut = cms.uint32(1),
0104     TPGWriteFgr = cms.uint32(1),
0105     TPGWriteSpi = cms.uint32(1),
0106     TPGWriteDel = cms.uint32(1),
0107     TPGWriteBxt = cms.uint32(0), # these can be 0=use same as existing number for this tag or NN=use badxt from bxt_conf_id=NN
0108     TPGWriteBtt = cms.uint32(0), 
0109     TPGWriteBst = cms.uint32(0), 
0110 
0111     writeToFiles = cms.bool(True),
0112     outFile = cms.string('TPG_beamv6_trans_rrrrrr_spikekill.txt'),
0113                                           
0114    #### TPG config tag and version (if not given it will be automatically given ) ####
0115     TPGtag = cms.string('BEAMV6_TRANS_SPIKEKILL'),
0116     TPGversion = cms.uint32(1),
0117                                         
0118    #### TPG calculation parameters ####
0119     useTransverseEnergy = cms.bool(True),    ## true when TPG computes transverse energy, false for energy
0120     Et_sat_EB = cms.double(128.0),            ## Saturation value (in GeV) of the TPG before the compressed-LUT (rem: with 35.84 the TPG_LSB = crystal_LSB)
0121     Et_sat_EE = cms.double(128.0),            ## Saturation value (in GeV) of the TPG before the compressed-LUT (rem: with 35.84 the TPG_LSB = crystal_LSB)
0122 
0123     sliding = cms.uint32(0),                 ## Parameter used for the FE data format, should'nt be changed
0124 
0125     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
0126     weight_sampleMax = cms.uint32(3),        ## position of the maximum among the 5 samples used by the TPG amplitude filter
0127     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
0128 
0129     forcedPedestalValue = cms.int32(-3),     ## use this value instead of getting it from DB or MC
0130                                              ## -1: means use value from DB or MC.
0131                                              ## -2: ped12 = 0 used to cope with FENIX bug
0132                                              ## -3: used with sFGVB: baseline subtracted is pedestal-offset*sin(theta)/G with G=mult*2^-(shift+2) 
0133     pedestal_offset =  cms.uint32(150),      ## pedestal offset used with option forcedPedestalValue = -3
0134 
0135     useInterCalibration = cms.bool(True),    ## use or not values from DB. If not, 1 is assumed
0136 
0137     timing_delays_EB = cms.string('Delays_EB.txt'), # timing delays for latency EB / TT 
0138     timing_delays_EE = cms.string('Delays_EE.txt'), # timing delays for latency EE / strip                                         
0139     timing_phases_EB = cms.string('Phases_EB.txt'), # TCC phase setting for EB / TT
0140     timing_phases_EE = cms.string('Phases_EE.txt'), # TCC phase setting for EE / strip
0141 
0142     useTransparencyCorr = cms.bool(True),   ## true if you want to correct TPG for transparency change in EE                                          
0143     transparency_corrections = cms.string('../../../Tools/DBDump/bin/weekly_rrrrrr'), # transparency corr to be used to compute linearizer parameters 1/crystal
0144 
0145     SFGVB_Threshold = cms.uint32(12),             ## (adc) SFGVB threshold in FE
0146     SFGVB_lut = cms.uint32(0xfffefee8),           ## SFGVB LUT in FE                                
0147     SFGVB_SpikeKillingThreshold = cms.int32(12),  ## (GeV) Spike killing threshold applied in TPG ET in TCC (-1 no killing)
0148                                         
0149     forceEtaSlice = cms.bool(False),         ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0150 
0151     LUT_option = cms.string('Linear'),       ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0152     LUT_threshold_EB = cms.double(0.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0153     LUT_threshold_EE = cms.double(0.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0154     LUT_stochastic_EB = cms.double(0.03),    ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0155     LUT_noise_EB = cms.double(0.2),          ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0156     LUT_constant_EB = cms.double(0.005),     ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0157     LUT_stochastic_EE = cms.double(0.03),    ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0158     LUT_noise_EE = cms.double(0.2),          ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0159     LUT_constant_EE = cms.double(0.005),     ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0160 
0161     TTF_lowThreshold_EB = cms.double(1.0),   ## EB Trigger Tower Flag low threshold in GeV
0162     TTF_highThreshold_EB = cms.double(2.0),  ## EB Trigger Tower Flag high threshold in GeV
0163     TTF_lowThreshold_EE = cms.double(1.0),   ## EE Trigger Tower Flag low threshold in GeV
0164     TTF_highThreshold_EE = cms.double(2.0),  ## EE Trigger Tower Flag high threshold in GeV
0165 
0166     FG_lowThreshold_EB = cms.double(3.9),      ## EB Fine Grain Et low threshold in GeV
0167     FG_highThreshold_EB = cms.double(3.9),     ## EB Fine Grain Et high threshold in GeV
0168     FG_lowRatio_EB = cms.double(0.9),          ## EB Fine Grain low-ratio
0169     FG_highRatio_EB = cms.double(0.9),         ## EB Fine Grain high-ratio
0170     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0171     FG_Threshold_EE = cms.double(18.75),       ## EE Fine threshold in GeV
0172     FG_lut_strip_EE = cms.uint32(0xfffefee8),  ## EE Fine Grain strip Look-up table
0173     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0174 )
0175 
0176 process.p = cms.Path(process.TPGParamProducer)
0177