示例#1
0
import sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process
process.TFileService.fileName = cms.string('evids.root')

process.evids = cms.EDAnalyzer('EventIdRecorder')
process.p = cms.Path(process.evids)

process.source.duplicateCheckMode = cms.untracked.string('noDuplicateCheck')

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples

    bkg_samples = Samples.ttbar_samples + Samples.qcd_samples

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    from JMTucker.Tools.SampleFiles import SampleFiles

    def crab_cfg_modifier(sample):
        return [('CMSSW', 'lumi_mask', '/uscms/home/tucker/mfvrecipe/HalfMCLists/jsons/%s.json' % sample.name)]

    cs = CRABSubmitter('HalfMCLists_TestJsons',
                       use_ana_dataset = True,
                       total_number_of_lumis = -1,
                       lumis_per_job = 3500,
                       crab_cfg_modifier = crab_cfg_modifier,
                       )
    cs.submit_all(bkg_samples)
示例#2
0
process.CosmicMuonsPt5Nsthits8Dxy100 = process.CosmicMuons.clone(min_pt = 5, min_nsthits = 8)

process.cosmicMuons = process.CosmicMuons.clone(track_src = 'cosmicMuons', min_npxhits = 0, min_nsthits = 0)
process.cosmicMuons1Leg = process.CosmicMuons.clone(track_src = 'cosmicMuons1Leg', min_npxhits = 0, min_nsthits = 0)
process.regionalCosmicTracks = process.CosmicMuons.clone(track_src = 'regionalCosmicTracks', min_nmuhits = 0)

process.p = cms.Path(process.triggerFilter
                   * process.CosmicMuonsPt1Nsthits6Dxy0
                   * process.CosmicMuonsPt1Nsthits6Dxy100
                   * process.CosmicMuonsPt1Nsthits8Dxy0
                   * process.CosmicMuonsPt1Nsthits8Dxy100
                   * process.CosmicMuonsPt5Nsthits6Dxy0
                   * process.CosmicMuonsPt5Nsthits6Dxy100
                   * process.CosmicMuonsPt5Nsthits8Dxy0
                   * process.CosmicMuonsPt5Nsthits8Dxy100
                   * process.cosmicMuons
                   * process.cosmicMuons1Leg
                   * process.regionalCosmicTracks)

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    from JMTucker.Tools.Samples import mfv_neutralino_tau0100um_M0400, mfv_neutralino_tau0300um_M0400, mfv_neutralino_tau1000um_M0400, mfv_neutralino_tau9900um_M0400
    from JMTucker.Tools.CRABSubmitter import CRABSubmitter

    cs = CRABSubmitter('CosmicMuons',
                       total_number_of_events = -1,
                       events_per_job = 10000,
                       )

    samples = [mfv_neutralino_tau0100um_M0400, mfv_neutralino_tau0300um_M0400, mfv_neutralino_tau1000um_M0400, mfv_neutralino_tau9900um_M0400]
    cs.submit_all(samples)
示例#3
0
import sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process
from JMTucker.Tools import SampleFiles

process.TFileService.fileName = 'minbias_histos.root'
#process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(20) )

process.source.fileNames = ['file:root://xrootd.unl.edu//store/mc/Summer12/MinBias_TuneZ2star_8TeV-pythia6/GEN-SIM/START50_V13-v3/0000/0005E496-3661-E111-B31E-003048F0E426.root']

process.minbiasHistos = cms.EDAnalyzer('MinBiasHistos',
                                    jet_src = cms.InputTag('ak5GenJets'),
                                    btag_src = cms.InputTag('combinedSecondaryVertexBjetTags'),
                                    gen_particle_src = cms.InputTag('genParticles'),
                                    jet_pt_min = cms.double(20),
                                    bdisc_min = cms.double(0.679),
                                    )


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

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    from JMTucker.Tools.Samples import TupleOnlyMCSample
    from JMTucker.Tools.CRABSubmitter import CRABSubmitter

    blah = TupleOnlyMCSample('MinBias','/MinBias_TuneZ2star_8TeV-pythia6/Summer12-START50_V13-v3/GEN-SIM',500000)
    
    cs = CRABSubmitter('MinBiasHistosV1',
                       job_control_from_sample = True,                       
                       )
    cs.submit_all([blah])
