Warning, /JetMETCorrections/Modules/test/README is written in an unsupported language. File is not indexed.
0001 1) Create the DB file. Make sure all of the names are consistent,
0002 as of this writing, Jec11_V12 is the latest.
0003
0004 cd JetMETCorrections/Modules/test
0005 cmsRun JetCorrectionDBWriter_cfg.py
0006 cmsRun JetCorrectionLocalDBReader_cfg.py
0007
0008
0009 This will print out a great deal of information for debugging purposes.
0010
0011
0012 2) Test the payloads for content:
0013
0014 cmsRun JetCorrectorDemoLocal_cfg.py
0015
0016
0017
0018 3) Get the templates for the dropbox scripts:
0019
0020 wget http://condb.web.cern.ch/condb/DropBoxOffline/templateForDropbox.txt
0021 wget http://condb.web.cern.ch/condb/DropBoxOffline/dropBoxOffline.sh
0022 wget http://condb.web.cern.ch/condb/DropBoxOffline/dropBoxOffline_test.sh
0023
0024 then
0025
0026 chmod +x dropBoxOffline.sh
0027 chmod +x dropBoxOffline_test.sh
0028
0029
0030 4) First upload to the "prep" testing drop-box. Modify the template to be this for testing:
0031
0032 destDB oracle://cms_orcoff_prep/CMS_COND_PHYSICSTOOLS
0033 tag TAGNAME
0034 inputtag PRODNAME
0035 since
0036 Timetype runnumber
0037 IOVCheck offline
0038 DuplicateTagHLT
0039 DuplicateTagEXPRESS
0040 DuplicateTagPROMPT
0041 usertext
0042
0043
0044
0045
0046
0047
0048
0049
0050 5) Check the payloads that are present in the created file, as of this writing, "Jec11_V12", but change
0051 to the latest tag as you've done above.
0052
0053 lxbuild150:$ cmscond_list_iov -c sqlite_file:Jec11_V12.db -a
0054 JetCorrectorParametersCollection_Jec11_V12_AK5Calo
0055 JetCorrectorParametersCollection_Jec11_V12_AK5PF
0056 JetCorrectorParametersCollection_Jec11_V12_AK5PFchs
0057 JetCorrectorParametersCollection_Jec11_V12_AK5JPT
0058 JetCorrectorParametersCollection_Jec11_V12_AK5TRK
0059 JetCorrectorParametersCollection_Jec11_V12_AK7Calo
0060 JetCorrectorParametersCollection_Jec11_V12_AK7PF
0061 JetCorrectorParametersCollection_Jec11_V12_AK7JPT
0062 JetCorrectorParametersCollection_Jec11_V12_KT4Calo
0063 JetCorrectorParametersCollection_Jec11_V12_KT4PF
0064 JetCorrectorParametersCollection_Jec11_V12_KT6Calo
0065 JetCorrectorParametersCollection_Jec11_V12_KT6PF
0066 JetCorrectorParametersCollection_Jec11_V12_IC5Calo
0067 JetCorrectorParametersCollection_Jec11_V12_IC5PF
0068
0069
0070
0071
0072
0073 6) Then check each of the payloads individually. There is a script to help you out called "testAllIOVs.py".
0074 Update the names to what you decided above. Output example:
0075
0076
0077 lxbuild150:$ python testAllIOVs.py
0078 Tag JetCorrectorParametersCollection_Jec11_V12_AK5Calo
0079 TimeType runnumber
0080 PayloadContainerName JetCorrectorParametersCollection
0081 since till payloadToken
0082 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000000]
0083 Total # of payload objects: 1
0084 Tag JetCorrectorParametersCollection_Jec11_V12_AK5PF
0085 TimeType runnumber
0086 PayloadContainerName JetCorrectorParametersCollection
0087 since till payloadToken
0088 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000001]
0089 Total # of payload objects: 1
0090 Tag JetCorrectorParametersCollection_Jec11_V12_AK5PFchs
0091 TimeType runnumber
0092 PayloadContainerName JetCorrectorParametersCollection
0093 since till payloadToken
0094 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000002]
0095 Total # of payload objects: 1
0096 Tag JetCorrectorParametersCollection_Jec11_V12_AK5JPT
0097 TimeType runnumber
0098 PayloadContainerName JetCorrectorParametersCollection
0099 since till payloadToken
0100 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000003]
0101 Total # of payload objects: 1
0102 Tag JetCorrectorParametersCollection_Jec11_V5_AK5TRK
0103 TimeType runnumber
0104 PayloadContainerName JetCorrectorParametersCollection
0105 since till payloadToken
0106 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000004]
0107 Total # of payload objects: 1
0108 Tag JetCorrectorParametersCollection_Jec11_V5_AK7Calo
0109 TimeType runnumber
0110 PayloadContainerName JetCorrectorParametersCollection
0111 since till payloadToken
0112 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000005]
0113 Total # of payload objects: 1
0114 Tag JetCorrectorParametersCollection_Jec11_V5_AK7PF
0115 TimeType runnumber
0116 PayloadContainerName JetCorrectorParametersCollection
0117 since till payloadToken
0118 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000006]
0119 Total # of payload objects: 1
0120 Tag JetCorrectorParametersCollection_Jec11_V5_AK7JPT
0121 TimeType runnumber
0122 PayloadContainerName JetCorrectorParametersCollection
0123 since till payloadToken
0124 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000007]
0125 Total # of payload objects: 1
0126 Tag JetCorrectorParametersCollection_Jec11_V5_KT4Calo
0127 TimeType runnumber
0128 PayloadContainerName JetCorrectorParametersCollection
0129 since till payloadToken
0130 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000008]
0131 Total # of payload objects: 1
0132 Tag JetCorrectorParametersCollection_Jec11_V5_KT4PF
0133 TimeType runnumber
0134 PayloadContainerName JetCorrectorParametersCollection
0135 since till payloadToken
0136 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-00000009]
0137 Total # of payload objects: 1
0138 Tag JetCorrectorParametersCollection_Jec11_V5_KT6Calo
0139 TimeType runnumber
0140 PayloadContainerName JetCorrectorParametersCollection
0141 since till payloadToken
0142 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-0000000A]
0143 Total # of payload objects: 1
0144 Tag JetCorrectorParametersCollection_Jec11_V5_KT6PF
0145 TimeType runnumber
0146 PayloadContainerName JetCorrectorParametersCollection
0147 since till payloadToken
0148 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-0000000B]
0149 Total # of payload objects: 1
0150 Tag JetCorrectorParametersCollection_Jec11_V5_IC5Calo
0151 TimeType runnumber
0152 PayloadContainerName JetCorrectorParametersCollection
0153 since till payloadToken
0154 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-0000000C]
0155 Total # of payload objects: 1
0156 Tag JetCorrectorParametersCollection_Jec11_V5_IC5PF
0157 TimeType runnumber
0158 PayloadContainerName JetCorrectorParametersCollection
0159 since till payloadToken
0160 1 4294967295 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000001-0000000D]
0161 Total # of payload objects: 1
0162
0163
0164
0165
0166
0167
0168
0169 7) Upload the payloads to the TEST dropbox:
0170 NOTE: For "V12", we're only updating the AK5 payloads but normally you do all of them.
0171
0172
0173 lxbuild150:$ cat uploadConstants.py
0174 #! /usr/bin/env python
0175 import os
0176 import re
0177 import sys
0178 import subprocess
0179
0180 #****************** template file **********************************
0181 templateFile = open('templateForDropbox.txt', 'r')
0182 fileContents = templateFile.read(-1)
0183 print '--------------- TEMPLATE : -----------------'
0184 print fileContents
0185 p1 = re.compile(r'TAGNAME')
0186 p2 = re.compile(r'PRODNAME')
0187
0188 #****************** definitions **********************************
0189 jec_type = 'JetCorrectorParametersCollection'
0190 ERA = 'Jec11_V12'
0191 ALGO_LIST = ['IC5Calo','IC5PF',
0192 'AK5Calo','AK5PF','AK5PFchs','AK5JPT','AK5TRK',
0193 'AK7Calo','AK7PF',
0194 'KT4Calo','KT4PF',
0195 'KT6Calo','KT6PF'
0196 ]
0197 #*********************************************************************
0198
0199 files = []
0200
0201
0202 ### L2+L3 Corrections
0203 for aa in ALGO_LIST: #loop for jet algorithms
0204
0205 s1 = jec_type + '_' + ERA + '_' + aa
0206 s2 = jec_type + '_' + ERA + '_' + aa
0207 k1 = p1.sub( s1, fileContents )
0208 k2 = p2.sub( s2, k1 )
0209 k2outfile = s2 + '.txt'
0210 print '--------------------------------------'
0211 print 'ORCOFF File for jet correction : ' + s2
0212 print 'Written to ' + k2outfile
0213 FILE = open(k2outfile,"w")
0214 FILE.write(k2)
0215 files.append( k2outfile )
0216
0217
0218
0219 for ifile in files :
0220 s = "./dropBoxOffline_test.sh "+ERA+".db " + ifile
0221 print s
0222 subprocess.call( ["./dropBoxOffline_test.sh", ERA+".db", ifile])
0223
0224
0225
0226
0227
0228 lxbuild150:$ uploadConstants.py
0229
0230
0231
0232
0233
0234
0235
0236 8) Now the files can be checked here:
0237
0238 http://condb.web.cern.ch/condb/DropBoxOffline/HTTPRequest_test.py
0239
0240
0241
0242 9) Check the uploaded test payloads. Be sure to change "Jec11_V12" to whatever you set above.
0243
0244 lxbuild150:$ cmscond_list_iov -c frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS -a | grep JetCorrectorParametersCollection_Jec11_V12
0245 JetCorrectorParametersCollection_Jec11_V12_AK5Calo
0246 JetCorrectorParametersCollection_Jec11_V12_AK5JPT
0247 JetCorrectorParametersCollection_Jec11_V12_AK5PF
0248 JetCorrectorParametersCollection_Jec11_V12_AK5PFchs
0249 JetCorrectorParametersCollection_Jec11_V12_AK5TRK
0250 JetCorrectorParametersCollection_Jec11_V12_AK7Calo
0251 JetCorrectorParametersCollection_Jec11_V12_AK7PF
0252 JetCorrectorParametersCollection_Jec11_V12_IC5Calo
0253 JetCorrectorParametersCollection_Jec11_V12_IC5PF
0254 JetCorrectorParametersCollection_Jec11_V12_KT4Calo
0255 JetCorrectorParametersCollection_Jec11_V12_KT4PF
0256 JetCorrectorParametersCollection_Jec11_V12_KT6Calo
0257 JetCorrectorParametersCollection_Jec11_V12_KT6PF
0258
0259
0260
0261
0262 10) Run on the uploaded test payloads. Again be sure to change the input tag name:
0263
0264 cmsRun JetCorrectorDemoPrep_cfg.py
0265
0266
0267
0268
0269
0270 11) Now we're ready to upload to the PRODUCTION account. So change the template to:
0271
0272 destDB oracle://cms_orcon_prod/CMS_COND_31X_PHYSICSTOOLS
0273 tag TAGNAME
0274 inputtag PRODNAME
0275 since
0276 Timetype runnumber
0277 IOVCheck offline
0278 DuplicateTagHLT
0279 DuplicateTagEXPRESS
0280 DuplicateTagPROMPT
0281 usertext
0282
0283
0284
0285
0286
0287
0288 12) Now change the "uploadConstants.py" script, and instead of calling "dropBoxOffline_test.sh" in the last line, call "dropBoxOffline.sh" instead.
0289
0290
0291 13) Check here to make sure they were uploaded correctly:
0292
0293 http://condb.web.cern.ch/condb/DropBoxOffline/HTTPRequest.py
0294
0295
0296 14) Then check to see if the payloads were uploaded. Either:
0297
0298 cmscond_list_iov -P /afs/cern.ch/cms/DB/conddb -c oracle://cms_orcoff_prod/CMS_COND_31X_PHYSICSTOOLS -a | grep Jec11_V12
0299
0300 or check
0301
0302 http://cms-conddb.cern.ch/payload_inspector/
0303
0304 The DBService is "offline production"
0305
0306 The account is "Physics Tools for 31x"
0307
0308 Then click "SUBMIT"
0309
0310
0311 15) Check that the right number of payloads was updated
0312
0313 cmscond_list_iov -P /afs/cern.ch/cms/DB/conddb -c oracle://cms_orcoff_prod/CMS_COND_31X_PHYSICSTOOLS -a | grep Jec11_V12 | wc -l
0314
0315 This should match the number sent to the ALCA list
0316
0317 16) Ask the ALCA L2's to create the global tag.
0318
0319
0320
0321 17) Check the global tags here:
0322
0323 http://cms-conddb.cern.ch/popcon/PopConRecentActivityRecorded.html
0324
0325
0326
0327 18) FOR HLT Only!
0328
0329 If you would like a new HLT global tag, you have to append the payloads to the existing
0330 ones.
0331
0332 Here is the documentation:
0333
0334 https://twiki.cern.ch/twiki/bin/viewauth/CMS/DropBoxOffline
0335
0336 For instance, we need tags for both HLT and express:
0337
0338 destDB oracle://cms_orcon_prod/CMS_COND_31X_PHYSICSTOOLS
0339 tag JetCorrectorParametersCollection_AK5Calo_v1_hlt
0340 inputtag JetCorrectorParametersCollection_Jec11_V1_AK5Calo
0341 since
0342 Timetype runnumber
0343 IOVCheck hlt
0344 DuplicateTagHLT
0345 DuplicateTagEXPRESS
0346 DuplicateTagPROMPT
0347 usertext
0348
0349 destDB oracle://cms_orcon_prod/CMS_COND_31X_PHYSICSTOOLS
0350 tag JetCorrectorParametersCollection_AK5Calo_v1_express
0351 inputtag JetCorrectorParametersCollection_Jec11_V1_AK5Calo
0352 since
0353 Timetype runnumber
0354 IOVCheck express
0355 DuplicateTagHLT
0356 DuplicateTagEXPRESS
0357 DuplicateTagPROMPT
0358 usertext
0359
0360
0361
0362
0363
0364 19) They will again show up here:
0365
0366 https://twiki.cern.ch/twiki/bin/viewauth/CMS/DropBoxOffline
0367
0368
0369
0370 20) Then check them as:
0371
0372 lxbuild150:$ cmscond_list_iov -P /afs/cern.ch/cms/DB/conddb -c
0373 oracle://cms_orcoff_prod/CMS_COND_31X_PHYSICSTOOLS -t
0374 JetCorrectorParametersCollection_AK5Calo_v1_hlt
0375 Tag JetCorrectorParametersCollection_AK5Calo_v1_hlt
0376 TimeType runnumber
0377 PayloadContainerName JetCorrectorParametersCollection
0378 since till payloadToken
0379 1 164601 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000008-0000003E]
0380 164602 4294967295
0381 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000008-00000067]
0382 Total # of payload objects: 2
0383 lxbuild150:$ cmscond_list_iov -P /afs/cern.ch/cms/DB/conddb -c
0384 oracle://cms_orcoff_prod/CMS_COND_31X_PHYSICSTOOLS -t
0385 JetCorrectorParametersCollection_AK5Calo_v1_express
0386 Tag JetCorrectorParametersCollection_AK5Calo_v1_express
0387 TimeType runnumber
0388 PayloadContainerName JetCorrectorParametersCollection
0389 since till payloadToken
0390 1 164601 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000008-0000003E]
0391 164602 4294967295
0392 [DB=00000000-0000-0000-0000-000000000000][CNT=JetCorrectorParametersCollection][CLID=8B390EB7-E018-28E3-3AE1-56A63E52AEEA][TECH=00000B01][OID=00000008-00000068]
0393 Total # of payload objects: 2
0394
0395
0396 21) Finally make a request for the IOV append to the alca conveners.