Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for Tau-embedded samples #18

Open
wants to merge 6 commits into
base: HTT_skim_v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions NanoProd/crab/Run2_2016/Embedded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
config:
params:
sampleType: data
kandrosov marked this conversation as resolved.
Show resolved Hide resolved
era: Run2_2016
storeFailed: False
customise: NanoProd/NanoProd/customize.customizeEmbedding
PFNSprefix: root://cmsxrootd-kit.gridka.de/
inputDBS: phys03

Embed_MuTau_Run2017F: /EmbeddingRun2016_F/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017G: /EmbeddingRun2016_G/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017H: /EmbeddingRun2016_H/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElTau_Run2017F: /EmbeddingRun2016_F/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017G: /EmbeddingRun2016_G/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017H: /EmbeddingRun2016_H/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_TauTau_Run2017F: /EmbeddingRun2016_F/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017G: /EmbeddingRun2016_G/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017H: /EmbeddingRun2016_H/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElMu_Run2017F: /EmbeddingRun2016_F/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017G: /EmbeddingRun2016_G/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017H: /EmbeddingRun2016_H/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
32 changes: 32 additions & 0 deletions NanoProd/crab/Run2_2016_HIPM/Embedded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
config:
params:
sampleType: data
era: Run2_2016_HIPM
storeFailed: False
customise: NanoProd/NanoProd/customize.customizeEmbedding
PFNSprefix: root://cmsxrootd-kit.gridka.de/
inputDBS: phys03

Embed_MuTau_Run2016B: /EmbeddingRun2016-HIPM_B_ver2/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2016C: /EmbeddingRun2016-HIPM_C/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2016D: /EmbeddingRun2016-HIPM_D/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2016E: /EmbeddingRun2016-HIPM_E/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2016F: /EmbeddingRun2016-HIPM_F/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElTau_Run2016B: /EmbeddingRun2016-HIPM_B_ver2/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2016C: /EmbeddingRun2016-HIPM_C/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2016D: /EmbeddingRun2016-HIPM_D/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2016E: /EmbeddingRun2016-HIPM_E/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2016F: /EmbeddingRun2016-HIPM_F/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_TauTau_Run2016B: /EmbeddingRun2016-HIPM_B_ver2/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2016C: /EmbeddingRun2016-HIPM_C/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2016D: /EmbeddingRun2016-HIPM_D/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2016E: /EmbeddingRun2016-HIPM_E/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2016F: /EmbeddingRun2016-HIPM_F/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElMu_Run2016B: /EmbeddingRun2016-HIPM_B_ver2/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2016C: /EmbeddingRun2016-HIPM_C/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2016D: /EmbeddingRun2016-HIPM_D/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2016E: /EmbeddingRun2016-HIPM_E/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2016F: /EmbeddingRun2016-HIPM_F/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
32 changes: 32 additions & 0 deletions NanoProd/crab/Run2_2017/Embedded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
config:
params:
sampleType: data
era: Run2_2017
storeFailed: False
customise: NanoProd/NanoProd/customize.customizeEmbedding
PFNSprefix: root://cmsxrootd-kit.gridka.de/
inputDBS: phys03

Embed_MuTau_Run2017B: /EmbeddingRun2017B/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017C: /EmbeddingRun2017C/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017D: /EmbeddingRun2017D/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017E: /EmbeddingRun2017E/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2017F: /EmbeddingRun2017F/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElTau_Run2017B: /EmbeddingRun2017B/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017C: /EmbeddingRun2017C/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017D: /EmbeddingRun2017D/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017E: /EmbeddingRun2017E/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2017F: /EmbeddingRun2017F/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_TauTau_Run2017B: /EmbeddingRun2017B/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017C: /EmbeddingRun2017C/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017D: /EmbeddingRun2017D/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017E: /EmbeddingRun2017E/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2017F: /EmbeddingRun2017F/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElMu_Run2017B: /EmbeddingRun2017B/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017C: /EmbeddingRun2017C/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017D: /EmbeddingRun2017D/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017E: /EmbeddingRun2017E/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2017F: /EmbeddingRun2017F/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
28 changes: 28 additions & 0 deletions NanoProd/crab/Run2_2018/Embedded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
config:
params:
sampleType: data
era: Run2_2018
storeFailed: False
customise: NanoProd/NanoProd/customize.customizeEmbedding
PFNSprefix: root://cmsxrootd-kit.gridka.de/
inputDBS: phys03

