Beispiel #1
0
def miniAOD_customizeMC(process):
    task = getPatAlgosToolsTask(process)
    #GenJetFlavourInfos
    process.load("PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi")
    task.add(process.selectedHadronsAndPartons)
    task.add(process.selectedHadronsAndPartonsForGenJetsFlavourInfos)

    process.load("PhysicsTools.JetMCAlgos.AK4GenJetFlavourInfos_cfi")
    task.add(process.ak4GenJetFlavourInfos)

    process.load(
        'PhysicsTools.PatAlgos.slimming.slimmedGenJetsFlavourInfos_cfi')
    task.add(process.slimmedGenJetsFlavourInfos)

    #slimmed pileup information
    process.load('PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
    task.add(process.slimmedAddPileupInfo)

    process.muonMatch.matched = "prunedGenParticles"
    process.electronMatch.matched = "prunedGenParticles"
    process.electronMatch.src = cms.InputTag("reducedEgamma",
                                             "reducedGedGsfElectrons")
    process.photonMatch.matched = "prunedGenParticles"
    process.photonMatch.src = cms.InputTag("reducedEgamma",
                                           "reducedGedPhotons")
    process.ootPhotonMatch.matched = "prunedGenParticles"
    process.ootPhotonMatch.src = cms.InputTag("reducedEgamma",
                                              "reducedOOTPhotons")
    process.tauMatch.matched = "prunedGenParticles"
    process.tauGenJets.GenParticles = "prunedGenParticles"
    #Boosted taus
    process.tauMatchBoosted.matched = "prunedGenParticles"
    process.tauGenJetsBoosted.GenParticles = "prunedGenParticles"
    process.patJetPartons.particles = "genParticles"
    process.patJetPartonMatch.matched = "prunedGenParticles"
    pp_on_AA.toModify(process.patJetPartonMatch,
                      matched="hiSignalGenParticles")
    from Configuration.ProcessModifiers.genJetSubEvent_cff import genJetSubEvent
    genJetSubEvent.toModify(process.patJetPartonMatch,
                            matched="cleanedPartons")
    process.patJetPartonMatch.mcStatus = [3, 23]
    process.patJetGenJetMatch.matched = "slimmedGenJets"
    (~pp_on_AA).toModify(
        process, patJetGenJetMatchAK8Puppi=dict(matched="slimmedGenJetsAK8"))
    process.patMuons.embedGenMatch = False
    process.patElectrons.embedGenMatch = False
    process.patPhotons.embedGenMatch = False
    process.patOOTPhotons.embedGenMatch = False
    process.patTaus.embedGenMatch = False
    process.patTausBoosted.embedGenMatch = False
    process.patJets.embedGenPartonMatch = False
    #also jet flavour must be switched
    process.patJetFlavourAssociation.rParam = 0.4

    from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJetSetup import removeJECsForMC
    pp_on_AA.toModify(process, removeJECsForMC)
    pp_on_AA.toReplaceWith(
        task, task.copyAndExclude([process.slimmedGenJetsFlavourInfos]))
)  #module siPixelPhase1OfflineDQM_sourceV can't run in FastSim since siPixelClusters of type edmNew::DetSetVector are not produced

_run3_globalValidation = globalValidation.copy()
_run3_globalValidation += gemSimValid

_phase2_globalValidation = _run3_globalValidation.copy()
_phase2_globalValidation += trackerphase2ValidationSource
_phase2_globalValidation += me0SimValid

_phase2_ge0_globalValidation = _run3_globalValidation.copy()
_phase2_ge0_globalValidation += trackerphase2ValidationSource

from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
run2_GEM_2017.toReplaceWith(globalValidation, _run3_globalValidation)
from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
run3_GEM.toReplaceWith(globalValidation, _run3_globalValidation)
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
phase2_muon.toReplaceWith(globalValidation, _phase2_globalValidation)
from Configuration.Eras.Modifier_phase2_GE0_cff import phase2_GE0
phase2_GE0.toReplaceWith(globalValidation, _phase2_ge0_globalValidation)
phase2_GE0.toReplaceWith(
    globalPrevalidationMuons,
    globalPrevalidationMuons.copyAndExclude([me0SimValid]))
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(
    globalValidation, globalValidation.copyAndExclude([pfTauRunDQMValidation]))
from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
phase2_timing_layer.toReplaceWith(
    globalValidationMTD,
    cms.Sequence(mtdSimValid + mtdDigiValid + mtdRecoValid))
Beispiel #3
0
import FWCore.ParameterSet.Config as cms
from PhysicsTools.PatAlgos.slimming.prunedGenParticles_cfi import *
from PhysicsTools.PatAlgos.slimming.packedGenParticles_cfi import *

prunedGenParticlesWithStatusOne = prunedGenParticles.clone()
prunedGenParticlesWithStatusOne.select.append("keep    status == 1")

prunedGenParticles.src = cms.InputTag("prunedGenParticlesWithStatusOne")

packedGenParticles.inputCollection = cms.InputTag(
    "prunedGenParticlesWithStatusOne")
