-
Notifications
You must be signed in to change notification settings - Fork 0
/
jetAna.py
94 lines (74 loc) · 3.48 KB
/
jetAna.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.load("Configuration.StandardSequences.MagneticField_cff")
process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi")
process.load("Configuration.StandardSequences.Geometry_cff")
process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
process.load("Geometry.CaloEventSetup.CaloGeometry_cff")
#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
#process.GlobalTag.globaltag = 'IDEAL_V12::All'
# for match muon in a jet by using trackAssociator
#from TrackingTools.TrackAssociator.default_cfi import *
process.source = cms.Source("PoolSource",
debugFlag = cms.untracked.bool(False),
debugVebosity = cms.untracked.uint32(10),
skipEvents = cms.untracked.uint32(0),
fileNames = cms.untracked.vstring(
'file:/uscms_data/d2/sckao/PAT336/tt171_pat336.root'
#'dcache:/pnfs/cms/WAX/resilient/sckao/QCDPAT336/qcd_pat336.root'
)
)
# replace the source files from a file list
#import TopPhysics.TtAnalysis.qcdPATfile_list as fileList
#process.source.fileNames = fileList.fileNames
process.maxEvents = cms.untracked.PSet(
# 100/pb => 9191
input = cms.untracked.int32(20000)
#input = cms.untracked.int32(24000)
)
process.MessageLogger = cms.Service("MessageLogger")
#from PhysicsTools.PatAlgos.tools.trigTools import switchOffTriggerMatchingOld
#switchOffTriggerMatchingOld( process )
process.jetAna = cms.EDAnalyzer("JetAnalysis",
debug = cms.untracked.bool(False),
isData = cms.untracked.bool(False),
rootFileName = cms.untracked.string('tt171_jetInfo.root'),
## ( Et, eta, JES )
jetSetup = cms.vdouble( 20, 2.6, 1.0 ),
bTagCut = cms.untracked.double(5),
bTagAlgo = cms.untracked.string("trackCountingHighEffBJetTags"),
#bTagAlgo = cms.untracked.string('softMuonBJetTags'),
#bTagAlgo = cms.untracked.string('jetProbabilityBJetTags'),
jetSource = cms.InputTag("cleanLayer1Jets"),
metSource = cms.InputTag("layer1METs"),
recoMetSource = cms.InputTag("tcMet"),
muSetup = cms.vdouble( 5, 2.4, 0.3 ),
muonSource = cms.InputTag("cleanLayer1Muons"),
eleSetup = cms.vdouble( 5, 2.4, 0.2, 0.02, 0.9 ),
electronSource = cms.InputTag("cleanLayer1Electrons"),
genParticles = cms.InputTag("genParticles"),
genJetSource = cms.InputTag("ak5GenJets"),
caloSource = cms.InputTag("towerMaker")
)
process.lepAna = cms.EDAnalyzer("MuonAnalysis",
debug = cms.untracked.bool(False),
isData = cms.untracked.bool(False),
rootFileName = cms.untracked.string('tt171_MuInfo.root'),
## Muon Setup
## ( pT, eta, Iso )
muSetup = cms.vdouble( 15, 2.1, 0.1 ),
recoMuons = cms.untracked.string('muons'),
muonSource = cms.InputTag("cleanLayer1Muons"),
## Electron Setup
## ( pT, eta, Iso, H/E, E/P )
eleSetup = cms.vdouble( 5, 2.4, 0.9, 0.02, 0.9 ),
electronSource = cms.InputTag("cleanLayer1Electrons"),
genParticles = cms.InputTag("genParticles")
)
#process.p = cms.Path( process.lepAna )
process.p = cms.Path( process.jetAna + process.lepAna )
#process.ttAna.TrackAssociatorParameters.useEcal = False
#process.ttAna.TrackAssociatorParameters.useHcal = False
#process.ttAna.TrackAssociatorParameters.useCalo = True
#process.ttAna.TrackAssociatorParameters.useHO = False
#process.ttAna.TrackAssociatorParameters.useMuon = False