Skip to content

Commit 164e69d

Browse files
winterchristianChristian Winter
andauthored
New Tau Embedding process modifiers (#6)
* first try distributing process Modifiers of Cleaning step * disable finale state radiation for mu->mu embedding * update center of mass energy for run3 * implement correct ModifierChain for tau embedding process modifiers * revert some changes * set all process modifier for tau embeddign cleaning step * Introduce special cleaning and simulation process modifier * add process modifiers for sim gen step * Set process modifiers for reco sim step * add process modifier for tau embedding merging step Those "toReplaceWith" modifiers need to be applied as late as possible e.g. in StandardSequences.Reconstruction_Data_cff. This is to avoid collisions with other modules that are cloned and modified versions from the original modules or "toModify" modifier calls that try to modify the original modules. They throw an exeption if they want to do this on the replaced merger modules. * add autoNANO option for the tau embedding nanoaod files * adjust test cmsDriver commands to work with the new process modifiers --------- Co-authored-by: Christian Winter <[email protected]>
1 parent 6452987 commit 164e69d

File tree

51 files changed

+731
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+731
-546
lines changed

Configuration/EventContent/python/EventContent_cff.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,9 @@ def SwapKeepAndDrop(l):
10471047
TauEmbeddingSimRecoEventContent = RAWRECOSIMHLTEventContent.clone()
10481048
TauEmbeddingSimRecoEventContent.outputCommands.extend(TauEmbSimReco.outputCommands)
10491049

1050-
TauEmbeddingMergeEventContent = MINIAODSIMEventContent.clone()
1051-
TauEmbeddingMergeEventContent.outputCommands.extend(TauEmbMerge.outputCommands)
1050+
# needs to have MINIAOD in its name to be recognized by cmsDriver as a MINIAOD output so that miniAOD_customizeOutput is applied
1051+
TauEmbeddingMergeMINIAODEventContent = MINIAODSIMEventContent.clone()
1052+
TauEmbeddingMergeMINIAODEventContent.outputCommands.extend(TauEmbMerge.outputCommands)
10521053

10531054
# needs to have NANOAOD in its name to be recognized by cmsDriver as a NANOAOD output so that NanoAODOutputModule is used
10541055
TauEmbeddingNANOAODEventContent = NANOAODSIMEventContent.clone()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This modifier is to implement general changes in the RECO sequence needed for the tau embedding method. More info can be found in TauAnalysis/MCEmbeddingTools.
4+
tau_embedding_cleaning = cms.Modifier()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This modifier is to implement general changes in the RECO sequence needed for the tau embedding method. More info can be found in TauAnalysis/MCEmbeddingTools.
4+
tau_embedding_merging = cms.Modifier()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import FWCore.ParameterSet.Config as cms
22

33
# This modifier is to change tau embedding method to perform mu->e embedding. More info can be found in TauAnalysis/MCEmbeddingTools.
4-
tau_embedding_mu_to_e = cms.Modifier()
4+
tau_embedding_mu_to_e = cms.Modifier()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import FWCore.ParameterSet.Config as cms
22

33
# This modifier is to change tau embedding method to perform mu->mu embedding. More info can be found in TauAnalysis/MCEmbeddingTools.
4-
tau_embedding_mu_to_mu = cms.Modifier()
4+
tau_embedding_mu_to_mu = cms.Modifier()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import FWCore.ParameterSet.Config as cms
22

33
# This modifier sets the correct cuts for the taus decaying into one jet and one muon. More info can be found in TauAnalysis/MCEmbeddingTools.
4-
tau_embedding_mutauh = cms.Modifier()
4+
tau_embedding_mutauh = cms.Modifier()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This modifier is to implement general changes in the RECO sequence needed for the tau embedding method. More info can be found in TauAnalysis/MCEmbeddingTools.
4+
tau_embedding_sim = cms.Modifier()

Configuration/StandardSequences/python/Reconstruction_cff.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,12 @@
320320
#
321321
reconstruction_woCosmicMuonsTask = cms.Task(localrecoTask,globalrecoTask,highlevelrecoTask,logErrorHarvester)
322322
reconstruction_woCosmicMuons = cms.Sequence(reconstruction_woCosmicMuonsTask)
323+
324+
##
325+
## Modify for the tau embedding methods reco sim step
326+
##
327+
from Configuration.ProcessModifiers.tau_embedding_sim_cff import tau_embedding_sim
328+
_tau_embedding_sim_globalreco_trackingTask = globalreco_trackingTask.copyAndExclude([offlineBeamSpotTask])
329+
tau_embedding_sim.toReplaceWith(globalreco_trackingTask, _tau_embedding_sim_globalreco_trackingTask)
330+
_tau_embedding_sim_reconstruction_pixelTrackingOnlyTask = reconstruction_pixelTrackingOnlyTask.copyAndExclude([offlineBeamSpotTask])
331+
tau_embedding_sim.toReplaceWith(reconstruction_pixelTrackingOnlyTask, _tau_embedding_sim_reconstruction_pixelTrackingOnlyTask)

IOMC/EventVertexGenerators/python/VtxSmearedRealistic_cfi.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@
66
src = "generator:unsmeared",
77
readDB = True
88
)
9+
10+
##
11+
## Set the the vertex used for the simulation to the measured vertex for the tau embedding method
12+
##
13+
from Configuration.ProcessModifiers.tau_embedding_sim_cff import tau_embedding_sim
14+
from TauAnalysis.MCEmbeddingTools.Simulation_GEN_cfi import tau_embedding_vtx_corrected_to_input
15+
tau_embedding_sim.toReplaceWith(VtxSmeared, tau_embedding_vtx_corrected_to_input)

PhysicsTools/NanoAOD/python/autoNANO.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,7 @@ def expandNanoMapping(seqList, mapping, key):
110110
# NANOGEN (from MiniAOD)
111111
'GENFromMini': {'sequence': 'PhysicsTools/NanoAOD/nanogen_cff.nanogenSequence',
112112
'customize': 'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGENFromMini'},
113+
# Tau embedding NanoAOD (includes Data as well as MC tables with an addition tau embedding table)
114+
'TauEmbedding': {'sequence': '@PHYS+PhysicsTools/NanoAOD/nano_cff.nanoSequenceFS+TauAnalysis/MCEmbeddingTools/Nano_cff.embeddingTable_seq',
115+
'customize': '@PHYS'},
113116
}

0 commit comments

Comments
 (0)