process.load("HeavyIonsAnalysis.VertexAnalysis.PAPileUpVertexFilter_cff")
process.pVertexFilterCutG = cms.Path(process.pileupVertexFilterCutG)
process.pVertexFilterCutGloose = cms.Path(process.pileupVertexFilterCutGloose)
process.pVertexFilterCutGtight = cms.Path(process.pileupVertexFilterCutGtight)
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(
    process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(
    process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(
    process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(
    process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)

from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag

process = MassReplaceInputTag(process, "offlinePrimaryVertices",
                              "offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

# Customization
###############################################################################
Exemplo n.º 2
0
def customizeHLTforAll(process, menuType="GRun", _customInfo=None):

    if (_customInfo is not None):

        _maxEvents = _customInfo['maxEvents']
        _globalTag = _customInfo['globalTag']
        _inputFile = _customInfo['inputFile']
        _realData = _customInfo['realData']

        import FWCore.ParameterSet.VarParsing as VarParsing
        cmsRunOptions = VarParsing.VarParsing('python')

        cmsRunOptions.maxEvents = _maxEvents
        cmsRunOptions.register('globalTag', _globalTag,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.string, "GlobalTag")
        cmsRunOptions.inputFiles = _inputFile
        cmsRunOptions.register('realData', _realData,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.bool, "Real Data?")

        cmsRunOptions.parseArguments()

        # report in log file
        #       print cmsRunOptions

        _maxEvents = cmsRunOptions.maxEvents
        _globalTag = cmsRunOptions.globalTag
        _inputFile = cmsRunOptions.inputFiles
        _realData = cmsRunOptions.realData

        # maxEvents
        if _maxEvents != -2:
            _maxEvents = cms.untracked.int32(_maxEvents)
            if hasattr(process, 'maxEvents'):
                process.maxEvents.input = _maxEvents
            else:
                process.maxEvents = cms.untracked.PSet(input=_maxEvents)

# GlobalTag
        if _globalTag == "@":
            _globalTag = _customInfo['globalTags'][_realData]
        if _globalTag != "":
            if hasattr(process, 'GlobalTag'):
                from Configuration.AlCa.GlobalTag import GlobalTag
                process.GlobalTag = GlobalTag(process.GlobalTag, _globalTag,
                                              '')
#               process.GlobalTag.snapshotTime = cms.string("9999-12-31 23:59:59.000")

# inputFile
        if _inputFile[0] == "@":
            _inputFile[0] = _customInfo['inputFiles'][_realData]
        if _inputFile != "":
            if hasattr(process, 'source'):
                process.source.fileNames = cms.untracked.vstring(_inputFile)

        if _realData:
            # Real-Data customisation
            if menuType == "HIon":
                #               fix "Unrunnable schedule" exception
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(
                    process, "rawDataRepacker", "rawDataCollector"
                )  #,"rawDataRepacker::@skipCurrentProcess")
        else:
            # Monte-Carlo customisation
            from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
            process = customizeHLTforMC(process)
            if menuType == "HIon":
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(process, "rawDataRepacker",
                                              "rawDataCollector")

    else:
        pass

    return process
Exemplo n.º 3
0
def customizeHLTforAll(process, _customInfo=None):

    if (_customInfo is not None):

        _maxEvents = _customInfo['maxEvents']
        _globalTag = _customInfo['globalTag']
        _inputFile = _customInfo['inputFile']
        _realData = _customInfo['realData']
        _fastSim = _customInfo['fastSim']

        import FWCore.ParameterSet.VarParsing as VarParsing
        cmsRunOptions = VarParsing.VarParsing('python')

        cmsRunOptions.maxEvents = _maxEvents
        cmsRunOptions.register('globalTag', _globalTag,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.string, "GlobalTag")
        cmsRunOptions.inputFiles = _inputFile
        cmsRunOptions.register('realData', _realData,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.bool, "Real Data?")
        cmsRunOptions.register('fastSim', _fastSim,
                               cmsRunOptions.multiplicity.singleton,
                               cmsRunOptions.varType.bool, "Fast Sim ?")

        cmsRunOptions.parseArguments()

        # report in log file
        print cmsRunOptions

        _maxEvents = cmsRunOptions.maxEvents
        _globalTag = cmsRunOptions.globalTag
        _inputFile = cmsRunOptions.inputFiles
        _realData = cmsRunOptions.realData
        _fastSim = cmsRunOptions.fastSim

        # maxEvents
        if _maxEvents != -2:
            _maxEvents = cms.untracked.int32(_maxEvents)
            if hasattr(process, 'maxEvents'):
                process.maxEvents.input = _maxEvents
            else:
                process.maxEvents = cms.untracked.PSet(input=_maxEvents)

# GlobalTag
        if _globalTag == "@":
            _globalTag = _customInfo['globalTags'][_realData]
        if _globalTag != "":
            if hasattr(process, 'GlobalTag'):
                from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
                process.GlobalTag = GlobalTag(process.GlobalTag, _globalTag,
                                              '')

# inputFile
        if _inputFile[0] == "@":
            _inputFile[0] = _customInfo['inputFiles'][_realData]
        if _inputFile != "":
            if hasattr(process, 'source'):
                process.source.fileNames = cms.untracked.vstring(_inputFile)

# MC customisation
        if not _realData:
            from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC
            process = customizeHLTforMC(process, _fastSim)
            if _customInfo['menuType'] == "HIon":
                from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
                process = MassReplaceInputTag(process, "rawDataRepacker",
                                              "rawDataCollector")
    else:
        pass

# CMSSW version customisation
    from HLTrigger.Configuration.customizeHLTforCMSSW import customiseHLTforCMSSW
    process = customiseHLTforCMSSW(process)

    return process
Exemplo n.º 4
0
def customizeHLTforMC(process, _fastSim=False):
    """adapt the HLT to run on MC, instead of data
  see Configuration/StandardSequences/Reconstruction_Data_cff.py
  which does the opposite, for RECO"""

    # PFRecHitProducerHCAL
    if 'hltParticleFlowRecHitHCAL' in process.__dict__:
        process.hltParticleFlowRecHitHCAL.ApplyPulseDPG = cms.bool(False)
        process.hltParticleFlowRecHitHCAL.LongShortFibre_Cut = cms.double(
            1000000000.0)

    # customise hltHbhereco to use the Method 3 time slew parametrization and response correction for Monte Carlo (PR #11091)
    if 'hltHbhereco' in process.__dict__:
        if process.hltHbhereco._TypedParameterizable__type == 'HcalHitReconstructor':
            # 2015-2016 Run 2
            process.hltHbhereco.pedestalSubtractionType = cms.int32(1)
            process.hltHbhereco.pedestalUpperLimit = cms.double(2.7)
            process.hltHbhereco.timeSlewParsType = cms.int32(3)
            # new time slew parametrisation
            process.hltHbhereco.timeSlewPars = cms.vdouble(
                12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142,
                0)
            # old response correction, matching the 2015D 25ns data
            process.hltHbhereco.respCorrM3 = cms.double(1.0)
        else:
            # 2017 Phase I
            process.hltHbhereco.algorithm.respCorrM3 = cms.double(1.0)

    if _fastSim:

        fastsim = cms.ProcessFragment(process.name_())
        fastsim.load("FastSimulation.HighLevelTrigger.HLTSetup_cff")

        fastSimUnsupportedPaths = (

            # paths for which a recovery is not foreseen/possible
            "AlCa_*_v*",
            "DQM_*_v*",
            "HLT_*Calibration_v*",
            "HLT_DTErrors_v*",
            "HLT_Random_v*",
            "HLT_HcalNZS_v*",
            "HLT_HcalPhiSym_v*",
            "HLT_Activity_Ecal*_v*",
            "HLT_IsoTrackHB_v*",
            "HLT_IsoTrackHE_v*",
            "HLT_L1SingleMuOpen_AntiBPTX_v*",
            "HLT_JetE*_NoBPTX*_v*",
            "HLT_L2Mu*_NoBPTX*_v*",
            "HLT_Beam*_v*",
            #"HLT_L1Tech_*_v*",
            "HLT_HI*",
            "HLT_PA*",
            "HLT_GlobalRunHPDNoise_v*",
            "HLT_L1TrackerCosmics_v*",
            "HLT_HcalUTCA_v*",
            "HLT_L1FatEvents_v*",

            # TODO: paths not supported by FastSim, but for which a recovery should be attempted
            "HLT_DoubleMu33NoFiltersNoVtx_v*",
            "HLT_DoubleMu38NoFiltersNoVtx_v*",
            "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
            "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
            "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
            "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
            "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
            "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
            "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
            "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
            "HLT_HT500_DisplacedDijet40_Inclusive_v*",
            "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
            "HLT_HT550_DisplacedDijet40_Inclusive_v*",
            "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
            "HLT_HT400_DisplacedDijet40_Inclusive_v*",
            "HLT_HT250_DisplacedDijet40_DisplacedTrack_v*",
            "HLT_HT200_DisplacedDijet40_DisplacedTrack_v*",
            "HLT_HT350_DisplacedDijet40_Inclusive_v*",
            "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
            "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
            "HLT_MET60_IsoTrk*",
            "HLT_MET75_IsoTrk50_v*",
            "HLT_MET90_IsoTrk50_v*",
            "HLT_VBF_DisplacedJet40_DisplacedTrack_v*",
            "HLT_VBF_DisplacedJet40_TightID_DisplacedTrack_v*",
            "HLT_VBF_DisplacedJet40_VTightID_DisplacedTrack_v*",
            "HLT_VBF_DisplacedJet40_VVTightID_DisplacedTrack_v*",
            "HLT_VBF_DisplacedJet40_Hadronic_2PromptTrack_v*",
            "HLT_VBF_DisplacedJet40_DisplacedTrack_2TrackIP2DSig5_v*",
            "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Tight_v*",
            "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Loose_v*",
            "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Tight_v*",
            "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Loose_v*",
            "HLT_Mu38NoFiltersNoVtx_DisplacedJet60_Loose_v*",
            "HLT_Mu28NoFiltersNoVtx_DisplacedJet40_Loose_v*",
            "HLT_Mu28NoFiltersNoVtx_CentralCaloJet40_v*",
            "HLT_Mu23NoFiltersNoVtx_Photon23_CaloIdL_v*",
            "HLT_DoubleMu18NoFiltersNoVtx_v*",
            "HLT_DoubleMuNoFiltersNoVtx_SaveObjects_v*",
            "MC_DoubleMuNoFiltersNoVtx_v*",
            "HLT_L1MuOpenNotHF2Pixel_SingleTrack*",
            "HLT_L1TOTEM0_RomanPotsAND_PixelClusters*",
        )

        ESModulesToRemove = (
            #      "CaloTowerGeometryFromDBEP",
            #      "CastorGeometryFromDBEP",
            #      "EcalBarrelGeometryFromDBEP",
            #      "EcalEndcapGeometryFromDBEP",
            #      "EcalPreshowerGeometryFromDBEP",
            #      "HcalGeometryFromDBEP",
            #      "ZdcGeometryFromDBEP",
            #      "XMLFromDBSource",
            #      "sistripconn",

            #      "navigationSchoolESProducer",
            #      "TransientTrackBuilderESProducer",
            #      "SteppingHelixPropagatorAny",
            #      "OppositeMaterialPropagator",
            #      "MaterialPropagator",
            #      "CaloTowerConstituentsMapBuilder",
            #      "CaloTopologyBuilder",
        )

        ModulesToRemove = (
            #   "hltL3MuonIsolations",
            "hltCkfL1SeededTrackCandidates",
            "hltCtfL1SeededithMaterialTracks",
            "hltCkf3HitL1SeededTrackCandidates",
            "hltCtf3HitL1SeededWithMaterialTracks",
            "hltCkf3HitActivityTrackCandidates",
            "hltCtf3HitActivityWithMaterialTracks",
            "hltActivityCkfTrackCandidatesForGSF",
            "hltL1SeededCkfTrackCandidatesForGSF",
            "hltMuCkfTrackCandidates",
            "hltMuCtfTracks",
            "hltTau3MuCkfTrackCandidates",
            "hltTau3MuCtfWithMaterialTracks",
            "hltMuTrackJpsiCkfTrackCandidates",
            "hltMuTrackJpsiCtfTracks",
            "hltMuTrackJpsiEffCkfTrackCandidates",
            "hltMuTrackJpsiEffCtfTracks",
            "hltJpsiTkPixelSeedFromL3Candidate",
            "hltCkfTrackCandidatesJpsiTk",
            "hltCtfWithMaterialTracksJpsiTk",
            "hltMuTrackCkfTrackCandidatesOnia",
            "hltMuTrackCtfTracksOnia",
            "hltFEDSelector",
            "hltL3TrackCandidateFromL2OIState",
            "hltL3TrackCandidateFromL2OIHit",
            "hltL3TrackCandidateFromL2IOHit",
            "hltL3TrackCandidateFromL2NoVtx",
            "hltHcalDigis",
            "hltHcalDigisL1EGSeeded",
            "hltHcalDigisL1EGUnseeded",
            "hltHoreco",
            "hltHfreco",
            "hltHbhereco",
            "hltHbherecoMethod2L1EGSeeded",
            "hltHbherecoMethod2L1EGUnseeded",
            "hltESRawToRecHitFacility",
            "hltEcalRecHitAll",
            "hltESRecHitAll",
            # === eGamma
            "hltEgammaCkfTrackCandidatesForGSF",
            "hltEgammaGsfTracks",
            "hltEgammaCkfTrackCandidatesForGSFUnseeded",
            "hltEgammaGsfTracksUnseeded",
            # === hltPF
            "hltPFJetCkfTrackCandidates",
            "hltPFJetCtfWithMaterialTracks",
            "hltPFlowTrackSelectionHighPurity",
            # === hltFastJet
            "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
            "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
            "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
            "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
            "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
            "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
            "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
            "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
            "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
            "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
            "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
            "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
            "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
            "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
            "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
            # === hltBLifetimeRegional
            "hltBLifetimeRegionalPixelSeedGeneratorHbb",
            "hltBLifetimeRegionalCkfTrackCandidatesHbb",
            "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
            "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
            "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
            "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
            "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
            "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
            "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
            "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
            "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
            "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
            "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
            "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
            "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
            "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
            "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
            "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
            "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
            "hltPixelTracksForMinBias",
            "hltPixelTracksForMinBias01",
            "hltPixelTracksForHighMult",
            "hltRegionalPixelTracks",
            "hltPixelTracksReg",
            "hltPixelTracksL3Muon",
            "hltPixelTracksGlbTrkMuon",
            "hltPixelTracksHighPtTkMuIso",
            "hltPixelTracksHybrid",
            "hltPixelTracksForPhotons",
            "hltPixelTracksForEgamma",
            "hltPixelTracksElectrons",
            "hltPixelTracksForHighPt",
            "hltHighPtPixelTracks",
            "hltPixelTracksForNoPU",
            "hltPixelTracksForSeedsTau3mu",
            "hltPixelTracksGlbDiTrkMuon",
            "hltPixelTracksHitTripletsForMinBias",
            "hltPixelTracksHitTripletsForMinBias01",
            "hltPixelTracksHitTripletsForHighMult",
            "hltRegionalPixelTracksHitTriplets",
            "hltPixelTracksHitTripletsReg",
            "hltPixelTracksHitTripletsL3Muon",
            "hltPixelTracksHitTripletsGlbTrkMuon",
            "hltPixelTracksHitTripletsHighPtTkMuIso",
            "hltPixelTracksHitTripletsHybrid",
            "hltPixelTracksHitTripletsForPhotons",
            "hltPixelTracksHitTripletsForEgamma",
            "hltPixelTracksHitTripletsElectrons",
            "hltPixelTracksHitTripletsForHighPt",
            "hltHighPtPixelTracksHitTriplets",
            "hltPixelTracksHitTripletsForNoPU",
            "hltPixelTracksHitTripletsForSeedsTau3mu",
            "hltPixelTracksHitTripletsGlbDiTrkMuon",
            "hltPixelTracksHitTriplets",
            "hltPixelTracksHitDoubletsForMinBias",
            "hltPixelTracksHitDoubletsForMinBias01",
            "hltPixelTracksHitDoubletsForHighMult",
            "hltRegionalPixelTracksHitDoublets",
            "hltPixelTracksHitDoubletsReg",
            "hltPixelTracksHitDoubletsL3Muon",
            "hltPixelTracksHitDoubletsGlbTrkMuon",
            "hltPixelTracksHitDoubletsHighPtTkMuIso",
            "hltPixelTracksHitDoubletsHybrid",
            "hltPixelTracksHitDoubletsForPhotons",
            "hltPixelTracksHitDoubletsForEgamma",
            "hltPixelTracksHitDoubletsElectrons",
            "hltPixelTracksHitDoubletsForHighPt",
            "hltHighPtPixelTracksHitDoublets",
            "hltPixelTracksHitDoubletsForNoPU",
            "hltPixelTracksHitDoubletsForSeedsTau3mu",
            "hltPixelTracksHitDoubletsGlbDiTrkMuon",
            "hltPixelTracksHitDoublets",
            "hltPixelTracksTrackingRegionsForMinBias",
            "hltPixelTracksTrackingRegionsForMinBias01",
            "hltPixelTracksTrackingRegionsForHighMult",
            "hltRegionalPixelTracksTrackingRegions",
            "hltPixelTracksTrackingRegionsReg",
            "hltPixelTracksTrackingRegionsL3Muon",
            "hltPixelTracksTrackingRegionsGlbTrkMuon",
            "hltPixelTracksTrackingRegionsHighPtTkMuIso",
            "hltPixelTracksTrackingRegionsHybrid",
            "hltPixelTracksTrackingRegionsForPhotons",
            "hltPixelTracksTrackingRegionsForEgamma",
            "hltPixelTracksTrackingRegionsElectrons",
            "hltPixelTracksTrackingRegionsForHighPt",
            "hltHighPtPixelTracksTrackingRegions",
            "hltPixelTracksTrackingRegionsForNoPU",
            "hltPixelTracksTrackingRegionsForSeedsTau3mu",
            "hltPixelTracksTrackingRegionsGlbDiTrkMuon",
            "hltPixelTracksTrackingRegions",
            "hltFastPixelHitsVertex",
            "hltFastPixelTracks",
            "hltFastPixelTracksRecover",
            "hltPixelLayerPairs",
            "hltPixelLayerTriplets",
            "hltPixelLayerTripletsReg",
            "hltPixelLayerTripletsHITHB",
            "hltPixelLayerTripletsHITHE",
            "hltPixelLayerTripletsAfterSplitting",
            "hltMixedLayerPairs",
            "hltFastPrimaryVertexbbPhi",
            "hltPixelTracksFastPVbbPhi",
            "hltPixelTracksRecoverbbPhi",
            "hltFastPixelHitsVertexVHbb",
            "hltFastPixelTracksVHbb",
            "hltFastPixelTracksRecoverVHbb",
            "hltFastPrimaryVertex",
            "hltFastPVPixelVertexFilter",
            "hltFastPVPixelTracks",
            "hltFastPVPixelTracksHitTriplets",
            "hltFastPVPixelTracksHitDoublets",
            "hltFastPVPixelTracksTrackingRegions",
            "hltFastPVPixelTracksRecover",
            "hltFastPVPixelTracksHitTripletsRecover",
            "hltFastPVPixelTracksHitDoubletsRecover",
            "hltFastPVPixelTracksTrackingRegionsRecover",
            "hltPAGoodHighPurityFullTracks",

            #   "hltPixelMatchElectronsActivity",
            "hltMuonCSCDigis",
            "hltMuonDTDigis",
            "hltMuonRPCDigis",
            #     "hltGtDigis",
            #     "hltL1GtTrigReport",
            #   "hltCsc2DRecHits",
            #   "hltDt1DRecHits",
            #   "hltRpcRecHits",
            "hltScalersRawToDigi",
            "hltEcalPreshowerDigis",
            "hltEcalDigis",
            "hltEcalDetIdToBeRecovered",
        )

        SequencesToRemove = (
            "HLTL1SeededEgammaRegionalRecoTrackerSequence",
            "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
            "HLTPixelMatchElectronActivityTrackingSequence",
            "HLTDoLocalStripSequence",
            "HLTDoLocalPixelSequence",
            "HLTDoLocalPixelSequenceRegL2Tau",
            "HLTDoLocalStripSequenceReg",
            "HLTDoLocalPixelSequenceReg",
            "HLTDoLocalStripSequenceRegForBTag",
            "HLTDoLocalPixelSequenceRegForBTag",
            "HLTDoLocalPixelSequenceRegForNoPU",
            "HLTDoLocalPixelSequenceAfterSplitting",
            "HLTPADoLocalStripSequenceAfterSplitting",
            "HLTBeginSequence",
            "HLTBeginSequenceL1Fat",
            "HLTBeginSequenceNZS",
            "HLTBeginSequenceBPTX",
            "HLTBeginSequenceAntiBPTX",
            "HLTHBHENoiseSequence",
            "HLTIterativeTrackingIter04",
            "HLTIterativeTrackingIter02",
            "HLTIterativeTracking",
            "HLTIterativeTrackingForHighPt",
            "HLTIterativeTrackingTau3Mu",
            "HLTIterativeTrackingGlbDiTrkMuonIter02",
            "HLTIterativeTrackingReg",
            "HLTIterativeTrackingForPA",
            "HLTPAIterativeTracking",
            "HLTIterativeTrackingForElectronIter02",
            "HLTIterativeTrackingForPhotonsIter02",
            "HLTIterativeTrackingL3MuonIter02",
            "HLTIterativeTrackingGlbTrkMuonIter02",
            "HLTIterativeTrackingL3MuonRegIter02",
            "HLTIterativeTrackingHighPtTkMu",
            "HLTIterativeTrackingHighPtTkMuIsoIter02",
            "HLTIterativeTrackingForBTagIter02",
            "HLTIterativeTrackingForBTagIter12",
            "HLTIterativeTrackingForTauIter04",
            "HLTIterativeTrackingForTauIter02",
            "HLTIterativeTrackingDisplacedJpsiIter02",
            "HLTIterativeTrackingDisplacedPsiPrimeIter02",
            "HLTIterativeTrackingDisplacedNRMuMuIter02",
            "HLTIterativeTrackingDisplacedTau3muIter02",
            "HLTIterativeTrackingForBTagIteration0",
            "HLTIterativeTrackingIteration4DisplacedJets",
            "HLTRegionalCKFTracksForL3Isolation",
            "HLTHBHENoiseCleanerSequence",
        )

        # Removing ESmodules
        for label in ESModulesToRemove:
            if (hasattr(process, label)):
                delattr(process, label)

# Removing paths
        import fnmatch, re
        ExplicitList = []
        HLTSchedule = tuple(path.label_() for path in process.HLTSchedule)
        for path in HLTSchedule:
            getattr(process, path).insert(1, process.HLTL1UnpackerSequence)
        for black in fastSimUnsupportedPaths:
            compiled = re.compile(fnmatch.translate(black))
            for path in HLTSchedule:
                if compiled.search(path) is not None:
                    ExplicitList += [path]
        UniqueList = []
        for path in ExplicitList:
            if path not in UniqueList:
                UniqueList += [path]
        for path in UniqueList:
            process.schedule.remove(getattr(process, path))
        process.setSchedule_(process.schedule)
        process.prune()

        # Removing streams and datasets PSets
        if hasattr(process, 'streams'):
            delattr(process, 'streams')
        if hasattr(process, 'datasets'):
            delattr(process, 'datasets')

# Removing sequences, possibly to be taken from fastsim import
        for label in SequencesToRemove:
            if hasattr(process, label):
                if hasattr(fastsim, label):
                    setattr(process, label, getattr(fastsim, label))
                else:
                    object = getattr(process, label)
                    list = tuple(process.sequences_().keys())
                    for name in list:
                        sequence = getattr(process, name)
                        more = True
                        while more:
                            more = sequence.remove(object)
                    list = tuple(process.paths_().keys())
                    for name in list:
                        path = getattr(process, name)
                        more = True
                        while more:
                            more = path.remove(object)
                    delattr(process, label)

# Removing modules, possibly to be taken from fastsim import
        for label in ModulesToRemove:
            if hasattr(process, label):
                if hasattr(fastsim, label):
                    setattr(process, label, getattr(fastsim, label))
                else:
                    object = getattr(process, label)
                    # remove from sequences
                    list = tuple(process.sequences_().keys())
                    for name in list:
                        sequence = getattr(process, name)
                        more = True
                        while more:
                            more = sequence.remove(object)
                    # remove from paths
                    list = tuple(process.paths_().keys())
                    for name in list:
                        path = getattr(process, name)
                        more = True
                        while more:
                            more = path.remove(object)
                    # remove from end paths
                    list = tuple(process.endpaths_().keys())
                    for name in list:
                        path = getattr(process, name)
                        more = True
                        while more:
                            more = path.remove(object)
                    delattr(process, label)

# Special transformations:
        if hasattr(process, 'hltGetConditions') and hasattr(
                process, 'HLTriggerFirstPath'):
            process.hltDummyConditions = cms.EDFilter("HLTBool",
                                                      result=cms.bool(True))
            process.HLTriggerFirstPath.replace(process.hltGetConditions,
                                               process.hltDummyConditions)
        if hasattr(process, 'hltPixelVertices'):
            process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
        specialModules = (
            'hltEcalRecHit',
            'hltEcalPreshowerRecHit',
        )
        for label in specialModules:
            if hasattr(process, label):
                setattr(fastsim, label, getattr(process, label))

# Use fastsim imports
        for label in fastsim.producers_().keys():
            if hasattr(process, label):
                setattr(process, label, getattr(fastsim, label))
        for label in fastsim.filters_().keys():
            if hasattr(process, label):
                setattr(process, label, getattr(fastsim, label))
        for label in fastsim.analyzers_().keys():
            if hasattr(process, label):
                setattr(process, label, getattr(fastsim, label))
        for label in fastsim.sequences_().keys():
            if hasattr(process, label):
                setattr(process, label, getattr(fastsim, label))

# Update InputTags

        InputTags = (
            #     ('hltGtDigis','gtDigis'),
            #     ('hltL1GtObjectMap','gtDigis'),
            ('hltEcalDigis:ebDigis', 'ecalDigis:ebDigis'),
            ('hltEcalDigis:eeDigis', 'ecalDigis:eeDigis'),
            ('hltMuonCSCDigis', 'muonCSCDigis'),
            ('hltMuonCSCDigis:MuonCSCStripDigi',
             'muonCSCDigis:MuonCSCStripDigi'),
            ('hltMuonCSCDigis:MuonCSCWireDigi',
             'muonCSCDigis:MuonCSCWireDigi'),
            ('hltMuonDTDigis', 'muonDTDigis'),
            ('hltMuonRPCDigis', 'muonRPCDigis'),
            ('hltEcalPreshowerDigis', 'ecalPreshowerDigis'),
            ('hltHbhereco', 'hbhereco'),
            ('hltHbherecoMethod2L1EGSeeded', 'hbhereco'),
            ('hltHbherecoMethod2L1EGUnseeded', 'hbhereco'),
            ('hltHoreco', 'horeco'),
            ('hltHfreco', 'hfreco'),
            ('hltIter2Merged', 'generalTracks'),
            ('hltIter2HighPtMerged', 'generalTracks'),
            ('hltIter2MergedForElectrons', 'generalTracks'),
            ('hltIter2MergedForPhotons', 'generalTracks'),
            ('hltIter2L3MuonMerged', 'generalTracks'),
            ('hltIter2MergedForBTag', 'generalTracks'),
            ('hltIter2MergedForTau', 'generalTracks'),
            ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
            ('hltIter2HighPtTkMuMerged', 'generalTracks'),
            ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
            ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
            ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
            ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
            ('hltIter2DisplacedTau3muMerged', 'generalTracks'),
            ('hltIter2GlbDiTrkMuonMerged', 'generalTracks'),
            ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
            ('hltIter4HighPtMerged', 'generalTracks'),
            ('hltIterativeTrackingForPAMerged', 'generalTracks'),
            #('hltPAIterativeTrackingMerged', 'generalTracks'),
            ('hltPAIterativeTrackingMerged', 'generalTracks'),
            ('hltPAGoodHighPurityFullTracks', 'generalTracks'),
            ('hltFastPVPixelTracks', 'hltPixelTracks'),
            ('hltFastPVPixelTracksRecover', 'hltPixelTracks'),
            ('hltPixelTracksL3Muon', 'hltPixelTracks'),
            ('hltPixelTracksGlbTrkMuon', 'hltPixelTracks'),
            ('hltPixelTracksHighPtTkMuIso', 'hltPixelTracks'),
            ('hltPixelTracksHybrid', 'hltPixelTracks'),
            ('hltPixelTracksForPhotons', 'hltPixelTracks'),
            ('hltPixelTracksForEgamma', 'hltPixelTracks'),
            ('hltPixelTracksElectrons', 'hltPixelTracks'),
            ('hltPixelTracksForHighPt', 'hltPixelTracks'),
            ('hltHighPtPixelTracks', 'hltPixelTracks'),
            ('hltPixelTracksForNoPU', 'hltPixelTracks'),
            ('hltPixelTracksForSeedsTau3mu', 'hltPixelTracks'),
            ('hltPixelTracksGlbDiTrkMuon', 'hltPixelTracks'),
            ('hltL1extraParticles', 'l1extraParticles'),
            ('hltL1extraParticles:Central', 'l1extraParticles:Central'),
            ('hltL1extraParticles:Forward', 'l1extraParticles:Forward'),
            ('hltL1extraParticles:Isolated', 'l1extraParticles:Isolated'),
            ('hltL1extraParticles:NonIsolated',
             'l1extraParticles:NonIsolated'),
            ('hltL1extraParticles:Tau', 'l1extraParticles:Tau'),
            ('hltL1extraParticles:IsoTau', 'l1extraParticles:IsoTau'),
            ('hltOfflineBeamSpot', 'offlineBeamSpot'),
            ('hltOnlineBeamSpot', 'offlineBeamSpot'),
            ('hltSiStripClusters', 'MeasurementTrackerEvent'),
            ('hltSiStripClustersAfterSplitting', 'MeasurementTrackerEvent'),
        )
        from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
        for pair in InputTags:
            process = MassReplaceInputTag(process, pair[0], pair[1])

# Update top-level named parameters
        NamedParameters = (
            #     ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
            ('killDeadChannels', cms.bool(True), cms.bool(False)),
            ('recoverEBFE', cms.bool(True), cms.bool(False)),
            ('recoverEEFE', cms.bool(True), cms.bool(False)),
            ('src', cms.InputTag('hltHcalTowerNoiseCleaner'),
             cms.InputTag('hltTowerMakerForAll')),
            ('src', cms.InputTag('hltHcalTowerNoiseCleanerWithrechit'),
             cms.InputTag('hltTowerMakerForAll')),
            ('initialSeeds', cms.InputTag('noSeedsHere'),
             cms.InputTag('hltPixelPairSeeds')),
            ('preFilteredSeeds', cms.bool(True), cms.bool(False)),
        )
        from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
        for thrice in NamedParameters:
            process = MassReplaceParameter(process, thrice[0], thrice[1],
                                           thrice[2])

# Update nested named parameters
        for label in (
                'hltEgammaElectronPixelSeeds',
                'hltEgammaElectronPixelSeedsUnseeded',
        ):
            if hasattr(process, label):
                getattr(process,
                        label).SeedConfiguration.initialSeeds = cms.InputTag(
                            'hltPixelPairSeeds')
                getattr(
                    process,
                    label).SeedConfiguration.preFilteredSeeds = cms.bool(False)


# Extending fastsim import
        fastsim.extend(process)
        fastsim.setSchedule_(fastsim.schedule)
        fastsim.prune()

        # muon seeds
        import FastSimulation.HighLevelTrigger.full2fast as full2fast
        if hasattr(fastsim, "hltL3TrajSeedOIHit"):
            full2fast.modify_hltL3TrajSeedOIHit(fastsim.hltL3TrajSeedOIHit)
        if hasattr(fastsim, "hltL3NoFiltersTrajSeedOIHit"):
            full2fast.modify_hltL3TrajSeedOIHit(
                fastsim.hltL3NoFiltersTrajSeedOIHit)
        if hasattr(fastsim, "hltL3TrajSeedIOHit"):
            full2fast.modify_hltL3TrajSeedIOHit(fastsim.hltL3TrajSeedIOHit)
        if hasattr(fastsim, "hltL3NoFiltersTrajSeedIOHit"):
            full2fast.modify_hltL3NoFiltersTrajSeedIOHit(
                fastsim.hltL3NoFiltersTrajSeedIOHit)

        return fastsim

    else:

        return process
Exemplo n.º 5
0
process.pVertexFilterCutGloose = cms.Path(process.pileupVertexFilterCutGloose)
process.pVertexFilterCutGtight = cms.Path(process.pileupVertexFilterCutGtight)
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)
'''
from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
process = MassReplaceInputTag(process, "offlinePrimaryVertices",
                              "offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

if cleanJets == True:
    from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
    process = MassReplaceInputTag(process, "particleFlow",
                                  "filteredParticleFlow")
    process.filteredParticleFlow.PFCandidates = "particleFlow"

###############################################################################

# Customization
Exemplo n.º 6
0
process.pHBHENoiseFilterResultProducer = cms.Path(
    process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(
    process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(
    process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(
    process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)

from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag

process = MassReplaceInputTag(process, "offlinePrimaryVertices",
                              "offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

###############################################################################

# Customization
##################################### trigger selection
process.load("HLTrigger.HLTfilters.hltHighLevel_cfi")
process.hltPFJet60 = process.hltHighLevel.clone()
process.hltPFJet60.HLTPaths = ["HLT_HIL3Mu3Eta2p5_PuAK4CaloJet60Eta2p1_v1"]
process.superFilterSequence = cms.Sequence(process.hltPFJet60)
process.superFilterPath = cms.Path(process.superFilterSequence)

process.skimanalysis.superFilters = cms.vstring("superFilterPath")
for path in process.paths:
    getattr(
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)
'''
from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
process = MassReplaceInputTag(process, "offlinePrimaryVertices",
                              "offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

# if cleanJets == True:
#     from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
#     process = MassReplaceInputTag(process,"particleFlow","filteredParticleFlow")
#     process.filteredParticleFlow.PFCandidates  = "particleFlow"

# Path and EndPath definitions
process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.digitisation_step = cms.Path(process.pdigi_hi_nogen)
process.L1simulation_step = cms.Path(process.SimL1Emulator)
process.digi2raw_step = cms.Path(process.DigiToRaw)
process.raw2digi_step = cms.Path(process.RawToDigi)
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)

from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
process = MassReplaceInputTag(process,"offlinePrimaryVertices","offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

###############################################################################

# Customization
# KT : add HLT filtering
import HLTrigger.HLTfilters.hltHighLevel_cfi
process.hltfilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
process.hltfilter.HLTPaths = ["HLT_HIGEDPhoton30*_v*", "HLT_HIIslandPhoton30*_v*", "HLT_HIGEDPhoton40*_v*", "HLT_HIIslandPhoton40*_v*"]
process.superFilterPath = cms.Path(process.hltfilter)
process.skimanalysis.superFilters = cms.vstring("superFilterPath")
##filter all path with the production filter sequence
for path in process.paths:
  getattr(process,path)._seq = process.hltfilter * getattr(process,path)._seq
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)

from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
process = MassReplaceInputTag(process,"offlinePrimaryVertices","offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

###############################################################################

# Customization
# KT : filter events on reco photons
# photon selection
process.selectedPhotons = cms.EDFilter("PhotonSelector",
    src = cms.InputTag("gedPhotons"),
    cut = cms.string('abs(eta) < 2.5')
)

# leading photon E_T filter
process.photonFilter = cms.EDFilter("EtMinPhotonCountFilter",
    src = cms.InputTag("selectedPhotons"),
process.pVertexFilterCutGplus = cms.Path(process.pileupVertexFilterCutGplus)
process.pVertexFilterCutE = cms.Path(process.pileupVertexFilterCutE)
process.pVertexFilterCutEandG = cms.Path(process.pileupVertexFilterCutEandG)

process.load('HeavyIonsAnalysis.JetAnalysis.EventSelection_cff')
process.pHBHENoiseFilterResultProducer = cms.Path(process.HBHENoiseFilterResultProducer)
process.HBHENoiseFilterResult = cms.Path(process.fHBHENoiseFilterResult)
process.HBHENoiseFilterResultRun1 = cms.Path(process.fHBHENoiseFilterResultRun1)
process.HBHENoiseFilterResultRun2Loose = cms.Path(process.fHBHENoiseFilterResultRun2Loose)
process.HBHENoiseFilterResultRun2Tight = cms.Path(process.fHBHENoiseFilterResultRun2Tight)
process.HBHEIsoNoiseFilterResult = cms.Path(process.fHBHEIsoNoiseFilterResult)

process.pAna = cms.EndPath(process.skimanalysis)

from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
process = MassReplaceInputTag(process,"offlinePrimaryVertices","offlinePrimaryVerticesRecovery")
process.offlinePrimaryVerticesRecovery.oldVertexLabel = "offlinePrimaryVertices"

###############################################################################

# Customization
# KT : filter events on reco electrons
process.electronFilter = cms.EDFilter("PtMinGsfElectronCountFilter",
    src = cms.InputTag("gedGsfElectrons"),
    ptMin = cms.double(2.0),
    minNumber = cms.uint32(1)
)

process.electronFilterSequence = cms.Sequence(process.electronFilter
)