コード例 #1
0
ファイル: connector.py プロジェクト: namapane/cmg-cmssw
 def connect_by_db_(self):
     ''' '''
     from CMGTools.RootTools.utils.connect import connect
     connect(self.MC_list,
             self.tier,
             self.pattern,
             self.aliases,
             cache=self.cache,
             verbose=self.verbose)
コード例 #2
0
ファイル: connector.py プロジェクト: namapane/cmg-cmssw
    def connect_by_pck_(self):
        ''' '''
        from CMGTools.RootTools.utils.getFiles import getFiles

        redict_aliases = dict(zip(self.aliases.values(), self.aliases.keys()))

        regex = re.compile(r'(?P<sample>[a-zA-Z0-9_]+[a-zA-Z])(?:[0-9]+)$')

        for alias_k, alias_v in self.mc_dict.items():
            m = regex.match(alias_k)
            if m and 'QCD' not in alias_k:
                alias_k = m.group('sample')
            if alias_k not in self.aliases.values():
                continue
            sample_pck = '*'.join([
                '', redict_aliases[alias_k].replace('/', '').replace('.', '*'),
                self.tier.replace('%', ''), self.pattern + '.pck'
            ])
            cached_sample = glob.glob('/'.join(
                [self.homedir, '.cmgdataset', sample_pck]))
            single_mc_list = [alias_v]

            if len(cached_sample) == 0:
                print 'sample not cached yet, connecting to the DB'
                from CMGTools.RootTools.utils.connect import connect
                connect(single_mc_list,
                        self.tier,
                        self.pattern,
                        self.aliases,
                        cache=self.cache,
                        verbose=self.verbose)

            elif len(cached_sample) > 1:
                print 'better specify which sample, many found'
                print cached_sample
                raise

            else:
                file = open(cached_sample[0])
                mycomp = pickle.load(file)
                single_mc_list[0].files = getFiles(
                    '/'.join([''] + mycomp.lfnDir.split('/')
                             [mycomp.lfnDir.split('/').index('CMG') + 1:]),
                    mycomp.user,
                    self.pattern,
                    useCache=self.cache)
                print 'attached files to %s' % (single_mc_list[0].name)
                print 'files %s' % (
                    '/'.join(single_mc_list[0].files[0].split('/')[:-1] +
                             [self.pattern]))
コード例 #3
0
ファイル: connector.py プロジェクト: artlbv/my-cmgtools-lite
    def connect_by_pck_(self):
        ''' '''
        from CMGTools.RootTools.utils.getFiles import getFiles

        redict_aliases = dict( zip(self.aliases.values(), self.aliases.keys()) )

        regex = re.compile(r'(?P<sample>[a-zA-Z0-9_]+[a-zA-Z])(?:[0-9]+)$')

        for alias_k, alias_v in self.mc_dict.items():
            m = regex.match(alias_k)
            if m and 'QCD' not in alias_k:
                alias_k = m.group('sample')
            if alias_k not in self.aliases.values():
                continue
            sample_pck = '*'.join(['',redict_aliases[alias_k].replace('/','').replace('.','*'),
                                   self.tier.replace('%',''),self.pattern+'.pck'])
            cached_sample = glob.glob('/'.join([self.homedir,'.cmgdataset',sample_pck]))
            single_mc_list = [alias_v]

            if len(cached_sample) == 0:
                print 'sample not cached yet, connecting to the DB'
                from CMGTools.RootTools.utils.connect import connect
                connect(single_mc_list, self.tier, self.pattern, self.aliases,
                         cache=self.cache, verbose=self.verbose)

            elif len(cached_sample) >1:
                print 'better specify which sample, many found'
                print cached_sample
                raise

            else:
                file = open(cached_sample[0])
                mycomp = pickle.load(file)
                single_mc_list[0].files = getFiles('/'.join( ['']+mycomp.lfnDir.split('/')[mycomp.lfnDir.split('/').index('CMG')+1:] ),
                                                              mycomp.user, self.pattern, useCache=self.cache)
                print 'attached files to %s' %(single_mc_list[0].name)
                print 'files %s' %('/'.join(single_mc_list[0].files[0].split('/')[:-1]+[self.pattern]))
コード例 #4
0
aliases = {
    '/DYJets.*': 'DYJets',
    '/TauPlusX/Run2012A-13Jul2012.*': 'data_Run2012A',
    '/TauPlusX/Run2012A-recover-06Aug2012-v1.*': 'data_Run2012A_aug6',
    '/TauPlusX/Run2012B-13Jul2012.*': 'data_Run2012B',
    '/TauPlusX/Run2012C-24Aug2012-v1.*': 'data_Run2012C_v1',
    '/TauPlusX/Run2012C-PromptReco-v2.*': 'data_Run2012C_v2'
}

