-
Notifications
You must be signed in to change notification settings - Fork 8
2017F Alignment notes
First we need a GPR. To make a GPR, Sasha requires a GT (1), a JSON file of runs (2), and a CMSSW release (3).
To get the GT, look at the latest approved Tracker tag for the period (in this case 2017F) Can find this on indico: ask Luca
Then look up the GT which has a latest IOV that matches the tracker tag.
For 2017F, we’ll use 94X_dataRun2_ReReco_EOY17_v4 (1) Then take the run numbers corresponding to the IOV we want. For 2017F, we want 304911 to 305898 (check plot in slides) ask Luca
Then find an existing JSON file which is a superset of these IOV: Rereco JSON:
https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/Collisions17/13TeV/ReReco/
Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt
will work wget this file into lxplus environment
Trim the JSON file to just have the IOV’s we want; 304911-305898 Use brilcalc to check the integrated luminosity: You may need to install brilcalc first:
brilcalc lumi -b "STABLE BEAMS" -i Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt --normtag /afs/cern.ch/user/l/lumipro/public/normtag_file/normtag_DATACERT.json -u /fb
Doing brilcalc reveals that this JSON as it stands contains 9 fb-1, which is too much, so trim the JSON even more by trial-and-error (down to around 4 to 5 fb-1)
Rename the JSON file appropriately with the runs we actually picked, e.g.
Cert_304911-305350_13TeV_EOY2017ReReco_Collisions17_JSON.txt (2)
Now we have the GT (1) and JSON (2) to provide. We note that the GT is for 9_4_0 so we ask Sasha to use the 9_4_0 release (3). Email him asking to provide a GPR given these requirements. Appreciate Sasha.
Create_InputListy.py requires a JSON file, a .list file (full of paths to ROOT files on DAS), and an Outname First we need to make a .list file.
eos find /store/data/Run2017F/SingleMuon/ALCARECO/MuAlCalIsolatedMu-PromptReco-v1/ | grep root > input_files.list
Rename the input_files.list appropriately for bookkeeping:
SingleMuon_ALCARECO_MuAlCalIsolatedMu_PromptReco_304911-305350_2017F.list
→ then put this name into Create_InputList.py, sans “.list” at the end Put the name of our trimmed JSON in Create_InputList.py Make an appropriate outname like SingleMuon_ALCARECO_MuAlCalIsolatedMu_PromptReco_304911-305350.py
JSON + filelist = ~6 fb^-1 in 2017F File list:
/afs/cern.ch/work/a/adthomps/public/SingleMuon_ALCARECO_MuAlCalIsolatedMu_PromptReco_304911-305350.py
JSON:
/afs/cern.ch/work/a/adthomps/public/Cert_304911-305350_13TeV_EOY2017ReReco_Collisions17_JSON.txt
Using 9_4_4 and 9_4_0 alignment code File list:
/afs/cern.ch/work/a/adthomps/public/SingleMuon_ALCARECO_MuAlCalIsolatedMu_PromptReco_304911-305350.py
JSON:
/afs/cern.ch/work/a/adthomps/public/Cert_304911-305350_13TeV_EOY2017ReReco_Collisions17_JSON.txt
GPR:
/afs/cern.ch/user/s/spiridon/public/gpr2018/GPR_Mar2_2018_SW944_run304911-305350_dL4_iter1.db
Previous Alignment (DT):
/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONALIGN/www/muonGeometries/2017-11_data_ALCARECO_AlignmentWithRun2017BF/data_DT-1100-111111_2017part2*
Previous Alignment (CSC):
/afs/cern.ch/cms/CAF/CMSALCA/ALCA_MUONALIGN/www/muonGeometries/2017-11_data_ALCARECO_AlignmentWithRun2017BF/data_CSC-1100-110001_2017Bpart2IOV*
GT:
94X_dataRun2_ReReco_EOY17_v4
Tracker RCD, APE, template, deformation not needed as GT has what we need!
To change tracker alignment if needed: run in CMSSW with alignment:
cat gather_cfg.py | grep \#
# for json support
try: # FUTURE: Python 2.6, prior to 2.6 requires simplejson
# optionally: create ntuples along with tmp files
# optionally: create a ntuple with MapPlot plugin
# optionally do selective DT or CSC alignment
# optionally use JSON file for good limi mask
#json_file = 'Cert_136035-144114_7TeV_StreamExpress_Collisions10_JSON.txt'
#print "Run: ",run,"- This lumi starts at ", lsrange[0], " previous ended at ", prevblock[1]+1, " so I should merge"
#add TrackDetectorAssociator lookup maps to the EventSetup
# TODO : uncomment the line below when AlignmentProducer is updated:
#process.looper.muonCollectionTag = cms.InputTag(muonCollectionTag)
#process.looper.algoConfig.createNtuple = createAlignNtuple
##T0 Correction on DT need GlobalMuons to be reconstructed
if len(muonCollectionTag) > 0: # use Tracker Muons
#else: #beginning 2016-rereco (ALL in 80X_dataRun2_2016LegacyRepro_Candidate_v0)
# process.GlobalTag.toGet = cms.VPSet(
# cms.PSet(record = cms.string("TrackerAlignmentRcd"),
# tag = cms.string("TrackerAlignment_EOY16_sm1959"),
# connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
# ),
### cms.PSet(record = cms.string("TrackerAlignmentErrorExtendedRcd"),
### tag = cms.string("TrackerAlignmentExtendedErrors_MP_Run2016B"),
### connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
### ),
# cms.PSet(record = cms.string("SiPixelTemplateDBObjectRcd"),
# tag = cms.string("SiPixelTemplateDBObject_38T_v10_offline"),
# connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
# ),
# cms.PSet(record = cms.string("TrackerSurfaceDeformationRcd"),
# tag = cms.string("TrackerSurfaceDeformations_EOY16_mp2269"),
# connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
# )
# )
###Option 1: condb: look for tag pointed to by Tracker Alignment people e.g. https://cms-conddb.cern.ch/cmsDbBrowser/list/Prod/tags/TrackerAlignment_v21_offline
See: IOV for that tag and the IOV we are running over Opdo condDB copy for db for that tag:
conddb copy TrackerAlignment_v21_offline TrackerAlignment_v21_17F --destdb TrackerAlignment_17F.db --from 304911 --to 304912
conddb copy <inputtag> <nameyou want/not same as tag> --destdb <arb_name>.db --from 304911 --to 304912
To check tag(s) of copied db:
conddb --db TrackerAlignment_17F.db listTags
Input example:
# cms.PSet(record = cms.string("TrackerAlignmentRcd"),
# tag = cms.string("TrackerAlignment_v21_17F"),
# connect = cms.string('sqlite:_file:TrackerAlignment_17F.db')
# ),
###Option 2: Point directly to tag in condDB (can't specify IOV?) Maybe only useful for MC. (Ryan's comment)
# cms.PSet(record = cms.string("TrackerAlignmentRcd"),
# tag = cms.string("TrackerAlignment_v21_offline"),
# connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS')
# ),
##run alignment:
Example creatJobs line:
./createJobs.py data_CSC-1100-100001_2017F_CMSSW925p2_SingMu_MuAlCalIsoMuv1_94X_dataRun2_ReReco_EOY17_v4_ 1 data_CSC-1100-110001_2017Bpart2IOV_CMSSW940pre3_SingMu_MuAlCalIsoMu_94XRereco17_01.db SingleMuon_ALCARECO_MuAlCalIsolatedMu_PromptReco_304911-305350.py --json Cert_304911-305350_13TeV_EOY2017ReReco_Collisions17_JSON.txt --inputInBlocks -s data_CSC-1100-100001_2017F_CMSSW925p2_SingMu_MuAlCalIsoMuv1_94X_dataRun2_ReReco_EOY17_v4.sh --validationLabel data_CSC-1100-100001_2017F_CMSSW925p2_SingMu_MuAlCalIsoMuv1_94X_dataRun2_ReReco_EOY17_v4 --b --user_mail youremail --minTrackPt 30 --maxTrackPt 200 --maxDxy 0.2 --minNCrossedChambers 1 --residualsModel pureGaussian --peakNSigma 1.6 --station123params 111111 --station4params 101111 --cscparams 110001 --useResiduals 1100 --mapplots --curvatureplots --segdiffplots --extraPlots --globalTag 94X_dataRun2_ReReco_EOY17_v4 --createAlignNtuple --noCleanUp --noDT --gprcdconnect sqlite_file:GPR_Mar2_2018_SW944_run304911-305350_dL4_iter1.db --gprcd IdealGeometry --is_Alca