Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-14 23:39:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.NanoAOD.nano_eras_cff import *
0004 from  PhysicsTools.NanoAOD.common_cff import *
0005 
0006 
0007 from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
0008 
0009 chsForSATkJets = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string('charge()!=0 && pvAssociationQuality()>=5 && vertexRef().key()==0'))
0010 softActivityJets = ak4PFJets.clone(src = 'chsForSATkJets', doAreaFastjet = False, jetPtMin=1)
0011 softActivityJets10 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>10'))
0012 softActivityJets5 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>5'))
0013 softActivityJets2 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>2'))
0014 
0015 
0016 ##### Soft Activity tables
0017 saJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
0018     src = cms.InputTag("softActivityJets"),
0019     cut = cms.string(""),
0020     maxLen = cms.uint32(6),
0021     name = cms.string("SoftActivityJet"),
0022     doc  = cms.string("jets clustered from charged candidates compatible with primary vertex (" + chsForSATkJets.cut.value()+")"),
0023     singleton = cms.bool(False), # the number of entries is variable
0024     extension = cms.bool(False), # this is the main table for the jets
0025     variables = cms.PSet(P3Vars,
0026   )
0027 )
0028 
0029 saJetTable.variables.pt.precision=10
0030 saJetTable.variables.eta.precision=8
0031 saJetTable.variables.phi.precision=8
0032 
0033 saTable = cms.EDProducer("GlobalVariablesTableProducer",
0034     variables = cms.PSet(
0035         SoftActivityJetHT = ExtVar( cms.InputTag("softActivityJets"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt>1" ),
0036         SoftActivityJetHT10 = ExtVar( cms.InputTag("softActivityJets10"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt , pt >10"  ),
0037         SoftActivityJetHT5 = ExtVar( cms.InputTag("softActivityJets5"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt>5"  ),
0038         SoftActivityJetHT2 = ExtVar( cms.InputTag("softActivityJets2"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt >2"  ),
0039         SoftActivityJetNjets10 = ExtVar( cms.InputTag("softActivityJets10"), "candidatesize", doc = "number of soft activity jet pt, pt >2"  ),
0040         SoftActivityJetNjets5 = ExtVar( cms.InputTag("softActivityJets5"), "candidatesize", doc = "number of soft activity jet pt, pt >5"  ),
0041         SoftActivityJetNjets2 = ExtVar( cms.InputTag("softActivityJets2"), "candidatesize", doc = "number of soft activity jet pt, pt >10"  ),
0042 
0043     )
0044 )
0045 
0046 softActivityTask = cms.Task(chsForSATkJets,softActivityJets,softActivityJets2,softActivityJets5,softActivityJets10)
0047 softActivityTablesTask = cms.Task(saJetTable,saTable)