Skip to content

Commit 7fdaafa

Browse files
authored
Merge pull request #1 from jsturdy/simplified-workflow
Simplified workflow
2 parents 251655e + 6433826 commit 7fdaafa

7 files changed

Lines changed: 6704 additions & 18 deletions

File tree

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ignore everything
2+
*
3+
# Don't ignore subdirectories
4+
!*/
5+
# Don't ignore special files
6+
!*.gitignore
7+
!*.md
8+
!*.rst
9+
!LICENSE
10+
# Don't ignore source files, etc
11+
!*.C
12+
!*.cc
13+
!*.h
14+
!*.py
15+
!*.sh
16+
# Don't ignore build files
17+
!BuildFile.xml
18+
# Ignore __init__.py files
19+
__init__.py
20+
*.#*
21+
# Others to ignore

Analyzer/plugins/MakeZprimeMiniAodTreeHEEP.cc

Lines changed: 2077 additions & 0 deletions
Large diffs are not rendered by default.

Analyzer/plugins/MakeZprimeMiniAodTreeMC.cc

Lines changed: 2295 additions & 0 deletions
Large diffs are not rendered by default.

Analyzer/plugins/MakeZprimeMiniAodTreeMuon.cc

Lines changed: 2198 additions & 0 deletions
Large diffs are not rendered by default.

Analyzer/test/runMakeZprimeMiniAodTree_cfg.py

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
#==============================================================
2-
# Analysis code for Z' boson to dilepton analysis =
3-
# This python to run the tree producer code =
4-
# To run over MINIAOD MC or Data with fixed trigger =
5-
# Author: Sherif Elgammal =
6-
# 01/01/2016 =
7-
#==============================================================
81
import FWCore.ParameterSet.Config as cms
2+
from FWCore.ParameterSet.VarParsing import VarParsing
93
from RecoMuon.TrackingTools.MuonServiceProxy_cff import *
104
from PhysicsTools.PatAlgos.triggerLayer1.triggerProducer_cfi import *
115
#from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import *
6+
from PhysicsTools.SelectorUtils.tools.vid_id_tools import switchOnVIDElectronIdProducer
7+
from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDElectronSelection
8+
from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupAllVIDIdsInModule
9+
from PhysicsTools.SelectorUtils.tools.vid_id_tools import DataFormat
1210

1311
process = cms.Process("tree")
14-
process.load("RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi")
15-
process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
1612
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
1713
process.load('Configuration/Geometry/GeometryRecoDB_cff')
1814
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
@@ -24,17 +20,25 @@
2420
process.load("FWCore.MessageLogger.MessageLogger_cfi")
2521
#Track isolation correction
2622
process.load("TrackingTools.TransientTrack.TransientTrackBuilder_cfi")
27-
process.load("PhysicsTools.PatAlgos.slimming.packedCandidatesForTrkIso_cfi")
2823
process.load("PhysicsTools.PatAlgos.slimming.primaryVertexAssociation_cfi")
2924
process.load("RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi")
3025

26+
27+
#EGamma VID
28+
from PhysicsTools.SelectorUtils.tools.vid_id_tools import *
29+
dataFormat = DataFormat.MiniAOD
30+
switchOnVIDElectronIdProducer(process, dataFormat)
31+
32+
33+
34+
3135
process.options = cms.untracked.PSet(
3236
Rethrow = cms.untracked.vstring('ProductNotFound'),
3337
wantSummary = cms.untracked.bool(True)
3438
)
3539

3640
process.maxEvents = cms.untracked.PSet(
37-
input = cms.untracked.int32(-1),
41+
input = cms.untracked.int32(10000),
3842
SkipEvent = cms.untracked.vstring('ProductNotFound')
3943
)
4044

@@ -43,7 +47,15 @@
4347

4448
process.source = cms.Source("PoolSource",
4549
fileNames = cms.untracked.vstring(
46-
'/store/mc/RunIISpring16MiniAODv1/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/PUSpring16_80X_mcRun2_asymptotic_2016_v3_ext1-v1/20000/0017320C-7BFC-E511-9B2D-0CC47A4C8E34.root'
50+
51+
'/store/mc/RunIISpring16MiniAODv2/ZToEE_NNPDF30_13TeV-powheg_M_200_400/MINIAODSIM/PUSpring16RAWAODSIM_reHLT_80X_mcRun2_asymptotic_v14-v1/20000/0C242E56-BA3A-E611-9B2D-0242AC130004.root',
52+
53+
54+
55+
#'/store/data/Run2016B/DoubleEG/MINIAOD/03Feb2017_ver2-v2/50000/00054938-CEEA-E611-889E-0CC47A4D7650.root',
56+
#'/store/data/Run2016B/DoubleEG/MINIAOD/03Feb2017_ver2-v2/50000/001BC16F-90EA-E611-87E2-F04DA27540BB.root',
57+
#'/store/data/Run2016B/DoubleEG/MINIAOD/03Feb2017_ver2-v2/50000/001EB4EF-D3EA-E611-B94E-0CC47A4C8F26.root'
58+
4759
#'/store/data/Run2016G/SingleMuon/MINIAOD/23Sep2016-v1/90000/9695BF0B-8E97-E611-A1A4-00259044051C.root',
4860
#'/store/data/Run2016G/SingleMuon/MINIAOD/23Sep2016-v1/90000/1C603D88-C597-E611-A0BE-008CFAF2931E.root'
4961
)
@@ -64,22 +76,29 @@
6476
thresh = cms.untracked.double(0.25)
6577
)
6678
##################################################################
79+
#from HEEP.VID.tools import addHEEPV70ElesMiniAOD
80+
#addHEEPV70ElesMiniAOD(process,useStdName=True)
81+
82+
from HEEP.VID.tools import addHEEPV70ElesMiniAOD
83+
addHEEPV70ElesMiniAOD(process,useStdName=True)
84+
6785
#####################################################################
6886
# Global tag (data)
69-
#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
70-
#process.GlobalTag = GlobalTag(process.GlobalTag, '80X_dataRun2_2016SeptRepro_v4', '')
87+
from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
88+
process.GlobalTag = GlobalTag(process.GlobalTag, '80X_dataRun2_2016SeptRepro_v7', '')
7189