packedGenParticles.map = cms.InputTag(
    "prunedGenParticles"
)  # map with rekey association from prunedGenParticlesWithStatusOne to prunedGenParticles, used to relink our refs to prunedGen
packedGenParticles.inputOriginal = cms.InputTag("genParticles")

genParticlesTask = cms.Task(prunedGenParticles, packedGenParticles,
                            prunedGenParticlesWithStatusOne)

from PhysicsTools.PatAlgos.packedGenParticlesSignal_cfi import *

_genParticlesHITask = genParticlesTask.copy()
_genParticlesHITask.add(packedGenParticlesSignal)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(genParticlesTask, _genParticlesHITask)
Beispiel #4
0
        'keep booledmValueMap_muidTM2DCompatibilityTight_*_*',
        'keep booledmValueMap_muidTMLastStationAngLoose_*_*',
        'keep booledmValueMap_muidTMLastStationAngTight_*_*',
        'keep booledmValueMap_muidTMLastStationLoose_*_*',
        'keep booledmValueMap_muidTMLastStationOptimizedLowPtLoose_*_*',
        'keep booledmValueMap_muidTMLastStationOptimizedLowPtTight_*_*',
        'keep booledmValueMap_muidTMLastStationTight_*_*',
        'keep booledmValueMap_muidTMOneStationAngLoose_*_*',
        'keep booledmValueMap_muidTMOneStationAngTight_*_*',
        'keep booledmValueMap_muidTMOneStationLoose_*_*',
        'keep booledmValueMap_muidTMOneStationTight_*_*',
        'keep booledmValueMap_muidTrackerMuonArbitrated_*_*'))

import copy
OutALCARECODtCalib = copy.deepcopy(OutALCARECODtCalib_noDrop)
OutALCARECODtCalib.outputCommands.insert(0, "drop *")

## customizations for the pp_on_AA eras
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA

OutALCARECODtCalibHI = copy.deepcopy(OutALCARECODtCalib_noDrop)
OutALCARECODtCalibHI.outputCommands.insert(0, "drop *")
OutALCARECODtCalibHI.outputCommands.append("keep *_offlinePrimaryVertices__*")
OutALCARECODtCalibHI.outputCommands.append(
    "keep *_offlinePrimaryVerticesWithBS_*_*")
OutALCARECODtCalibHI.outputCommands.append(
    "keep *_offlinePrimaryVerticesFromCosmicTracks_*_*")

#Specify to use HI output for the pp_on_AA eras
pp_on_AA.toReplaceWith(OutALCARECODtCalib, OutALCARECODtCalibHI)
Beispiel #5
0
    FPix = dict(skipClusters = 'pixelPairStepSeedClusterMask')
)

from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
tripletElectronTrackingRegions = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
    ptMin        = 1.0,
    originRadius = 0.02,
    nSigmaZ      = 4.0
))

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
pp_on_AA.toReplaceWith(tripletElectronTrackingRegions,
    _globalTrackingRegionWithVertices.clone(
        RegionPSet = dict(
            fixedError   = 0.5,
            ptMin        = 8.0,
            originRadius = 0.02
        )
))

