From aa13b6042987b0a13a688e6a58508ea2d5dde2a2 Mon Sep 17 00:00:00 2001 From: capalmer Date: Tue, 14 May 2019 22:59:16 +0200 Subject: [PATCH] add directory of just length scale scan files and run2016 config --- lsctools/config.py | 4 +++- run2016.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 run2016.py diff --git a/lsctools/config.py b/lsctools/config.py index 68ac41d..81ba0dd 100644 --- a/lsctools/config.py +++ b/lsctools/config.py @@ -4,7 +4,7 @@ options = {'nominalTitle': 'Nominal Position [#mum]'} EOSPATH = '/eos/cms/store/group' OUTPATH = dirname(__file__)+'/../results' -OWNPATH = '/afs/cern.ch/work/j/joknolle/store' +OWNPATH = '/eos/cms/store/user/capalmer/lengthScale' def PCC(): """Set common parameters of PCC data sets""" @@ -276,6 +276,8 @@ def PCC2016ReRecoJan2017(): '130_084911'), (5, 4, '213_002332'), (6, 1, \ '130_084929'), (7, 3, '213_002401'), (8, 1, \ '130_084943'))] + + options['fulltrees'] = ['/comm_luminosity/PCC/VdM/May2016Scans/PCC_Run2016B-17Jan2017-v1_ZeroBiasALL_LengthScale/'] options['minitrees'] = [s+'_FPix_Feb27' for s in options['fulltrees']] # options['dataset'] = ['2016_rereco_jan17', \ # '2016 ReReco Jan 2017'] diff --git a/run2016.py b/run2016.py new file mode 100644 index 0000000..016db0f --- /dev/null +++ b/run2016.py @@ -0,0 +1,23 @@ +from lsctools import config, prepare, gather, fit, plot, analyze + +# Load 2016 configuration +config.PCC2016ReRecoJan2017() + +# Find ROOT files belonging to LS scans +prepare.findRootFiles('fulltrees') + +for scan in config.options['scans']: + # Get vertex data from ROOT files + gather.vertexPositionPerBxStep(scan, all=True, alternative=True) + + # Fit vertex positions at each step with Gaussian + fit.vertexPosition(scan, all=True, alternative=True, fitmethod='L') + + # Create plots of vertex distribution at each step + plot.vertexPositionPerBxStep(scan, all=True, alternative=True, fit='L') + + # Analyze full scan + analyze.vertexPosition(scan, all=True, alternative=True, fitted='L') + + # Plot full scan results + plot.vertexPositionPerDirectionBx(scan, all=True, alternative=True, fitted='L')