Line Code
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
import FWCore.ParameterSet.Config as cms
from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
IsoPhotonEBHLTFilter = hltHighLevel.clone(
     throw = False,
     HLTPaths = ["HLT_Photon110EB_TightID_TightIso_v*"]
)

# run on MIONAOD
RUN_ON_MINIAOD = False


# cuts
PHOTON_CUT=("pt > 110 && abs(eta)<1.4442")

# single lepton selectors
if RUN_ON_MINIAOD:
    goodPhotons = cms.EDFilter("PATElectronRefSelector",
                                    src = cms.InputTag("slimmedPhotons"),
                                    cut = cms.string(PHOTON_CUT)
                                    )
else:
    goodPhotons = cms.EDFilter("PhotonRefSelector",
                                    src = cms.InputTag("gedPhotons"),
                                    cut = cms.string(PHOTON_CUT)
                                    )

photonIDWP = cms.PSet( #first for barrel, second for endcap. 
    full5x5_sigmaIEtaIEtaCut       = cms.vdouble(0.011 ,-1. )  , # full5x5_sigmaIEtaIEtaCut
    hOverECut                      = cms.vdouble(0.1  ,-1. )  , # hOverECut
    relCombIsolationWithEACut      = cms.vdouble(0.05  ,-1. )   # relCombIsolationWithEALowPtCut
) 


identifiedPhotons = cms.EDFilter("IsoPhotonEBSelectorAndSkim",
                                   src    = cms.InputTag("goodPhotons"),
                                   phID = photonIDWP, 
                                   absEtaMin=cms.vdouble( 0.0000, 1.0000, 1.4790, 2.0000, 2.2000, 2.3000, 2.4000),
                                   absEtaMax=cms.vdouble( 1.0000,  1.4790, 2.0000,  2.2000, 2.3000, 2.4000, 5.0000),
                                   effectiveAreaValues=cms.vdouble( 0.1703, 0.1715, 0.1213, 0.1230, 0.1635, 0.1937, 0.2393),
                                   rho = cms.InputTag("fixedGridRhoFastjetCentralCalo") 
                         )

identifiedPhotonsCountFilter = cms.EDFilter("CandViewCountFilter",
                                    src = cms.InputTag("identifiedPhotons"),
                                    minNumber = cms.uint32(1)
                                    )



#sequences
isoPhotonEBSequence = cms.Sequence(IsoPhotonEBHLTFilter*goodPhotons*identifiedPhotons*identifiedPhotonsCountFilter )