MC_list = [DYJets, WJets]
allsamples = copy.copy(MC_list)
allsamples.extend(data_list)

connect([WJets],
        '/WJets%TAUMU_2012%',
        'tauMu.*root',
        walias,
        cache=True,
        verbose=False)

# connect( allsamples, '%TAUMU_2012_MuRm_SVFit_Recoil_ZtoW_C_15Oct%', 'tauMu.*root', aliases, cache=True, verbose=False)
connect(allsamples,
        '%TAUMU_MuRm_OSVFit_Colin18Oct',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)

allsamples = []
for mc in MC_list:
    mc.triggers = mc_triggers
    allsamples.append(mc)
コード例 #5
0
    '/TauPlusX/Run2012B-22Jan2013-v1.*':'data_Run2012B',
    '/TauPlusX/Run2012C-22Jan2013-v1.*':'data_Run2012C',
    '/TauPlusX/Run2012D-22Jan2013-v1.*':'data_Run2012D',
    }


MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_higgs )
MC_list.extend( mc_diboson ) 
    
allsamples = copy.copy( MC_list )
allsamples.extend( data_list )
allsamples.extend( embed_list )


connect( allsamples, '%TAUMU_MuRm_%Colin_%Jun13', 'tauMu.*root', aliases, cache=True, verbose=False)

connect( [WJets], '%TAUMU_NewRecoil_RelTauIso_Colin_1Jul13', 'tauMu.*root',
         {'/WJets.*START53.*NewRecoil.*':'WJets'}, cache=True, verbose=False)

dy_nevents = [ DYJets.nGenEvents,
               DY1Jets.nGenEvents,
               DY2Jets.nGenEvents,
               DY3Jets.nGenEvents,
               DY4Jets.nGenEvents
               ]
for dy in mc_dy:
    dy.nevents = dy_nevents


コード例 #6
0
    '/DoubleMuParked/Run2012D-22Jan2013-v1':'data_Run2012D',
    }



MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_diboson_inc ) 
    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list )

# the pattern provided to this function is a SQL pattern.
# % represents the wildcard.
# this pattern allows to select a whole group of samples.

connect( allsamples, '%CMGPF_V5_16_0', 'cmgTuple.*root', aliases, cache=True, verbose=False)


# guessing the best split factor for each component,
# to get about the same number of events in each job
for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

# picking up the json file automatically. Here, we use the dcs jsons.
for data in data_list:
    if len(data.files):
        data.json = jsonPick( data.files[0], jsonMap )


if __name__ == '__main__':
    from CMGTools.RootTools.fwlite.Config import printComps
コード例 #7
0
    '/DoubleMu/StoreResults-DoubleMu_2012B_PromptReco_v1_Run193752to195135':
    'embed_Run2012B_193752_195135',
    '/DoubleMu/StoreResults-DoubleMu_2012B_PromptReco_v1_Run195147to196070':
    'embed_Run2012B_195147_196070',
    '/WW_TuneZ2star.*START52.*': 'WW',
    '/WZ_TuneZ2star.*START52.*': 'WZ',
    '/ZZ_TuneZ2star.*START52.*': 'ZZ'
}

MC = copy.copy(mc_ewk)
MC.extend(mc_higgs)
MC.extend(mc_diboson)
for sam in MC:
    sam.triggers = mc_triggers
for data in data_list_2012:
    data.triggers = data_triggers

allsamples = copy.copy(MC)
allsamples.extend(data_list_2012)
allsamples.extend(embed_list_2012)

connect(allsamples,
        '%TAUMU_NewSVFit_Colin17Sep',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)

# this number is not in the DB (dbs says this sample is still in production)
WJets.nGenEvents = 61444940
コード例 #8
0
    '/DoubleMuParked/Run2012D-22Jan2013-v1': 'data_Run2012D',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_diboson_inc)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)

# the pattern provided to this function is a SQL pattern.
# % represents the wildcard.
# this pattern allows to select a whole group of samples.

connect(allsamples,
        '%CMGPF_V5_16_0',
        'cmgTuple.*root',
        aliases,
        cache=True,
        verbose=False)

# guessing the best split factor for each component,
# to get about the same number of events in each job
for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

