File indexing completed on 2024-04-06 12:06:47
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004
0005
0006
0007
0008
0009
0010 HLTPath = "HLT_Ele*"
0011 HLTProcessName = "HLT"
0012
0013
0014 ELECTRON_ET_CUT_MIN = 10.0
0015 TAG_ELECTRON_ET_CUT_MIN = 20.0
0016 W_ELECTRON_ET_CUT_MIN = 27.0
0017 ELECTRON_COLL = "gedGsfElectrons"
0018 ELECTRON_CUTS = "(abs(superCluster.eta)<2.5) && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN) + ")"
0019
0020
0021 MET_CUT_MIN = 20.
0022 MT_CUT_MIN = 50.
0023
0024
0025
0026
0027
0028
0029
0030
0031 goodElectrons = cms.EDFilter("GsfElectronRefSelector",
0032 src = cms.InputTag( ELECTRON_COLL ),
0033 cut = cms.string( ELECTRON_CUTS )
0034 )
0035
0036 GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer",
0037 src = cms.InputTag("goodPhotons"),
0038 ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"),
0039 deltaR = cms.untracked.double(0.3)
0040 )
0041
0042
0043
0044
0045
0046
0047
0048
0049 PassingWP90 = goodElectrons.clone(
0050 cut = cms.string(
0051 goodElectrons.cut.value() +
0052 " && (gsfTrack.hitPattern().numberOfLostHits(\'MISSING_INNER_HITS\')<=1 && !(-0.02<convDist<0.02 && -0.02<convDcot<0.02))"
0053 " && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN) + ")"
0054 " && ((isEB"
0055 " && ( dr03TkSumPt/p4.Pt <0.12 && dr03EcalRecHitSumEt/p4.Pt < 0.09 && dr03HcalTowerSumEt/p4.Pt < 0.1 )"
0056 " && (sigmaIetaIeta<0.01)"
0057 " && ( -0.8<deltaPhiSuperClusterTrackAtVtx<0.8 )"
0058 " && ( -0.007<deltaEtaSuperClusterTrackAtVtx<0.007 )"
0059 " && (hadronicOverEm<0.12)"
0060 ")"
0061 " || (isEE"
0062 " && ( dr03TkSumPt/p4.Pt <0.07 && dr03EcalRecHitSumEt/p4.Pt < 0.07 && dr03HcalTowerSumEt/p4.Pt < 0.07 )"
0063 " && (sigmaIetaIeta<0.03)"
0064 " && ( -0.7<deltaPhiSuperClusterTrackAtVtx<0.7 )"
0065 " && ( -0.009<deltaEtaSuperClusterTrackAtVtx<0.009 )"
0066 " && (hadronicOverEm<0.1) "
0067 "))"
0068 )
0069 )
0070
0071 PassingWP80 = goodElectrons.clone(
0072 cut = cms.string(
0073 goodElectrons.cut.value() +
0074 " && (gsfTrack.hitPattern().numberOfLostHits(\'MISSING_INNER_HITS\')==0 && !(-0.02<convDist<0.02 && -0.02<convDcot<0.02))"
0075 " && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN) + ")"
0076 " && ((isEB"
0077 " && ( dr03TkSumPt/p4.Pt <0.12 && dr03EcalRecHitSumEt/p4.Pt < 0.09 && dr03HcalTowerSumEt/p4.Pt < 0.1 )"
0078 " && (sigmaIetaIeta<0.01)"
0079 " && ( -0.06<deltaPhiSuperClusterTrackAtVtx<0.06 )"
0080 " && ( -0.004<deltaEtaSuperClusterTrackAtVtx<0.004 )"
0081 " && (hadronicOverEm<0.12)"
0082 ")"
0083 " || (isEE"
0084 " && ( dr03TkSumPt/p4.Pt <0.05 && dr03EcalRecHitSumEt/p4.Pt < 0.06 && dr03HcalTowerSumEt/p4.Pt < 0.03 )"
0085 " && (sigmaIetaIeta<0.03)"
0086 " && ( -0.03<deltaPhiSuperClusterTrackAtVtx<0.03 )"
0087 " && ( -0.007<deltaEtaSuperClusterTrackAtVtx<0.007 )"
0088 " && (hadronicOverEm<0.10) "
0089 "))"
0090 )
0091 )
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer",
0103 InputProducer = cms.InputTag( ELECTRON_COLL ),
0104 hltTags = cms.untracked.string( HLTPath ),
0105 triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName),
0106 triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName),
0107 stageL1Trigger = cms.uint32(1),
0108
0109 l1GtRecordInputTag = cms.InputTag('gtDigis'),
0110 l1GtReadoutRecordInputTag = cms.InputTag('gtDigis'),
0111 )
0112 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
0113 stage2L1Trigger.toModify(PassingHLT,
0114 stageL1Trigger = 2,
0115
0116 l1tAlgBlkInputTag = cms.InputTag('gtStage2Digis'),
0117 l1tExtBlkInputTag = cms.InputTag('gtStage2Digis'),
0118
0119 l1GtRecordInputTag = None,
0120 l1GtReadoutRecordInputTag = None,
0121 )
0122
0123
0124
0125
0126
0127
0128
0129
0130 WElecTagHLT = PassingHLT.clone(
0131 InputProducer = cms.InputTag( "PassingWP80" )
0132 )
0133
0134 ele_sequence = cms.Sequence(
0135 goodElectrons +
0136 PassingWP80 +
0137 WElecTagHLT
0138 )
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149 MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))"
0150 elecMet = cms.EDProducer("CandViewShallowCloneCombiner",
0151 decay = cms.string("pfMet WElecTagHLT"),
0152 checkCharge = cms.bool(False),
0153 cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (MET_CUT_MIN, W_ELECTRON_ET_CUT_MIN, MT_CUT_MIN))
0154 )
0155 elecMetCounter = cms.EDFilter("CandViewCountFilter",
0156 src = cms.InputTag("elecMet"),
0157 minNumber = cms.uint32(1)
0158 )
0159 elecMetFilter = cms.Sequence(elecMet * elecMetCounter)
0160
0161 import HLTrigger.HLTfilters.hltHighLevel_cfi
0162 WEnuHltFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
0163 throw = cms.bool(False),
0164 HLTPaths = [HLTPath]
0165 )
0166
0167
0168
0169 import RecoJets.Configuration.RecoPFJets_cff
0170 kt6PFJetsForRhoCorrectionWElectronSkim = RecoJets.Configuration.RecoPFJets_cff.kt6PFJets.clone(
0171 doRhoFastjet = True,
0172 Rho_EtaMax = 2.5
0173 )
0174
0175
0176 elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter * kt6PFJetsForRhoCorrectionWElectronSkim)
0177
0178
0179 from Configuration.EventContent.AlCaRecoOutput_cff import OutALCARECOEcalCalElectron
0180 WElectronSkimContent = OutALCARECOEcalCalElectron.clone()
0181 WElectronSkimContent.outputCommands.extend( [
0182 "keep *_pfMet_*_*",
0183 "keep *_kt6*_rho_*",
0184 "keep *_offlinePrimaryVerticesWithBS_*_*",
0185 "keep *_generator_*_*",
0186 "keep *_rawDataCollector_*_*",
0187 'keep recoCaloClusters_*_*_*',
0188 'keep recoPreshowerClusters_*_*_*',
0189 'keep *_reducedEcalRecHits*_*_*',
0190 'keep *_offlineBeamSpot_*_*',
0191 'keep *_allConversions_*_*',
0192 'keep *_gtDigis_*_*'
0193 ] )