Beispiel #1
0
    mcPdgId     = cms.vint32(11,22),                 # one or more PDG ID (11 = el, 22 = pho); absolute values (see below)
    checkCharge = cms.bool(False),              # True = require RECO and MC objects to have the same charge
    mcStatus    = cms.vint32(1),                # PYTHIA status code (1 = stable, 2 = shower, 3 = hard scattering)
    maxDeltaR   = cms.double(0.3),              # Minimum deltaR for the match
    maxDPtRel   = cms.double(0.5),              # Minimum deltaPt/Pt for the match
    resolveAmbiguities    = cms.bool(True),     # Forbid two RECO objects to match to the same GEN object
    resolveByMatchQuality = cms.bool(True),    # False = just match input in order; True = pick lowest deltaR pair first
)

photonMCTable = cms.EDProducer("CandMCMatchTableProducer",
    src     = photonTable.src,
    mcMap   = cms.InputTag("photonsMCMatchForTable"),
    objName = photonTable.name,
    objType = photonTable.name, #cms.string("Photon"),
    branchName = cms.string("genPart"),
    docString = cms.string("MC matching to status==1 photons or electrons"),
)

photonSequence = cms.Sequence(egmPhotonIDSequence + bitmapVIDForPho + isoForPho + slimmedPhotonsWithUserData + finalPhotons)
photonTables = cms.Sequence ( photonTable)
photonMC = cms.Sequence(photonsMCMatchForTable + photonMCTable)

_with80XScale_sequence = photonSequence.copy()
_with80XScale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons80X + energyCorrForPhoton80X + slimmedPhotonsWithUserData)
run2_miniAOD_80XLegacy.toReplaceWith(photonSequence, _with80XScale_sequence)

_with94Xv1Scale_sequence = photonSequence.copy()
_with94Xv1Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons94Xv1 + slimmedPhotonsWithUserData)
run2_nanoAOD_94XMiniAODv1.toReplaceWith(photonSequence, _with94Xv1Scale_sequence)

Beispiel #2
0
)

photonMCTable = cms.EDProducer(
    "CandMCMatchTableProducer",
    src=photonTable.src,
    mcMap=cms.InputTag("photonsMCMatchForTable"),
    objName=photonTable.name,
    objType=photonTable.name,  #cms.string("Photon"),
    branchName=cms.string("genPart"),
    docString=cms.string("MC matching to status==1 photons or electrons"),
)

photonSequence = cms.Sequence(egmPhotonIDSequence + bitmapVIDForPho +
                              isoForPho + slimmedPhotonsWithUserData +
                              finalPhotons)
photonTables = cms.Sequence(photonTable)
photonMC = cms.Sequence(photonsMCMatchForTable + photonMCTable)

_with80XScale_sequence = photonSequence.copy()
_with80XScale_sequence.replace(
    slimmedPhotonsWithUserData, calibratedPatPhotons80X +
    energyCorrForPhoton80X + slimmedPhotonsWithUserData)
run2_miniAOD_80XLegacy.toReplaceWith(photonSequence, _with80XScale_sequence)

_with94Xv1Scale_sequence = photonSequence.copy()
_with94Xv1Scale_sequence.replace(
    slimmedPhotonsWithUserData,
    calibratedPatPhotons94Xv1 + slimmedPhotonsWithUserData)
run2_nanoAOD_94XMiniAODv1.toReplaceWith(photonSequence,
                                        _with94Xv1Scale_sequence)
Beispiel #3
0
electronMCTable = cms.EDProducer("CandMCMatchTableProducer",
    src     = electronTable.src,
    mcMap   = cms.InputTag("electronsMCMatchForTable"),
    objName = electronTable.name,
    objType = electronTable.name, #cms.string("Electron"),
    branchName = cms.string("genPart"),
    docString = cms.string("MC matching to status==1 electrons or photons"),
)

electronSequence = cms.Sequence(bitmapVIDForEle + isoForEle + ptRatioRelForEle + slimmedElectronsWithUserData + finalElectrons)
electronTables = cms.Sequence (electronMVATTH + electronTable)
electronMC = cms.Sequence(electronsMCMatchForTable + electronMCTable)

_withUpdate_sequence = cms.Sequence(slimmedElectronsUpdated + electronSequence.copy())
run2_nanoAOD_92X.toReplaceWith(electronSequence, _withUpdate_sequence)

_withUpdateAnd80XLegacyScale_sequence = _withUpdate_sequence.copy()
_withUpdateAnd80XLegacyScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectrons80XLegacy + bitmapVIDForEleSpring15 +bitmapVIDForEleSum16 + slimmedElectronsWithUserData)
run2_miniAOD_80XLegacy.toReplaceWith(electronSequence, _withUpdateAnd80XLegacyScale_sequence)

