Esempio n. 1
0
def customizerFuncForMuonHLTNtupler(process, newProcessName = "MYHLT"):
    if hasattr(process, "DQMOutput"):
        del process.DQMOutput


    from MuonHLTTool.MuonHLTNtupler.ntupler_cfi import ntuplerBase
    process.ntupler = ntuplerBase.clone()

    # -- set to the new process name
    process.ntupler.myTriggerResults = cms.untracked.InputTag("TriggerResults",          "",     newProcessName)
    process.ntupler.myTriggerEvent   = cms.untracked.InputTag("hltTriggerSummaryAOD",    "",     newProcessName)
    process.ntupler.lumiScaler       = cms.untracked.InputTag("hltScalersRawToDigi",     "",     newProcessName)

    process.ntupler.L1Muon           = cms.untracked.InputTag("hltGtStage2Digis",        "Muon", newProcessName)
    process.ntupler.L2Muon           = cms.untracked.InputTag("hltL2MuonCandidates",     "",     newProcessName)
    process.ntupler.L3Muon           = cms.untracked.InputTag("hltIterL3MuonCandidates", "",     newProcessName)
    process.ntupler.TkMuon           = cms.untracked.InputTag("hltHighPtTkMuonCands",    "",     newProcessName)

    process.ntupler.iterL3MuonNoID.iterL3OI        = cms.untracked.InputTag("hltL3MuonsIterL3OI",                   "", newProcessName),
    process.ntupler.iterL3MuonNoID.iterL3IOFromL2  = cms.untracked.InputTag("hltL3MuonsIterL3IO",                   "", newProcessName),
    process.ntupler.iterL3MuonNoID.iterL3FromL2    = cms.untracked.InputTag("hltIterL3MuonsFromL2LinksCombination", "", newProcessName),
    process.ntupler.iterL3MuonNoID.iterL3IOFromL1  = cms.untracked.InputTag("hltIter3IterL3FromL1MuonMerged",       "", newProcessName),
    process.ntupler.iterL3MuonNoID                 = cms.untracked.InputTag("hltIterL3MuonsNoID",                   "", newProcessName)

    process.TFileService = cms.Service("TFileService",
      fileName = cms.string("ntuple.root"),
      closeFileFast = cms.untracked.bool(False),
      )

    process.mypath = cms.EndPath(process.ntupler)

    return process
Esempio n. 2
0
process.load(
    "Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
process.load('Configuration.Geometry.GeometryRecoDB_cff')

# -- ntupler -- #
flag_HLTRerun = False

if flag_HLTRerun:
    newProcessName = "MYHLT"

    from MuonHLTTool.MuonHLTNtupler.customizerForMuonHLTNtupler import customizerFuncForMuonHLTNtupler
    process = customizerFuncForMuonHLTNtupler(process, newProcessName)

else:  # -- without HLT rerun
    from MuonHLTTool.MuonHLTNtupler.ntupler_cfi import ntuplerBase
    process.ntupler = ntuplerBase.clone()

    # -- change the input tag to store the default objects in the input edm file
    process.ntupler.L1Muon = cms.untracked.InputTag(
        "gmtStage2Digis", "Muon", "RECO")  # -- if L1 is not emulated
    process.ntupler.myTriggerResults = cms.untracked.InputTag(
        "TriggerResults", "", "HLT")
    process.ntupler.myTriggerEvent = cms.untracked.InputTag(
        "hltTriggerSummaryAOD", "", "HLT")
    process.ntupler.lumiScaler = cms.untracked.InputTag("scalersRawToDigi")

    process.TFileService = cms.Service(
        "TFileService",
        fileName=cms.string("ntuple.root"),
        closeFileFast=cms.untracked.bool(False),
    )