File indexing completed on 2024-11-28 03:56:24
0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer
0004 from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi import simpleSingletonCandidateFlatTableProducer
0005 from PhysicsTools.NanoAOD.simpleHTXSFlatTableProducer_cfi import simpleHTXSFlatTableProducer
0006
0007
0008
0009 mergedGenParticles = cms.EDProducer("MergedGenParticleProducer",
0010 inputPruned = cms.InputTag("prunedGenParticles"),
0011 inputPacked = cms.InputTag("packedGenParticles"),
0012 )
0013
0014 genParticles2HepMC = cms.EDProducer("GenParticles2HepMCConverter",
0015 genParticles = cms.InputTag("mergedGenParticles"),
0016 genEventInfo = cms.InputTag("generator"),
0017 signalParticlePdgIds = cms.vint32(),
0018 )
0019
0020 genParticles2HepMCHiggsVtx = cms.EDProducer("GenParticles2HepMCConverter",
0021 genParticles = cms.InputTag("mergedGenParticles"),
0022 genEventInfo = cms.InputTag("generator"),
0023 signalParticlePdgIds = cms.vint32(25),
0024 )
0025
0026
0027 particleLevel = cms.EDProducer("ParticleLevelProducer",
0028 src = cms.InputTag("genParticles2HepMC:unsmeared"),
0029
0030 doJetClustering = cms.bool(False),
0031 usePromptFinalStates = cms.bool(True),
0032 excludePromptLeptonsFromJetClustering = cms.bool(False),
0033 excludeNeutrinosFromJetClustering = cms.bool(True),
0034
0035 particleMinPt = cms.double(0.),
0036 particleMaxEta = cms.double(5.),
0037
0038 lepConeSize = cms.double(0.1),
0039 lepMinPt = cms.double(1.),
0040 lepMaxEta = cms.double(2.5),
0041
0042 jetConeSize = cms.double(0.4),
0043 jetMinPt = cms.double(10.),
0044 jetMaxEta = cms.double(999.),
0045
0046 fatJetConeSize = cms.double(0.8),
0047 fatJetMinPt = cms.double(170.),
0048 fatJetMaxEta = cms.double(999.),
0049
0050 phoIsoConeSize = cms.double(0.4),
0051 phoMaxRelIso = cms.double(0.5),
0052 phoMinPt = cms.double(1.),
0053 phoMaxEta = cms.double(2.5),
0054 )
0055
0056 rivetProducerHTXS = cms.EDProducer('HTXSRivetProducer',
0057 HepMCCollection = cms.InputTag('genParticles2HepMCHiggsVtx','unsmeared'),
0058 LHERunInfo = cms.InputTag('externalLHEProducer'),
0059 ProductionMode = cms.string('AUTO'),
0060 )
0061
0062
0063
0064 rivetLeptonTable = simpleCandidateFlatTableProducer.clone(
0065 src = cms.InputTag("particleLevel:leptons"),
0066 cut = cms.string("pt > 10"),
0067 name= cms.string("GenDressedLepton"),
0068 doc = cms.string("Dressed leptons from Rivet-based ParticleLevelProducer"),
0069 externalVariables = cms.PSet(
0070 hasTauAnc = ExtVar(cms.InputTag("tautagger"),bool, doc="true if Dressed lepton has a tau as ancestor"),
0071 ),
0072 variables = cms.PSet(
0073 P4Vars,
0074 pdgId = Var("pdgId", int, doc="PDG id"),
0075 )
0076 )
0077
0078 rivetPhotonTable = simpleCandidateFlatTableProducer.clone(
0079 src = cms.InputTag("particleLevel:photons"),
0080 cut = cms.string("pt > 10"),
0081 name= cms.string("GenIsolatedPhoton"),
0082 doc = cms.string("Isolated photons from Rivet-based ParticleLevelProducer"),
0083 variables = cms.PSet(
0084 P4Vars
0085 )
0086 )
0087
0088 tautagger = cms.EDProducer("GenJetTauTaggerProducer",
0089 src = rivetLeptonTable.src,
0090 )
0091
0092 rivetMetTable = simpleSingletonCandidateFlatTableProducer.clone(
0093 src = cms.InputTag("particleLevel:mets"),
0094 name = cms.string("FiducialMET"),
0095 doc = cms.string("MET from Rivet-based ParticleLevelProducer in fiducial volume abs(eta)<5"),
0096 variables = cms.PSet(PTVars),
0097 )
0098
0099 HTXSCategoryTable = simpleHTXSFlatTableProducer.clone(
0100 src = cms.InputTag("rivetProducerHTXS","HiggsClassification"),
0101 name = cms.string("HTXS"),
0102 doc = cms.string("HTXS classification"),
0103 variables=cms.PSet(
0104 stage_0 = Var("stage0_cat",int, doc="HTXS stage-0 category"),
0105 stage_1_pTjet30 = Var("stage1_cat_pTjet30GeV",int, doc="HTXS stage-1 category (jet pt>30 GeV)"),
0106 stage_1_pTjet25 = Var("stage1_cat_pTjet25GeV",int, doc="HTXS stage-1 category (jet pt>25 GeV)"),
0107 stage1_1_cat_pTjet30GeV = Var("stage1_1_cat_pTjet30GeV",int,doc="HTXS stage-1.1 category(jet pt>30 GeV)"),
0108 stage1_1_cat_pTjet25GeV = Var("stage1_1_cat_pTjet25GeV",int,doc="HTXS stage-1.1 category(jet pt>25 GeV)"),
0109 stage1_1_fine_cat_pTjet30GeV = Var("stage1_1_fine_cat_pTjet30GeV",int,doc="HTXS stage-1.1-fine category(jet pt>30 GeV)"),
0110 stage1_1_fine_cat_pTjet25GeV = Var("stage1_1_fine_cat_pTjet25GeV",int,doc="HTXS stage-1.1-fine category(jet pt>25 GeV)"),
0111 stage1_2_cat_pTjet30GeV = Var("stage1_2_cat_pTjet30GeV",int,doc="HTXS stage-1.2 category(jet pt>30 GeV)"),
0112 stage1_2_cat_pTjet25GeV = Var("stage1_2_cat_pTjet25GeV",int,doc="HTXS stage-1.2 category(jet pt>25 GeV)"),
0113 stage1_2_fine_cat_pTjet30GeV = Var("stage1_2_fine_cat_pTjet30GeV",int,doc="HTXS stage-1.2-fine category(jet pt>30 GeV)"),
0114 stage1_2_fine_cat_pTjet25GeV = Var("stage1_2_fine_cat_pTjet25GeV",int,doc="HTXS stage-1.2-fine category(jet pt>25 GeV)"),
0115 Higgs_pt = Var("higgs.Pt()",float, doc="pt of the Higgs boson as identified in HTXS", precision=14),
0116 Higgs_y = Var("higgs.Rapidity()",float, doc="rapidity of the Higgs boson as identified in HTXS", precision=12),
0117 njets30 = Var("jets30.size()","uint8", doc="number of jets with pt>30 GeV as identified in HTXS"),
0118 njets25 = Var("jets25.size()","uint8", doc="number of jets with pt>25 GeV as identified in HTXS"),
0119
0120 V_pt = Var("V_pt",float, doc="pt of the vector boson as identified in HTXS", precision=14),
0121 Mjj = Var("Mjj",float, doc="invariant mass of the dijet (pt>30) system as identified in HTXS", precision=14),
0122 ptHjj = Var("ptHjj",float, doc="pt of the dijet(pt>30)-plus-higgs system as identified in HTXS", precision=14),
0123 dPhijj = Var("dPhijj",float, doc="DeltaPhi between jets (pt>30) in dijet system as identified in HTXS", precision=12),
0124 )
0125 )
0126
0127 lheInfoTable = cms.EDProducer("LHETablesProducer",
0128 lheInfo = cms.VInputTag(cms.InputTag("externalLHEProducer"), cms.InputTag("source")),
0129 precision = cms.int32(14),
0130 storeLHEParticles = cms.bool(True)
0131 )
0132
0133 particleLevelTask = cms.Task(mergedGenParticles,genParticles2HepMC,particleLevel,tautagger,genParticles2HepMCHiggsVtx,rivetProducerHTXS)
0134 particleLevelTablesTask = cms.Task(rivetLeptonTable,rivetPhotonTable,rivetMetTable,HTXSCategoryTable,lheInfoTable)