示例#4
0
    samples = [
        Samples.DataSample('MultiJetPk2012B', '/MultiJet1Parked/Run2012B-v1/RAW'),
        Samples.DataSample('MultiJetPk2012C', '/MultiJet1Parked/Run2012C-v1/RAW'),
        Samples.DataSample('MultiJetPk2012D', '/MultiJet1Parked/Run2012D-v1/RAW'),
        ]

    for sample in samples:
        sample.lumis_per = 100

    def modify(sample):
        to_add = []
        to_replace = []

        to_add.append('process.dummyToMakeDiffHash = cms.PSet(sampleName = cms.string("%s"))' % sample.name)

        return to_add, to_replace

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('RawQuadJet50',
                       pset_modifier = modify,
                       job_control_from_sample = True,
                       get_edm_output = True,
                       data_retrieval = 'cornell',
                       max_threads = 1,
                       publish_data_name = 'RawQuadJet50',
                       GRID_data_location_override = 'T2_US',
                       USER_jmt_skip_input_files = 'src/EgammaAnalysis/ElectronTools/data/*,src/CMGTools/External/data/TMVAClassificationCategory_JetID_53X_chs_Dec2012.weights.xml,lib/slc5_amd64_gcc462/libCMGToolsExternal.so',
                       )

    cs.submit_all(samples[:1])
示例#5
0
                                       min_4th_jet_pt=20,
                                       min_nsemilepmuons=1,
                                       min_ht=500)
process.trignjetsslep = cuts.clone(min_nsemileptons=1)
process.trigonly = cuts.clone(min_njets=0, min_4th_jet_pt=0)

for name in process.filters.keys():
    setattr(process, 'p' + name, cms.Path(getattr(process, name)))

if use_weights:
    process.load('JMTucker.MFVNeutralino.WeightProducer_cfi')

import JMTucker.Tools.SimpleTriggerEfficiency_cfi as SimpleTriggerEfficiency
SimpleTriggerEfficiency.setup_endpath(
    process, weight_src='mfvWeight' if use_weights else '')

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples
    samples = Samples.qcd_samples + Samples.ttbar_samples + Samples.mfv_signal_samples + Samples.leptonic_background_samples

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    from JMTucker.Tools.SampleFiles import SampleFiles

    cs = CRABSubmitter(
        'EventsCutplay',
        total_number_of_events=1000000,
        events_per_job=500000,
        manual_datasets=SampleFiles['MFVNtupleV15'],
    )
    cs.submit_all(samples)
示例#6
0
process.source.fileNames = ['/store/mc/RunIIFall15DR76/QCD_HT1000to1500_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/AODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/00000/0078199A-3FC1-E511-86E1-001E6739801B.root']
process.TFileService.fileName = 'tracker_mapper.root'

from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
process.triggerFilter = hltHighLevel.clone()
process.triggerFilter.HLTPaths = ['HLT_PFHT800_v*']
process.triggerFilter.andOr = True # = OR

process.TrackerMapper = cms.EDAnalyzer('TrackerMapper',
                                       track_src = cms.InputTag('generalTracks'),
                                       beamspot_src = cms.InputTag('offlineBeamSpot'),
                                       primary_vertex_src = cms.InputTag('offlinePrimaryVertices'),
                                       pileup_weights = cms.vdouble(0.4430900689834877, 0.7774946230174374, 1.211532146615326, 1.5555095481485082, 1.3656299694579321, 1.9513380206283242, 1.4311409855780286, 1.2555573073998676, 1.3509572272968273, 1.3430021765269047, 1.2671533450149761, 1.1830775671347276, 1.0767805180896135, 0.9110431461207203, 0.6971726104245397, 0.48543658081115554, 0.32209366814732293, 0.22848641867558733, 0.19027360131827362, 0.15527725489164057, 0.09487219082044276, 0.04095796584834362, 0.013672759117602781, 0.003987335129679708, 0.0011389782126837726, 0.00033784224878244623, 0.00010191256127555789, 2.9928259966798484e-05, 8.357594204838038e-06, 2.2051905560049044e-06, 5.493198439639333e-07, 1.2915574040259908e-07, 2.8638852677561204e-08, 5.978815170388724e-09, 1.1718664799704302e-09, 2.147556635829967e-10, 3.658973660525496e-11, 5.759196292572524e-12, 8.200005561089732e-13, 1.0437472148786202e-13),
                                       )

process.p = cms.Path(process.triggerFilter * process.TrackerMapper)

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples

    for s in Samples.ttbar_samples + Samples.qcd_samples:
        s.events_per = 500000
    for s in Samples.data_samples:
        s.json = '../../MFVNeutralino/test/ana_all.json'

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('TrackerMapper',
                       job_control_from_sample = True,
                       )
    cs.submit_all(Samples.ttbar_samples + Samples.qcd_samples + Samples.data_samples)
    process.source.secondaryFileNames = cms.untracked.vstring('/store/mc/Summer12_DR53X/TTJets_SemiLeptMGDecays_8TeV-madgraph/AODSIM/PU_S10_START53_V7A_ext-v1/00000/66DA98B8-5B24-E211-8DA5-003048D476C4.root')
    process.TFileService.fileName = 'leptonic_nb_analysis_ttbarsemilep.root'

