Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:28

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 
0004 
0005 ################################################################
0006 #### This config is used to generate payload for PFCalibration 
0007 ################################################################
0008 
0009 
0010 process = cms.Process("myprocess")
0011 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
0012 process.load("CondCore.CondDB.CondDB_cfi")
0013 #process.CondDBCommon.connect = 'sqlite_file:PhysicsPerformance.db'
0014 
0015 
0016 
0017 
0018 process.maxEvents = cms.untracked.PSet(
0019     input = cms.untracked.int32(1)
0020 )
0021 process.source = cms.Source("EmptySource",
0022                             firstRun = cms.untracked.uint32(10)
0023                             )
0024 
0025 # process.PoolDBOutputService.DBParameters.messageLevel = 3
0026 
0027 
0028 process.mywriter = cms.EDAnalyzer(
0029   "ProducePFCalibrationObject",
0030   write = cms.untracked.bool(False),
0031   toWrite = cms.VPSet(
0032             cms.PSet(fType      = cms.untracked.string("PFfa_BARREL"),
0033                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0034                      limits     = cms.untracked.vdouble(0., 1000.),
0035                      parameters = cms.untracked.vdouble(-30.7141, 31.7583, 4.40594, 1.70914, 0.0613696, 0.000104857, -1.38927, -0.743082, )
0036                     ),
0037             cms.PSet(fType      = cms.untracked.string("PFfb_BARREL"),
0038                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0039                      limits     = cms.untracked.vdouble(0., 1000.),
0040                      parameters = cms.untracked.vdouble(2.25366, 0.537715, -4.81375, 12.109, 1.80577, 0.187919, -6.26234, -0.607392, )
0041                     ),
0042             cms.PSet(fType      = cms.untracked.string("PFfc_BARREL"),
0043                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0044                      limits     = cms.untracked.vdouble(0., 1000.),
0045                      parameters = cms.untracked.vdouble(1.5126, 0.855057, -6.04199, 2.08229, 0.592266, 0.0291232, 0.364802, -1.50142, )
0046                     ),
0047             cms.PSet(fType      = cms.untracked.string("PFfaEta_BARRELEH"),
0048                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])"),
0049                      limits     = cms.untracked.vdouble(0., 1000.),
0050                      parameters = cms.untracked.vdouble(0.0185555, -0.0470674, 396.959, )
0051                     ),
0052             cms.PSet(fType      = cms.untracked.string("PFfbEta_BARRELEH"),
0053                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])"),
0054                      limits     = cms.untracked.vdouble(0., 1000.),
0055                      parameters = cms.untracked.vdouble(0.0396458, 0.114128, 251.405, )
0056                     ),
0057             cms.PSet(fType      = cms.untracked.string("PFfaEta_BARRELH"),
0058                      formula    = cms.untracked.string("[0]+[1]*x"),
0059                      limits     = cms.untracked.vdouble(0., 1000.),
0060                      parameters = cms.untracked.vdouble(0.00434994, -5.16564e-06, )
0061                     ),
0062             cms.PSet(fType      = cms.untracked.string("PFfbEta_BARRELH"),
0063                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])"),
0064                      limits     = cms.untracked.vdouble(0., 1000.),
0065                      parameters = cms.untracked.vdouble(-0.0232604, 0.0937525, 34.9935, )
0066                     ),
0067 
0068             cms.PSet(fType      = cms.untracked.string("PFfa_ENDCAP"),
0069                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0070                      limits     = cms.untracked.vdouble(0., 1000.),
0071                      parameters = cms.untracked.vdouble(1.17227, 13.1489, -29.1672, 0.604223, 0.0426363, 3.30898e-15, 0.165293, -7.56786, )
0072                     ),
0073             cms.PSet(fType      = cms.untracked.string("PFfb_ENDCAP"),
0074                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0075                      limits     = cms.untracked.vdouble(0., 1000.),
0076                      parameters = cms.untracked.vdouble(-0.974251, 1.61733, 0.0629183, 7.78495, -0.774289, 7.81399e-05, 0.139116, -4.25551, )
0077                     ),
0078             cms.PSet(fType      = cms.untracked.string("PFfc_ENDCAP"),
0079                      formula    = cms.untracked.string("[0]+((([1]+([2]/sqrt(x)))*exp(-(x^[6]/[3])))-([4]*exp(-(x^[7]/[5]))))"),
0080                      limits     = cms.untracked.vdouble(0., 1000.),
0081                      parameters = cms.untracked.vdouble(1.01863, 1.29787, -3.97293, 21.7805, 0.810195, 0.234134, 1.42226, -0.0997326, )
0082                     ),
0083             cms.PSet(fType      = cms.untracked.string("PFfaEta_ENDCAPEH"),
0084                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])"),
0085                      limits     = cms.untracked.vdouble(0., 1000.),
0086                      parameters = cms.untracked.vdouble(0.0112692, -2.68063, 2.90973, )
0087                     ),
0088             cms.PSet(fType      = cms.untracked.string("PFfbEta_ENDCAPEH"),
0089                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])"),
0090                      limits     = cms.untracked.vdouble(0., 1000.),
0091                      parameters = cms.untracked.vdouble(-0.0192991, -0.265, 80.5502, )
0092                     ),
0093 
0094             cms.PSet(fType      = cms.untracked.string("PFfaEta_ENDCAPH"),
0095                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])+[3]*[3]*exp(-x*x/([4]*[4]))"),
0096                      limits     = cms.untracked.vdouble(0., 1000.),
0097                      parameters = cms.untracked.vdouble(-0.0106029, -0.692207, 0.0542991, -0.171435, -61.2277, )
0098                     ),
0099             cms.PSet(fType      = cms.untracked.string("PFfbEta_ENDCAPH"),
0100                      formula    = cms.untracked.string("[0]+[1]*exp(-x/[2])+[3]*[3]*exp(-x*x/([4]*[4]))"),
0101                      limits     = cms.untracked.vdouble(0., 1000.),
0102                      parameters = cms.untracked.vdouble(0.0214894, -0.266704, 5.2112, 0.303578, -104.367, )
0103                     ),
0104 #########################################################################################################
0105             cms.PSet(fType      = cms.untracked.string("PFfcEta_BARRELH"),
0106                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0107                      limits     = cms.untracked.vdouble(0., 1000.),
0108                      parameters = cms.untracked.vdouble(0., 2., 0., 1., )
0109                     ),
0110             cms.PSet(fType      = cms.untracked.string("PFfcEta_ENDCAPH"),
0111                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0112                      limits     = cms.untracked.vdouble(0., 1000.),
0113                      parameters = cms.untracked.vdouble(0., 0., 0.05, 0., )
0114                     ),
0115             cms.PSet(fType      = cms.untracked.string("PFfdEta_ENDCAPH"),
0116                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0117                      limits     = cms.untracked.vdouble(0., 1000.),
0118                      parameters = cms.untracked.vdouble(1.5, 4., -1.1, 1., )
0119                     ),
0120             cms.PSet(fType      = cms.untracked.string("PFfcEta_BARRELEH"),
0121                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0122                      limits     = cms.untracked.vdouble(0., 1000.),
0123                      parameters = cms.untracked.vdouble(0., 2., 0., 1., )
0124                     ),
0125             cms.PSet(fType      = cms.untracked.string("PFfcEta_ENDCAPEH"),
0126                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0127                      limits     = cms.untracked.vdouble(0., 1000.),
0128                      parameters = cms.untracked.vdouble(0., 0., 0., 0., )
0129                     ),
0130             cms.PSet(fType      = cms.untracked.string("PFfdEta_ENDCAPEH"),
0131                      formula    = cms.untracked.string("[3]*((x-[0])^[1])+[2]"),
0132                      limits     = cms.untracked.vdouble(0., 1000.),
0133                      parameters = cms.untracked.vdouble(1.5, 2., 0.6, 1., )
0134                     ),
0135             
0136             ),
0137 
0138 
0139   read = cms.untracked.bool(True),
0140   toRead = cms.untracked.vstring("PFfa_BARREL",
0141                                  "PFfb_BARREL",
0142                                  "PFfc_BARREL",
0143                                  "PFfa_ENDCAP",
0144                                  "PFfb_ENDCAP",
0145                                  "PFfc_ENDCAP",
0146                                  #### New Functions
0147                                  "PFfaEta_BARRELEH",
0148                                  "PFfbEta_BARRELEH",
0149                                  "PFfaEta_ENDCAPEH",
0150                                  "PFfbEta_ENDCAPEH",
0151                                  "PFfaEta_BARRELH",
0152                                  "PFfbEta_BARRELH",
0153                                  "PFfaEta_ENDCAPH",
0154                                  "PFfbEta_ENDCAPH",
0155                                  #### Left older functions untouched for backward compatibility
0156                                  "PFfaEta_BARREL",
0157                                  "PFfbEta_BARREL",
0158                                  "PFfaEta_ENDCAP",
0159                                  "PFfbEta_ENDCAP",
0160                                  
0161                                  #### New functions by Bhumika on September 2018
0162 
0163                                  "PFfcEta_BARRELH",
0164                                  "PFfcEta_ENDCAPH",
0165                                  "PFfdEta_ENDCAPH",
0166                                  "PFfcEta_BARRELEH",
0167                                  "PFfcEta_ENDCAPEH",
0168                                  "PFfdEta_ENDCAPEH",
0169 
0170 
0171                                  ) # same strings as fType
0172 )
0173 
0174 
0175 process.p = cms.Path(process.mywriter)
0176 
0177 from CondCore.DBCommon.CondDBCommon_cfi import CondDBCommon
0178 CondDBCommon.connect = "sqlite_file:PFCalibration.db"
0179 
0180 
0181 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0182                                   CondDBCommon,
0183                                   toPut = cms.VPSet(cms.PSet(record = cms.string('PFCalibrationRcd'),
0184                                                              tag = cms.string('PFCalibration_v10_mc'),
0185                                                              timetype   = cms.untracked.string('runnumber')
0186                                                              )
0187                                                              ),
0188                                   loadBlobStreamer = cms.untracked.bool(False),
0189                                   #    timetype   = cms.untracked.string('lumiid')
0190                                   #    timetype   = cms.untracked.string('runnumber')
0191                                   )
0192 
0193 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0194 #process.GlobalTag.globaltag = '90X_upgrade2017_realistic_v20'
0195 #process.GlobalTag.connect   = 'sqlite_file:/afs/cern.ch/user/c/cerminar/public/Alca/GlobalTag/GR_R_311_V2.db'
0196 process.GlobalTag.globaltag = '103X_upgrade2018_realistic_v8'
0197 
0198 process.GlobalTag.toGet = cms.VPSet(
0199     cms.PSet(record = cms.string("PFCalibrationRcd"),
0200              tag = cms.string("PFCalibration_v10_mc"),
0201              connect = cms.string("sqlite_file:PFCalibration.db")
0202              #connect = cms.untracked.string("sqlite_file:PFCalibration.db")
0203              )
0204     )