Embed_MuTau_Run2018A: /EmbeddingRun2018A/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2018B: /EmbeddingRun2018B/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2018C: /EmbeddingRun2018C/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_MuTau_Run2018D: /EmbeddingRun2018D/MuTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElTau_Run2018A: /EmbeddingRun2018A/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2018B: /EmbeddingRun2018B/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2018C: /EmbeddingRun2018C/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElTau_Run2018D: /EmbeddingRun2018D/ElTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_TauTau_Run2018A: /EmbeddingRun2018A/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2018B: /EmbeddingRun2018B/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2018C: /EmbeddingRun2018C/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_TauTau_Run2018D: /EmbeddingRun2018D/TauTauFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER

Embed_ElMu_Run2018A: /EmbeddingRun2018A/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2018B: /EmbeddingRun2018B/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2018C: /EmbeddingRun2018C/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
Embed_ElMu_Run2018D: /EmbeddingRun2018D/ElMuFinalState-inputDoubleMu_106X_ULegacy_miniAOD-v1/USER
37 changes: 37 additions & 0 deletions NanoProd/python/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,40 @@ def customize(process):
process = customizeGenParticles(process)
process = customizeTaus(process)
return process

def customizeEmbedding(process):
process.nanoAOD_step = cms.Path( cms.Sequence( process.nanoSequenceCommon + process.nanoSequenceOnlyData + process.nanoSequenceOnlyFullSim + cms.Sequence(cms.Task(process.genParticleTask, process.particleLevelTask, process.jetMCTaskak4, process.muonMCTask, process.electronMCTask, process.photonMCTask, process.tauMCTask, process.boostedTauMCTask, process.ttbarCatMCProducersTask, process.globalTablesMCTask, process.genWeightsTableTask, process.genVertexTablesTask, process.genParticleTablesTask, process.particleLevelTablesTask)) ) )

process.linkedObjects.lowPtElectrons = cms.InputTag("finalElectrons")
process.jetMCTaskak4.remove(process.genJetFlavourTable)
process.nanoSequenceCommon.remove(process.lowPtElectronTablesTask)
process.globalTablesMCTask.remove(process.genFilterTable)

# Get embedded data
process.unpackedPatTrigger.triggerResults = cms.InputTag("TriggerResults::SIMembeddingHLT")
process.NANOAODSIMoutput.outputCommands.append("keep edmTriggerResults_*_*_SIMembeddingHLT")
process.NANOAODSIMoutput.outputCommands.append("keep edmTriggerResults_*_*_MERGE")
process.NANOAODSIMoutput.outputCommands.remove("keep edmTriggerResults_*_*_*")
process.genParticles2HepMC.genEventInfo = cms.InputTag("generator", "", "SIMembeddingpreHLT")
process.puppiMetTable.src = cms.InputTag("slimmedMETsPuppi", "", "RERUNPUPPI")
process.rawPuppiMetTable.src = cms.InputTag("slimmedMETsPuppi", "", "RERUNPUPPI")
process.updatedJetsPuppi.jetSource = cms.InputTag("slimmedJetsPuppi", "", "MERGE")
process.jetPuppiCorrFactorsNano.src = cms.InputTag("slimmedJetsPuppi", "", "MERGE")

# Add HF jet shape info (https://github.com/cms-sw/cmssw/blob/CMSSW_10_6_30/PhysicsTools/NanoAOD/python/jets_cff.py#L741-L759)
from RecoJets.JetProducers.hfJetShowerShape_cfi import hfJetShowerShape
process.hfJetShowerShapeforNanoAOD = hfJetShowerShape.clone(jets="updatedJets",vertices="offlineSlimmedPrimaryVertices")
process.updatedJetsWithUserData.userFloats.hfsigmaEtaEta = cms.InputTag('hfJetShowerShapeforNanoAOD:sigmaEtaEta')
process.updatedJetsWithUserData.userFloats.hfsigmaPhiPhi = cms.InputTag('hfJetShowerShapeforNanoAOD:sigmaPhiPhi')
process.updatedJetsWithUserData.userInts.hfcentralEtaStripSize = cms.InputTag('hfJetShowerShapeforNanoAOD:centralEtaStripSize')
process.updatedJetsWithUserData.userInts.hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforNanoAOD:adjacentEtaStripsSize')
process.jetTable.variables.hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10)
process.jetTable.variables.hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10)
process.jetTable.variables.hfcentralEtaStripSize = Var("userInt('hfcentralEtaStripSize')", int, doc="eta size of the central tower strip in HF (noise discriminating variable) ")
process.jetTable.variables.hfadjacentEtaStripsSize = Var("userInt('hfadjacentEtaStripsSize')", int, doc="eta size of the strips next to the central tower strip in HF (noise discriminating variable) ")
_jetTask_rerunHFshowershape = process.jetTask.copy()
_jetTask_rerunHFshowershape.add(process.hfJetShowerShapeforNanoAOD)
process.jetTask = _jetTask_rerunHFshowershape

process = customize(process)
return process