--
PatrawanPasuwan - 2018-09-27
This twiki page contains details related to running the
Stop1L framework.
Setting up the framework
For release 21, see this
presentation. The presentation also contains instructions on doing clean build.
When logging back in to stop1l-xaod on your lxplus, do “source setup.sh” to setup the environment.
If you want to change the
AnalysisBase version, follow the following steps:
- Change 21.2.45 to 21.2.46 in SWup/share/SWupconfig.sh
- Delete the 'athena' directory and package_filters.txt file (use SUSYTools in AnalysisBase)
- Clean up the 'build' directory
- Inside the 'build' directory, do 'cmake ..' to generate makefiles
- Compile by doing 'make'
Plot configuration file
See
example-plot.py or
data_export.py for an example of the configuration file.
In case you need to apply the cuts, you could do so by following this example:
ntupleDir = '/eos/atlas/unpledged/group-tokyo/users/toyamaza/stop1L/ntuples/21.2.37/20180814/default/'
PlotConfig = { 'stack': [
S( ntupleDir + 'mc16a_ttbar', 't#bar{t} 2L', TColor.GetColor("#A5C6E8"), lumi= 3219.56 + 32988.1 , cut="tt_cat==0 || tt_cat==3 || tt_cat==6"),
S( ntupleDir + 'mc16a_ttbar', 't#bar{t} 1L1#tau', TColor.GetColor("#5E9AD6"), lumi= 3219.56 + 32988.1 , cut="tt_cat==2 || tt_cat==5"),
S( ntupleDir + 'mc16a_ttbar', 't#bar{t} 1L', TColor.GetColor("#0F75DB"), lumi= 3219.56 + 32988.1 , cut="tt_cat==1 || tt_cat==4 || tt_cat>=7"),
], }
The ttbar category can be found in
GetTTbarCategory.h.
Running plot.py with cuts and weight applied
Example:
plot.py --log -p conf.py -b "20,-3.2,3.2" --cut "(sf_total)*(n_lep==1 && stxe_trigger && met > 230e3 && fabs(dphi_jet1_ptmiss) > 0.4 && fabs(dphi_jet2_ptmiss) > 0.4 && lep_pt[0] > 25e3 && mt > 30e3 && n_jet >= 4 && mt2_tau > 80e3)" -o plots --name dphi_hadtop_leptop "ROOT::Math::VectorUtil::Phi_mpi_pi(hadtop_phi - leptop_phi)"
<span style="color: #630000; font-size: 15.859999656677246px; font-weight: bold; background-color: transparent; font-family: Verdana, Arial, Helvetica, sans-serif;">Making an ntuple</span>
See also the instructions on
stop1l-xaod > Wiki > First steps
The following is an example for making a ttbar ntuple from a file in mc16a dataset. Note that release 21.2.45 is buggy, so use 21.2.46.
A) Locally:
1. Download the ttbar sample from rucio.
lsetup rucio
voms-proxy-init -voms atlas
rucio download --nrandom 1 mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_SUSY5.e6337_e5984_s3126_r9364_r9315_p3563
This will download a random file from this dataset. Note that you need a
grid certificate in this step and make sure that you have already
extract your grid certificate so it can be used with voms-proxy-int.
2. Create a text file to store a FULL path to the file you have just downloaded. For expample, I created list.txt, which contains
/afs/cern.ch/user/p/papasuwa/phd/stop1l-xaod/datasets/mc16a_ttbar/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_SUSY5.e6337_e5984_s3126_r9364_r9315_p3563/DAOD_SUSY5.15189521._000003.pool.root.1
3. Run the setup-sample script
setup-sample.py -n mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_SUSY5.e6337_e5984_s3126_r9364_r9315_p3563 -f list.txt ttbar --type mc
This will create a root file in /samples/ttbar.
4. Make an ntuple from the sample
4.1 Do “run.py -c r21 ttbar”. This will create a root file in “output/r21/ttbar/“ which will be used to make an ntuple.
4.2 Do “export-sample.py -c r21 ttbar” to make an ntuple
B) On the grid:
1. Setup the sample
Get the list of sample names you want to run on from AMI or rucio and write them down on a text file. e.g. samplelist.txt = Diboson.txt Choose a name for the samples e.g. sample = mc16d_Diboson. You will use this name in the following steps. Run:
setup-sample.py --susy-tools susy_crosssections_13TeV.txt --grid --dq2 samplelist.txt sample
2. Submit to the grid.
For this, you need to have a configuration file with the information for your samples, usually use r21 for 1 lepton (default), ttvzll for 3 leptons.
Do "grid-submit.py -c config sample"
3. Retrieve from the grid.
Do "grid-retrieve.py -c config sample"
Optionally, you can also add the grid suffix (-g) to retrieve a specific set of samples, this can be done with the submission date e.g. -g 2018_10_22.
4. Export the samples. This step is necessary to be able to plot the samples.
Do "export-sample-multiTag.py -c config sample"
Running print-yields.py with cuts and weight applied
To get the yields run the following command:
print-yields.py -l Lumi -w weight*sf_total*weight_sherpa22_njets /path-to-sample-dir/ "cuts"
Example:
Lumi = 42480
/path-to-sample-dir/ = /eos/user/k/kastanas/data/stop/ttvzll/mc16d_ttV/
cuts = (mu_trigger||el_trigger)&&n_jet>=4&&n_bjet>=1&&n_lep==3&&isZee>=0
Important: Be careful not to add the weights in the cut & remember to add the "weight*", which is automatically applied in plot.py but needs to be manually added in print-yields.py
Running Yosse's signal optimization script
What does the script do?
...
How to get the scipt?
GitLab link :
https://gitlab.cern.ch/sandrean/stop1l_optimization
git clone ssh://git@gitlab.cern.ch:7999/sandrean/stop1l_optimization.git
asetup AnalysisBase,21.2.46
Before running the script
1. Check the configuration file
The configuration file tells the optimization script where to get the signal and background samples. For the background samples, they are in the public directory of Tomohiro. The signal sample is set to tN samples in Yosse's eos at the moment, which is not accessible without a permission from him. Don't forget the change the directory to use the signal sample of your interest. The DM signal samples from Michaela are located on /eos/user/m/miqueits/ttbarMET1L_ntuples/Moriond2017/DM_signals.
You can change how many iterations you want to run with and the number of minimal significant increase. The samller your signal is, the smaller minimal significant increase you should use.
Command to run the script
Run the script locally
python optimize.py -c config_full.py -n output_name
Or submit the job on condor
cd condor
./launchcondor config_full.py output_name
Weights applied
The sf_total variable contains the scale factors for the following effects:
- B-tagging
- Jet vertex tagger
- Photons
- Muons
- Electrons
- Pileup weight
MC production information
For full run2,
The MC16 campaign will form the basis for physics results from summer 2017 onwards.
Sub-campaign |
Data match |
Processing |
Description |
MC16a |
2015+2016 |
HITS+digi+reco |
matches 2015+2016 dataset + mu profile |
MC16b |
none |
digi+reco |
uses higher mu (30-70) for trigger and CP studies for 2017 data |
MC16c |
2017 |
HITS+digi+reco |
uses expected 2017 mu profile, geometry and trigger |
MC16d |
2017 |
digi+reco |
uses true 2017 mu profile |
MC16e |
2018 |
HITS+digi+reco |
uses expected 2018 mu profile and trigger |
MC16f |
2018 |
digi+reco |
uses true 2018 mu profile if required |
For final Run-2 results users will add MC16a, MC16c/d and MC16e, weighted by lum.
In our specific case, the latest tag used at the moment with the new SUSY5 processing is p3703.
Therefore, the samples that we should use are:
Request an access to Abisko
Follow the instructions on this link
https://www.hpc2n.umu.se/documentation/access-and-accounts/users. Do the registration via SWAMID. The project for Abisko is SNIC 2018/3-38. See
here for a documentation on using Abisko cluster SNIC 2018/3-38.
You need to generate another ssh key for using
GitLab framework on Abisko (if you have not done that already). To do so, follow this
GitLab link or this
GitHub link.
When using Abisko, you should have your working directory on 'nobackup'. For a quick start:
$ ssh prim@abisko.hpc2n.umu.se
$ cd /pfs/nobackup/home/p/prim/
$ export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
$ alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'
$ setupATLAS -c -slc6
$ lsetup root
$ lsetup python
Related links
1st PAR meeting
SUSY derivation framework
SUSY cross sections
DM signal cross sections
DirectStop1L twiki
Stop1L 2019 Moriond Twiki
Stop1L 2019 Moriond internal note on GitLab
Stop1L 2019 Moriond internal note on CDS
ATLAS SUSY summary plots
Stop1L 36fb-1 paper
Stop1L 36fb-1 support note
Other useful links
Grid Certificate
Remote Lxplus
ATLAS workbook glossary