# picking up the json file automatically. Here, we use the dcs jsons.
for data in data_list:
    if len(data.files):
        data.json = jsonPick(data.files[0], jsonMap)

if __name__ == '__main__':
    from CMGTools.RootTools.fwlite.Config import printComps
コード例 #9
0
    '/GluGluToHToTauTau.*Phys14DR.*': 'HiggsGGH',
    '/VBF_HToTauTau_M-125_13TeV-powheg-pythia6.*Phys14DR.*': 'HiggsVBF',
}

# dictionarize
mc_dict = {}
for s in mc_higgs:
    mc_dict[s.name] = s

MC_list = [v for k, v in mc_dict.items()
           ]  #[mc_dict['HiggsGGH125'], mc_dict['HiggsVBF125']]
for sam in MC_list:
    # Set MC triggers
    sam.triggers = mc_triggers

connect(MC_list,
        '%TAUMU_MINIAOD_SVFIT25ns_steggema',
        '.*root',
        aliases,
        cache=True,
        verbose=False)

MC_list = [m for m in MC_list if m.files]

for sample in MC_list:
    sample.splitFactor = splitFactor(sample, 10e4)
    # JAN - temporarily use local file until we have TAUELE samples
    sample.files = [
        '/afs/cern.ch/user/s/steggema/work/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/tauEle_fullsel_tree_CMG.root'
    ]
コード例 #10
0
# from CMGTools.H2TauTau.proto.samples.run2012.diboson import *
# from CMGTools.H2TauTau.proto.samples.run2012.higgs import *

from CMGTools.H2TauTau.proto.samples.run2012.triggers_tauMu import data_triggers, mc_triggers

aliases = {
    '/TauPlusX/Run2012A-13Jul2012.*':'data_Run2012A',
    '/TauPlusX/Run2012A-recover-06Aug2012-v1.*':'data_Run2012A_aug6',
    '/TauPlusX/Run2012B-13Jul2012.*':'data_Run2012B',
    '/TauPlusX/Run2012C-24Aug2012-v1.*':'data_Run2012C_v1',
    '/TauPlusX/Run2012C-PromptReco-v2.*':'data_Run2012C_v2'
    }

allsamples = copy.copy(data_list)

connect( allsamples, '%Run2012%PAT_CMG_V5_8_0', 'cmgTuple.*root', aliases, cache=True, verbose=False)

allsamples = []

for data in data_list:
    data.json = jsonPick( data.files[0])
    data.triggers = data_triggers
    allsamples.append(data)
for c in allsamples:
    c.splitFactor = splitFactor(c)



# for c in data_list:
#     computeLumi(c, test=True)
コード例 #11
0
    '/W2Jets.*START53.*': 'W2Jets',
    '/W3Jets.*START53.*': 'W3Jets',
    '/W4Jets.*START53.*': 'W4Jets',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)
allsamples.extend(embed_list)

connect(allsamples,
        '/W%Jet%PAT_CMG_V5_14_0',
        'cmgTuple.*root',
        aliases,
        cache=True,
        verbose=False)

# this number is not in the DB (dbs says this sample is still in production)
# WJets.nGenEvents = 61444940

## for mc in MC_list:
##     mc.triggers = mc_triggers
##     # allsamples.append(mc)
## for data in data_list:
##     if len(data.files):
##         data.json = jsonPick( data.files[0], jsonMap)
##         data.triggers = data_triggers
##         # allsamples.append(data)
## for embed in embed_list:
コード例 #12
0
from CMGTools.H2TauTau.proto.samples.phys14.higgs import *

from CMGTools.Production.getFiles import getFiles
from CMGTools.RootTools.utils.connect import connect
from CMGTools.RootTools.utils.splitFactor import splitFactor
from CMGTools.RootTools.fwlite.Config import printComps

aliases = {
    '/GluGluToHToTauTau.*Phys14DR.*': 'HiggsGGH',
}

MC_list = [HiggsGGH125]

for sam in MC_list:
    sam.triggers = None  # No triggers yet

allsamples = copy.copy(MC_list)
connect(allsamples,
        '%htt_tt_27jan15_manzoni_nom',
        'miniAOD*root',
        aliases,
        cache=True,
        verbose=False)

