def getFiles(dataset, user, pattern):
    from CMGTools.Production.datasetToSource import datasetToSource

    # print 'getting files for', dataset,user,pattern
    ds = datasetToSource(user, dataset, pattern, True)
    files = ds.fileNames
    return ["root://eoscms//eos/cms%s" % f for f in files]
Example #2
0
def getFiles(dataset, user, pattern, useCache=True):
    from CMGTools.Production.datasetToSource import datasetToSource
    # print 'getting files for', dataset,user,pattern
    ds = datasetToSource( user, dataset, pattern, useCache )
    files = ds.fileNames
    import pdb ; pdb.set_trace()
    return ['root://eoscms//eos/cms%s' % f for f in files]
Example #3
0
def getFiles(dataset, user, pattern):
    from CMGTools.Production.datasetToSource import datasetToSource
    # print 'getting files for', dataset,user,pattern
    ds = datasetToSource(user, dataset, pattern, True)
    files = ds.fileNames
    #return ['root://eoscms//eos/cms%s' % f for f in files]
    return ['root://eoscms.cern.ch//eos/cms%s' % f for f in files]
Example #4
0
 def getFiles(self, dataset, user, pattern, useAAA=False):
     # print 'getting files for', dataset,user,pattern
     ds = datasetToSource(user, dataset, pattern, True)
     files = ds.fileNames
     mapping = 'root://eoscms.cern.ch//eos/cms%s'
     if useAAA: mapping = 'root://cms-xrd-global.cern.ch/%s'
     return [mapping % f for f in files]
Example #5
0
def getFiles(datasets, user, pattern):
    from CMGTools.Production.datasetToSource import datasetToSource
    files = []
    for d in datasets:
        ds = datasetToSource(user, d, pattern)
        files.extend(ds.fileNames)
    return ['root://eoscms//eos/cms%s' % f for f in files]
def getFiles(datasets, user, pattern):
    from CMGTools.Production.datasetToSource import datasetToSource

    files = []
    for d in datasets:
        ds = datasetToSource(user, d, pattern)
        files.extend(ds.fileNames)
    return ["root://eoscms//eos/cms%s" % f for f in files]
Example #7
0
def getFiles(datasets, user, pattern):
    
    from CMGTools.Production.datasetToSource import datasetToSource

    files = []
    for d in datasets:
        ds = datasetToSource(
                             'lucieg',
                             #os.environ['USER'],
                             d,
                             pattern
                             )
        files.extend(ds.fileNames)
    
    return ['root://eoscms//eos/cms%s' % f for f in files]
Example #8
0
def getFiles(dataset, user, regex, useCache=True):
    '''Returns the list of files corresponding to a given dataset
    and matching a regex pattern.

    Each logical file name in the list is appended a prefix
    root://eoscms//eos/cms/<LFN>
    where <LFN> starts with /store/...
    so that the files can be directly opened in root or FWLite,
    that is also in the python analysis framework.
    '''
    from CMGTools.Production.datasetToSource import datasetToSource
    # print 'getting files for', dataset,user,pattern
    ds = datasetToSource( user, dataset, regex, useCache )
    files = ds.fileNames
    return ['root://eoscms//eos/cms%s' % f for f in files]
# choose from 'tau-mu' 'di-tau' 'tau-ele' 'mu-ele' 'all-separate', 'all'
# channel = 'all'
channel = 'all'

local_run = False
if local_run:

    dataset_user = '******'
    dataset_name = '/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v3/MINIAODSIM'

    dataset_files = '.*root'

    process.source = datasetToSource(
        dataset_user,
        dataset_name,
        dataset_files,
    )

else:
    process.source = cms.Source(
        "PoolSource",
        noEventSort = cms.untracked.bool(True),
        duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
        fileNames = cms.untracked.vstring('/store/mc/RunIISpring15DR74/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/Asympt25ns_MCRUN2_74_V9-v3/10000/8CF409BF-6A14-E511-A190-0025905964C2.root')
    )

process.source.inputCommands = cms.untracked.vstring(
    'keep *'
)
Example #10
0
 def getFiles(self, dataset, user, pattern):
     # print 'getting files for', dataset,user,pattern
     ds = datasetToSource(user, dataset, pattern, True)
     files = ds.fileNames
     return ['root://eoscms//eos/cms%s' % f for f in files]
Example #11
0
 def getFiles(self,dataset, user, pattern):
     # print 'getting files for', dataset,user,pattern
     ds = datasetToSource( user, dataset, pattern, True )
     files = ds.fileNames
     return ['root://eoscms//eos/cms%s' % f for f in files]