if 'ttbardilep' in sys.argv:
    sample_ttbar()
    process.source.fileNames = '''/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_1_2_y4F.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_2_1_Gr1.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_3_1_47Y.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_4_1_9xi.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_5_1_vCZ.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_6_1_7o2.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_7_1_7Tm.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_8_1_QGa.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_9_1_rLc.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_10_1_2gY.root
/store/user/jchu/TTJets_FullLeptMGDecays_8TeV-madgraph/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_11_1_Gam.root'''.split('\n')
    process.source.secondaryFileNames = cms.untracked.vstring('/store/mc/Summer12_DR53X/TTJets_FullLeptMGDecays_8TeV-madgraph/AODSIM/PU_S10_START53_V7A-v2/00001/80BF45BD-BB1D-E211-B8A0-E41F13181808.root','/store/mc/Summer12_DR53X/TTJets_FullLeptMGDecays_8TeV-madgraph/AODSIM/PU_S10_START53_V7A-v2/00000/B29D0A87-A21A-E211-AC8D-E61F131915F3.root')
    process.TFileService.fileName = 'leptonic_nb_analysis_ttbardilep.root'

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    from JMTucker.Tools.Samples import mfv_signal_samples
    from JMTucker.Tools.CRABSubmitter import CRABSubmitter

    cs = CRABSubmitter('LeptonicNBAnalysis',
                       total_number_of_events = -1,
                       events_per_job = 10000,
                       use_ana_dataset = True,
                       CMSSW_use_parent = 1,
                       )
    cs.submit_all(mfv_signal_samples)
示例#8
0
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process

process.source.fileNames = ['/store/mc/Summer12_DR53X/TTJets_HadronicMGDecays_8TeV-madgraph/AODSIM/PU_S10_START53_V7A-v1/00000/002A756C-FA15-E211-9FA6-485B39800B75.root']
process.TFileService.fileName = 'tracker_mapper.root'

#process.source.fileNames = ['/store/user/tucker/RelValSingleMuPt1000_CMSSW_5_3_6-START53_V14-v2_GEN-SIM-RECO.7C1AEF1C-FF29-E211-BA60-003048678B20.root']

process.TrackerMapper = cms.EDAnalyzer('TrackerMapper',
                                       track_src = cms.InputTag('generalTracks'),
                                       use_rechits = cms.bool(False)
                                       )
process.p = cms.Path(process.TrackerMapper)

if 1:
    process.source.fileNames = ['file:/uscms/home/tucker/scratch/reco_1_2_L1S.root']
    process.TrackerMapper.use_rechits = True

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples

    for s in Samples.data_samples:
        s.json = 'ana_5pc.json'

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('TrackerMapper',
                       total_number_of_events = -1,
                       events_per_job = 500000,
                       )
    cs.submit_all([Samples.myttbarpydesignnoputkex])
示例#9
0
import sys, os
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process

process.source.fileNames = ['/store/mc/Summer12_DR53X/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/AODSIM/PU_S10_START53_V7A-v1/00000/000DE054-260E-E211-A375-00266CF9B9F0.root']
process.TFileService.fileName = 'mc_pileup.root'

process.MCPileupDist = cms.EDAnalyzer('PileupDist', binning = cms.vdouble(100, 0, 100))
process.MCPileupDistQuadJet50 = process.MCPileupDist.clone()

from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
process.triggerFilter = hltHighLevel.clone()
process.triggerFilter.HLTPaths = ['HLT_QuadJet50_v*']
process.triggerFilter.andOr = True # = OR

process.p = cms.Path(process.MCPileupDist * process.triggerFilter * process.MCPileupDistQuadJet50)

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples 
    from JMTucker.Tools.CRABSubmitter import CRABSubmitter

    cs = CRABSubmitter('PileupDist',
                       total_number_of_events = -1,
                       events_per_job = 500000,
                       )
    cs.submit_all([Samples.qcdht1000, Samples.mfv_neutralino_tau1000um_M0400])
示例#10
0
def modify(sample):
    to_add = []
    to_replace = []

    if sample.is_mc:
        if sample.is_fastsim:
            to_add.append('input_is_fastsim(process)')
        if sample.is_pythia8:
            to_add.append('input_is_pythia8(process)')
        if sample.no_skimming_cuts:
            to_add.append('no_skimming_cuts(process)')
        if sample.re_pat:
            to_add.append('re_pat(process)')
    else:
        magic = 'runOnMC = True'
        err = 'trying to submit on data, and tuple template does not contain the magic string "%s"' % magic
        to_replace.append((magic, 'runOnMC = False', err))

    return to_add, to_replace

