-
Notifications
You must be signed in to change notification settings - Fork 2
/
electron_isolation_CITK_AOD.py
80 lines (65 loc) · 3.4 KB
/
electron_isolation_CITK_AOD.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
import FWCore.ParameterSet.Config as cms
process = cms.Process( "ElectronIsolation" )
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(100)
)
process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
process.options.allowUnscheduled = cms.untracked.bool(False)
from RecoEgamma.EgammaIsolationAlgos.egmGedGsfElectronPFIsolation_cfi import *
process.load("CommonTools.ParticleFlow.pfNoPileUpIso_cff")
process.load("CommonTools.ParticleFlow.pfParticleSelection_cff")
process.pfNoPileUpCandidates = process.pfAllChargedHadrons.clone()
process.pfNoPileUpCandidates.pdgId.extend(process.pfAllNeutralHadronsAndPhotons.pdgId)
process.ElectronIsolation = cms.EDProducer("CITKPFIsolationSumProducer",
srcToIsolate = cms.InputTag("gedGsfElectrons"),
srcForIsolationCone = cms.InputTag('pfNoPileUpCandidates'),
isolationConeDefinitions = cms.VPSet(
cms.PSet( isolationAlgo = cms.string('ElectronPFIsolationWithConeVeto'),
coneSize = cms.double(0.3),
VetoConeSizeEndcaps = cms.double(0.015),
VetoConeSizeBarrel = cms.double(0.0),
isolateAgainst = cms.string('h+'),
miniAODVertexCodes = cms.vuint32(1,2,3) ),
cms.PSet( isolationAlgo = cms.string('ElectronPFIsolationWithConeVeto'),
coneSize = cms.double(0.3),
VetoConeSizeEndcaps = cms.double(0.0),
VetoConeSizeBarrel = cms.double(0.0),
isolateAgainst = cms.string('h0'),
miniAODVertexCodes = cms.vuint32(1,2,3) ),
cms.PSet( isolationAlgo = cms.string('ElectronPFIsolationWithConeVeto'),
coneSize = cms.double(0.3),
VetoConeSizeEndcaps = cms.double(0.08),
VetoConeSizeBarrel = cms.double(0.0),
isolateAgainst = cms.string('gamma'),
miniAODVertexCodes = cms.vuint32(2,3) )
)
)
process.ntupler = cms.EDAnalyzer('ElectronNtupler_CITK',
pruned = cms.InputTag("genParticles"),
pileup = cms.InputTag("addPileupInfo"),
vertices = cms.InputTag("offlinePrimaryVertices"),
electrons = cms.InputTag("gedGsfElectrons"),
rho = cms.InputTag("fixedGridRhoFastjetAll"),
#CITK
ValueMaps_ChargedHadrons_src = cms.InputTag("ElectronIsolation", "h+-DR030-BarVeto000-EndVeto001"),
ValueMaps_NeutralHadrons_src = cms.InputTag("ElectronIsolation", "h0-DR030-BarVeto000-EndVeto000"),
ValueMaps_Photons_src = cms.InputTag("ElectronIsolation", "gamma-DR030-BarVeto000-EndVeto008"),
)
process.particleFlowTmpPtrs = cms.EDProducer("PFCandidateFwdPtrProducer",
src = cms.InputTag('particleFlow')
)
process.electrons = cms.Path(process.particleFlowTmpPtrs + process.pfParticleSelectionSequence + process.pfNoPileUpCandidates + process.ElectronIsolation + process.ntupler)
process.source = cms.Source("PoolSource",
secondaryFileNames = cms.untracked.vstring(),
fileNames = cms.untracked.vstring('file:///afs/cern.ch/work/i/ishvetso/EgammaWork/test_samples/ttbar_AOD.root')
)
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 10
'''process.out = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string('patTuple.root'),
outputCommands = cms.untracked.vstring('keep *')
)
process.outpath = cms.EndPath(process.out)'''
process.TFileService = cms.Service("TFileService",
fileName = cms.string("tree.root")
)