CMS 3D CMS Logo

softActivity_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer
5 from PhysicsTools.NanoAOD.globalVariablesTableProducer_cfi import globalVariablesTableProducer
6 from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
7 
8 chsForSATkJets = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string('charge()!=0 && pvAssociationQuality()>=5 && vertexRef().key()==0'))
9 softActivityJets = ak4PFJets.clone(src = 'chsForSATkJets', doAreaFastjet = False, jetPtMin=1)
10 softActivityJets10 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>10'))
11 softActivityJets5 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>5'))
12 softActivityJets2 = cms.EDFilter("CandPtrSelector", src = cms.InputTag("softActivityJets"), cut = cms.string('pt>2'))
13 
14 
15 
16 saJetTable = simpleCandidateFlatTableProducer.clone(
17  src = cms.InputTag("softActivityJets"),
18  maxLen = cms.uint32(6),
19  name = cms.string("SoftActivityJet"),
20  doc = cms.string("jets clustered from charged candidates compatible with primary vertex (" + chsForSATkJets.cut.value()+")"),
21  variables = cms.PSet(P3Vars,
22  )
23 )
24 
25 saJetTable.variables.pt.precision=10
26 saJetTable.variables.eta.precision=8
27 saJetTable.variables.phi.precision=8
28 
29 saTable = globalVariablesTableProducer.clone(
30  variables = cms.PSet(
31  SoftActivityJetHT = ExtVar( cms.InputTag("softActivityJets"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt>1" ),
32  SoftActivityJetHT10 = ExtVar( cms.InputTag("softActivityJets10"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt , pt >10" ),
33  SoftActivityJetHT5 = ExtVar( cms.InputTag("softActivityJets5"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt>5" ),
34  SoftActivityJetHT2 = ExtVar( cms.InputTag("softActivityJets2"), "candidatescalarsum", doc = "scalar sum of soft activity jet pt, pt >2" ),
35  SoftActivityJetNjets10 = ExtVar( cms.InputTag("softActivityJets10"), "candidatesize", doc = "number of soft activity jet pt, pt >2" ),
36  SoftActivityJetNjets5 = ExtVar( cms.InputTag("softActivityJets5"), "candidatesize", doc = "number of soft activity jet pt, pt >5" ),
37  SoftActivityJetNjets2 = ExtVar( cms.InputTag("softActivityJets2"), "candidatesize", doc = "number of soft activity jet pt, pt >10" ),
38 
39  )
40 )
41 
42 softActivityTask = cms.Task(chsForSATkJets,softActivityJets,softActivityJets2,softActivityJets5,softActivityJets10)
43 softActivityTablesTask = cms.Task(saJetTable,saTable)
def ExtVar(tag, valtype, doc=None, precision=-1)
Definition: common_cff.py:27