7290
# Global tag (MC)
73-
from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
74-
process.GlobalTag = GlobalTag(process.GlobalTag, '80X_mcRun2_asymptotic_2016_v3', '')
91+
#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
92+
#process.GlobalTag = GlobalTag(process.GlobalTag, '80X_mcRun2_asymptotic_2016_v3', '')
7593

76-
process.demo = cms.EDAnalyzer("MakeZprimeMiniAodTree",
77-
outputFile = cms.string('MC.root'),
94+
process.demo = cms.EDAnalyzer("MakeZprimeMiniAodTreeHEEPData",
95+
outputFile = cms.string('Data.root'),
7896
eleTrkPtIsoLabel = cms.InputTag("heepIDVarValueMaps","eleTrkPtIso"),
7997
scProducer = cms.InputTag("reducedEgamma:reducedSuperClusters"),
8098
vertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
8199
muons = cms.InputTag("slimmedMuons"),
82100
electrons = cms.InputTag("slimmedElectrons"),
101+
eles = cms.InputTag("slimmedElectrons"),
83102
taus = cms.InputTag("slimmedTaus"),
84103
photons = cms.InputTag("slimmedPhotons"),
85104
#jets = cms.InputTag("slimmedJetsCMSTopTagCHSPacked:SubJets"),
@@ -123,6 +142,7 @@
123142
#'pfCombinedMVABJetTags'
124143
),
125144

145+
#Analysis = cms.string('ZprimeToEE')
126146
Analysis = cms.string('ZprimeToMuMu')
127147
)
128148

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# `ZprimeDiLeptons`
2+
This package contains several pieces of code
3+
* `Analyzer`: Contains the code for creating the `ntuples` used for making plots
4+
5+
## Working with the `ZprimeDiLeptons` `ntuple` making code
6+
7+
### Obtaining the code and setting up a working release area
8+
(Currently tested and working with `CMSSW_8_0_25`, which is checked out as part of the script)
9+
```
10+
wget https://raw.githubusercontent.com/wsu-fnal-ci-analysis/ZprimeDiLeptons/<tag>/scripts/setup.sh
11+
cd <location where you want to set up the release>
12+
source setup.sh
13+
```

scripts/setup.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/sh
2+
3+
# usage() {
4+
# echo 'Usage : ./setup.sh -r<ROOT version> [-s<sub version for ROOT6>] -c<compiler>'
5+
# echo ' -r must be either 5 or 6'
6+
# echo ' -s must be either 6, 8, or 10 if -r is 6'
7+
# echo ' -c must be either gcc or clang'
8+
# kill -INT $$;
9+
# }
10+
11+
# while getopts "r:c:s:h" o; do
12+
# case "${o}" in
13+
# r)
14+
# local rootver=${OPTARG}
15+
# if [ "${rootver}" != "5" ] && [ "${rootver}" != "6" ]
16+
# then
17+
# echo "Invalid ROOT version specified\n"
18+
# usage
19+
# fi
20+
# ;;
21+
# s)
22+
# local subver=${OPTARG}
23+
# ;;
24+
# c)
25+
# local compiler=${OPTARG}
26+
# if [ "${compiler}" != "gcc" ] && [ "${compiler}" != "clang" ]
27+
# then
28+
# echo "Invalid compiler option\n"
29+
# usage
30+
# fi
31+
# ;;
32+
# h)
33+
# echo "Printing help"
34+
# usage
35+
# ;;
36+
# *)
37+
# echo "Unknown option"
38+
# usage
39+
# ;;
40+
# esac
41+
# done
42+
43+
# shift $((OPTIND-1))
44+
45+
echo cmsrel CMSSW_8_0_25
46+
echo cd CMSSW_8_0_25/src
47+
echo cmsenv
48+
echo git cms-init
49+
# brings in HEEP V70 into VID
50+
echo git cms-merge-topic Sam-Harper:HEEPV70VID_8010_ReducedCheckout
51+
# for other E/gamma IDs in VID if you wish to have them
52+
echo git cms-merge-topic ikrav:egm_id_80X_v3
53+
# only necessary to run HEEP V70 on AOD (it will crash if this is not present looking for puppi candidates
54+
echo git cms-merge-topic Sam-Harper:PackedCandNoPuppi
55+
# we need this for the mva weights which runs in VID regardless if you need it or not
56+
echo mkdir -p ../external/slc6_amd64_gcc530/data/RecoEgamma/ElectronIdentification/
57+
echo git clone git@github.com:cms-data/RecoEgamma-ElectronIdentification ../external/slc6_amd64_gcc530/data/RecoEgamma/ElectronIdentification/data
58+
# needed for HEEP modified electrons with value maps
59+
echo git clone -b HEEPV70 git@github.com:Sam-Harper/HEEP.git
60+
echo git cms-merge-topic Sam-Harper:NewEGModifiers_8010
61+
# the zprime selection code
62+
echo git clone https://github.com/cms-analysis/ZprimeDiLeptons

0 commit comments

Comments
 (0)