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 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
import FWCore.ParameterSet.Config as cms

import HLTrigger.HLTfilters.hltHighLevel_cfi
ALCARECOEcalCalZElectronHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
    andOr = True, # choose logical OR between Triggerbits
    eventSetupPathsKey='EcalCalZElectron',
    throw = False # tolerate triggers stated above, but not available
)
ALCARECOEcalCalWElectronHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
    andOr = True, # choose logical OR between Triggerbits
    eventSetupPathsKey='EcalCalWElectron',
    throw = False # tolerate triggers stated above, but not available
)


#===================================================== removing events with trackerDrivenOnly electrons
# if you want to filter events with trackerDrivenOnly electrons
# you should produce a collection containing the Ref to the
# trackerDrivenOnly electrons and then you should filter these events
# the lines to produce the Ref collection are the following
# you should not need to uncomment those, because I've already
# produced them in the ALCARECO step
#trackerDrivenOnlyElectrons = cms.EDFilter("GsfElectronRefSelector",
#                                          src = cms.InputTag( 'gedGsfElectrons' ),
#                                          cut = cms.string( "(ecalDrivenSeed==0)" )
#                                          )

# these lines active a filter that counts if there are more than 0
# trackerDrivenOnly electrons 
#trackerDrivenRemover = cms.EDFilter("PATCandViewCountFilter",
#                                    minNumber = cms.uint32(0),
#                                    maxNumber = cms.uint32(0),
#                                    src = cms.InputTag("trackerDrivenOnlyElectrons")
#                                    )
#trackerDrivenRemoverSeq = cms.Sequence( trackerDrivenOnlyElectrons * trackerDrivenRemover )
#trackerDrivenRemoverSeq = cms.Sequence( trackerDrivenOnlyElectrons)


from Calibration.EcalAlCaRecoProducers.alCaIsolatedElectrons_cfi import *
from Calibration.EcalAlCaRecoProducers.AlCaElectronTracksReducer_cfi import *
from Calibration.EcalAlCaRecoProducers.eleIsoSequence_cff import *

from Calibration.EcalAlCaRecoProducers.WZElectronSkims_cff import *

from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets
kt6PFJetsForRhoCorrection = kt6PFJets.clone(doRhoFastjet = True)
kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5)

#list of SCs to be used for the recHit reduction
#GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer",
#   src     = cms.InputTag("goodPhotons"),
#   ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"),
#   deltaR =  cms.untracked.double(0.3)
#)

alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons)
alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer)

# sequence that reduces the RECO format (only ECAL part) into ALCARECO
ALCARECOEcalCalElectronECALSeq = cms.Sequence( alCaIsolatedElectrons)

# sequence that reduces the RECO format (not ECAL part) into ALCARECO
ALCARECOEcalCalElectronNonECALSeq = cms.Sequence( kt6PFJetsForRhoCorrection +
                                              alcaElectronTracksReducer 
#                                             + pfisoALCARECO 
                                              )

ALCARECOEcalCalElectronSeq = cms.Sequence( ALCARECOEcalCalElectronNonECALSeq+
                                           ALCARECOEcalCalElectronECALSeq
                                           )
############################################### FINAL SEQUENCES
# sequences used in AlCaRecoStreams_cff.py
seqALCARECOEcalCalZElectron   = cms.Sequence(ALCARECOEcalCalZElectronHLT * ZeeSkimFilterSeq  * ALCARECOEcalCalElectronSeq)
seqALCARECOEcalCalZSCElectron = cms.Sequence(ALCARECOEcalCalZElectronHLT * ZSCSkimFilterSeq  * ALCARECOEcalCalElectronSeq)
seqALCARECOEcalCalWElectron   = cms.Sequence(ALCARECOEcalCalWElectronHLT * WenuSkimFilterSeq * ALCARECOEcalCalElectronSeq)


seqALCARECOEcalCalPhoton = cms.Sequence( alCaIsolatedElectrons +
                                           kt6PFJetsForRhoCorrection 
                                         # + pfisoALCARECO 
                                         )