示例#1
0
process.trignjets = cuts.clone()
process.trignjetsht500 = cuts.clone(min_ht = 500)
process.trignjetsht750 = cuts.clone(min_ht = 750)
process.trigmu = cuts.clone(trigger_bit = 3, min_4th_jet_pt = 20)
process.trigmuht500 = cuts.clone(trigger_bit = 3, min_4th_jet_pt = 20, min_ht = 500)
process.trigtopmu = cuts.clone(trigger_bit = 4, min_4th_jet_pt = 20)
process.trigtopmunmu = cuts.clone(trigger_bit = 4, min_4th_jet_pt = 20, min_nsemilepmuons = 1)
process.trigtopmunmuht500 = cuts.clone(trigger_bit = 4, 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,
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process

process.source.fileNames = ['/store/user/tucker/sstop_genfsimreco_test/sstop_genfsimreco_test//15c4250952b10a469cc6da8beaecd65e/fastsim_9_1_Ziq.root']
process.MessageLogger.cerr.FwkReport.reportEvery = 1

process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.ParticleListDrawer = cms.EDAnalyzer('ParticleListDrawer',
                                            maxEventsToPrint = cms.untracked.int32(1000000),
                                            src = cms.InputTag('genParticles'),
                                            printOnlyHardInteraction = cms.untracked.bool(False),
                                            useMessageLogger = cms.untracked.bool(False)
                                            )

process.a = cms.EDAnalyzer('MCInteractionTest')
process.p = cms.Path(process.ParticleListDrawer * process.a)
示例#3
0
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process, add_analyzer, geometry_etc

process.MessageLogger.cerr.FwkReport.reportEvery = 1
geometry_etc(process, 'START53_V27::All')
process.source.fileNames = ['file:reco.root']
process.source.secondaryFileNames = cms.untracked.vstring('file:gensimhlt.root')
process.load('SimTracker.TrackAssociation.TrackAssociatorByHits_cfi')
process.TFileService.fileName = 'TrackAssociator.root'

process.TrackAssociator = cms.EDAnalyzer('MFVTrackAssociator',
                                         tracks_src = cms.InputTag('generalTracks'),
                                         sim_tracks_src = cms.InputTag('g4SimHits'),
                                         sim_vertices_src = cms.InputTag('g4SimHits'),
                                         tracking_particles_src = cms.InputTag('mergedtruth','MergedTrackTruth'),
                                         gen_particles_src = cms.InputTag('genParticles'),
                                         rec_vertices_src = cms.InputTag('mfvInclusiveVertexFinder'),
                                         do_checks = cms.bool(True),
                                         )

process.load('JMTucker.MFVNeutralino.GenParticles_cff')

process.load('JMTucker.Tools.ParticleListDrawer_cff')
process.ParticleListDrawer2 = process.ParticleListDrawer.clone(src = cms.InputTag('mfvGenParticles', 'All'))
process.ParticleListDrawer3 = process.ParticleListDrawer.clone(src = cms.InputTag('mfvGenParticles', 'Visible'))

process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')
process.goodOfflinePrimaryVertices.filter = cms.bool(True)

process.load('JMTucker.MFVNeutralino.VertexReco_cff')
示例#4
0
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process
from JMTucker.Tools import SampleFiles

use_weights = False

SampleFiles.setup(process, 'MFVNtupleV15', 'qcdht1000', 100000)
process.TFileService.fileName = 'pileup.root'

process.load('JMTucker.MFVNeutralino.VertexSelector_cfi')
vtx_sel = process.mfvSelectedVerticesTight

process.load('JMTucker.MFVNeutralino.AnalysisCuts_cfi')
ana_sel = process.mfvAnalysisCuts

def pize(f,sz):
    fmt = '%.' + str(sz) + 'f'
    return (fmt % f).replace('.','p').replace('-','n')

changes = []
changes.append(('nm1', '', ''))

changes.append(('tightX3', '', 'max_npv = 5'))
changes.append(('ABCDX3', 'min_ntracks = 5, min_maxtrackpt = 0', 'min_ntracks01 = 0, min_maxtrackpt01 = 0, max_npv = 5'))
changes.append(('triggerX3', '', 'apply_vertex_cuts = False, max_npv = 5'))
changes.append(('nocutsX3', '', 'min_4th_jet_pt = 0, min_njets = 0, apply_vertex_cuts = False, max_npv = 5, min_ht = 0'))

for i in xrange(6,30,3):
    changes.append(('tightX%i'%i, '', 'min_npv = %i, max_npv = %i+2'%(i,i)))
    changes.append(('ABCDX%i'%i, 'min_ntracks = 5, min_maxtrackpt = 0', 'min_ntracks01 = 0, min_maxtrackpt01 = 0, min_npv = %i, max_npv = %i+2'%(i,i)))
    changes.append(('triggerX%i'%i, '', 'apply_vertex_cuts = False, min_npv = %i, max_npv = %i+2'%(i,i)))
########################################################################

from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
process.goodDataFilter = hltHighLevel.clone()
process.goodDataFilter.TriggerResultsTag = cms.InputTag('TriggerResults', '', 'PAT')
process.goodDataFilter.HLTPaths = ['eventCleaningAll'] # can set to just 'goodOfflinePrimaryVertices', for example
process.goodDataFilter.andOr = False # = AND

process.triggerFilter = hltHighLevel.clone()
process.triggerFilter.HLTPaths = ['HLT_QuadJet50_v*']
process.triggerFilter.andOr = True # = OR

########################################################################

process.load('JMTucker.Tools.ResolutionsHistogrammer_cfi')

for x in ['WithTrigger']:
    setattr(process, 'histos' + x, process.histos.clone())

########################################################################

process.p0 = cms.Path(                        process.histos)
process.p1 = cms.Path(process.triggerFilter * process.histosWithTrigger)

if 'debug' in sys.argv:
    from JMTucker.Tools.CMSSWTools import file_event_from_argv
    file_event_from_argv(process)
    process.MessageLogger.cerr.FwkReport.reportEvery = 1
    process.histos.print_info = True
    process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
示例#6
0
             nonpucands_src = cms.InputTag('pfNoPileUpPF'),
             pf_jets_src = cms.InputTag('ak4PFJets'),
             pat_jets_src = cms.InputTag('selectedPatJetsPF'),
             pv_src = cms.InputTag('goodOfflinePrimaryVertices'),
             ltmm_src = cms.InputTag('mfvTrackMatches'),
             pt_cut = cms.double(0),
             verbose = cms.bool(True),
             )

