CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
slimming_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
30 from RecoLuminosity.LumiProducer.bunchSpacingProducer_cfi import bunchSpacingProducer
31 from HeavyFlavorAnalysis.Onia2MuMu.OniaPhotonConversionProducer_cfi import PhotonCandidates as oniaPhotonCandidates
33 
34 slimmingTask = cms.Task(
35  packedPFCandidatesTask,
36  lostTracks,
37  isolatedTracks,
38  offlineSlimmedPrimaryVertices,
39  offlineSlimmedPrimaryVerticesWithBS,
40  primaryVertexAssociation,
41  primaryVertexWithBSAssociation,
42  genParticlesTask,
43  packedCandidateToGenAssociationTask,
44  selectedPatTrigger,
45  slimmedPatTrigger,
46  slimmedCaloJets,
47  slimmedJets,
48  slimmedJetsAK8,
49  slimmedGenJets,
50  slimmedGenJetsAK8,
51  slimmedElectrons,
52  slimmedLowPtElectronsTask,
53  slimmedMuonTrackExtras,
54  slimmedMuons,
55  slimmedPhotons,
56  slimmedOOTPhotons,
57  slimmedTaus,
58  slimmedSecondaryVertices,
59  slimmedKshortVertices,
60  slimmedLambdaVertices,
61  slimmedMETs,
62  metFilterPathsTask,
63  reducedEgamma,
64  slimmedHcalRecHits,
65  bunchSpacingProducer,
66  oniaPhotonCandidates
67 )
68 
69 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
70 pp_on_AA.toReplaceWith(slimmingTask, slimmingTask.copyAndExclude([slimmedOOTPhotons]))
71 
72 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
73 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
74 _mAOD = (run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy)
75 (pp_on_AA | _mAOD).toReplaceWith(slimmingTask,
76  slimmingTask.copyAndExclude([slimmedLowPtElectronsTask]))
77 
78 from PhysicsTools.PatAlgos.slimming.hiPixelTracks_cfi import hiPixelTracks
79 from RecoHI.HiEvtPlaneAlgos.HiEvtPlane_cfi import hiEvtPlane
80 from RecoHI.HiEvtPlaneAlgos.hiEvtPlaneFlat_cfi import hiEvtPlaneFlat
81 pp_on_AA.toReplaceWith(slimmingTask, cms.Task(slimmingTask.copy(), hiPixelTracks, hiEvtPlane, hiEvtPlaneFlat))
82 
83 from PhysicsTools.PatAlgos.packedCandidateMuonID_cfi import packedCandidateMuonID
84 from PhysicsTools.PatAlgos.packedPFCandidateTrackChi2_cfi import packedPFCandidateTrackChi2
85 from RecoHI.HiCentralityAlgos.CentralityBin_cfi import centralityBin
86 from RecoHI.HiCentralityAlgos.hiHFfilters_cfi import hiHFfilters
87 lostTrackChi2 = packedPFCandidateTrackChi2.clone(candidates = "lostTracks", doLostTracks = True)
88 
89 pp_on_AA.toReplaceWith(
90  slimmingTask,
91  cms.Task(slimmingTask.copy(), packedCandidateMuonID, packedPFCandidateTrackChi2, lostTrackChi2, centralityBin, hiHFfilters))
92 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
93 run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexAssociationCleaned,slimmingTask.copy()))
94 run2_miniAOD_pp_on_AA_103X.toReplaceWith(slimmingTask,cms.Task(primaryVertexWithBSAssociationCleaned,slimmingTask.copy()))
95 
96 from RecoHI.HiTracking.miniAODVertexRecovery_cff import offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery
97 pp_on_AA.toReplaceWith(
98  slimmingTask,
99  cms.Task(slimmingTask.copy(), offlinePrimaryVerticesRecovery, offlineSlimmedPrimaryVerticesRecovery))
100 
101 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
102 _phase2_timing_slimmingTask = cms.Task(slimmingTask.copy(),
103  offlineSlimmedPrimaryVertices4D)
104 phase2_timing.toReplaceWith(slimmingTask,_phase2_timing_slimmingTask)