CMS 3D CMS Logo

srCondWrite_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("ProcessOne")
4 process.load("CondCore.CondDB.CondDB_cfi")
5 process.CondDB.connect = 'sqlite_file:EcalSRSettings_beam2016_option1_v1_mc.db'
6 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
7 #process.CondDBCommon.connect = 'sqlite_file:EcalSRSettings_beam2015_option1_v00_mc.db'
8 #process.CondDBCommon.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
9 
10 process.MessageLogger = cms.Service("MessageLogger",
11  debugModules = cms.untracked.vstring('*'),
12  destinations = cms.untracked.vstring('cout')
13  )
14 
15 process.source = cms.Source("EmptyIOVSource",
16  firstValue = cms.uint64(1),
17  lastValue = cms.uint64(1),
18  timetype = cms.string('runnumber'),
19  interval = cms.uint64(1)
20  )
21 
22 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
23  process.CondDB,
24 # process.CondDBCommon,
25  toPut = cms.VPSet(cms.PSet(
26  record = cms.string('EcalSRSettingsRcd'),
27  tag = cms.string('EcalSRSettings_beam2016_option1_v1_mc')
28  ))
29 )
30 
31 process.writeInDB = cms.EDAnalyzer("EcalSRCondTools",
32 # mode = cms.string("combine_config"), #Gets config from EcalSRCondTools module parameters,
33  #use values from onlineSrpConfigFile for the configuration
34  #not defined as module parameters. Values from module parameters
35  #take the precedence.
36 
37  mode = cms.string("python_config"), #configuration read from EcalSRCondTools module parameters (e.g. to produce MC config.)
38 
39 # mode = cms.string("online_config"), #import online SRP config from onlineSrpConfigFile file and bxGlobalOffset,
40  #automaticSrpSelect, automaticMasks parameters
41 
42 
43  onlineSrpConfigFile = cms.string("srp.cfg"),
44 
45  # Neighbour eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)
46  deltaEta = cms.int32(1),
47 
48  # Neighbouring eta range, neighborhood: (2*deltaEta+1)*(2*deltaPhi+1)
49  deltaPhi = cms.int32(1),
50 
51  # Index of time sample (staring from 1) the first DCC weights is implied
52  ecalDccZs1stSample = cms.int32(2),
53 
54  # ADC to GeV conversion factor used in ZS filter for EB
55  ebDccAdcToGeV = cms.double(0.035),
56 
57  # ADC to GeV conversion factor used in ZS filter for EE
58  eeDccAdcToGeV = cms.double(0.06),
59 
60  #DCC ZS FIR weights: weights are rounded in such way that in Hw
61  #representation (weigth*1024 rounded to nearest integer) the sum is null:
62  dccNormalizedWeights = cms.vdouble(-0.374, -0.374, -0.3629, 0.2721, 0.4681,
63  0.3707),
64 
65  # Switch to use a symetric zero suppression (cut on absolute value). For
66  # studies only, for time being it is not supported by the hardware.
67  symetricZS = cms.bool(False),
68 
69  # ZS energy threshold in GeV to apply to low interest channels of barrel
70  srpBarrelLowInterestChannelZS = cms.double(0.1),
71 
72  # ZS energy threshold in GeV to apply to low interest channels of endcap
73  srpEndcapLowInterestChannelZS = cms.double(0.3),
74 
75  # ZS energy threshold in GeV to apply to high interest channels of barrel
76  srpBarrelHighInterestChannelZS = cms.double(-1.e9),
77 
78  # ZS energy threshold in GeV to apply to high interest channels of endcap
79  srpEndcapHighInterestChannelZS = cms.double(-1.e9),
80 
81  #switch to run w/o trigger primitive. For debug use only
82  trigPrimBypass = cms.bool(False),
83 
84  # Mode selection for "Trig bypass" mode
85  # 0: TT thresholds applied on sum of crystal Et's
86  # 1: TT thresholds applies on compressed Et from Trigger primitive
87  # @ee trigPrimByPass_ switch
88  trigPrimBypassMode = cms.int32(0),
89 
90  #for debug mode only:
91  trigPrimBypassLTH = cms.double(1.0),
92 
93  #for debug mode only:
94  trigPrimBypassHTH = cms.double(1.0),
95 
96  #for debug mode only
97  trigPrimBypassWithPeakFinder = cms.bool(True),
98 
99  #Trigger Tower Flag to use when a flag is not found from the input
100  #Trigger Primitive collection. Must be one of the following values:
101  # 0: low interest, 1: mid interest, 3: high interest
102  # 4: forced low interest, 5: forced mid interest, 7: forced high interest
103  defaultTtf = cms.int32(4),
104 
105  # SR->action flag map
106  actions = cms.vint32(1, 3, 3, 3, 5, 7, 7, 7),
107 
108  #Bx offset common to every SRP card. used in both write mdes
109  #called SRP0BUNCHADJUSTPOSITION in online configuration database
110  bxGlobalOffset = cms.int32(3447),
111 
112  #Switch for selecion of SRP board to controls base on
113  #the list of ECAL FEDs included in the run (online specific parameter)
114  automaticSrpSelect = cms.int32(1),
115 
116  #Switch for automatic masking TCC input channels of SRP boards
117  #if the correcponding ECAL FED is excluded from the run (online specific parameter)
118  automaticMasks = cms.int32(1)
119 )
120 
121 
122 ## Changes settings to 2009 and 2010 beam ones:
123 
137 
138 
139 ## Changes settings to 2011 beam ones:
140 ## Index of time sample (starting from 1) the first DCC weights is implied
141 #process.writeInDB.ecalDccZs1stSample = cms.int32(2)
142 #
143 ## ZS energy threshold in GeV to apply to low interest channels of barrel
144 #process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
145 #process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(2.25*0.035)
146 #
147 ## ZS energy threshold in GeV to apply to low interest channels of endcap
148 #process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
149 #process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(3.75*0.06)
150 
151 
152 ## Changes settings to 2012 beam ones:
153 ## Index of time sample (starting from 1) the first DCC weights is implied
154 #process.writeInDB.ecalDccZs1stSample = cms.int32(2)
155 #
156 ## ZS energy threshold in GeV to apply to low interest channels of barrel
157 #process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
158 #process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(2.75*0.035)
159 #
160 ## ZS energy threshold in GeV to apply to low interest channels of endcap
161 #process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
162 #process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(6*0.06)
163 
164 # Changes settings to 2015 beam ones:
165 # Index of time sample (starting from 1) the first DCC weights is implied
166 #process.writeInDB.ecalDccZs1stSample = cms.int32(3)
167 
168 # ZS energy threshold in GeV to apply to low interest channels of barrel
169 process.writeInDB.ebDccAdcToGeV = cms.double(0.035)
170 process.writeInDB.srpBarrelLowInterestChannelZS = cms.double(0.1575)
171 # 3.278 = noise increase vs ADC count = 1.1 , so in this case noise = 3.6 ADC counts
172 # ZS energy threshold in GeV to apply to low interest channels of endcap
173 process.writeInDB.eeDccAdcToGeV = cms.double(0.06)
174 process.writeInDB.srpEndcapLowInterestChannelZS = cms.double(0.39)
175 
176 process.p = cms.Path(process.writeInDB)