示例#1
0
import sys
from JMTucker.Tools.general import typed_from_argv
from JMTucker.Tools.CMSSWTools import *
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process

process.TFileService.fileName = 'mctruth.root'

process.load('JMTucker.MFVNeutralino.WeightProducer_cfi')
process.p = cms.Path(process.mfvWeight)

process.mfvMovedTree = cms.EDAnalyzer('MFVMovedTracksTreer',
                                      event_src = cms.InputTag('mfvEvent'),
                                      weight_src = cms.InputTag('mfvWeight'),
                                      mover_src = cms.string(''),
                                      vertices_src = cms.InputTag('mfvVerticesAux'),
                                      max_dist2move = cms.double(-1),
                                      apply_presel = cms.bool(False),
                                      njets_req = cms.uint32(0),
                                      nbjets_req = cms.uint32(0),
                                      for_mctruth = cms.bool(True),
                                      )

process.p *= process.mfvMovedTree
file_event_from_argv(process)

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

    cs = CRABSubmitter('TrackMoverMCTruthV6p1_76X',
                       dataset = 'ntuplev6p1_76x_nstlays3',
示例#2
0
/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfv_neutralino_tau1000um_M0400/a6ab3419cb64660d6c68351b3cff9fb0/aodpat_9_1_ANl.root
/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfv_neutralino_tau1000um_M0400/a6ab3419cb64660d6c68351b3cff9fb0/aodpat_10_1_VPN.root'''.split('\n')
process.TFileService.fileName = 'cosmic_muons.root'

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

process.CosmicMuons = cms.EDAnalyzer('CosmicMuons',
                                     track_src = cms.InputTag('globalCosmicMuons'),
                                     primary_vertex_src = cms.InputTag('goodOfflinePrimaryVertices'),
                                     beamspot_src = cms.InputTag('offlineBeamSpot'),
                                     general_track_src = cms.InputTag('generalTracks'),
                                     gen_particle_src = cms.InputTag('genParticles'),
                                     min_pt = cms.double(1),
                                     max_eta = cms.double(2.4),
                                     min_npxhits = cms.int32(1),
                                     min_nsthits = cms.int32(6),
                                     min_nmuhits = cms.int32(2),
                                     min_dxy = cms.double(0.01),
                                     max_relpterr = cms.double(0.5),
                                     )

process.CosmicMuonsPt1Nsthits6Dxy0 = process.CosmicMuons.clone(min_dxy = 0)
process.CosmicMuonsPt1Nsthits6Dxy100 = process.CosmicMuons.clone()
process.CosmicMuonsPt1Nsthits8Dxy0 = process.CosmicMuons.clone(min_nsthits = 8, min_dxy = 0)
process.CosmicMuonsPt1Nsthits8Dxy100 = process.CosmicMuons.clone(min_nsthits = 8)
process.CosmicMuonsPt5Nsthits6Dxy0 = process.CosmicMuons.clone(min_pt = 5, min_dxy = 0)
process.CosmicMuonsPt5Nsthits6Dxy100 = process.CosmicMuons.clone(min_pt = 5)
process.CosmicMuonsPt5Nsthits8Dxy0 = process.CosmicMuons.clone(min_pt = 5, min_nsthits = 8, min_dxy = 0)
示例#3
0
process.maxEvents.input = 100
process.options.wantSummary = True
process.source.fileNames = ['/store/user/jchu/mfv_neutralino_tau1000um_M0200/jtuple_v7/5d4c2a74c85834550d3f9609274e8548/pat_11_1_css.root']
process.source.secondaryFileNames = cms.untracked.vstring('/store/user/tucker/mfv_neutralino_tau1000um_M0200/mfv_neutralino_tau1000um_M0200/a6ab3419cb64660d6c68351b3cff9fb0/aodpat_1048_1_yBl.root')
set_events_to_process(process, [(1,1048,26)])

process.TFileService.fileName = 'pileup_play.root'

add_analyzer('PileupRemovalPlay',
             pucands_src = cms.InputTag('pfPileUpPF'),
             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 *
示例#4
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])
示例#5
0
import os, sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process, add_analyzer

process.maxEvents.input = 1000
process.source.fileNames = ['file:/uscms/home/tucker/nobackup/fromt3/mfv_neutralino_tau1000um_M0400_jtuple_v6_547d3313903142038335071634b26604_pat_1_1_Dpa.root']
process.TFileService.fileName = 'track_play.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')

ana = process.mfvTrackingPlay = cms.EDAnalyzer('MFVTrackPlay',
                                               track_src = cms.InputTag('generalTracks'),
                                               dxy_cut = cms.double(0),
                                               quality_cut = cms.string(''),
                                               jet_src = cms.InputTag('selectedPatJetsPF'),
                                               jet_pt_cut = cms.double(20),
                                               delta_r_jet_cut = cms.double(1e10),
                                               )
process.p = cms.Path(process.mfvTrackingPlay)

cuts = [
    ('Qpt0p5eta2p4DRJet0p4',        'pt > 0.5 && abs(eta) < 2.4'),
    ('Qpt0p5eta2p4DRJet0p4JetPt80', 'pt > 0.5 && abs(eta) < 2.4'),
    ('Qpt5eta2p4',                  'pt > 5   && abs(eta) < 2.4'),
    ('Qpt5eta2p48hits',             'pt > 5   && abs(eta) < 2.4 && hitPattern.numberOfValidHits >= 8'),
    ('Qpt5eta2p48hitsdxy0p1',       'pt > 5   && abs(eta) < 2.4 && hitPattern.numberOfValidHits >= 8'),
    ('Qpt20eta2p48hitsdxy0p1',      'pt > 20  && abs(eta) < 2.4 && hitPattern.numberOfValidHits >= 8'),
    ]
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),
                           muon_trackerhits_min = cms.bool(True),
                           muon_pixelhits_min = cms.bool(True),
                           muon_dxy_max = cms.bool(True),
                           muon_dz_max = cms.bool(True),
                           muon_eta_max = cms.bool(True),
                           muon_tkpterror_max = cms.bool(True),
                           muon_trkkink_max = cms.bool(True),
                           muon_pt_min = cms.bool(True),
                           muon_iso_max = cms.bool(True),
示例#7
0
for line in file:
	string = "/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfv_neutralino_tau1000um_M0400/a6ab3419cb64660d6c68351b3cff9fb0/"+line
    # add as many files as you wish this way
	myfilelist.extend( [string] )

process.source = cms.Source('PoolSource', fileNames = myfilelist)

process.thrustNtuple = cms.EDAnalyzer('MFVThrustAnalysis',
                                      gen_particles_src = cms.InputTag('genParticles'),
                                      gen_jets_src = cms.InputTag('ak4GenJets'),
                                      gen_met_src = cms.InputTag('genMetTrue'),
                                      met_src = cms.InputTag('patMETsPF'),
                                      jets_src = cms.InputTag('selectedPatJetsPF'),
                                      muon_src = cms.InputTag('selectedPatMuonsPF'),
                                      map_src = cms.InputTag('mfvVerticesToJets'),
                                      pt_cut = cms.double(30),
                                      eta_cut = cms.double(3),
                                      loose_pt_cut = cms.double(30), # 20
                                      loose_eta_cut = cms.double(3), # 3.5
                                      lepton_pt_cut = cms.double(30), # 20
                                      lepton_eta_cut = cms.double(2.1), # 3.5
                                      )

process.p = cms.Path(process.mfvVertexSequence*process.thrustNtuple)

if __name__ == '__main__' and hasattr(sys, 'argv') and 'submit' in sys.argv:
    crab_cfg = '''
[CRAB]
jobtype = cmssw
scheduler = %(scheduler)s
示例#8
0
import sys
from JMTucker.Tools.BasicAnalyzer_cfg import cms, process
from JMTucker.Tools import SampleFiles

#SampleFiles.setup(process, 'MFVNtupleV18', 'mfv_neutralino_tau1000um_M0400', 1000)
process.source.fileNames = ['/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfvmergentuple_v18/2f015b87b0f183c443d811e67eceec2e/merge_1_1_S9a.root','/store/user/tucker/mfv_neutralino_tau1000um_M0400/mfvmergentuple_v18/2f015b87b0f183c443d811e67eceec2e/merge_2_1_Qi0.root']
process.TFileService.fileName = 'resolutions.root'

process.load('JMTucker.MFVNeutralino.VertexSelector_cfi')
process.load('JMTucker.MFVNeutralino.AnalysisCuts_cfi')

mfvResolutions = cms.EDAnalyzer('MFVResolutions',
                                vertex_src = cms.InputTag('mfvSelectedVerticesTight'),
                                mevent_src = cms.InputTag('mfvEvent'),
                                which_mom = cms.int32(0),
                                max_dr = cms.double(-1),
                                max_dist = cms.double(0.005),
                                )

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

process.mfvResolutionsByDistCutTrks = mfvResolutions.clone()
process.p *= process.mfvResolutionsByDistCutTrks

process.mfvResolutionsByDistCutJets = mfvResolutions.clone(which_mom = 1)
process.p *= process.mfvResolutionsByDistCutJets

process.mfvResolutionsByDistCutTrksJets = mfvResolutions.clone(which_mom = 2)
process.p *= process.mfvResolutionsByDistCutTrksJets

process.p *= process.mfvAnalysisCuts
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 = 'hadronic_nb_analysis.root'

process.p = cms.EDAnalyzer('HadronicNBAnalysis',
                           trigger_results_src = cms.InputTag('TriggerResults', '', 'HLT'),
                           jet_src = cms.InputTag('selectedPatJetsPF'),
                           min_njets = cms.int32(6),
                           min_jet_pt = cms.double(50.0),
                           min_1st_jet_pt = cms.double(150.0),
                           b_discriminator_name = cms.string('combinedSecondaryVertexBJetTags'),
                           min_nbtags = cms.int32(2),
                           bdisc_min = cms.double(0.898),
                           muon_src = cms.InputTag('selectedPatMuonsPF'),
                           electron_src = cms.InputTag('selectedPatElectronsPF'),
                           )
process.p0 = cms.Path(process.p)

def de_mfv():
    if hasattr(process, 'mfvGenParticleFilter'):
        process.mfvGenParticleFilter.cut_invalid = False
    if hasattr(process, 'mfvGenVertices'):
        process.mfvGenVertices.is_mfv = False

if 'qcdht0100' in sys.argv:
    de_mfv()
    process.source.fileNames = '''/store/user/jchu/QCD_HT-100To250_TuneZ2star_8TeV-madgraph-pythia/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_1_1_Shq.root
/store/user/jchu/QCD_HT-100To250_TuneZ2star_8TeV-madgraph-pythia/jtuple_no_skimming_cuts_v8/a95b67af6a62c008520600808d84ac2d/pat_2_1_RWX.root