HiggsGGH125.files = [
    #   '/afs/cern.ch/work/m/manzoni/diTau2015/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/diTau_fullsel_tree_CMG_tt.root',
    #   '/afs/cern.ch/work/m/manzoni/diTau2015/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/muEle_fullsel_tree_CMG.root'   ,
    #   '/afs/cern.ch/work/m/manzoni/diTau2015/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/diTau_fullsel_tree_CMG.root'   ,
    '/afs/cern.ch/work/m/manzoni/diTau2015/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/tauEle_fullsel_tree_CMG.root',
    #   '/afs/cern.ch/work/m/manzoni/diTau2015/CMSSW_7_2_3/src/CMGTools/H2TauTau/prod/tauMu_fullsel_tree_CMG.root'   ,
]
コード例 #13
0
    '/WZJetsTo3LNu.*START42.*': 'WZJetsTo3LNu',
    '/ZZJetsTo2L2Nu.*START42.*': 'ZZJetsTo2L2Nu',
    '/ZZJetsTo2L2Q.*START42.*': 'ZZJetsTo2L2Q',
    '/ZZJetsTo4L.*START42.*': 'ZZJetsTo4L',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)
for sam in MC_list:
    sam.triggers = mc_triggers
for data in data_list_2011A:
    data.triggers = data_triggers_2011A
for data in data_list_2011B:
    data.triggers = data_triggers_2011B

allsamples = copy.copy(MC_list)
allsamples.extend(data_list_2011)
allsamples.extend(embed_list_2011)

connect(allsamples,
        '%TAUMU_2011_Colin_Oct24',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)
Tbar_tW.nGenEvents = 809984.

for c in allsamples:
    c.splitFactor = splitFactor(c)
コード例 #14
0
    '/DoubleMu/StoreResults-Run2012A_22Jan2013_v1_RHembedded_trans1_tau116_ptmu1_16had1_18_v1.*':'embed_Run2012A_22Jan',
    '/DoubleMuParked/StoreResults-Run2012D_22Jan2013_v1_RHembedded_trans1_tau116_ptmu1_16had1_18_v1.*':'embed_Run2012B_22Jan',
    '/DoubleMuParked/StoreResults-Run2012C_22Jan2013_v1_RHembedded_trans1_tau116_ptmu1_16had1_18_v1.*':'embed_Run2012C_22Jan',
    '/DoubleMuParked/StoreResults-Run2012B_22Jan2013_v1_RHembedded_trans1_tau116_ptmu1_16had1_18_v1.*':'embed_Run2012D_22Jan',
    }


MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_higgs )
MC_list.extend( mc_diboson ) 
    
allsamples = copy.copy( MC_list )
# allsamples.extend( data_list )
# allsamples.extend( embed_list )

connect( allsamples, '%TAUMU_SVF%_Jun13%', 'tauMu.*root', aliases, cache=True, verbose=False)

connect( data_list, '%TAUMU_SVF%_Jun21%', 'tauMu.*root', aliases, cache=True, verbose=False)
connect( embed_list, '%TAUMU_SVF%_Jul02', 'tauMu.*root', aliases, cache=True, verbose=False)

allsamples.extend( data_list )
allsamples.extend( embed_list )

# Attach number of generated events for stitching
dy_nevents = [ DYJets.nGenEvents,
               DY1Jets.nGenEvents,
               DY2Jets.nGenEvents,
               DY3Jets.nGenEvents,
               DY4Jets.nGenEvents
               ]
for dy in mc_dy:
コード例 #15
0
    '/DoubleMu/Run2011B-16Jan2012-v1/AOD/V5/PAT_CMG_V5_6_0_B$':'data_Run2011B',
    '/DoubleMu/Run2011A-16Jan2012-v1/AOD/V5/PAT_CMG_V5_6_0_B$':'data_Run2011A',
    '/TTJets.*START42.*/VertexWeight':'TTJets',
    '/WWJetsTo2L2Nu.*START42.*/VertexWeight':'WWJetsTo2L2Nu',
    '/WZJetsTo2L2Q.*START42.*/VertexWeight':'WZJetsTo2L2Q',
    '/WZJetsTo3LNu.*START42.*/VertexWeight':'WZJetsTo3LNu',
    '/ZZJetsTo2L2Nu.*START42.*/VertexWeight':'ZZJetsTo2L2Nu',
    '/ZZJetsTo2L2Q.*START42.*/VertexWeight':'ZZJetsTo2L2Q',
    '/ZZJetsTo4L.*START42.*/VertexWeight':'ZZJetsTo4L',
    }


data_list = data_list_2011

MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_diboson ) 
    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list_2011 )

connect( allsamples, '%PAT_CMG_V5_6_0_B%', 'cmgTuple.*root', aliases, cache=True, verbose=False)

for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

for data in data_list:
    if len(data.files):
        data.json = jsonPick( data.files[0])