_with94XScale_sequence = electronSequence.copy()
_with94XScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectrons94X + slimmedElectronsWithUserData)
run2_nanoAOD_94XMiniAODv1.toReplaceWith(electronSequence, _with94XScale_sequence)
run2_nanoAOD_94XMiniAODv2.toReplaceWith(electronSequence, _with94XScale_sequence)

_with_bitmapVIDForEleSpring15AndSum16_sequence = electronSequence.copy()
_with_bitmapVIDForEleSpring15AndSum16_sequence.replace(slimmedElectronsWithUserData, bitmapVIDForEleSpring15 + bitmapVIDForEleSum16 + slimmedElectronsWithUserData)
run2_nanoAOD_94X2016.toReplaceWith(electronSequence, _with_bitmapVIDForEleSpring15AndSum16_sequence)

Beispiel #4
0
electronTables = cms.Sequence(electronMVATTH + electronTable)
electronMC = cms.Sequence(electronsMCMatchForTable + electronMCTable)

_withUpdate_sequence = cms.Sequence(slimmedElectronsUpdated +
                                    electronSequence.copy())
run2_nanoAOD_92X.toReplaceWith(electronSequence, _withUpdate_sequence)

_withUpdateAnd80XScale_sequence = _withUpdate_sequence.copy()
_withUpdateAnd80XScale_sequence.replace(
    slimmedElectronsWithUserData,
    calibratedPatElectrons80X + energyCorrForEle80X + bitmapVIDForEleSpring15 +
    slimmedElectronsWithUserData)
run2_miniAOD_80XLegacy.toReplaceWith(electronSequence,
                                     _withUpdateAnd80XScale_sequence)

_with94XScale_sequence = electronSequence.copy()
_with94XScale_sequence.replace(
    slimmedElectronsWithUserData,
    calibratedPatElectrons94X + slimmedElectronsWithUserData)
run2_nanoAOD_94XMiniAODv1.toReplaceWith(electronSequence,
                                        _with94XScale_sequence)
run2_nanoAOD_94XMiniAODv2.toReplaceWith(electronSequence,
                                        _with94XScale_sequence)

_with_bitmapVIDForEleSpring15_sequence = electronSequence.copy()
_with_bitmapVIDForEleSpring15_sequence.replace(
    slimmedElectronsWithUserData,
    bitmapVIDForEleSpring15 + slimmedElectronsWithUserData)
run2_nanoAOD_94X2016.toReplaceWith(electronSequence,
                                   _with_bitmapVIDForEleSpring15_sequence)
Beispiel #5
0
_withULAndUpdate_sequence = cms.Sequence(slimmedElectronsUpdated + electronSequence.copy())

_withUL17AndUpdateScale_sequence = _withULAndUpdate_sequence.copy()
_withUL17AndUpdateScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectronsUL17 + slimmedElectronsWithUserData)
run2_egamma_2017.toReplaceWith(electronSequence, _withUL17AndUpdateScale_sequence)

_withUL18AndUpdateScale_sequence = _withULAndUpdate_sequence.copy()
_withUL18AndUpdateScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectronsUL18 + slimmedElectronsWithUserData)
run2_egamma_2018.toReplaceWith(electronSequence, _withUL18AndUpdateScale_sequence)

_withTo106XAndUpdateAnd80XLegacyScale_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAnd80XLegacyScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectrons80XLegacy + bitmapVIDForEleSpring15 +bitmapVIDForEleSum16 + slimmedElectronsWithUserData)
run2_miniAOD_80XLegacy.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd80XLegacyScale_sequence)

_withTo106XAndUpdateAnd94XScale_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAnd94XScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectrons94X + slimmedElectronsWithUserData)
run2_nanoAOD_94XMiniAODv1.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd94XScale_sequence)
run2_nanoAOD_94XMiniAODv2.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd94XScale_sequence)

_withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence.replace(slimmedElectronsWithUserData,  bitmapVIDForEleSpring15 + bitmapVIDForEleSum16 + slimmedElectronsWithUserData)
run2_nanoAOD_94X2016.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence)

_withTo106XAndUpdateAnd102XScale_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAnd102XScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectrons102X + slimmedElectronsWithUserData)
run2_nanoAOD_102Xv1.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd102XScale_sequence)

_withUpdate_sequence = electronSequence.copy()
_withUpdate_sequence.replace(bitmapVIDForEle, slimmedElectronsUpdated + bitmapVIDForEle)
run2_nanoAOD_106Xv1.toReplaceWith(electronSequence, _withUpdate_sequence)