Example #12
0
dataset_user = '******'
# dataset_name = '/TTbarH_M-125_13TeV_amcatnlo-pythia8-tauola/Phys14DR-PU40bx25_PHYS14_25_V1-v1/MINIAODSIM'
# dataset_name = '/GluGluToHToTauTau_M-125_13TeV-powheg-pythia6/Phys14DR-PU20bx25_tsg_PHYS14_25_V1-v1/MINIAODSIM'
dataset_name = '/DYJetsToLL_M-50_13TeV-madgraph-pythia8/Phys14DR-PU20bx25_PHYS14_25_V1-v1/MINIAODSIM'
#dataset_name = '/GluGluToHToTauTau_M-125_13TeV-powheg-pythia6/Phys14DR-PU40bx25_PHYS14_25_V1-v2/MINIAODSIM'
# dataset_name = '/VBF_HToTauTau_M-125_13TeV-powheg-pythia6/Phys14DR-PU20bx25_tsg_PHYS14_25_V1-v2/MINIAODSIM'
# dataset_name = '/VBF_HToTauTau_M-125_13TeV-powheg-pythia6/Phys14DR-PU40bx25_PHYS14_25_V1-v1/MINIAODSIM'
# dataset_name = '/TTbarH_M-125_13TeV_amcatnlo-pythia8-tauola/Phys14DR-PU20bx25_tsg_PHYS14_25_V1-v2/MINIAODSIM' ## also in Marias request
# dataset_name = '/TTbarH_M-125_13TeV_amcatnlo-pythia8-tauola/Phys14DR-PU40bx25_PHYS14_25_V1-v1/MINIAODSIM'

dataset_files = '.*root'


process.source = datasetToSource(
    dataset_user,
    dataset_name,
    dataset_files,
    )

process.source.inputCommands=cms.untracked.vstring(
    'keep *'
    )

process.options = cms.untracked.PSet(
        allowUnscheduled = cms.untracked.bool(True)
)

if numberOfFilesToProcess>0:
    process.source.fileNames = process.source.fileNames[:numberOfFilesToProcess]

runOnMC = process.source.fileNames[0].find('Run201')==-1 and process.source.fileNames[0].find('embedded')==-1
Example #13
0

#NIKITA: to read a file locally
## process.source = cms.Source(
##     'PoolSource',
##     fileNames = cms.untracked.vstring( 'file:gun_jetA_mateff.root' )
##     )

# to read a file on eos (disk pool)
# all done without material effects
# FS211: charged hadrons
# FS130: neutral hadrons
# FS22: photons
# PS12: neutrinos

process.source = datasetToSource('cbern','/PFSim/FS211/Aug8_100k_pt0to100_MEoff','.*root')


process.load('CMGTools.PFSim.pfsim_cff')

process.p = cms.Path(
    process.pfsimSequence
    )


from CMGTools.PFSim.eventContent import simple as gensimreco

process.out = cms.OutputModule(
    "PoolOutputModule",
    dataset = cms.untracked.PSet(
    dataTier = cms.untracked.string('SIM')
Example #14
0
 def getFilesFromIC(self, dataset, user, pattern):
     # print 'getting files for', dataset,user,pattern
     ds = datasetToSource(user, dataset, pattern, True)
     files = ds.fileNames
     mapping = 'root://gfe02.grid.hep.ph.ic.ac.uk/pnfs/hep.ph.ic.ac.uk/data/cms%s'
     return [mapping % f for f in files]
Example #15
0
#NIKITA: to read a file locally
# process.source = cms.Source(
#    'PoolSource',
#    fileNames = cms.untracked.vstring( 'file:gun_jetA_mateff.root' )
#    )

# to read a file on eos (disk pool)
# all done without material effects
# FS211: charged hadrons
# FS130: neutral hadrons
# FS22: photons
# PS12: neutrinos

process.source = datasetToSource('cbern',
                                 '/PFSim/FS211/Aug8_100k_pt0to100_MEoff',
                                 '.*root')

print process.source.fileNames

process.load('CMGTools.PFSim.pfsim_cff')

process.p = cms.Path(process.pfsimSequence)

from CMGTools.PFSim.eventContent import simple as gensimreco

process.out = cms.OutputModule(
    "PoolOutputModule",
    dataset=cms.untracked.PSet(dataTier=cms.untracked.string('SIM')),
    fileName=cms.untracked.string('sim.root'),
    outputCommands=cms.untracked.vstring(*gensimreco))