process.PileupRemovalPlayNoZCheck = process.PileupRemovalPlay.clone(pucands_src = 'pfPileUpNoClosestZVertexPF',
                                                                    nonpucands_src = 'pfNoPileUpNoClosestZVertexPF')
process.PileupRemovalPlayPt5 = process.PileupRemovalPlay.clone(pt_cut = 5)
process.PileupRemovalPlayNoZCheckPt5 = process.PileupRemovalPlayNoZCheck.clone(pt_cut = 5)
#process.pPileupRemovalPlay *= process.PileupRemovalPlayNoZCheck * process.PileupRemovalPlayPt5 * process.PileupRemovalPlayNoZCheckPt5

process.load('JMTucker.MFVNeutralino.RedoPURemoval_cff')
process.pPileupRemovalPlay.replace(process.PileupRemovalPlay, process.mfvRedoPURemoval * process.PileupRemovalPlay)

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

    mfv_neutralino_tau0000um_M0400.ana_dataset_override = '/mfv_neutralino_tau0000um_M0400/jchu-jtuple_pileupremovalstudies_v6-5c257295836d18fbf020b73449ad9b5f/USER'
    mfv_neutralino_tau0100um_M0400.ana_dataset_override = '/mfv_neutralino_tau0100um_M0400/jchu-jtuple_pileupremovalstudies_v6-5c257295836d18fbf020b73449ad9b5f/USER'
    mfv_neutralino_tau1000um_M0400.ana_dataset_override = '/mfv_neutralino_tau1000um_M0400/jchu-jtuple_pileupremovalstudies_v6-5c257295836d18fbf020b73449ad9b5f/USER'
    mfv_neutralino_tau1000um_M1000.ana_dataset_override = '/mfv_neutralino_tau1000um_M1000/jchu-jtuple_pileupremovalstudies_v6-5c257295836d18fbf020b73449ad9b5f/USER'
    mfv_neutralino_tau9900um_M0400.ana_dataset_override = '/mfv_neutralino_tau9900um_M0400/jchu-jtuple_pileupremovalstudies_v6-5c257295836d18fbf020b73449ad9b5f/USER'
 
    samples = [mfv_neutralino_tau0000um_M0400, mfv_neutralino_tau0100um_M0400, mfv_neutralino_tau1000um_M0400, mfv_neutralino_tau1000um_M1000, mfv_neutralino_tau9900um_M0400]

    from JMTucker.Tools.CRABSubmitter import CRABSubmitter
    cs = CRABSubmitter('PileupPlay',
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process

process.source.fileNames = ['/store/user/jchu/mfv_neutralino_tau1000um_M0400/jtuple_v7/5d4c2a74c85834550d3f9609274e8548/pat_1_1_hdB.root']
process.source.secondaryFileNames = cms.untracked.vstring('/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfv_neutralino_tau1000um_M0400/a6ab3419cb64660d6c68351b3cff9fb0/aodpat_891_1_sZ9.root','/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfv_neutralino_tau1000um_M0400/a6ab3419cb64660d6c68351b3cff9fb0/aodpat_948_2_lgB.root')
process.TFileService.fileName = 'leptonic_nb_analysis.root'

process.load('Configuration.Geometry.GeometryIdeal_cff')
process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'START53_V21::All'
process.load('TrackingTools.TransientTrack.TransientTrackBuilder_cfi')

process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')
process.goodOfflinePrimaryVertices.filter = cms.bool(True)
process.load('JMTucker.MFVNeutralino.Vertexer_cff')

process.p = cms.EDAnalyzer('LeptonicNBAnalysis',
                           trigger_results_src = cms.InputTag('TriggerResults', '', 'HLT'),
                           primary_vertex_src = cms.InputTag('goodOfflinePrimaryVertices'),
                           secondary_vertex_src = cms.InputTag('mfvSelectedVerticesTight'),
                           muon_src = cms.InputTag('selectedPatMuonsPF'),
                           min_nmuons = cms.int32(1),
                           jet_src = cms.InputTag('selectedPatJetsPF'),
                           min_jet_pt = cms.double(30.0),
                           max_jet_eta = cms.double(2.4),
                           min_njets = cms.int32(6),
                           b_discriminator_name = cms.string('combinedSecondaryVertexBJetTags'),
                           bdisc_min = cms.double(0.679),
                           min_nbtags = cms.int32(1),
                           muon_stations_min = cms.bool(True),
示例#8
0
import sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process, geometry_etc
from JMTucker.Tools import SampleFiles

#SampleFiles.setup(process, 'MFVNtupleV18', 'mfv_neutralino_tau1000um_M0400', 100)
process.source.fileNames = ['/store/user/tucker/TTJets_HadronicMGDecays_8TeV-madgraph/mfvntuple_v18/c761ddfa7f093d8f86a338439e06a1d4/ntuple_100_1_NHs.root']
process.TFileService.fileName = 'histos.root'

process.load('JMTucker.MFVNeutralino.Histos_cff')

import JMTucker.Tools.SimpleTriggerResults_cfi as SimpleTriggerResults
SimpleTriggerResults.setup_endpath(process, weight_src='mfvWeight')

nm1s = [
    ('Ntracks', 'min_ntracks = 0, min_njetsntks = 0'),
    ('Drmin',   'max_drmin = 1e9'),
    ('Drmax',   'max_drmax = 1e9'),
    ('Mindrmax','min_drmax = 0'),
    ('Bs2derr', 'max_bs2derr = 1e9'),
    ('Njets',   'min_njetsntks = 0'),
    ('Ntracksptgt3', 'min_ntracksptgt3 = 0'),
    ('Sumnhitsbehind', 'max_sumnhitsbehind = 1000000'),
    ('ButNtracksAndGt3', 'max_drmin = 1e9, max_drmax = 1e9, min_drmax = 0, max_bs2derr = 1e9, min_njetsntks = 0'),
    ]

for name, cut in nm1s:
    evt_cut = ''
    if type(cut) == tuple:
        cut, evt_cut = cut

    vtx = eval('process.mfvSelectedVerticesTight.clone(%s)' % cut)
import sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process, file_event_from_argv

file_event_from_argv(process)
process.TFileService.fileName = 'simple_trigger_efficiency.root'

process.RandomNumberGeneratorService = cms.Service('RandomNumberGeneratorService')
process.RandomNumberGeneratorService.SimpleTriggerEfficiency = cms.PSet(initialSeed = cms.untracked.uint32(1219))

#import prescales
process.load('JMTucker.Tools.SimpleTriggerEfficiency_cfi')
process.SimpleTriggerEfficiency.prescale_paths  = cms.vstring()  #*prescales.prescales.keys()),
process.SimpleTriggerEfficiency.prescale_values = cms.vuint32()  #*[o for l,h,o in prescales.prescales.itervalues()]),

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

for x in sys.argv:
    if x.startswith('process='):
        process_name = x.replace('process=', '')
        process.SimpleTriggerEfficiency.trigger_results_src = cms.InputTag('TriggerResults', '', process_name)