Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:02

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 process.load("CondCore.CondDB.CondDB_cfi")
0020 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0021 from Configuration.AlCa.GlobalTag import GlobalTag
0022 process.GlobalTag = GlobalTag(process.GlobalTag, '101X_postLS2_realistic_v6', '')
0023 
0024 process.GlobalTag.toGet = cms.VPSet(
0025   cms.PSet(record = cms.string('EcalPedestalsRcd'),
0026            tag = cms.string('EcalPedestals_mid2021_235fb_mc'),
0027            ),
0028   cms.PSet(record = cms.string('EcalIntercalibConstantsRcd'),
0029            tag = cms.string('EcalIntercalibConstants_TL235fb_mc'),
0030            ),
0031   cms.PSet(record = cms.string('EcalLaserAPDPNRatiosRcd'),
0032            tag = cms.string('EcalLaserAPDPNRatios_TL235fb_mc'),
0033            ),
0034   cms.PSet(record = cms.string('EcalLaserAlphasRcd'),
0035            tag = cms.string('EcalLaserAlphas_EB_sic1_btcp1_EE_sic1_btcp1'),
0036            )
0037 )
0038 #########################
0039 process.source = cms.Source("EmptySource",
0040        firstRun = cms.untracked.uint32(161310)
0041        ##firstRun = cms.untracked.uint32(257385)                                                             
0042 )
0043 
0044 
0045 process.maxEvents = cms.untracked.PSet(
0046     input = cms.untracked.int32(1)
0047 )
0048 
0049 process.TPGParamProducer = cms.EDAnalyzer("EcalTPGParamBuilder",
0050 
0051     #### inputs/ouputs control ####
0052     ##writeToDB  = cms.bool(True),
0053     ##writeTODB = cms.bool(False),                                                                       
0054     writeToDB  = cms.bool(False),
0055     allowDBEE  = cms.bool(False),
0056 
0057     DBsid   = cms.string('cms_omds_adg'), ## real DB 
0058     ##DBsid   = cms.string('int2r'), ## test DB
0059     ## P5 online DB
0060     DBuser  = cms.string('CMS_ECAL_R'),
0061     DBpass  = cms.string('3c4l_r34d3r'),
0062     ##DBpass  = cms.string('*******'),
0063     ## test DB
0064     ##DBuser  = cms.string('cms_ecal_conf_test'),
0065     DBport  = cms.uint32(10121),
0066 
0067     TPGWritePed = cms.uint32(1), # can be 1=load ped from offline DB  0=use previous ped NN=use ped from ped_conf_id=NN
0068     TPGWriteLin = cms.uint32(1),
0069     TPGWriteSli = cms.uint32(1),
0070     TPGWriteWei = cms.uint32(1),
0071     TPGWriteLut = cms.uint32(1),
0072     TPGWriteFgr = cms.uint32(1),
0073     TPGWriteSpi = cms.uint32(1),
0074     TPGWriteDel = cms.uint32(1),
0075     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
0076     TPGWriteBtt = cms.uint32(0), 
0077     TPGWriteBst = cms.uint32(0), 
0078 
0079     writeToFiles = cms.bool(True),
0080                       
0081     outFile = cms.string('TPG_235fb.txt'),
0082                             
0083                                           
0084    #### TPG config tag and version (if not given it will be automatically given ) ####
0085     TPGtag = cms.string('BEAMV6_TRANS_SPIKEKILL'),
0086     TPGversion = cms.uint32(1),
0087                                         
0088    #### TPG calculation parameters ####
0089     useTransverseEnergy = cms.bool(True),    ## true when TPG computes transverse energy, false for energy
0090     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)
0091     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)
0092 
0093     sliding = cms.uint32(0),                 ## Parameter used for the FE data format, should'nt be changed
0094 
0095     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
0096     weight_sampleMax = cms.uint32(3),        ## position of the maximum among the 5 samples used by the TPG amplitude filter
0097     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
0098 
0099     forcedPedestalValue = cms.int32(-3),     ## use this value instead of getting it from DB or MC
0100                                              ## -1: means use value from DB or MC.
0101                                              ## -2: ped12 = 0 used to cope with FENIX bug
0102                                              ## -3: used with sFGVB: baseline subtracted is pedestal-offset*sin(theta)/G with G=mult*2^-(shift+2) 
0103     pedestal_offset =  cms.uint32(150),      ## pedestal offset used with option forcedPedestalValue = -3
0104 
0105     useInterCalibration = cms.bool(True),    ## use or not values from DB. If not, 1 is assumed
0106 
0107     timing_delays_EB = cms.string('Delays_EB.txt'), # timing delays for latency EB / TT 
0108     timing_delays_EE = cms.string('Delays_EE.txt'), # timing delays for latency EE / strip                                         
0109     timing_phases_EB = cms.string('Phases_EB.txt'), # TCC phase setting for EB / TT
0110     timing_phases_EE = cms.string('Phases_EE.txt'), # TCC phase setting for EE / strip
0111 
0112     useTransparencyCorr = cms.bool(True),   ## true if you want to correct TPG for transparency change in EE                                          
0113 #    transparency_corrections = cms.string('hourly_235'), # transparency corr to be used to compute linearizer parameters 1/crystal
0114     transparency_corrections = cms.string('tag'), # transparency corr to be used to compute linearizer parameters 1/crystal
0115                                           
0116                                           
0117     SFGVB_Threshold = cms.uint32(16),             ## (adc) SFGVB threshold in FE
0118     SFGVB_lut = cms.uint32(0xfffefee8),           ## SFGVB LUT in FE                                
0119     SFGVB_SpikeKillingThreshold = cms.int32(16),  ## (GeV) Spike killing threshold applied in TPG ET in TCC (-1 no killing)
0120                                         
0121     forceEtaSlice = cms.bool(False),         ## when true, same linearization coeff for all crystals belonging to a given eta slice (tower)
0122 
0123     LUT_option = cms.string('Linear'),       ## compressed LUT option can be: "Identity", "Linear", "EcalResolution"
0124     LUT_threshold_EB = cms.double(0.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0125     LUT_threshold_EE = cms.double(0.250),    ## All Trigger Primitives <= threshold (in GeV) will be set to 0 
0126     LUT_stochastic_EB = cms.double(0.03),    ## Stochastic term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0127     LUT_noise_EB = cms.double(0.2),          ## noise term (GeV) of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0128     LUT_constant_EB = cms.double(0.005),     ## constant term of the ECAL-EB ET resolution (used only if LUT_option="EcalResolution")
0129     LUT_stochastic_EE = cms.double(0.03),    ## Stochastic term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0130     LUT_noise_EE = cms.double(0.2),          ## noise term (GeV) of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0131     LUT_constant_EE = cms.double(0.005),     ## constant term of the ECAL-EE ET resolution (used only if LUT_option="EcalResolution")
0132 
0133     TTF_lowThreshold_EB = cms.double(2.0),   ## EB Trigger Tower Flag low threshold in GeV                                                                                                                   
0134     TTF_highThreshold_EB = cms.double(4.0),  ## EB Trigger Tower Flag high threshold in GeV                                                                                                                  
0135     TTF_lowThreshold_EE = cms.double(2.0),   ## EE Trigger Tower Flag low threshold in GeV                                                                                                                   
0136     TTF_highThreshold_EE = cms.double(4.0),  ## EE Trigger Tower Flag high threshold in GeV                                                                                                                   
0137     FG_lowThreshold_EB = cms.double(3.9),      ## EB Fine Grain Et low threshold in GeV
0138     FG_highThreshold_EB = cms.double(3.9),     ## EB Fine Grain Et high threshold in GeV
0139     FG_lowRatio_EB = cms.double(0.9),          ## EB Fine Grain low-ratio
0140     FG_highRatio_EB = cms.double(0.9),         ## EB Fine Grain high-ratio
0141 
0142     FG_lut_EB = cms.uint32(0x08),              ## EB Fine Grain Look-up table. Put something != 0 if you really know what you do!
0143     FG_Threshold_EE = cms.double(18.75),       ## EE Fine threshold in GeV
0144     FG_lut_strip_EE = cms.uint32(0xfffefee8),  ## EE Fine Grain strip Look-up table
0145     FG_lut_tower_EE = cms.uint32(0)            ## EE Fine Grain tower Look-up table
0146 )
0147 
0148 process.p = cms.Path(process.TPGParamProducer)
0149