from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
tripletElectronHitDoublets = _hitPairEDProducer.clone(
    seedingLayers   = 'tripletElectronSeedLayers',
    trackingRegions = 'tripletElectronTrackingRegions',
    maxElement      = 50000000,
    produceIntermediateHitDoublets = True,
)
from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
tripletElectronHitTriplets = _pixelTripletHLTEDProducer.clone(
    doublets   = 'tripletElectronHitDoublets',
Beispiel #6
0
slimmingTask = cms.Task(
    packedPFCandidatesTask, lostTracks, isolatedTracks,
    offlineSlimmedPrimaryVertices, offlineSlimmedPrimaryVerticesWithBS,
    primaryVertexAssociation, primaryVertexWithBSAssociation, genParticlesTask,
    packedCandidateToGenAssociationTask, selectedPatTrigger, slimmedPatTrigger,
    slimmedCaloJets, slimmedJets, slimmedJetsAK8, slimmedGenJets,
    slimmedGenJetsAK8, slimmedElectrons, slimmedLowPtElectronsTask,
    slimmedMuonTrackExtras, slimmedMuons, slimmedDisplacedMuonTrackExtras,
    slimmedDisplacedMuons, slimmedPhotons, slimmedOOTPhotons, slimmedTaus,
    slimmedSecondaryVertices, slimmedKshortVertices, slimmedLambdaVertices,
    slimmedMETs, metFilterPathsTask, reducedEgamma, slimmedHcalRecHits,
    bunchSpacingProducer, oniaPhotonCandidates)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA

pp_on_AA.toReplaceWith(slimmingTask,
                       slimmingTask.copyAndExclude([slimmedOOTPhotons]))

from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy

_mAOD = (run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy)
(pp_on_AA | _mAOD).toReplaceWith(
    slimmingTask, slimmingTask.copyAndExclude([slimmedLowPtElectronsTask]))

from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
from Configuration.Eras.Era_Run2_2016_HIPM_cff import Run2_2016_HIPM
(pp_on_AA | _mAOD | run2_miniAOD_UL | Run2_2016_HIPM).toReplaceWith(
    slimmingTask,
    slimmingTask.copyAndExclude(
        [slimmedDisplacedMuons, slimmedDisplacedMuonTrackExtras]))
Beispiel #7
0
from CalibMuon.DTCalibration.DTCalibMuonSelection_cfi import *

# AlCaReco for DT calibration
ALCARECODtCalibHLTFilter = copy.deepcopy(hltHighLevel)
#ALCARECODtCalibHLTFilter.andOr = True ## choose logical OR between Triggerbits
#ALCARECODtCalibHLTFilter.HLTPaths = ['HLT_L1MuOpen*', 'HLT_L1Mu*']
ALCARECODtCalibHLTFilter.throw = False  ## dont throw on unknown path names
ALCARECODtCalibHLTFilter.eventSetupPathsKey = 'DtCalib'

import RecoLocalMuon.DTSegment.dt4DSegments_CombPatternReco4D_LinearDriftFromDB_cfi as dt4DSegmentsCfiRef
dt4DSegmentsNoWire = dt4DSegmentsCfiRef.dt4DSegments.clone()
dt4DSegmentsNoWire.Reco4DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False
dt4DSegmentsNoWire.Reco4DAlgoConfig.Reco2DAlgoConfig.recAlgoConfig.tTrigModeConfig.doWirePropCorrection = False

#this is to select collisions
from RecoMET.METFilters.metFilters_cff import primaryVertexFilter, noscraping

seqALCARECODtCalib = cms.Sequence(primaryVertexFilter * noscraping *
                                  ALCARECODtCalibHLTFilter *
                                  DTCalibMuonSelection * dt4DSegmentsNoWire)

## customizations for the pp_on_AA eras
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toModify(ALCARECODtCalibHLTFilter, eventSetupPathsKey='DtCalibHI')

seqALCARECODtCalibHI = cms.Sequence(ALCARECODtCalibHLTFilter *
                                    dt4DSegmentsNoWire)

#Specify to use HI sequence for the pp_on_AA eras
pp_on_AA.toReplaceWith(seqALCARECODtCalib, seqALCARECODtCalibHI)
Beispiel #8
0
import FWCore.ParameterSet.Config as cms

from DQMOffline.Trigger.ParticleNetAK4BTagMonitoring_cfi import particleNetAK4BTagMonitoring
from DQMOffline.Trigger.ParticleNetAK8HbbTagMonitoring_cfi import particleNetAK8HbbTagMonitoring

particleNetMonitoringHLT = cms.Sequence(particleNetAK4BTagMonitoring +
                                        particleNetAK8HbbTagMonitoring)

# empty particleNetMonitoringHLT sequence when using the pp_on_AA processModifier:
#  HLT-PNET DQM can trigger the execution of modules to run inference
#  on offline jet collections which are not present in HIon workflows
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(particleNetMonitoringHLT, cms.Sequence())
Beispiel #9
0
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel

phase1Pixel.toModify(TrackerMapFoldedClient, EtaMin=-3., EtaMax=3.)
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker

phase2_tracker.toModify(TrackerMapFoldedClient, EtaMin=-4.5, EtaMax=4.5)

TrackerMapFoldedClient_highpurity_dzPV0p1 = TrackerMapFoldedClient.clone(
    TrackQuality=cms.string('highPurityTracks/dzPV0p1'))

TrackerMapFoldedClient_highpurity_pt0to1 = TrackerMapFoldedClient.clone(
    TrackQuality=cms.string('highPurityTracks/pt_0to1'))

TrackerMapFoldedClient_highpurity_pt1 = TrackerMapFoldedClient.clone(
    TrackQuality=cms.string('highPurityTracks/pt_1'))

foldedMapClientSeq = cms.Sequence(TrackerMapFoldedClient *
                                  TrackerMapFoldedClient_highpurity_dzPV0p1 *
                                  TrackerMapFoldedClient_highpurity_pt0to1 *
                                  TrackerMapFoldedClient_highpurity_pt1)

#run3
TrackerMapFoldedClient_hiConformalPixelTracks = TrackerMapFoldedClient.clone(
    TrackQuality=cms.string('hiConformalPixelTracks'))

folded_with_conformalpixtkclient = cms.Sequence(
    TrackerMapFoldedClient_hiConformalPixelTracks + foldedMapClientSeq.copy())
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA

pp_on_AA.toReplaceWith(foldedMapClientSeq, folded_with_conformalpixtkclient)
hfrecoMBNZS.tsFromDB = cms.bool(False)
hfrecoMBNZS.dropZSmarkedPassed = cms.bool(False)

seqALCARECOHcalCalMinBiasDigi = cms.Sequence(hcalminbiasHLT * hcalDigiAlCaMB *
                                             gtDigisAlCaMB)
seqALCARECOHcalCalMinBiasDigiNoHLT = cms.Sequence(hcalDigiAlCaMB *
                                                  gtDigisAlCaMB)

seqALCARECOHcalCalMinBias = cms.Sequence(
    hbherecoMBNZS * horecoMBNZS * hbherecoNoise * hfrecoNoise * hfrecoMBNZS *
    horecoNoise)

#Specify to use HI output for the pp_on_AA eras
seqALCARECOHcalCalMinBiasHI = cms.Sequence(hbherecoNoise * hfrecoNoise *
                                           hfrecoMBNZS * horecoNoise)
pp_on_AA.toReplaceWith(seqALCARECOHcalCalMinBias, seqALCARECOHcalCalMinBiasHI)

import RecoLocalCalo.HcalRecProducers.hfprereco_cfi
hfprerecoNoise = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
    digiLabel=cms.InputTag("hcalDigiAlCaMB"),
    dropZSmarkedPassed=cms.bool(False),
    tsFromDB=cms.bool(False),
    sumAllTimeSlices=cms.bool(False),
    forceSOI=cms.int32(0))