cs = CRABSubmitter('Tuple' + tuple_version.upper(),
                   pset_template_fn = os.path.join(os.environ['CMSSW_BASE'], 'src/JMTucker/Tools/python/PATTuple_cfg.py'),
                   pset_modifier = modify,
                   job_control_from_sample = True,
                   get_edm_output = True,
                   data_retrieval = 'fnal',
                   publish_data_name = 'jtuple_' + tuple_version
                   )

cs.submit_all(background_samples)
示例#11
0
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import *

del process.TFileService
process.MessageLogger.cerr.FwkReport.reportEvery = 1
file_event_from_argv(process)

process.load('JMTucker.Tools.ParticleListDrawer_cff')
process.p = cms.Path(process.ParticleListDrawer)

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    from JMTucker.Tools.Samples import background_samples
    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('BkgsParticleList',
                       total_number_of_events = 3,
                       number_of_jobs = 1,
                       USER_jmt_skip_input_files = 'src/EGamma/EGammaAnalysisTools/data/*',
                       )
    cs.submit_all([s for s in background_samples if s.name != 'ttbarhadronic'])
    process.source.secondaryFileNames = cms.untracked.vstring('/store/mc/Summer12_DR53X/QCD_HT-500To1000_TuneZ2star_8TeV-madgraph-pythia6/AODSIM/PU_S10_START53_V7A-v1/00003/1C38BEB3-D728-E211-897B-00266CF9BEF8.root','/store/mc/Summer12_DR53X/QCD_HT-500To1000_TuneZ2star_8TeV-madgraph-pythia6/AODSIM/PU_S10_START53_V7A-v1/00000/C28A8612-991F-E211-B35C-0024E8769B6D.root')
    process.TFileService.fileName = 'hadronic_nb_analysis_qcdht0500.root'

if 'qcdht1000' in sys.argv:
    de_mfv()
    process.source.fileNames = '''/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_1_1_uij.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_2_1_OyH.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_3_1_JW6.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_4_1_hSV.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_5_1_Lqm.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_6_1_7Ml.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_7_1_f2A.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_8_1_XxA.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_9_1_a1G.root
/store/user/jchu/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_10_1_SzD.root'''.split('\n')
    process.source.secondaryFileNames = cms.untracked.vstring('/store/mc/Summer12_DR53X/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/AODSIM/PU_S10_START53_V7A-v1/00000/0038E6D2-860D-E211-9211-00266CFACC38.root','/store/mc/Summer12_DR53X/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/AODSIM/PU_S10_START53_V7A-v1/00000/D4C0816B-870D-E211-B094-00266CF258D8.root')
    process.TFileService.fileName = 'hadronic_nb_analysis_qcdht1000.root'

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    from JMTucker.Tools.Samples import mfv_signal_samples, qcdht1000
    qcdht1000.ana_dataset_override = '/QCD_HT-1000ToInf_TuneZ2star_8TeV-madgraph-pythia6/jchu-jtuple_no_skimming_cuts_v8-a95b67af6a62c008520600808d84ac2d/USER'

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('HadronicNBAnalysis',
                       total_number_of_events = -1,
                       events_per_job = 10000,
                       use_ana_dataset = True,
                       CMSSW_use_parent = 1,
                       )
    cs.submit_all(mfv_signal_samples + [qcdht1000])
示例#13
0
        process.p *= obj
        vtx_srcs.append(cms.InputTag(name))

process.nmx = cms.EDAnalyzer(
    'NmxHistos',
    weight_src=cms.InputTag('mfvWeight'),
    use_weight=cms.bool(False),
    vertex_srcs=cms.VInputTag(*vtx_srcs),
)

process.p *= process.nmx

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    import JMTucker.Tools.Samples as Samples
    samples = Samples.from_argv([
        Samples.mfv_neutralino_tau0100um_M0400, Samples.
        mfv_neutralino_tau1000um_M0400, Samples.mfv_neutralino_tau0300um_M0400,
        Samples.mfv_neutralino_tau9900um_M0400
    ] + Samples.ttbar_samples + Samples.qcd_samples + Samples.data_samples)

    for s in Samples.data_samples:
        s.json = 'ana_all.json'

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter(
        'NmxV20',
        job_control_from_sample=True,
        use_ana_dataset=True,
    )
    cs.submit_all(samples)