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