hfprerecoMBNZS = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
    digiLabel=cms.InputTag("hcalDigiAlCaMB"),
    dropZSmarkedPassed=cms.bool(False),
    tsFromDB=cms.bool(False),
    sumAllTimeSlices=cms.bool(True),
    forceSOI=cms.int32(1))
Beispiel #11
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.ak4CaloJets_cfi import ak4CaloJets as _ak4CaloJets
from RecoHI.HiJetAlgos.HiRecoJets_cff import akPu4CaloJets as _akPu4CaloJets
from RecoLocalCalo.CaloTowersCreator.calotowermaker_cfi import calotowermaker
caloTowerForTrk = calotowermaker.clone(hbheInput='hbheprereco',
                                       missingHcalRescaleFactorForEcal=1.0)

ak4CaloJetsForTrk = _ak4CaloJets.clone(
    srcPVs='firstStepPrimaryVerticesUnsorted', src='caloTowerForTrk')

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(
    ak4CaloJetsForTrk,
    _akPu4CaloJets.clone(srcPVs='firstStepPrimaryVerticesUnsorted',
                         src='caloTowerForTrk'))

from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(ak4CaloJetsForTrk, srcPVs="pixelVertices")

caloJetsForTrkTask = cms.Task(caloTowerForTrk, ak4CaloJetsForTrk)
caloJetsForTrk = cms.Sequence(caloJetsForTrkTask)

from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
run3_HB.toModify(caloTowerForTrk, hbheInput="hbhereco")

from Configuration.Eras.Modifier_pf_badHcalMitigationOff_cff import pf_badHcalMitigationOff
pf_badHcalMitigationOff.toModify(caloTowerForTrk,
                                 missingHcalRescaleFactorForEcal=0.0)
# output block for alcastream HCAL Min Bias
# output module
#  module alcastreamHcalMinbiasOutput = PoolOutputModule

OutALCARECOHcalCalMinBias_noDrop = cms.PSet(
    SelectEvents=cms.untracked.PSet(
        SelectEvents=cms.vstring('pathALCARECOHcalCalMinBias')),
    outputCommands=cms.untracked.vstring(
        'keep *_hltTriggerSummaryAOD_*_*', 'keep *_TriggerResults_*_*',
        'keep HcalNoiseSummary_hcalnoise_*_*',
        'keep HBHERecHitsSorted_hbherecoMBNZS_*_*',
        'keep HORecHitsSorted_horecoMBNZS_*_*',
        'keep HFRecHitsSorted_hfrecoMBNZS_*_*',
        'keep HBHERecHitsSorted_hbherecoNoise_*_*',
        'keep HORecHitsSorted_horecoNoise_*_*',
        'keep HFRecHitsSorted_hfrecoNoise_*_*'))

import copy
OutALCARECOHcalCalMinBias = copy.deepcopy(OutALCARECOHcalCalMinBias_noDrop)
OutALCARECOHcalCalMinBias.outputCommands.insert(0, "drop *")

## customizations for the pp_on_AA eras
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
OutALCARECOHcalCalMinBiasHI = copy.deepcopy(OutALCARECOHcalCalMinBias_noDrop)
OutALCARECOHcalCalMinBiasHI.outputCommands.insert(0, "drop *")
OutALCARECOHcalCalMinBiasHI.outputCommands.insert(
    6, "keep HFRecHitsSorted_hfreco_*_*")

#Specify to use HI output for the pp_on_AA
pp_on_AA.toReplaceWith(OutALCARECOHcalCalMinBias, OutALCARECOHcalCalMinBiasHI)
Beispiel #13
0
    jetDQMAnalyzerAk4PFCleaned * jetDQMAnalyzerAk4PFCHSCleaned)

jetDQMAnalyzerSequenceCosmics = cms.Sequence(jetDQMAnalyzerAk4CaloUncleaned)

jetDQMAnalyzerSequenceMiniAOD = cms.Sequence(
    jetDQMAnalyzerAk4PFCHSUncleanedMiniAOD *
    jetDQMAnalyzerAk4PFCHSCleanedMiniAOD *
    jetDQMAnalyzerAk8PFPUPPICleanedMiniAOD *
    jetDQMAnalyzerAk4PFCHSPuppiCleanedMiniAOD)

