import FinalStateAnalysis.Utilities.cfgcleaner as cfgcleaner import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing from FinalStateAnalysis.Utilities.version import fsa_version, get_user import os import time options = TauVarParsing.TauVarParsing( xSec=-999.0, xSecErr=0.0, skipEvents=0, # For debugging keepEverything=0, reportEvery=2000, puTag='unknown', isAOD=True, calibrationTarget='2012Jul13ReReco', verbose=0, # Print out summary table at end profile=0, # Enabling profiling keepAll=0, # Don't drop any event content # Used for the EGamma electron calibration # See https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaElectronEnergyScale dataset='Prompt', dumpCfg='', #used for crab clean=1, embedded=0, # If running on embedded samples, set to 1 ) files = [ #"root://cmsxrootd.hep.wisc.edu//store/data/Run2012B/DoubleMu/AOD/29Jun2012-v1/0001/C46FD2A9-3FC3-E111-A1A8-485B39800C00.root" ]
from FinalStateAnalysis.NtupleTools.rerun_Jets import rerun_jets import PhysicsTools.PatAlgos.tools.helpers as helpers process = cms.Process("Ntuples") import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing options = TauVarParsing.TauVarParsing( skipEvents=0, # Start at an event offset (for debugging) reportEvery=100, channels='mt', rerunMCMatch=False, eventView=0, # Switch between final state view (0) and event view (1) passThru=0, # Turn off preselections dump=0, # If one, dump process python to stdout rerunFSA=1, # If one, rebuild the PAT FSA events verbose=0, # If one print out the TimeReport noPhotons=0, # If one, don't assume that photons are in the PAT tuples. svFit=1, # If one, SVfit appropriate lepton pairs. zzMode=False, rochCor="", eleCor="", rerunQGJetID=0, # If one reruns the quark-gluon JetID runNewElectronMVAID=0, # If one runs the new electron MVAID rerunMVAMET=0, # If one, (re)build the MVA MET rerunJets=0 ) options.outputFile = "ntuplize.root" options.parseArguments() process.source = cms.Source( "PoolSource",
#!/usr/bin/env cmsRun import FWCore.ParameterSet.Config as cms import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing process = cms.Process("USER") import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing options = TauVarParsing.TauVarParsing() options.parseArguments() process.source = cms.Source( "PoolSource", fileNames=cms.untracked.vstring(options.inputFiles), ) process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(1)) process.printEventContent = cms.EDAnalyzer("EventContentAnalyzer") process.p = cms.Path(process.printEventContent) process.schedule = cms.Schedule(process.p)
import os from pdb import set_trace import time options = TauVarParsing.TauVarParsing( xSec=-999.0, xSecErr=0.0, skipEvents=0, # For debugging keepEverything=0, reportEvery=2000, puTag='unknown', HLTprocess='HLT', isAOD=True, calibrationTarget='2012Jul13ReReco', passThru=0, verbose=0, # Print out summary table at end profile=0, # Enabling profiling keepAll=0, # Don't drop any event content # Used for the EGamma electron calibration # https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaElectronEnergyScale dataset='Prompt', dumpCfg='', # Used for crab clean=1, embedded=0, # If running on embedded samples, set to 1 analyzeSkimEff='', # Analyze the skim efficiency and put it in this file eleReg=0, zzMode=False, ) files = [] options.inputFiles = files
#!/usr/bin/env cmsRun import FWCore.ParameterSet.Config as cms import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing options = TauVarParsing.TauVarParsing( ewkSkim=1, # Apply EWK skim conditions skipEvents=0, # For debugging ) options.inputFiles = "file:output.root" options.outputFile = 'plots.root' options.parseArguments() process = cms.Process("TUPLETEST") process.source = cms.Source( "PoolSource", fileNames = cms.untracked.vstring(options.inputFiles), skipEvents = cms.untracked.uint32(options.skipEvents), ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents)) process.TFileService = cms.Service( "TFileService", fileName = cms.string(options.outputFile) ) pt = cms.PSet( min = cms.untracked.double(0),
bash < do_higgs.txt ''' import FWCore.ParameterSet.Config as cms process = cms.Process("TrileptonNtuple") import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing options = TauVarParsing.TauVarParsing( skipEvents=0, # For debugging puScenario='S4', saveSkim=0, reportEvery=100, makeH2Tau=1, makeTNP=1, makeTrilepton=1, makeQuad=1, make4L=1, dump=0, # If one, dump process python to stdout rerunFSA=0, # If one, rebuild the PAT FSA events verbose=0, # If one print out the TimeReport ) options.outputFile = "higgs.root" options.parseArguments() process.source = cms.Source( "PoolSource", fileNames=cms.untracked.vstring(options.inputFiles), skipEvents=cms.untracked.uint32(options.skipEvents), #lumisToProcess = options.buildPoolSourceLumiMask()
Skim on the presence of a gen. level. lepton. Example to require at least one muon: ./skimByGenLepton_cfg.py inputFile=in.root outputFile=out.root \ pdgId=13 minPt=10 maxEta=2.1 minNumber=1 ''' import FWCore.ParameterSet.Config as cms import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing options = TauVarParsing.TauVarParsing( pdgId=0, # For debugging minPt="5", maxEta="2.5", minNumber=1, ) options.outputFile = "selectGenLepton.root" options.parseArguments() process = cms.Process("SkimGenLepton") process.source = cms.Source( "PoolSource", fileNames=cms.untracked.vstring(options.inputFiles), ) process.maxEvents = cms.untracked.PSet( input=cms.untracked.int32(options.maxEvents)) process.options = cms.untracked.PSet(wantSummary=cms.untracked.bool(True))
import FWCore.ParameterSet.Config as cms import FinalStateAnalysis.Utilities.TauVarParsing as TauVarParsing from FinalStateAnalysis.Utilities.EventList import EventList # Create our option set, with some extra options options = TauVarParsing.TauVarParsing( evtList= '/afs/hep.wisc.edu/home/efriis/event_lists/mikes_LP_MuTauInclusiveEvents.reformatted.txt' ) example_files = [ "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/770/783A319B-AADA-E011-8136-BCAEC5329713.root", "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/755/8EA1A088-6CDA-E011-9322-BCAEC532970D.root", "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/754/8AE67E46-6CDA-E011-A35A-BCAEC532972D.root", "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/744/38CE631A-69DA-E011-BDCC-BCAEC5329731.root", "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/742/520ABDD8-69DA-E011-B14A-003048F118C4.root", "/store/data/Run2011A/SingleMu/AOD/PromptReco-v6/000/175/735/A8F2188D-70DA-E011-920C-003048F024E0.root", ] for example_file in example_files: options.inputFiles = example_file options.parseArguments() evt_list_file = open(options.evtList, 'r') evt_list = EventList(evt_list_file) process = cms.Process("PAT") process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.cerr.FwkReport.reportEvery = 100