コード例 #16
0
# the following for 52X sync purposes only:
MC.append(HiggsGGH125)
MC.append(HiggsVBF125)

MC.extend(mc_diboson)
MC.extend(mc_diboson_xcl)

allsamples = copy.copy(MC)
allsamples.extend(data_list_2012)
allsamples.extend(embed_list_2012)

# allsamples = copy.copy(data_list_2012)

connect(allsamples,
        '%H2TauTau_tauEle_20Sep_PG_newSVFit_MVAMET',
        'tauEle.*root',
        aliases,
        cache=False,
        verbose=False)

print
for sam in MC:
    print 'setting trigger', mc_triggers, 'for sample', sam.name
    sam.triggers = mc_triggers
for data in data_list_2012:
    print 'setting trigger', data_triggers, 'for sample', data.name
    data.triggers = data_triggers
print

# this number is not in the DB (dbs says this sample is still in production)
WJets.nGenEvents = 61444940
コード例 #17
0
    '/WZ_TuneZ2.*START42.*':'WZ',
    '/ZZ_TuneZ2.*START42.*':'ZZ',
    '/WWJetsTo2L2Nu.*START42.*':'WWJetsTo2L2Nu',
    '/WZJetsTo2L2Q.*START42.*':'WZJetsTo2L2Q',
    '/WZJetsTo3LNu.*START42.*':'WZJetsTo3LNu',
    '/ZZJetsTo2L2Nu.*START42.*':'ZZJetsTo2L2Nu',
    '/ZZJetsTo2L2Q.*START42.*':'ZZJetsTo2L2Q',
    }


MC = copy.copy( mc_ewk )
MC.extend( mc_higgs )
MC.extend( mc_diboson ) 
for sam in MC:
    sam.triggers = mc_triggers
for data in data_list_2011A:
    data.triggers = data_triggers_2011A
for data in data_list_2011B:
    data.triggers = data_triggers_2011B

    
allsamples = copy.copy(MC)
allsamples.extend( data_list_2011 )
allsamples.extend( embed_list_2011 )

connect( allsamples, '%/TAUMU_2011_ColinSep21_NewSVFit', 'tauMu.*root', aliases, cache=True, verbose=False)

for c in allsamples:
    c.splitFactor = splitFactor(c)

コード例 #18
0
    if '2012A' in sam.name:
        sam.triggers = data_triggers_2012A
    elif '2012B' in sam.name:
        sam.triggers = data_triggers_2012B
    elif '2012C' in sam.name:
        sam.triggers = data_triggers_2012C
    elif '2012D' in sam.name:
        sam.triggers = data_triggers_2012D

allsamples1 = copy.copy( mc_higgs )
allsamples1.extend( ztt_mc_ewk )
allsamples1.extend( embed_list )
allsamples1.extend( mc_higgs_susy )

pat1 = '%HTT_Feb6_hinzmann_Nom'
connect( allsamples1, pat1, 'diTau.*root', aliases, cache=True, verbose=False)

allsamples2 = copy.copy( data_2012 )
allsamples2.extend( t_mc_ewk )
allsamples2.extend( mc_diboson_incl )
allsamples2.extend( w_mc_ewk )
pat2 = '%V5_8_0/HTT_Sep12_hinzmann'
connect( allsamples2, pat2, 'diTau.*root', aliases, cache=True, verbose=False)

allsamples = copy.copy(allsamples1)
allsamples.extend(allsamples2)

DYJets.nGenEvents /= 0.8 ## overall trigger efficiency in MC

for h in mc_higgs :
  h.nGenEvents /= 0.8 ## overall trigger efficiency in MC
コード例 #19
0
ファイル: connector.py プロジェクト: artlbv/my-cmgtools-lite
 def connect_by_db_(self):
     ''' '''
     from CMGTools.RootTools.utils.connect import connect
     connect(self.MC_list, self.tier, self.pattern,
             self.aliases, cache=self.cache, verbose=self.verbose)
コード例 #20
0
MC_list.extend(mc_diboson)
MC_list.extend(mc_higgs)

# the following for 52X sync purposes only:
#MC_list.append (HiggsGGH125)
#MC_list.append (HiggsVBF125)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)
allsamples.extend(embed_list)

print 'start connecting... \n\n'

connect(allsamples,
        '%H2TauTau_tauEle_22oct_PG',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)

from CMGTools.H2TauTau.proto.samples.density import *

print
print 'density test'
density(allsamples)
print