jetDQMAnalyzerSequenceHI = cms.Sequence(
    jetDQMAnalyzerIC5CaloHIUncleaned * jetDQMMatchAkPu3CaloAkPu3PF *
    jetDQMMatchAkPu4CaloAkPu4PF * jetDQMMatchAkPu5CaloAkPu5PF *
    jetDQMAnalyzerAkPU3Calo * jetDQMAnalyzerAkPU4Calo *
    jetDQMAnalyzerAkPU5Calo * jetDQMAnalyzerAkPU3PF * jetDQMAnalyzerAkPU4PF *
    jetDQMAnalyzerAkPU5PF * jetDQMAnalyzerAkCs3PF * jetDQMAnalyzerAkCs4PF)

_jetDQMAnalyzerSequenceHI = cms.Sequence(
    jetDQMMatchAkPu4CaloAkPu4PF * jetDQMAnalyzerAkPU4Calo *
    jetDQMAnalyzerAkPU3PF * jetDQMAnalyzerAkPU4PF * jetDQMAnalyzerAkCs4PF)
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(jetDQMAnalyzerSequence, _jetDQMAnalyzerSequenceHI)
pp_on_AA.toModify(jetDQMAnalyzerAkPU4Calo,
                  srcVtx=cms.untracked.InputTag("offlinePrimaryVertices"))
pp_on_AA.toModify(jetDQMAnalyzerAkPU3PF,
                  srcVtx=cms.untracked.InputTag("offlinePrimaryVertices"))
pp_on_AA.toModify(jetDQMAnalyzerAkPU4PF,
                  srcVtx=cms.untracked.InputTag("offlinePrimaryVertices"))
pp_on_AA.toModify(jetDQMAnalyzerAkCs4PF,
                  srcVtx=cms.untracked.InputTag("offlinePrimaryVertices"))
import FWCore.ParameterSet.Config as cms

from DQMOffline.Trigger.ParticleNetAK4BTagClient_cfi import particleNetAK4BTagEfficiency
from DQMOffline.Trigger.ParticleNetAK8HbbTagClient_cfi import particleNetAK8HbbTagEfficiency

particleNetClientHLT = cms.Sequence(
    particleNetAK4BTagEfficiency
  + particleNetAK8HbbTagEfficiency
)

# empty particleNetClientHLT sequence when using the pp_on_AA processModifier:
#  see DQMOffline/Trigger/python/ParticleNetJetTagMonitoring_cff.py
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(particleNetClientHLT, cms.Sequence())
    interestingOotGamIsoDetIdEB, interestingOotGamIsoDetIdEE,
    interestingGamIsoDetIdEB, interestingGamIsoDetIdEE,
    interestingGedEgammaIsoHCALDetId, interestingOotEgammaIsoHCALDetId,
    interestingGedEgammaIsoESDetId, interestingOotEgammaIsoESDetId)
interestingEgammaIsoDetIds = cms.Sequence(interestingEgammaIsoDetIdsTask)

_pp_on_AA_interestingEgammaIsoDetIdsTask = interestingEgammaIsoDetIdsTask.copy(
)
_pp_on_AA_interestingEgammaIsoDetIdsTask.remove(interestingOotGamIsoDetIdEB)
_pp_on_AA_interestingEgammaIsoDetIdsTask.remove(interestingOotGamIsoDetIdEE)
_pp_on_AA_interestingEgammaIsoDetIdsTask.remove(
    interestingOotEgammaIsoHCALDetId)
_pp_on_AA_interestingEgammaIsoDetIdsTask.remove(interestingOotEgammaIsoESDetId)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(interestingEgammaIsoDetIdsTask,
                       _pp_on_AA_interestingEgammaIsoDetIdsTask)

from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
egamma_lowPt_exclusive.toModify(
    interestingGedEgammaIsoESDetId,
    minSCEt=1.0,  #default 500
    minEleEt=1.0,  #default 20
    minPhoEt=1.0  #default 20
)
egamma_lowPt_exclusive.toModify(
    interestingGedEgammaIsoHCALDetId,
    minSCEt=1.0,  #default 20
    minEleEt=1.0,  #default 20
    minPhoEt=1.0  #default 20
)
# One module to count objects
selectedPatCandidateSummary = cms.EDAnalyzer(
    "CandidateSummaryTable",
    logName=cms.untracked.string("selectedPatCanddiates|PATSummaryTables"),
    candidates=cms.VInputTag(
        cms.InputTag("selectedPatElectrons"),
        cms.InputTag("selectedPatLowPtElectrons"),
        cms.InputTag("selectedPatMuons"),
        cms.InputTag("selectedPatTaus"),
        cms.InputTag("selectedPatPhotons"),
        cms.InputTag("selectedPatOOTPhotons"),
        cms.InputTag("selectedPatJets"),
    ))

selectedPatCandidatesTask = cms.Task(selectedPatElectrons,
                                     selectedPatLowPtElectrons,
                                     selectedPatMuons, selectedPatTaus,
                                     selectedPatPhotons, selectedPatOOTPhotons,
                                     selectedPatJets)

selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary,
                                     selectedPatCandidatesTask)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(
    selectedPatCandidatesTask,
    selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
pp_on_AA.toModify(
    selectedPatCandidateSummary.candidates,
    func=lambda list: list.remove(cms.InputTag("selectedPatOOTPhotons")))
Beispiel #17
0
    singleTopMuonMediumDQM * singleTopElectronMediumDQM * DiMuonDQM *
    DiElectronDQM * ElecMuonDQM * susyDQM * HiggsDQM * ExoticaDQM * B2GDQM *
    FSQDQM * SMPDQM)

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toReplaceWith(
    dqmPhysics,
    dqmPhysics.copyAndExclude([  # FIXME
        ewkMuDQM,  # Excessive printouts because 2017 doesn't have HLT yet
        ewkElecDQM,  # Excessive printouts because 2017 doesn't have HLT yet
        ewkMuLumiMonitorDQM,  # Excessive printouts because 2017 doesn't have HLT yet
    ]))
from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
dqmPhysicspA = dqmPhysics.copy()
dqmPhysicspA += CentralitypADQM
pA_2016.toReplaceWith(dqmPhysics, dqmPhysicspA)
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
_dqmPhysics = dqmPhysics.copy()
_dqmPhysics += CentralityDQM
pp_on_AA.toModify(CentralityDQM,
                  vertexcollection=cms.InputTag("offlinePrimaryVertices"))
pp_on_AA.toReplaceWith(dqmPhysics, _dqmPhysics)

bphysicsOniaDQMHI = bphysicsOniaDQM.clone(
    vertex=cms.InputTag("hiSelectedVertex"))
dqmPhysicsHI = cms.Sequence(bphysicsOniaDQMHI + CentralityDQM)

from DQM.Physics.qcdPhotonsCosmicDQM_cff import *
dqmPhysicsCosmics = cms.Sequence(dqmPhysics)
dqmPhysicsCosmics.replace(qcdPhotonsDQM, qcdPhotonsCosmicDQM)
Beispiel #18
0
    gsfTracksOpenConversions)
highlevelreco = cms.Sequence(highlevelrecoTask)

# AA data with pp reco
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
from RecoHI.HiTracking.HILowPtConformalPixelTracks_cfi import *
from RecoHI.HiCentralityAlgos.HiCentrality_cfi import hiCentrality
from RecoHI.HiCentralityAlgos.HiClusterCompatibility_cfi import hiClusterCompatibility
_highlevelreco_HITask = highlevelrecoTask.copy()
_highlevelreco_HITask.add(hiConformalPixelTracksTaskPhase1)
_highlevelreco_HITask.add(hiCentrality)
_highlevelreco_HITask.add(hiClusterCompatibility)
(pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(highlevelrecoTask,
                                           _highlevelreco_HITask)
pp_on_AA.toReplaceWith(highlevelrecoTask,
                       highlevelrecoTask.copyAndExclude([PFTauTask]))

# not commisoned and not relevant in FastSim (?):
_fastSim_highlevelrecoTask = highlevelrecoTask.copyAndExclude(
    [muoncosmichighlevelrecoTask])
fastSim.toReplaceWith(highlevelrecoTask, _fastSim_highlevelrecoTask)

from FWCore.Modules.logErrorHarvester_cfi import *

# "Export" Section
reconstructionTask = cms.Task(localrecoTask, globalrecoTask, highlevelrecoTask,
                              logErrorHarvester)
reconstruction = cms.Sequence(reconstructionTask)

#logErrorHarvester should only wait for items produced in the reconstruction sequence
_modulesInReconstruction = list()
import FWCore.ParameterSet.Config as cms

from DQMOffline.JetMET.dataCertificationJetMET_cfi import *

dataCertificationJetMETSequence = cms.Sequence(qTesterJet + qTesterMET +
                                               dataCertificationJetMET)

dataCertificationJetMETSequenceHI = cms.Sequence(qTesterJet + qTesterMET +
                                                 dataCertificationJetMETHI)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA

pp_on_AA.toReplaceWith(dataCertificationJetMETSequence,
                       dataCertificationJetMETSequenceHI)
Beispiel #20
0
from PhysicsTools.PatAlgos.recoLayer0.jetCorrections_cff import *
from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import *
from PhysicsTools.PatAlgos.mcMatchLayer0.jetFlavourId_cff import *
from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import *

## for scheduled mode
makePatJetsTask = cms.Task(patJetCorrectionsTask, patJetCharge,
                           patJetPartonMatch, patJetGenJetMatch,
                           patJetFlavourIdLegacyTask, patJetFlavourIdTask,
                           patJets)

from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJets_cff import *
_makePatJetsTaskHI = cms.Task(recoJetsHIpostAODTask, makePatJetsTask.copy())

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(makePatJetsTask, _makePatJetsTaskHI)

makePatJets = cms.Sequence(makePatJetsTask)

from RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi import *  #pfImpactParameterTagInfos
from RecoBTag.SecondaryVertex.pfSecondaryVertexTagInfos_cfi import *  #pfSecondaryVertexTagInfos
from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import *  #pfInclusiveSecondaryVertexFinderTagInfos
from RecoBTag.Combined.deepFlavour_cff import *  #pfDeepCSVTask

#make a copy to avoid labels and substitution problems
_makePatJetsWithDeepFlavorTask = makePatJetsTask.copy()
_makePatJetsWithDeepFlavorTask.add(pfImpactParameterTagInfos,
                                   pfSecondaryVertexTagInfos,
                                   pfInclusiveSecondaryVertexFinderTagInfos,
                                   pfDeepCSVTask)
Beispiel #21
0
from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toReplaceWith(reducedEcalRecHitsTask,
                            _phase2_reducedEcalRecHitsTask)

_fastSim_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copyAndExclude(
    seldigisTask)
from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toReplaceWith(reducedEcalRecHitsTask, _fastSim_reducedEcalRecHitsTask)

_pp_on_AA_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copy()
_pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEB)
_pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEE)
_pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFES)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(reducedEcalRecHitsTask,
                       _pp_on_AA_reducedEcalRecHitsTask)

