Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("ProcessOne")
0004 process.load("CondCore.CondDB.CondDB_cfi")
0005 process.CondDB.connect = 'sqlite_file:EcalSRSettings_beam2016_option1_v1_mc.db'
0006 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
0007 #process.CondDBCommon.connect = 'sqlite_file:EcalSRSettings_beam2015_option1_v00_mc.db'
0008 #process.CondDBCommon.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
0009 
0010 process.MessageLogger = cms.Service("MessageLogger",
0011     cerr = cms.untracked.PSet(
0012         enable = cms.untracked.bool(False)
0013     ),
0014     cout = cms.untracked.PSet(
0015         enable = cms.untracked.bool(True)
0016     ),
0017     debugModules = cms.untracked.vstring('*')
0018 )
0019 
0020 process.source = cms.Source("EmptyIOVSource",
0021                                 firstValue = cms.uint64(1),
0022                                 lastValue = cms.uint64(1),
0023                                 timetype = cms.string('runnumber'),
0024                                 interval = cms.uint64(1)
0025                             )
0026 
0027 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0028     process.CondDB,
0029 #    process.CondDBCommon,
0030     toPut = cms.VPSet(cms.PSet(
0031         record = cms.string('EcalSRSettingsRcd'),
0032         tag = cms.string('EcalSRSettings_beam2016_option1_v1_mc')
0033     ))
0034 )
0035 
0036 process.writeInDB = cms.EDAnalyzer("EcalSRCondTools",
0037 #   mode = cms.string("combine_config"), #Gets config from EcalSRCondTools module parameters,
0038                                          #use values from onlineSrpConfigFile for the configuration
0039                                          #not defined as module parameters. Values from module parameters
0040                                          #take the precedence.
0041                                    
0042     mode = cms.string("python_config"), #configuration read from EcalSRCondTools module parameters (e.g. to produce MC config.)
0043 
0044 #    mode = cms.string("online_config"), #import online SRP config from onlineSrpConfigFile file and bxGlobalOffset,
0045                                          #automaticSrpSelect, automaticMasks parameters
0046 
0047 
0048     onlineSrpConfigFile = cms.string("srp.cfg"),
0049                                  
0050     # Neighbour eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)
0051     deltaEta = cms.int32(1),
0052 
0053     # Neighbouring eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)
0054     deltaPhi = cms.int32(1),
0055 
0056     # Index of time sample (staring from 1) the first DCC weights is implied
0057     ecalDccZs1stSample = cms.int32(2),
0058 
0059     # ADC to GeV conversion factor used in ZS filter for EB
0060     ebDccAdcToGeV = cms.double(0.035),
0061 
0062     # ADC to GeV conversion factor used in ZS filter for EE
0063     eeDccAdcToGeV = cms.double(0.06),
0064 
0065     #DCC ZS FIR weights: weights are rounded in such way that in Hw
0066     #representation (weigth*1024 rounded to nearest integer) the sum is null:
0067     dccNormalizedWeights = cms.vdouble(-0.374, -0.374, -0.3629, 0.2721, 0.4681, 
0068         0.3707),
0069 
0070     # Switch to use a symetric zero suppression (cut on absolute value). For
0071     # studies only, for time being it is not supported by the hardware.
0072     symetricZS = cms.bool(False),
0073 
0074     # ZS energy threshold in GeV to apply to low interest channels of barrel
0075     srpBarrelLowInterestChannelZS = cms.double(0.1),
0076 
0077     # ZS energy threshold in GeV to apply to low interest channels of endcap
0078     srpEndcapLowInterestChannelZS = cms.double(0.3),
0079 
0080     # ZS energy threshold in GeV to apply to high interest channels of barrel
0081     srpBarrelHighInterestChannelZS = cms.double(-1.e9),
0082 
0083     # ZS energy threshold in GeV to apply to high interest channels of endcap
0084     srpEndcapHighInterestChannelZS = cms.double(-1.e9),
0085 
0086     #switch to run w/o trigger primitive. For debug use only
0087     trigPrimBypass = cms.bool(False),
0088 
0089     # Mode selection for "Trig bypass" mode
0090     # 0: TT thresholds applied on sum of crystal Et's
0091     # 1: TT thresholds applies on compressed Et from Trigger primitive
0092     # @ee trigPrimByPass_ switch
0093     trigPrimBypassMode = cms.int32(0),
0094                               
0095     #for debug mode only:
0096     trigPrimBypassLTH = cms.double(1.0),
0097 
0098     #for debug mode only:
0099     trigPrimBypassHTH = cms.double(1.0),
0100 
0101     #for debug mode only
0102     trigPrimBypassWithPeakFinder = cms.bool(True),
0103                               
0104     #Trigger Tower Flag to use when a flag is not found from the input
0105     #Trigger Primitive collection. Must be one of the following values:
0106     # 0: low interest, 1: mid interest, 3: high interest
0107     # 4: forced low interest, 5: forced mid interest, 7: forced high interest
0108     defaultTtf = cms.int32(4),
0109 
0110     # SR->action flag map
0111     actions = cms.vint32(1, 3, 3, 3, 5, 7, 7, 7),
0112 
0113     #Bx offset common to every SRP card. used in both write mdes
0114     #called SRP0BUNCHADJUSTPOSITION in online configuration database
0115     bxGlobalOffset = cms.int32(3447),
0116 
0117     #Switch for selecion of SRP board to controls base on
0118     #the list of ECAL FEDs included in the run (online specific parameter) 
0119     automaticSrpSelect = cms.int32(1),
0120 
0121     #Switch for automatic masking TCC input channels of SRP boards
0122     #if the correcponding ECAL FED is excluded from the run (online specific parameter)
0123     automaticMasks = cms.int32(1)
0124 )
0125 
0126 
0127 ## Changes settings to 2009 and 2010 beam ones:
0128 ##
0129 ## DCC ZS FIR weights.
0130 #process.writeInDB.dccNormalizedWeights = cms.vdouble(-1.1865, 0.0195, 0.2900, 0.3477, 0.3008, 0.2266)
0131 #
0132 ## Index of time sample (starting from 1) the first DCC weights is implied
0133 #process.writeInDB.ecalDccZs1stSample = cms.int32(3)
0134 #
0135 ## ZS energy threshold in GeV to apply to low interest channels of barrel
0136 #process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
0137 #process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(2.25*0.035)
0138 #
0139 ## ZS energy threshold in GeV to apply to low interest channels of endcap
0140 #process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
0141 #process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(3.75*0.06)
0142 
0143 
0144 ## Changes settings to 2011 beam ones:
0145 ## Index of time sample (starting from 1) the first DCC weights is implied
0146 #process.writeInDB.ecalDccZs1stSample = cms.int32(2)
0147 #
0148 ## ZS energy threshold in GeV to apply to low interest channels of barrel
0149 #process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
0150 #process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(2.25*0.035)
0151 #
0152 ## ZS energy threshold in GeV to apply to low interest channels of endcap
0153 #process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
0154 #process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(3.75*0.06)
0155 
0156 
0157 ## Changes settings to 2012 beam ones:
0158 ## Index of time sample (starting from 1) the first DCC weights is implied
0159 #process.writeInDB.ecalDccZs1stSample = cms.int32(2)
0160 #
0161 ## ZS energy threshold in GeV to apply to low interest channels of barrel
0162 #process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
0163 #process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(2.75*0.035)
0164 #
0165 ## ZS energy threshold in GeV to apply to low interest channels of endcap
0166 #process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
0167 #process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(6*0.06)
0168 
0169 # Changes settings to 2015 beam ones:
0170 # Index of time sample (starting from 1) the first DCC weights is implied
0171 #process.writeInDB.ecalDccZs1stSample = cms.int32(3)
0172 
0173 # ZS energy threshold in GeV to apply to low interest channels of barrel
0174 process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
0175 process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(0.1575)
0176 # 3.278 = noise increase vs ADC count = 1.1 , so in this case noise = 3.6 ADC counts
0177 # ZS energy threshold in GeV to apply to low interest channels of endcap
0178 process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
0179 process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(0.39)
0180 
0181 process.p = cms.Path(process.writeInDB)