Exemplo n.º 1
0
import libPython.puReweighter as pu
import etc.inputs.tnpSampleDef as tnpSamples
from libPython.tnpClassUtils import mkdir


puType = 2

for sName in tnpSamples.Moriond17_80X.keys():    
    sample = tnpSamples.Moriond17_80X[sName]
    if sample is None : continue
    if not sample.isMC: continue
    
    trees = {}
#    trees['ele'] = 'GsfElectronToEleID'
    trees['pho'] = 'GsfElectronToPhoID'
    for tree in trees:
        dirout =  'etc/inputs/moriond17/'
        mkdir(dirout)
        
        if   puType == 0 : sample.set_puTree( dirout + '%s_%s.pu.puTree.root'  % (sample.name,tree) )
        elif puType == 1 : sample.set_puTree( dirout + '%s_%s.nVtx.puTree.root' % (sample.name,tree) )
        elif puType == 2 : sample.set_puTree( dirout + '%s_%s.rho.puTree.root'  % (sample.name,tree) )
        sample.set_tnpTree(trees[tree]+'/fitter_tree')
        sample.dump()
        pu.reweight(sample, puType )
    
Exemplo n.º 2
0
#export  PYTHONPATH=$PYTHONPATH:/afs/cern.ch/user/s/soffi/scratch0/TEST/CMSSW-10-0-0-pre3/src/egm_tnp_analysis
import etc.inputs.tnpSampleDef as tnpSamples
from libPython.tnpClassUtils import mkdir
import libPython.puReweighter as pu

puType = 0

for sName in tnpSamples.Moriond18_94X.keys():    
    sample = tnpSamples.Moriond18_94X[sName]
    if sample is None : continue
#    if not 'rec' in sName : continue
#    if not 'Winter17' in sName : continue
    if not 'DY' in sName: continue
    if not sample.isMC: continue
    
    trees = {}
    trees['ele'] = 'tnpEleIDs'
    trees['pho'] = 'tnpPhoIDs'
#    trees['rec'] = 'GsfElectronToSC'
    for tree in trees:
        dirout =  '/eos/cms/store/group/phys_egamma/swmukher/ntuple_2017_v2/PU/'
        mkdir(dirout)
        
        if   puType == 0 : sample.set_puTree( dirout + '%s_%s.pu.puTree.root'   % (sample.name,tree) )
        elif puType == 1 : sample.set_puTree( dirout + '%s_%s.nVtx.puTree.root' % (sample.name,tree) )
        elif puType == 2 : sample.set_puTree( dirout + '%s_%s.rho.puTree.root'  % (sample.name,tree) )
        sample.set_tnpTree(trees[tree]+'/fitter_tree')
        sample.dump()
        pu.reweight(sample, puType )
    
Exemplo n.º 3
0
import libPython.puReweighter as pu
import etc.inputs.tnpSampleDef as tnpSamples

for sName in tnpSamples.ICHEP2016.keys():

    sample = tnpSamples.ICHEP2016[sName]
    if sName == 'mc_DY_madgraph_ele': continue
    if sName == 'mc_DY_amcatnlo_ele': continue
    if sName == 'mc_DY_amcatnlo_rec': continue
    #    if sName == 'mc_DY_madgraph_rec': continue
    #    if sName == 'mc_DY_madgraph_pho': continue
    #    if sName == 'mc_DY_amcatnlo_pho': continue

    if sample is None: continue
    if not sample.isMC: continue
    sample.set_puTree('etc/inputs/ichep2016/%s.puTree.root' % sample.name)
    sample.dump()
    pu.reweight(sample, True)