print
for sam in MC_list:
    print 'setting trigger', mc_triggers, 'for sample', sam.name
    sam.triggers = mc_triggers
    sam.splitFactor = splitFactor(sam)
コード例 #21
0
mc_ewk = []
# mc_ewk += mc_dy
# mc_ewk += t_mc_ewk

MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_higgs )
MC_list.extend( mc_higgs_susy )
# MC_list.extend( mc_diboson ) 
    
allsamples = copy.copy( MC_list )
# allsamples.extend( data_list )

allsamples.extend( embed_list )

connect( allsamples, '%TAUELE_SVFitVEGASTESDown_Aug12%', 'tauEle.*root', aliases, cache=True, verbose=False)
connect( data_list, '%TAUELE_SVFitVEGAS_Aug06%', 'tauEle.*root', aliases, cache=True, verbose=False)
connect( mc_dy, '%TAUELE_SVFitVEGASTESDown_Aug26%', 'tauEle.*root', aliases, cache=True, verbose=False)

allsamples.extend( data_list )
allsamples.extend( mc_dy )
MC_list.extend( mc_dy ) 

# Attach number of generated events for stitching
dy_nevents = [ DYJets.nGenEvents,
               DY1Jets.nGenEvents,
               DY2Jets.nGenEvents,
               DY3Jets.nGenEvents,
               DY4Jets.nGenEvents
               ]
for dy in mc_dy:
コード例 #22
0
data_Run2011B_MuRm = cfg.DataComponent(name='data_Run2011B_MuRm',
                                       files=[],
                                       intLumi=0.,
                                       triggers=[])

aliases = {
    '/DYJets.*START42.*': 'DYJetsMuRm',
    '/WJetsToLNu.*START42.*': 'WJets',
    '/DoubleMu/Run2011A-16Jan2012-v1/AOD.*': 'data_Run2011A_MuRm',
    '/DoubleMu/Run2011B-16Jan2012-v1/AOD.*': 'data_Run2011B_MuRm',
}

allsamples = [DYJetsMuRm, WJets, data_Run2011A_MuRm, data_Run2011B_MuRm]

# connect( allsamples, '%TAUMU_%MuRm_ColinSep28', 'tauMu.*root', aliases, cache=True, verbose=False)
connect(allsamples,
        '%TAUMU_MuRm_rlxTauIso_ColinOct6',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)

MC_list = [DYJetsMuRm, WJets]
data_list_2011 = [data_Run2011A_MuRm, data_Run2011B_MuRm]
embed_list = []

for mc in MC_list:
    mc.triggers = mc_triggers
for data in data_list_2011:
    data.json = jsonPick(data.files[0])
コード例 #23
0
mc_ewk = []
# mc_ewk += mc_dy
# mc_ewk += t_mc_ewk

MC_list = copy.copy(mc_ewk)

MC_list.extend(mc_higgs)
MC_list.extend(mc_higgs_susy)
# MC_list.extend( mc_diboson )

allsamples = copy.copy(MC_list)

connect(allsamples,
        '%TAUMU_SVFitVEGAS_TESDown_Aug02_steggema',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)
connect(embed_list,
        '%TAUMU_SVFitVEGASTESDown_Aug07_steggema',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)
# Import the non-shifted data such that the plotting scripts know the integrated luminosity
connect(data_list,
        '%TAUMU_SVFitVEGAS_Jul29_steggema',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)
コード例 #24
0
    '/WZJetsTo3LNu.*START42.*':'WZJetsTo3LNu',
    '/ZZJetsTo2L2Nu.*START42.*':'ZZJetsTo2L2Nu',
    '/ZZJetsTo2L2Q.*START42.*':'ZZJetsTo2L2Q',
    '/ZZJetsTo4L.*START42.*':'ZZJetsTo4L',
    }

MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_higgs )
MC_list.extend( mc_diboson ) 
for sam in MC_list:
    sam.triggers = mc_triggers
for data in data_list_2011A:
    data.triggers = data_triggers_2011A
for data in data_list_2011B:
    data.triggers = data_triggers_2011B

    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list_2011 )
allsamples.extend( embed_list_2011 )

#  pat = '/VBF%TAUELE_2011_Colin_Oct25'
# pat = '/VBF%/TAUELE_2011_ColinOct31_Test1'
pat = '%/TAUELE_2011_OK_ColinOct31%'
connect( allsamples, pat, 'tauEle.*root', aliases, cache=True, verbose=False)
Tbar_tW.nGenEvents = 809984.

for c in allsamples:
    c.splitFactor = splitFactor(c)