pp_on_AA.toModify(
    reducedEcalRecHitsEB.interestingDetIdCollections,
    func=lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEB")))
pp_on_AA.toModify(
    reducedEcalRecHitsEB.interestingDetIdCollections,
    func=lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEB")))
pp_on_AA.toModify(
    reducedEcalRecHitsEE.interestingDetIdCollections,
    func=lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEE")))
pp_on_AA.toModify(
    reducedEcalRecHitsEE.interestingDetIdCollections,
    func=lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEE")))
pp_on_AA.toModify(
    reducedEcalRecHitsES.interestingDetIds,
Beispiel #22
0
photonIDValueMaps = cms.EDProducer(
  "PhotonIDValueMapProducer",
  ebReducedRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
  eeReducedRecHitCollection = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
  esReducedRecHitCollection  = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"),
  particleBasedIsolation = cms.InputTag("particleBasedIsolationTmp","gedPhotonsTmp"),
  pfCandidates = cms.InputTag("particleFlowTmp"),
  src = cms.InputTag("gedPhotonsTmp"),
  vertices = cms.InputTag("offlinePrimaryVertices"),
  isAOD = cms.bool(True)
  )


particleFlowEGammaFullTask = cms.Task(particleFlowEGamma, gedGsfElectronTaskTmp, gedPhotonTaskTmp, ootPhotonTask)
particleFlowEGammaFull = cms.Sequence(particleFlowEGammaFullTask)
particleFlowEGammaFinalTask = cms.Task(particleBasedIsolationTmp,
                                       pfNoPileUpIsoTask,
                                       pfNoPileUpCandidates,
                                       pfPileUpAllChargedParticles,
                                       egmPhotonIsolationCITK,
                                       egmElectronIsolationCITK,
                                       egmElectronIsolationPileUpCITK,
                                       photonIDValueMaps,
                                       gedPhotonTask,
                                       gedElectronPFIsoTask)
particleFlowEGammaFinal = cms.Sequence(particleFlowEGammaFinalTask)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(particleFlowEGammaFullTask, particleFlowEGammaFullTask.copyAndExclude([ootPhotonTask]))

Beispiel #23
0
import FWCore.ParameterSet.Config as cms

from RecoParticleFlow.PFTracking.trackerDrivenElectronSeeds_cff import *
from RecoEgamma.EgammaElectronProducers.ecalDrivenElectronSeeds_cff import *
from RecoParticleFlow.PFTracking.mergedElectronSeeds_cfi import *

electronSeedsTask = cms.Task(trackerDrivenElectronSeeds,ecalDrivenElectronSeeds,electronMergedSeeds) 
electronSeeds = cms.Sequence(electronSeedsTask)

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(electronSeedsTask, electronSeedsTask.copyAndExclude([trackerDrivenElectronSeeds]))

from Configuration.Eras.Modifier_fastSim_cff import fastSim
_fastSim_electronSeedsTask = electronSeedsTask.copy()
_fastSim_electronSeedsTask.replace(trackerDrivenElectronSeeds, cms.Task(trackerDrivenElectronSeedsTmp,trackerDrivenElectronSeeds))
fastSim.toReplaceWith(electronSeedsTask, _fastSim_electronSeedsTask)
# replace the ECAL driven electron track candidates with the FastSim emulated ones
import FastSimulation.Tracking.electronCkfTrackCandidates_cff
fastElectronCkfTrackCandidates = FastSimulation.Tracking.electronCkfTrackCandidates_cff.electronCkfTrackCandidates.clone()


from TrackingTools.GsfTracking.CkfElectronCandidateMaker_cff import *
from TrackingTools.GsfTracking.GsfElectronGsfFit_cff import *
electronGsfTrackingTask = cms.Task(electronSeedsTask,electronCkfTrackCandidates,electronGsfTracks)
electronGsfTracking = cms.Sequence(electronGsfTrackingTask)
_electronGsfTrackingTask = electronGsfTrackingTask.copy()
_fastSim_electronGsfTrackingTask = electronGsfTrackingTask.copy()
_fastSim_electronGsfTrackingTask.replace(electronCkfTrackCandidates,fastElectronCkfTrackCandidates)
fastSim.toReplaceWith(electronGsfTrackingTask,_fastSim_electronGsfTrackingTask)

from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
Beispiel #24
0
DQMOfflineLumi = cms.Sequence ( zcounting )

DQMOfflineMuon = cms.Sequence( dtSources *
                               rpcTier0Source *
                               cscSources *
                               muonMonitors
                              )

_run3_GEM_DQMOfflineMuon = DQMOfflineMuon.copy()
_run3_GEM_DQMOfflineMuon += gemSources
run3_GEM.toReplaceWith(DQMOfflineMuon, _run3_GEM_DQMOfflineMuon)

#Taus not created in pp conditions for HI
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
_DQMOfflineTAU = cms.Sequence()
pp_on_AA.toReplaceWith(DQMOfflineTAU, _DQMOfflineTAU)


# miniAOD DQM validation
from Validation.RecoParticleFlow.miniAODDQM_cff import * # On MiniAOD vs RECO
from Validation.RecoParticleFlow.DQMForPF_MiniAOD_cff import * # MiniAOD PF variables
from DQM.TrackingMonitor.tracksDQMMiniAOD_cff import *
from DQMOffline.Muon.miniAOD_cff import *
from DQM.Physics.DQMTopMiniAOD_cff import *

DQMOfflineMiniAOD = cms.Sequence(jetMETDQMOfflineRedoProductsMiniAOD*muonMonitors_miniAOD*MuonMiniAOD*DQMOfflinePF)

#Post sequences are automatically placed in the EndPath by ConfigBuilder if PAT is run.
#miniAOD DQM sequences need to access the filter results.

PostDQMOfflineMiniAOD = cms.Sequence(miniAODDQMSequence*jetMETDQMOfflineSourceMiniAOD*tracksDQMMiniAOD*topPhysicsminiAOD)
Beispiel #25
0
from PhysicsTools.PatAlgos.producersLayer1.metProducer_cff import *

## module to count objects
patCandidateSummary = cms.EDAnalyzer(
    "CandidateSummaryTable",
    logName=cms.untracked.string("patCandidates|PATSummaryTables"),
    candidates=cms.VInputTag(
        cms.InputTag("patElectrons"),
        cms.InputTag("patLowPtElectrons"),
        cms.InputTag("patMuons"),
        cms.InputTag("patTaus"),
        cms.InputTag("patPhotons"),
        cms.InputTag("patOOTPhotons"),
        cms.InputTag("patJets"),
        cms.InputTag("patMETs"),
    ))

patCandidatesTask = cms.Task(makePatElectronsTask, makePatLowPtElectronsTask,
                             makePatMuonsTask, makePatTausTask,
                             makePatPhotonsTask, makePatOOTPhotonsTask,
                             makePatJetsTask, makePatMETsTask)

_patCandidatesTask = patCandidatesTask.copy()
_patCandidatesTask.remove(makePatOOTPhotonsTask)
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toReplaceWith(patCandidatesTask, _patCandidatesTask)
pp_on_AA.toModify(patCandidateSummary.candidates,
                  func=lambda list: list.remove(cms.InputTag("patOOTPhotons")))

patCandidates = cms.Sequence(patCandidateSummary, patCandidatesTask)
Beispiel #26
0
jetGlobalReco = cms.Sequence(jetGlobalRecoTask)
jetHighLevelRecoTask = cms.Task(recoPFJetsTask, jetCorrectorsForRecoTask,
                                recoJetAssociationsTask,
                                recoJetAssociationsExplicitTask,
                                recoJPTJetsTask)
jetHighLevelReco = cms.Sequence(jetHighLevelRecoTask)

from RecoHI.HiJetAlgos.hiFJGridEmptyAreaCalculator_cff import hiFJGridEmptyAreaCalculator
from RecoHI.HiJetAlgos.hiFJRhoProducer import hiFJRhoProducer
from RecoHI.HiJetAlgos.HiRecoPFJets_cff import kt4PFJetsForRho
from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
from RecoHI.HiCentralityAlgos.pACentrality_cfi import pACentrality
pA_2016.toModify(pACentrality, producePixelTracks=False)

_jetHighLevelReco_pATask = jetHighLevelRecoTask.copy()
_jetHighLevelReco_pATask.add(kt4PFJetsForRho)
_jetHighLevelReco_pATask.add(hiFJRhoProducer)
_jetHighLevelReco_pATask.add(hiFJGridEmptyAreaCalculator)
_jetHighLevelReco_pATask.add(pACentrality)
pA_2016.toReplaceWith(jetHighLevelRecoTask, _jetHighLevelReco_pATask)

_jetGlobalReco_HITask = cms.Task(recoJetsHITask, recoJetIdsTask)
_jetGlobalReco_HI = cms.Sequence(_jetGlobalReco_HITask)
_jetHighLevelReco_HITask = cms.Task(recoPFJetsHITask, jetCorrectorsForRecoTask,
                                    recoJetAssociationsTask)
_jetHighLevelReco_HI = cms.Sequence(_jetHighLevelReco_HITask)

pp_on_AA.toReplaceWith(jetGlobalRecoTask, _jetGlobalReco_HITask)
pp_on_AA.toReplaceWith(jetHighLevelRecoTask, _jetHighLevelReco_HITask)