diff --git a/Configuration/Skimming/test/createSkimConfigForEachPDs.py b/Configuration/Skimming/test/createSkimConfigForEachPDs.py deleted file mode 100644 index 7f40fcc2855b3..0000000000000 --- a/Configuration/Skimming/test/createSkimConfigForEachPDs.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import time - - -localtime = time.localtime(time.time()) - -#print "Local current time :", localtime - -from Configuration.Skimming.autoSkim import autoSkim - -tier1dirname = 'tier1_%sy_%sm_%sd_%sh_%sm_%ss' %(localtime[0],localtime[1],localtime[2],localtime[3],localtime[4],localtime[5]) -testdirname = 'test_%sy_%sm_%sd_%sh_%sm_%ss' %(localtime[0],localtime[1],localtime[2],localtime[3],localtime[4],localtime[5]) -os.system( 'mkdir %s' %(tier1dirname) ) -os.system( 'mkdir %s' %(testdirname) ) - -for k in autoSkim: - print k - - if "Cosmics" in k: - ### 5E33 menu - #os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012A-PromptReco-v1/RECO and run=191277\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py --scenario=cosmics' %(k,k,k)) - ### 7E33 menu - #os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012B-PromptReco-v1/RECO and run=193928\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py --scenario=cosmics' %(k,k,k)) - os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012B-PromptReco-v1/RECO and run=194050 and lumi=500\" -n 1000 --conditions auto:com10 --python_filename=skim_%s.py --scenario=cosmics' %(k,k,k)) - - else: - ### 5E33 menu - #print ('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012A-PromptReco-v1/RECO and run=190705\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py' %(k,k,k)) - #os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012A-PromptReco-v1/RECO and run=190705\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py' %(k,k,k)) - #os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012A-PromptReco-v1/RECO and run=191277\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py' %(k,k,k)) - ### 7E33 menu - #os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012B-PromptReco-v1/RECO and run=193928\" -n 100 --conditions auto:com10 --python_filename=skim_%s.py' %(k,k,k)) - os.system('cmsDriver.py skims -s SKIM:@%s --data --no_exec --dbs \"find file,file.parent where dataset=/%s/Run2012B-PromptReco-v1/RECO and run=194050 and lumi=500\" -n 1000 --conditions auto:com10 --python_filename=skim_%s.py' %(k,k,k)) - - os.system('mkdir -p %s/%s' %(testdirname,k)) - - ###################################################### - # uncomment below if you want to get a summary from your test - ###################################################### - os.system('echo \"process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )\" >> skim_%s.py' %(k)) - - os.system('cp skim_%s.py %s/%s' %(k,testdirname,k)) - os.system('mv skim_%s.py %s' %(k,tier1dirname)) - - - ###################################################### - # uncomment below if you want to run a test on all the skims - ###################################################### - #os.system('cd %s/%s ; cmsRun skim_%s.py > skim_%s.txt 2>&1' %(testdirname,k,k,k) ) - # use the one below in case RAW not available on eos - #print ('cd %s/%s ; sed -i \"s/\/store\/data\/Run2012B/rfio\:\/castor\/cern.ch\/cms\/store\/data\/Run2012B/g\" skim_%s.py ; cmsRun skim_%s.py > skim_%s.txt 2>&1' %(testdirname,k,k,k,k) ) - #os.system('cd %s/%s ; sed -i \"s/\/store\/data\/Run2012B/rfio\:\/castor\/cern.ch\/cms\/store\/data\/Run2012B/g\" skim_%s.py ; cmsRun skim_%s.py > skim_%s.txt 2>&1 &' %(testdirname,k,k,k,k) ) - - diff --git a/Configuration/Skimming/test/getSkimEfficiency.py b/Configuration/Skimming/test/getSkimEfficiency.py deleted file mode 100644 index bebc71e5fe57c..0000000000000 --- a/Configuration/Skimming/test/getSkimEfficiency.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env python - -import subprocess as sp -import sys -import os -import optparse -import re -import string - - -parser = optparse.OptionParser(description='Calculate Skim Efficiency') -parser.add_option ("--input_dir", "-i", dest = "input_dir", type=str, help = "input directory") -parser.add_option ("--number_events" , "-n", dest = "number_events" , type=str, help = "number of events processed") -(options, args) = parser.parse_args() - -if not options.input_dir : parser.print_help(); sys.exit() -if not options.number_events : parser.print_help(); sys.exit() - -input_dir = options.input_dir -number_events = options.number_events - - -#------------------------------------------------ -# Step 1: loop over PD folders in input directory -#------------------------------------------------ - -ls_command = "ls " + input_dir - -listPDs_output = "" -listPDs_output, listPDs_stderr = sp.Popen ( ls_command , shell=True, stdout=sp.PIPE ).communicate() - -#print listPDs_output - -if listPDs_output == "": - print "\n" - print "ERROR! Can't find the directory or the directory is empty:", input_dir - print "\n" - sys.exit() - - -#------------------------------------------------------- -# create matrix -#------------------------------------------------------- -skimMatrix = {} -column=[] -lineCounter = int(0) - -listPDs_output_lines = listPDs_output.split("\n") -#print listPDs_output_lines -del listPDs_output_lines[-1] -#print listPDs_output_lines - -for l, PD in enumerate(listPDs_output_lines): - PD = PD.strip() - print "PD:", l, PD - skimMatrix[PD] = {} - - ls_command_two = "ls " + input_dir + "/" + PD + " | grep .root" - listSkims_output, listSkims_stderr = sp.Popen ( ls_command_two , shell=True, stdout=sp.PIPE ).communicate() - listSkims_output_files = listSkims_output.split("\n") - del listSkims_output_files[-1] - #print listSkims_output_files - - for f, file in enumerate(listSkims_output_files): - skim = string.split(file,".root")[0] - #print " SKIM:", f, skim - - ## search for number of events in skim - file_path = input_dir + "/" + PD + "/" + file - edm_command = "edmEventSize -v " + file_path - #print edm_command - edmCommand_output, edmCommand_stderr = sp.Popen ( edm_command , shell=True, stdout=sp.PIPE , stderr=sp.PIPE ).communicate() - #print edmCommand_output - edmCommand_output_lines = edmCommand_output.split("\n") - #print edmCommand_output_lines - if "contains no Events" in edmCommand_stderr : - numberOfEventsInSkim = 0 - else: - numberOfEventsInSkim = (float(string.split(edmCommand_output_lines[1]," ")[3]) / float(number_events))*100 - #print numberOfEventsInSkim - skimMatrix[PD][skim] = numberOfEventsInSkim - - print skimMatrix[PD] , "\n" - -#print skimMatrix - diff --git a/DPGAnalysis/Skims/python/CosmicSPSkim_cff.py b/DPGAnalysis/Skims/python/CosmicSPSkim_cff.py deleted file mode 100644 index 33e48166aece4..0000000000000 --- a/DPGAnalysis/Skims/python/CosmicSPSkim_cff.py +++ /dev/null @@ -1,80 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi import * - - -cosmicMuonsBarrelOnlyFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("cosmicMuons"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -cosmicMuonsFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("cosmicMuons"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -cosmicMuons1LegFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("cosmicMuons1Leg"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -globalCosmicMuonsBarrelOnlyFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("globalCosmicMuons"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -cosmictrackfinderP5Filter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("cosmictrackfinderP5"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -globalCosmicMuonsFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("globalCosmicMuons"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -rsWithMaterialTracksP5Filter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("rsWithMaterialTracksP5"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -globalCosmicMuons1LegFilter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("globalCosmicMuons1Leg"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - -ctfWithMaterialTracksP5Filter = cms.EDFilter("HLTMuonPointingFilter", - SALabel = cms.InputTag("ctfWithMaterialTracksP5"), - PropagatorName = cms.string("SteppingHelixPropagatorAny"), - radius = cms.double(10.0), - maxZ = cms.double(50.0), -) - - -cosmicMuonsBarrelOnlySequence = cms.Sequence(cosmicMuonsBarrelOnlyFilter) -cosmicMuonsSequence = cms.Sequence(cosmicMuonsFilter) -cosmicMuons1LegSequence = cms.Sequence(cosmicMuons1LegFilter) -globalCosmicMuonsBarrelOnlySequence = cms.Sequence(globalCosmicMuonsBarrelOnlyFilter) -cosmictrackfinderP5Sequence = cms.Sequence(cosmictrackfinderP5Filter) -globalCosmicMuonsSequence = cms.Sequence(globalCosmicMuonsFilter) -rsWithMaterialTracksP5Sequence = cms.Sequence(rsWithMaterialTracksP5Filter) -globalCosmicMuons1LegSequence = cms.Sequence(globalCosmicMuons1LegFilter) -ctfWithMaterialTracksP5Sequence = cms.Sequence(ctfWithMaterialTracksP5Filter) - - diff --git a/DPGAnalysis/Skims/python/Skims_DPG_cff.py b/DPGAnalysis/Skims/python/Skims_DPG_cff.py index cb82705d00b00..91df1dd42a515 100644 --- a/DPGAnalysis/Skims/python/Skims_DPG_cff.py +++ b/DPGAnalysis/Skims/python/Skims_DPG_cff.py @@ -255,33 +255,7 @@ ##################### - from DPGAnalysis.Skims.WMuSkim_cff import * -WMuPath = cms.Path( pfMetWMuNuSeq ) -SKIMStreamWMu = cms.FilteredStream( - responsible = 'DDT Test', - name = 'WMu', - paths = ( WMuPath ), - content = skimContent.outputCommands, - selectEvents = cms.untracked.PSet(), - dataTier = cms.untracked.string('RAW-RECO') - ) - - -from DPGAnalysis.Skims.WElectronSkim_cff import * -WElectronPath = cms.Path( elecMetSeq ) -SKIMStreamWElectron = cms.FilteredStream( - responsible = 'Egamma POG', - name = 'WElectron', - paths = ( WElectronPath ), - content = skimContent.outputCommands, - selectEvents = cms.untracked.PSet(), - dataTier = cms.untracked.string('RAW-RECO') - ) - - - - from DPGAnalysis.Skims.ZMuSkim_cff import * from DPGAnalysis.Skims.ZmmgSkim_cff import * @@ -368,11 +342,10 @@ from DPGAnalysis.Skims.HighMETSkim_cff import * pfPath = cms.Path(pfMETSelSeq) -tcPath = cms.Path(tcMETSelSeq) SKIMStreamHighMET = cms.FilteredStream( responsible = 'MET Group', name = 'HighMET', - paths = (pfPath,tcPath), + paths = (pfPath), content = skimContent.outputCommands, selectEvents = cms.untracked.PSet(), dataTier = cms.untracked.string('RAW-RECO')