コード例 #25
0
ファイル: diMu_ColinNov13.py プロジェクト: anantoni/CMG
    '/DoubleMu/Run2012C-24Aug2012-v1':'data_Run2012C_v1',
    '/DoubleMu/Run2012C-PromptReco-v2/AOD/PAT_CMG_V5_10_0_runrange_start-203002':'data_Run2012C_v2',
    }



MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_diboson_inc ) 
    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list )

# the pattern provided to this function is a SQL pattern.
# % represents the wildcard.
# this pattern allows to select a whole group of samples.
connect( allsamples, '%PAT_CMG_V5_10_0%', 'cmgTuple.*root', aliases, cache=True, verbose=False)



# guessing the best split factor for each component,
# to get about the same number of events in each job
for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

# picking up the json file automatically. Here, we use the dcs jsons.
for data in data_list:
    if len(data.files):
        data.json = jsonPick( data.files[0], jsonMap )


コード例 #26
0
    # '/WJetsToLNu_TuneZ2Star_8TeV-madgraph-tarball/Summer12-PU_S7_START52_V9-v1':'WJets',
    '/WJetsToLNu_TuneZ2Star_8TeV-madgraph-tarball/Summer12-PU_S7_START52_V9_extension-v1':'WJets',
    '/W2Jets':'W2Jets',
    '/W3Jets':'W3Jets',
    '/TTJets':'TTJets',
    '/TauPlusX/Run2012A-PromptReco-v1':'data_Run2012A',
    '/TauPlusX/Run2012B-PromptReco-v1':'data_Run2012B_start_196509',
    '/DoubleMu/StoreResults-DoubleMu_2012A_PromptReco_v1':'embed_Run2012A',
    '/DoubleMu/StoreResults-DoubleMu_2012B_PromptReco_v1_Run193752to195135':'embed_Run2012B_193752_195135',
    '/DoubleMu/StoreResults-DoubleMu_2012B_PromptReco_v1_Run195147to196070':'embed_Run2012B_195147_196070'
    }


MC = copy.copy( mc_ewk )
MC.extend( mc_higgs ) 
# MC.extend( mc_diboson ) 
for sam in MC:
    sam.triggers = mc_triggers
for data in data_list_2012:
    data.triggers = data_triggers

    
allsamples = copy.copy(MC)
allsamples.extend( data_list_2012 )
allsamples.extend( embed_list_2012 )

connect( allsamples, '%TAUMU_Colin_Jul4', 'tauMu.*root', aliases, cache=True)

# this number is not in the DB (dbs says this sample is still in production)
WJets.nGenEvents = 61444940
コード例 #27
0
mc_ewk = []
mc_ewk += mc_dy
mc_ewk += t_mc_ewk

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)
allsamples.extend(embed_list)

connect(allsamples,
        '%TAUELE_SVFitNoES_Jul09%',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)

MC_list.extend(mc_w)
allsamples.extend(mc_w)
connect(mc_w,
        '%TAUELE_SVFitNoESFixedRecoil_Jul19_steggema',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)

# Attach number of generated events for stitching
dy_nevents = [
    DYJets.nGenEvents, DY1Jets.nGenEvents, DY2Jets.nGenEvents,
コード例 #28
0
MC_list = copy.copy(mc_ewk)
# MC_list.extend( mc_higgs )
# MC_list.extend( mc_higgs_susy )
MC_list.extend(mc_diboson)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)

mc_repro = []
mc_repro += mc_dy
mc_repro += mc_higgs
mc_repro += mc_higgs_susy

connect(allsamples,
        '%TAUELE_SVFitVEGAS_Aug06%',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)
connect(embed_list,
        '%TAUELE_SVFitVEGAS_Aug07%',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)
connect(mc_repro,
        '%TAUELE_SVFitVEGAS_Aug26%',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)
コード例 #29
0
    '/WZJetsTo3LNu.*START42.*': 'WZJetsTo3LNu',
    '/ZZJetsTo2L2Nu.*START42.*': 'ZZJetsTo2L2Nu',
    '/ZZJetsTo2L2Q.*START42.*': 'ZZJetsTo2L2Q',
    '/ZZJetsTo4L.*START42.*': 'ZZJetsTo4L',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)
for sam in MC_list:
    sam.triggers = mc_triggers
for data in data_list_2011A:
    data.triggers = data_triggers_2011A
for data in data_list_2011B:
    data.triggers = data_triggers_2011B

allsamples = copy.copy(MC_list)
allsamples.extend(data_list_2011)
allsamples.extend(embed_list_2011)

