process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')

pathCut   = "HLT_IsoMu20_v"
filterCut = "hltL3crIsoL1sMu16L1f0L2f10QL3f20QL3trkIsoFiltered0p09"
ntupleName = "MuonPOGntuples.root"
runOnMC = True     

process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))


process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')

process.source = cms.Source("PoolSource",                           
                            fileNames = cms.untracked.vstring('file:PlaceHolder.root')
                            )

process.GlobalTag.globaltag = cms.string('76X_mcRun2_asymptotic_v12')

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple

appendMuonPogNtuple(process,runOnMC,"HLT",ntupleName,pathCut,filterCut)
import subprocess

process = cms.Process("NTUPLES")

process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')

process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))


process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')

process.source = cms.Source("PoolSource",                           
                            fileNames = cms.untracked.vstring('file:PlaceHolder.root')
                            )

process.GlobalTag.globaltag = cms.string('74X_dataRun2_Prompt_v1')

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple

ntupleName = "MuonPOGntuples.root"
runOnMC = False 
appendMuonPogNtuple(process,runOnMC,"HLT",ntupleName)
Example #3
0
        "/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select", "ls",
        sourcefilesfolder
    ])
    process.source.fileNames = [
        sourcefilesfolder + "/" + f for f in files.split()
    ]
else:
    process.GlobalTag.globaltag = cms.string('74X_dataRun2_Prompt_v0')
    sourcefilesfolder = "/store/data/Run2015B/SingleMuon/AOD/PromptReco-v1/000/251/643/00000"
    files = subprocess.check_output([
        "/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select", "ls",
        sourcefilesfolder
    ])
    process.source.fileNames = [
        sourcefilesfolder + "/" + f for f in files.split()
    ]

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple

if runOnMC:
    ntupleName = "ntuples_DY_NLO.root"
else:
    ntupleName = "ntuples_SingleMu.root"

appendMuonPogNtuple(process, runOnMC, "HLT", ntupleName)
Example #4
0
process.load(
    'Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff'
)

process.GlobalTag.globaltag = cms.string(options.globalTag)

process.source = cms.Source("PoolSource",
                            fileNames=cms.untracked.vstring(),
                            secondaryFileNames=cms.untracked.vstring())

files = subprocess.check_output([
    "/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select", "ls",
    options.eosInputFolder
])
process.source.fileNames = [
    options.eosInputFolder + "/" + f for f in files.split()
]

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple, customiseHlt, customiseMuonCuts

appendMuonPogNtuple(process, options.runOnMC, "HLT", options.ntupleName)

customiseHlt(process, pathCut, filterCut)
customiseMuonCuts(process, options.minMuPt, options.minNMu)
Example #5
0
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(options.nEvents))

process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')

process.GlobalTag.globaltag = cms.string(options.globalTag)

process.source = cms.Source("PoolSource",
                            
        fileNames = cms.untracked.vstring(),
        secondaryFileNames = cms.untracked.vstring()

)

files = subprocess.check_output([ "/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select", "ls", options.eosInputFolder ])
process.source.fileNames = [ options.eosInputFolder+"/"+f for f in files.split() ]  

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple, customiseHlt, customiseMuonCuts
    
appendMuonPogNtuple(process,options.runOnMC,"HLT",options.ntupleName)

customiseHlt(process,pathCut,filterCut)
customiseMuonCuts(process,options.minMuPt,options.minNMu)


Example #6
0
process.options = cms.untracked.PSet(wantSummary=cms.untracked.bool(True))
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

process.source = cms.Source(
    "PoolSource",
    fileNames=cms.untracked.vstring(
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/244/00000/1A55C9D8-5327-E511-BA1A-02163E0133D1.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/244/00000/5C0D9766-6727-E511-A61F-02163E014729.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/244/00000/BE92D76E-6E27-E511-96D2-02163E0133A7.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/251/00000/3004473B-8B27-E511-AD12-02163E0120B3.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/252/00000/283B8530-8D27-E511-8310-02163E014289.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/252/00000/70B9C1B4-9227-E511-ACC2-02163E01413E.root",
        "/store/data/Run2015B/DoubleMuon/AOD/PromptReco-v1/000/251/252/00000/7859893B-9C27-E511-BE3A-02163E01414A.root",
    ),
    secondaryFileNames=cms.untracked.vstring(),
)

process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff")
process.GlobalTag.globaltag = "74X_dataRun2_Prompt_v0"

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
# process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
# process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple

appendMuonPogNtuple(process, False, "HLT", "ntuple_DoubleMuon_251244_251252.root")

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')

process.source = cms.Source("PoolSource",
                            
        fileNames = cms.untracked.vstring(),
        secondaryFileNames = cms.untracked.vstring()

)

files = subprocess.check_output([ "/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select", "ls", options.eosInputFolder ])
process.source.fileNames = [ options.eosInputFolder+"/"+f for f in files.split() ]    

process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi")
#process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi")

from MuonPOG.Tools.MuonPogNtuples_cff import appendMuonPogNtuple

appendMuonPogNtuple(process,options.runOnMC,"HLT",options.ntupleName,pathCut,filterCut)

process.MuonPogTree.MuonTag = cms.untracked.InputTag("slimmedMuons")
process.MuonPogTree.PrimaryVertexTag = cms.untracked.InputTag("offlineSlimmedPrimaryVertices")
process.MuonPogTree.TrigResultsTag = cms.untracked.InputTag("none")
process.MuonPogTree.TrigSummaryTag = cms.untracked.InputTag("none")
process.MuonPogTree.PFMetTag = cms.untracked.InputTag("none")
process.MuonPogTree.PFChMetTag = cms.untracked.InputTag("none")
process.MuonPogTree.CaloMetTag = cms.untracked.InputTag("none")