connect(allsamples,
        '%TAUMU_2011_Colin_OSVFit_RecoilTest_Oct23',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)
Tbar_tW.nGenEvents = 809984.

for c in allsamples:
    c.splitFactor = splitFactor(c)
コード例 #30
0
##     '/WWJetsTo2L2Nu.*START42.*':'WWJetsTo2L2Nu',
##     '/WZJetsTo2L2Q.*START42.*':'WZJetsTo2L2Q',
##     '/WZJetsTo3LNu.*START42.*':'WZJetsTo3LNu',
##     '/ZZJetsTo2L2Nu.*START42.*':'ZZJetsTo2L2Nu',
##     '/ZZJetsTo2L2Q.*START42.*':'ZZJetsTo2L2Q',
##     '/ZZJetsTo4L.*START42.*':'ZZJetsTo4L',
    }


MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_higgs )
MC_list.extend( mc_diboson ) 
for sam in MC_list:
    sam.triggers = mc_triggers
for data in data_list_2011A:
    data.triggers = data_triggers_2011A
for data in data_list_2011B:
    data.triggers = data_triggers_2011B

    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list_2011 )
allsamples.extend( embed_list_2011 )

connect( allsamples, '%TAUMU_Up_ColinOct30', 'tauMu.*root', aliases, cache=True, verbose=False)
Tbar_tW.nGenEvents = 809984.

for c in allsamples:
    c.splitFactor = splitFactor(c)

コード例 #31
0
    'embed_Run2012C_24Aug2012_v1',
    '/DoubleMu/StoreResults-DoubleMu_2012D_PromptReco_v1_embedded_trans1.*':
    'embed_2012D_PromptReco_v1',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)
allsamples.extend(embed_list)

connect(allsamples,
        '%TAUMU_OSVFit_May27%',
        'tauMu.*root',
        aliases,
        cache=True,
        verbose=False)

# this number is not in the DB (dbs says this sample is still in production)
# WJets.nGenEvents = 61444940

for mc in MC_list:
    mc.triggers = mc_triggers
    # allsamples.append(mc)
for data in data_list:
    if len(data.files):
        data.json = jsonPick(data.files[0], jsonMap)
        data.triggers = data_triggers
        # allsamples.append(data)
for embed in embed_list:
コード例 #32
0
ファイル: tauMu_JanAug27.py プロジェクト: namapane/cmg-cmssw
from CMGTools.H2TauTau.proto.samples.csa2014.ewk import *

aliases = {'/VBF_HToTauTau.*POSTLS170.*': 'HiggsVBF'}

MC_list = [HiggsVBF125]

for sam in MC_list:
    sam.triggers = None  # No triggers yet

allsamples = copy.copy(MC_list)

pat = '/VBF_HToTauTau_M-125_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM/V5_B/PAT_CMG_V5_14_0/TAUMU_OSVFit_NoRecoil_May1'

connect(allsamples,
        '%TAUMU_MINIAODTEST_steggema',
        'miniAOD*root',
        aliases,
        cache=True,
        verbose=False)

# take stuff from yuta
MC_list = [HiggsVBF125, HiggsGGH125, DYJets]

HiggsVBF125.files = getFiles(
    '/VBF_HToTauTau_M-125_13TeV-powheg-pythia6/Spring14miniaod-PU20bx25_POSTLS170_V5-v2/MINIAODSIM',
    'CMS', '*.root')

HiggsGGH125.files = getFiles(
    '/GluGluToHToTauTau_M-125_13TeV-powheg-pythia6/Spring14miniaod-PU20bx25_POSTLS170_V5-v1/MINIAODSIM',
    'CMS', '*.root')

DYJets.files = getFiles(
コード例 #33
0
    'embed_Run2012C_22Jan',
    '/DoubleMuParked/StoreResults-Run2012B_22Jan2013_v1_RHembedded_trans1_tau115_ptelec1_20had1_18_v1.*':
    'embed_Run2012D_22Jan',
}

MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_higgs)
MC_list.extend(mc_diboson)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)
# allsamples.extend( embed_list )

connect(allsamples,
        '%TAUELE_SVF%_Jun28%',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)

# Accidentally named the e-tau embedded jobs TAUMU
connect(embed_list,
        '%PAT_CMG_V5_16_0_B%TAUMU_SVFit_Jun28_steggema',
        'tauEle.*root',
        aliases,
        cache=True,
        verbose=False)

allsamples.extend(embed_list)

# Attach number of generated events for stitching
dy_nevents = [