import FWCore.ParameterSet.Config as cms
from subprocess import *
import FWCore.Utilities.FileUtils as FileUtils
mylist=FileUtils.loadListFromFile('/afs/cern.ch/user/m/mshi/CMSSW_7_6_3/src/GGHAA2Mu2TauAnalysis/testLowMassDY.txt')
process = cms.Process("testSKIM1")


process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000)

process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True),
                SkipEvent = cms.untracked.vstring('ProductNotFound'))

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(*mylist))


#require event to fire IsoMu24_eta2p1
process.Mu1Mu2Analyzer=cms.EDAnalyzer(
        'Mu1Mu2Analyzer',
        genParticleTag = cms.InputTag('genParticles'),
        Mu1Mu2=cms.InputTag('Isolation'),
        particleFlow=cms.InputTag('particleFlow')
)
process.MuMuTauTauRecoAnalyzer=cms.EDAnalyzer(
	'MuMuTauTauRecoAnalyzer',
          tauTag=cms.InputTag('muHadTauSelector','','SKIM'),
 jetMuonMapTag=cms.InputTag('CleanJets','muonValMap','SKIM'),
        Mu1Mu2= cms.InputTag('Isolation'),
        genParticleTag=cms.InputTag('genParticles'),
   	muHadMassBins=cms.vdouble(0.0, 1.0, 2.0,3.0, 4.0, 12.0),
Example #2
0
process.load("GeneratorInterface.HydjetInterface.hydjetDefault_cfi")

process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(200)
                                       )
#process.MessageLogger.cerr.FwkReport.reportEvery = 200

#process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck',
#                                        ignoreTotal=cms.untracked.int32(0),
#                                        oncePerEventMode = cms.untracked.bool(False)
#                                        )

process.source = cms.Source('PoolSource',
                            fileNames = cms.untracked.vstring(),
                            duplicateCheckMode = cms.untracked.string("noDuplicateCheck")
                            )
mylist = FileUtils.loadListFromFile ('filelist.txt')
for fname in mylist:
 process.source.fileNames.append('file:%s' % (fname))
process.TFileService = cms.Service("TFileService",
                                  fileName = cms.string("pPbAna_jb0.root"))


process.test = cms.EDAnalyzer('AMPTAnalyzer'
                             )

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




Example #3
0
  centralitySrc = cms.InputTag("pACentrality")
  )

process.options = cms.untracked.PSet(
# after crash
SkipEvent = cms.untracked.vstring('ProductNotFound')	
)

# Input Source
process.source = cms.Source('PoolSource',
                            fileNames = cms.untracked.vstring(
#'/store/user/davidlw/PAHighPt/PA2013_FlowCorr_PromptReco_TrkHM_Gplus_v12/331639eac1650e369e7dacf443369878/pPb_HM_100_1_tMI.root'
),
                            #duplicateCheckMode = cms.untracked.string("noDuplicateCheck")
                            )
mylist = FileUtils.loadListFromFile ('filelistAll.dat')
for fname in mylist:
 process.source.fileNames.append('file:%s' % (fname))
# process.source.fileNames.append('%s' % (fname))


# histogram output
process.TFileService = cms.Service("TFileService",
                                  fileName = cms.string("skimTreeTrack.root"))

process.demo = cms.EDAnalyzer('SkimTrack',
   srcTrack = cms.untracked.InputTag("generalTracks"),
   vzcutmax = cms.untracked.double(15.0),
   vzcutmin = cms.untracked.double(-0.1),
   etaMin = cms.untracked.double(-2.4),
   etaMax = cms.untracked.double(2.4),
TAU_3PRONG_1NEUTRAL = 11
TAU_3PRONG_2NEUTRAL = 12
TAU_3PRONG_3NEUTRAL = 13
TAU_3PRONG_NNEUTRAL = 14
TAU_RARE = 15

### No consideration of pT rank ###

ANY_PT_RANK = -1

#################
# Initialization
#################
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/k/ktos/GroupDir/CMSSW_7_6_3/src/AnalyzerGeneratorRecoVariousFunctions/Analyzer/FILE_TESTS/inFileList_WJets_CleanJets.txt')

process = cms.Process("FAKERATEANALYZER")

###################################################
# initialize MessageLogger and output report
###################################################
process.load("FWCore.MessageLogger.MessageLogger_cfi")

process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(100)
process.options   = cms.untracked.PSet( 
		wantSummary = cms.untracked.bool(True), 
		SkipEvent = cms.untracked.vstring('ProductNotFound')
)

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.load("Configuration.Geometry.GeometryIdeal_cff")
process.GlobalTag.globaltag=autoCond['startup']

#load the response corrections calculator
process.load('DijetCalibration.Analyzers.dijetntuplizer_cfi')
process.load('JetMETCorrections.Configuration.JetCorrectionProducers_cff')

# run over files

process.dijetcalibration.rootHistFilename = cms.string('tree.root')
#process.dijetcalibration.doCaloJets = cms.bool(False)
#process.dijetcalibration.doPFJets = cms.bool(False)
#process.dijetcalibration.doGenJets = cms.bool(False)
#process.dijetcalibration.debug = cms.untracked.bool(True)
#process.dijetcalibration.maxDeltaEta = cms.double(0.5)
#process.dijetcalibration.minJetEt = cms.double(20.0)
#process.dijetcalibration.minSumJetEt = cms.double(50.0)
#process.dijetcalibration.maxThirdJetEt = cms.double(100.0)

import FWCore.Utilities.FileUtils as FileUtils
readFiles = cms.untracked.vstring(FileUtils.loadListFromFile('files.list'))
process.source = cms.Source("PoolSource", fileNames=readFiles)

print readFiles

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.MessageLogger.cerr.FwkReport.reportEvery=cms.untracked.int32(100)
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )

process.p = cms.Path(process.dijetcalibration)
Example #6
0
# for igprof
#process.IgProfService = cms.Service("IgProfService",
#  reportFirstEvent            = cms.untracked.int32(0),
#  reportEventInterval         = cms.untracked.int32(25),
#  reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > igdqm.%I.gz")
#)

#
# /Wmunu/Summer09-MC_31X_V3-v1/GEN-SIM-RECO
#process.source = cms.Source("PoolSource",
#    fileNames = cms.untracked.vstring(*inputfiles))

#Load files from text
#import FWCore.Python.FileUtils as FileUtils
import FWCore.Utilities.FileUtils as FileUtils
readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('inputfile_MinimumBias_ReReco_122294.txt') )

#Extend the list if needed...
#readFiles.extend( FileUtils.loadListFromFile ('moreInfoIwant.txt') )

#Read the input files
process.source = cms.Source ("PoolSource",fileNames = readFiles)

#
process.source.inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
#
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32( nevents )
)
process.Timing = cms.Service("Timing")
import FWCore.ParameterSet.Config as cms
import FWCore.PythonUtilities.LumiList as LumiList
import FWCore.ParameterSet.Types as CfgTypes

process = cms.Process("opendata")

goodJSON = 'Cert_136033-149442_7TeV_Apr21ReReco_Collisions10_JSON_v2.txt'
myLumis = LumiList.LumiList(filename = goodJSON).getCMSSWString().split(',')

import FWCore.Utilities.FileUtils as FileUtils

singleMuFiles = FileUtils.loadListFromFile('CMS_Run2011A_SingleMu_AOD_12Oct2013-v1_10000_file_index.txt')
process.source = cms.Source("PoolSource",
                            fileNames = cms.untracked.vstring(*singleMuFiles)
                            )

process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange()
process.source.lumisToProcess.extend(myLumis)

process.load("TTBarFilter.TTBarFilter.TTBarFilter_cfi")

process.TTBarFilter.csvFileName = cms.string("SingleMu_Run2011A.csv")
process.TTBarFilter.minPt = cms.double(20.0)
process.TTBarFilter.maxEta = cms.double(2.1)

process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10000))

process.mypath = cms.Path(process.TTBarFilter)
process.schedule = cms.Schedule(process.mypath)
Example #8
0
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils
import os

process = cms.Process("SKIMANA")

process.load('Configuration/StandardSequences/Services_cff')
process.load('FWCore.MessageLogger.MessageLogger_cfi')
process.load('Configuration/StandardSequences/GeometryExtended_cff')
process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
process.load('Configuration/EventContent/EventContent_cff')


# =============== input file setting =====================
mylist = FileUtils.loadListFromFile ('run150431.txt')
#mylist.extend ( FileUtils.loadListFromFile ('run150431.txt') )

# =============== 2.36 TeV MC Sample =====================
run_list = ['150431:834258-150431:834258',
            '150431:956113-150431:956113',
            '150431:1061046-150431:1061046',
            '150431:1130789-150431:1130789',
            '150431:1329205-150431:1329205',
            '150431:1450252-150431:1450252']

process.source = cms.Source("PoolSource",
   fileNames = cms.untracked.vstring( *mylist),
   eventsToProcess = cms.untracked.VEventRange(run_list) 
)
import FWCore.ParameterSet.Config as cms

process = cms.Process("Demo")

process.load("FWCore.MessageService.MessageLogger_cfi")

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

import FWCore.Utilities.FileUtils as FileUtils
<<<<<<< HEAD
mylist = FileUtils.loadListFromFile('130.txt')
=======
mylist = FileUtils.loadListFromFile('90.txt')
>>>>>>> 2908c8155495873c1df20881babf7e78b9fd93ad
process.source = cms.Source("PoolSource",fileNames =
cms.untracked.vstring( *mylist ))

process.demo = cms.EDAnalyzer('HiggsGenHltRecoAnalyzer',
    GenParticleLabel = cms.InputTag("genParticles"),
    hltInputTag      = cms.InputTag( "TriggerResults::HLT" )
)


process.p = cms.Path(process.demo)
process = cms.Process("Trees",eras.Run2_2017)


# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('Configuration.Geometry.GeometryExtended2017devReco_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )                                              

mylist = FileUtils.loadListFromFile ('dataset-Sim-HFAimed.txt')

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

process.MessageLogger.cerr.FwkReport.reportEvery = 500

#process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
#process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
#process.GlobalTag.globaltag = 'GR_R_74_V13A::All'
#process.GlobalTag.globaltag = 'GR_P_V56::All'
#process.GlobalTag.globaltag = 'MCRUN2_71_V1::All'
#process.GlobalTag.globaltag = 'MCRUN2_74_V8::All'
#process.GlobalTag.globaltag = 'MCRUN2_74_V8B::All'

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '80X_mcRun2_asymptotic_v14', '')
Example #11
0
process = cms.Process("ANA")

process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.load("Configuration.StandardSequences.Services_cff")
process.load("GeneratorInterface.HydjetInterface.hydjetDefault_cfi")

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))

process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

# process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck',
#                                        ignoreTotal=cms.untracked.int32(0),
#                                        oncePerEventMode = cms.untracked.bool(False)
#                                        )

process.source = cms.Source(
    "PoolSource", fileNames=cms.untracked.vstring(), duplicateCheckMode=cms.untracked.string("noDuplicateCheck")
)
import FWCore.Utilities.FileUtils as FileUtils

mylist = FileUtils.loadListFromFile("filelist.txt")
for fname in mylist:
    process.source.fileNames.append("file:%s" % (fname))


process.ana = cms.EDAnalyzer("AMPTAnalyzer")

process.TFileService = cms.Service("TFileService", fileName=cms.string("outtreefile_ampt.root"))
process.p = cms.Path(process.ana)
Example #12
0
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load('Configuration.StandardSequences.Reconstruction_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.load('HeavyIonsAnalysis.Configuration.collisionEventSelection_cff')
process.load('Configuration.EventContent.EventContentHeavyIons_cff')
process.MessageLogger.cerr.FwkReport.reportEvery = 200

process.source = cms.Source("PoolSource",
   fileNames = cms.untracked.vstring(
#  '/store/hidata/HIRun2013A/PAHighPt/RECO/PromptReco-v1/000/210/634/FA4E6B7E-7366-E211-8DD0-0019B9F581C9.root'
#  'file:/cms/store/hidata/HIRun2013/PAHighPt/RECO/PromptReco-v1/000/210/498/00000/1E825832-FA64-E211-8F9C-003048CF9B28.root'
),
				)
filename = "filelist"+sys.argv[3]+".dat"
mylist = FileUtils.loadListFromFile (filename)
for fname in mylist[int(sys.argv[4]):int(sys.argv[5])]:
 process.source.fileNames.append('file:%s' % (fname))

# =============== Other Statements =====================
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
process.GlobalTag.globaltag = 'GR_P_V43F::All'
if sys.argv[3] == "pPbReReco":
    process.source.lumisToProcess = LumiList.LumiList(filename = 'Cert_210498-210658_HI_PromptReco_Collisions13_JSON_v2.txt').getVLuminosityBlockRange()
elif sys.argv[3] == "pPb":
    process.source.lumisToProcess = LumiList.LumiList(filename = 'Cert_210676-211256_HI_PromptReco_Collisions13_JSON_v2.txt').getVLuminosityBlockRange()
elif sys.argv[3] == "Pbp":
    process.source.lumisToProcess = LumiList.LumiList(filename = 'Cert_211313-211631_HI_PromptReco_Collisions13_JSON_v2.txt').getVLuminosityBlockRange()

# =============== Import Sequences =====================
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/m/mshi/gHaa2mumutautau_gen_analyzer/CMSSW_7_1_11_patch2/src/ggA_GenLevel_Analyzer/AmumuAnalyzer/allInfoIWant_heavyHiggs_300_light_9.txt')
process = cms.Process("Demo")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )

process.source = cms.Source("PoolSource",
    # replace 'myfile.root' with the source file you want to use
    fileNames = cms.untracked.vstring(*mylist)
)


process.demo = cms.EDAnalyzer('AmumuAnalyzer',
    genParticleTag=cms.InputTag("genParticles"),
    outFileName = cms.string('/afs/cern.ch/user/m/mshi/gHaa2mumutautau_gen_analyzer/CMSSW_7_1_11_patch2/src/ggA_GenLevel_Analyzer/AmumuAnalyzer/heavyHiggs_300_light9.root'),  
)

process.TFileService = cms.Service("TFileService",
					fileName = cms.string('histodemo_heavyHiggs_300_light9.root')
)
process.p = cms.Path(process.demo)
process.load('Configuration.Geometry.GeometryRecoDB_cff') # Ideal geometry and interface
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") # Global tag
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag.globaltag = GlobalTag("80X_dataRun2_Prompt_v2")

process.options = cms.untracked.PSet(
     SkipEvent= cms.untracked.vstring("ProductNotFound"), # make this exception fatal
  )
process.maxEvents=cms.untracked.PSet(input=cms.untracked.int32(10000)) 

import FWCore.Utilities.FileUtils as FileUtils
 
readFiles = cms.untracked.vstring()


readFiles = cms.untracked.vstring( FileUtils.loadListFromFile (os.environ['CMSSW_BASE']+'/src/CosmicRateTool/TrackAnalyzer/test/'+'fileList.txt') )
process.source = cms.Source("PoolSource",
			   fileNames = readFiles,
			   )

process.TFileService = cms.Service("TFileService", fileName = cms.string("Cosmic_rate_tuple.root") )

process.load("CosmicRateTool.TrackAnalyzer.cosmicRateAnalyzer_cfi")
process.p = cms.Path(process.cosmicRateAnalyzer)

#process.demo = cms.EDAnalyzer("CosmicRateAnalyzer",
#				tracks = cms.InputTag("ctfWithMaterialTracksP5"),                # Track collection for prompt RECO Dataset
#				tracksInputTag = cms.InputTag("ALCARECOTkAlCosmicsCTF0T"),		 # Track collection for stream and prompt ALCARECO Dataset
#				muonsInputTag = cms.InputTag("muons1Leg"),		 # for muon Trigger timing information  
#)
# https://github.com/cms-smpj/SMPJ/tree/v1.0


## Skeleton process
from PhysicsTools.PatAlgos.patTemplate_cfg import *
import FWCore.Utilities.FileUtils as FileUtils

process.load('Configuration.StandardSequences.Services_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

# True : when running in OpenData virtual machine
# False: when runing in lxplus 
runOnVM = True

# Local input
fileList = FileUtils.loadListFromFile('CMS_MonteCarlo2011_Summer11LegDR_QCD_Pt-80to120_TuneZ2_7TeV_pythia6_AODSIM_PU_S13_START53_LV6-v1_00000_file_index.txt')
process.source.fileNames = cms.untracked.vstring(*fileList)

if runOnVM:
    process.GlobalTag.connect = cms.string('sqlite_file:/cvmfs/cms-opendata-conddb.cern.ch/START53_LV6A1.db')

# Global tag for Summer11LegDR-PU_S13_START53_LV6-v1
process.GlobalTag.globaltag = cms.string('START53_LV6A1::All')


# Load PAT config
process.load("RecoTauTag.Configuration.RecoPFTauTag_cff") # re-run tau discriminators (new version)
process.load("PhysicsTools.PatAlgos.patSequences_cff")
process.load('Configuration.StandardSequences.Reconstruction_cff')
process.load('RecoJets.Configuration.RecoPFJets_cff')
process.load('RecoJets.Configuration.RecoJets_cff')
process = cms.Process("Trees",eras.Run2_2017)


# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('Configuration.Geometry.GeometryExtended2017devReco_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )                                              

mylist = FileUtils.loadListFromFile ('dataset-SIM.txt')

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

process.MessageLogger.cerr.FwkReport.reportEvery = 500

#process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
#process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
#process.GlobalTag.globaltag = 'GR_R_74_V13A::All'
#process.GlobalTag.globaltag = 'GR_P_V56::All'
#process.GlobalTag.globaltag = 'MCRUN2_71_V1::All'
#process.GlobalTag.globaltag = 'MCRUN2_74_V8::All'
#process.GlobalTag.globaltag = 'MCRUN2_74_V8B::All'

from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '80X_mcRun2_asymptotic_v14', '')
gjetsFiles = cms.untracked.vstring(
  '/store/relval/CMSSW_5_3_14/RelValPhotonJets_Pt_10/GEN-SIM-RECO/START53_LV6-v1/00000/5847CE87-FB60-E311-A45A-0025905A6134.root',
  '/store/relval/CMSSW_5_3_14/RelValPhotonJets_Pt_10/GEN-SIM-RECO/START53_LV6-v1/00000/C82EE6E4-4D60-E311-8621-0025905A4964.root'
)

qcdFiles = cms.untracked.vstring(
 '/store/relval/CMSSW_5_3_14/RelValQCD_FlatPt_15_3000/GEN-SIM-RECO/START53_LV3_Feb14-v1/00000/D2D13174-A495-E311-8372-0025905A60F4.root',
 '/store/relval/CMSSW_5_3_14/RelValQCD_FlatPt_15_3000/GEN-SIM-RECO/START53_LV3_Feb14-v1/00000/EAB6B353-9B95-E311-B000-00304867915A.root'
)

# Load file list
# Summer12_DR53X production G_Pt_XtoY
import FWCore.Utilities.FileUtils as FileUtils
listFileName='fileinfo_GJet/makepy_Summer12_DR53X_G_Pt_470to800.txt'
#listFileName='selection_tmp.txt'
mylist = FileUtils.loadListFromFile(listFileName)
mylist.extend( FileUtils.loadListFromFile(listFileName) )
gjetsFiles = cms.untracked.vstring( *mylist )



process.source = cms.Source("PoolSource",
#                            fileNames = cms.untracked.vstring(
#        '/store/mc/Summer12_DR53X/G_Pt-15to3000_TuneZ2_Flat_8TeV_pythia6/AODSIM/PU_S10_START53_V7A-v1/00000/0035BB1E-950E-E211-B5FE-002481E101DA.root'
#        )
                            fileNames= gjetsFiles
                            #fileNames= qcdFiles
)

process.copyAll = cms.OutputModule("PoolOutputModule",
          fileName = cms.untracked.string("selectionGPt_470to800_3k.root") )
Example #18
0
## let it run
process.p = cms.Path(
   process.patDefaultSequence
   )

## ------------------------------------------------------
#  In addition you usually want to change the following
#  parameters:
## ------------------------------------------------------
#
#globaltag
process.GlobalTag.globaltag = 'GR_R_42_V25::All' 

#luminosity
import FWCore.ParameterSet.Config as cms
import PhysicsTools.PythonAnalysis.LumiList as LumiList
myLumis = LumiList.LumiList(filename='Cert_136033-149442_7TeV_Apr21ReReco_Collisions10_JSON_v2.txt').getCMSSWString().split(',')
process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange()
process.source.lumisToProcess.extend(myLumis)

#input file
import FWCore.Utilities.FileUtils as FileUtils
files2010data = FileUtils.loadListFromFile ('Electron2010data_500files_1.txt') 
readFiles = cms.untracked.vstring( *files2010data )
process.source.fileNames = readFiles

#process.maxEvents.input = -1                                  ##  (e.g. -1 to run on all events)
process.maxEvents.input = 1000                               ##  (e.g. -1 to run on all events)
#output file
process.out.fileName = 'file://Electron_PAT_data_500files_1.root' ##  (e.g. 'myTuple.root')
Example #19
0
import FWCore.ParameterSet.Config as cms

process = cms.Process("Demo")

process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 1000

process.TFileService = cms.Service("TFileService",
                                   fileName=cms.string('L1MuonHistogramPooja.root')
                                   )

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )


import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('cmsswSourceFiles')

process.source = cms.Source("PoolSource",
    # replace 'myfile.root' with the source file you want to use
    fileNames = cms.untracked.vstring(*mylist)
)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff')
process.load('Configuration.StandardSequences.Generator_cff')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
process.load('Configuration.StandardSequences.Reconstruction_Data_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(-1)
)


# This might prove useful when running over lots of data

import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('sourceList%INSTANCE%')
 
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring(*mylist)
)

import PhysicsTools.PythonAnalysis.LumiList as LumiList
process.source.lumisToProcess = LumiList.LumiList(filename = '%LUMIFILE%').getVLuminosityBlockRange()

process.options = cms.untracked.PSet(

)

process.load("FWCore.MessageService.MessageLogger_cfi")
#May need this in future processings
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgrade2019', '')

process.options = cms.untracked.PSet(
    wantSummary = cms.untracked.bool(True),
                                     #    SkipEvent = cms.untracked.vstring('ProductNotFound')
    )

process.MessageLogger.cerr.FwkReport.reportEvery = 5000

# Two options for inputting files:
# 1: List the files by hand as a vector of strings in fileNames = cms.untracked.vstring(...) below
# 2: Specify a text file listing all input files, one file path per line in mylist = FileUtils.loadListFromFile(...) below. This list will be passed to PoolSource if you do fileNames = cms.untracked.vstring(readFiles).

import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile ("sample.list") 
readFiles = cms.untracked.vstring( *mylist)

process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring(readFiles)
)

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )


process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string('test_flat_tree.root'),
                                   )

from Configuration.AlCa.GlobalTag import GlobalTag
Example #22
0
import FWCore.ParameterSet.Config as cms
import FWCore.PythonUtilities.LumiList as LumiList
import FWCore.ParameterSet.Types as CfgTypes

process = cms.Process("opendata")

goodJSON = 'Cert_160404-180252_7TeV_ReRecoNov08_Collisions11_JSON.txt'
myLumis = LumiList.LumiList(filename = goodJSON).getCMSSWString().split(',')

import FWCore.Utilities.FileUtils as FileUtils
from FWCore.MessageLogger.MessageLogger_cfi import *

singleElectronFiles = FileUtils.loadListFromFile('CMS_Run2011A_SingleElectron_AOD_12Oct2013-v1_20000_file_index.txt')
process.source = cms.Source("PoolSource",
                            fileNames = cms.untracked.vstring(*singleElectronFiles)
                            )

process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange()
process.source.lumisToProcess.extend(myLumis)

process.load('WenuFilter.WenuFilter.WenuFilter_cfi')

process.WenuFilter.csvFileName = cms.string('Wenu_Run2011A.csv')
process.WenuFilter.electronMinPt = cms.double(25.0)

process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(500000))

process.mypath = cms.Path(process.WenuFilter)
process.schedule = cms.Schedule(process.mypath)
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/m/mshi/CMSSW_7_4_12_patch4/src/GGHAA2Mu2TauAnalysis/DrellYan.txt')
process = cms.Process("DrellYan")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

process.source = cms.Source("PoolSource",
    # replace 'myfile.root' with the source file you want to use
    fileNames = cms.untracked.vstring(*mylist))


process.DrellYan = cms.EDAnalyzer('DrellYanAnalyzer',
    genParticleTag=cms.InputTag("genParticles"),
      outFileName = cms.string('/afs/cern.ch/user/m/mshi/CMSSW_7_4_12_patch4/src/GGHAA2Mu2TauAnalysis/MuMuTauTauGenAnalyzer/python/DrellYan_out.root')
)
process.TFileService = cms.Service("TFileService",
                                        fileName = cms.string('Drell_Yan.root')
)

process.p = cms.Path(process.DrellYan)
# for igprof
#process.IgProfService = cms.Service("IgProfService",
#  reportFirstEvent            = cms.untracked.int32(0),
#  reportEventInterval         = cms.untracked.int32(25),
#  reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > igdqm.%I.gz")
#)

#
# /Wmunu/Summer09-MC_31X_V3-v1/GEN-SIM-RECO
#process.source = cms.Source("PoolSource",
#    fileNames = cms.untracked.vstring(*inputfiles))

#Load files from text
#import FWCore.Python.FileUtils as FileUtils
import FWCore.Utilities.FileUtils as FileUtils
readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('filelist_ExpressPhysics_121964.txt') )

#Extend the list if needed...
#readFiles.extend( FileUtils.loadListFromFile ('moreInfoIwant.txt') )

#Read the input files
process.source = cms.Source ("PoolSource",fileNames = readFiles)

#
process.source.inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
#
process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32( nevents )
)
process.Timing = cms.Service("Timing")
Example #25
0
process.options = cms.untracked.PSet(
    Rethrow = cms.untracked.vstring('ProductNotFound')
)

# Tone down the logging messages, MessageLogger!
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.options = cms.untracked.PSet(
    Rethrow = cms.untracked.vstring('ProductNotFound'),
    wantSummary = cms.untracked.bool(True)
    )

# Input source
readFiles = cms.untracked.vstring()
import FWCore.Utilities.FileUtils as FileUtils
readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('filelists/R112237_raw.list') )
process.source = cms.Source ("PoolSource",fileNames = readFiles )
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100000) )

# Output definition
process.output = cms.OutputModule(
    "PoolOutputModule",
    outputCommands = cms.untracked.vstring('drop *',
                                           'keep HBHERecHitsSorted_*_*_*',
                                           'keep CaloTowersSorted_*_*_*',
                                           'keep recoHcalNoiseRBXs_*_*_*',
                                           'keep HcalNoiseSummary_*_*_*',
                                           'keep recoCaloMETs_*_*_*', 
                                           'keep recoCaloJets_*_*_*',
                                           'keep recoTracks_generalTracks_*_*',
                                           'keep L1GlobalTrigger*_*_*_*'
Example #26
0
import FWCore.Utilities.FileUtils as FileUtils
import sys, os

from Configuration.StandardSequences.Eras import eras

process = cms.Process("demo2", eras.Phase2C1)

process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.Geometry.GeometryExtended2023D12_cff')
process.load('Configuration.Geometry.GeometryExtended2023D12Reco_cff')

#mylist = FileUtils.loadListFromFile('list_test.txt');
#mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/g/garamire/work/private/RPCserviceWork/timingStudies/borisSimulation/CMSSW_9_1_1_patch1/src/HSCPAnalysis/HSCPRecHits/test/list.txt');
#mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/g/garamire/work/private/RPCserviceWork/timingStudies/borisSimulation/CMSSW_9_1_1_patch1/src/HSCPAnalysis/HSCPRecHits/test/list_1218.txt');
mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/g/garamire/work/private/RPCserviceWork/timingStudies/borisSimulation/CMSSW_9_1_1_patch1/src/HSCPAnalysis/HSCPRecHits/test/list_final.txt');
#mylist = FileUtils.loadListFromFile('list_HSCP_Official.txt');
#mylist= FileUtils.loadListFromFile('list_ZMM_PU200.txt');

process.MessageLogger.cerr.FwkReport.reportEvery = 1000

#process.load("RecoLocalMuon.RPCRecHit.rpcRecHits_cfi")
#from RecoLocalMuon.RPCRecHit.rpcRecHits_cfi import *
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.source = cms.Source("PoolSource",
    # replace 'myfile.root' with the source file you want to use
    fileNames = cms.untracked.vstring(*mylist)
)
process.load('HSCPAnalysis.HSCPRecHits.CfiFile_cfi')
process.TFileService = cms.Service("TFileService",
                   	#fileName = cms.string("ZMM_RecHits.root")
#   Externaly provided input-files list to be used and activation toggle.
#   Check that the externaly provided input-files list exists and is non-empty (if activated)
#   (empty lists evaluate to FALSE in Boolean contexts [such as if some_list:])
#
uselstFile = True ; lstFile = "%s.list" % (pyBaseName)

#   DO NOT EDIT THIS LINE
uselstFile = uselstFile and isLocalRun

if uselstFile:
    if not os.path.exists(lstFile):
        sys.exit("Input Filelist does not exist")
    else:
        import FWCore.Utilities.FileUtils as FileUtils
        filelist = FileUtils.loadListFromFile(lstFile) 
        if not filelist:
            sys.exit("Input Filelist is empty")


#   JSON file to be used and activation toggle. Check that the JSON file exists (if activated)
#
useJSON = True ; jsonFile = 'Cert_136033-149442_7TeV_Nov4ReReco_Collisions10_JSON.json'

#   DO NOT EDIT THIS LINE
useJSON = useJSON and isLocalRun

if not os.path.exists(jsonFile) and useJSON:
  sys.exit("Provided JSON File does not exist")

### ========
### Skeleton
### ========

## ---
## Start with pre-defined skeleton process
## ---
from PhysicsTools.PatAlgos.patTemplate_cfg import *
import FWCore.Utilities.FileUtils as FileUtils
mylist=FileUtils.loadListFromFile('/afs/cern.ch/user/m/mshi/amumu_trigger_matching/CMSSW_7_4_1_patch4/src/sourceFiles.txt')
## switch to uncheduled mode
process.options.allowUnscheduled = cms.untracked.bool(True)
#process.Tracer = cms.Service("Tracer")


#process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
#process.load("PhysicsTools.PatAlgos.selectionLayer1.selectedPatCandidates_cff")
##process.load("PhysicsTools.PatAlgos.slimming.slimming_cff")
process.source.fileNames = cms.untracked.vstring(*mylist)
process.maxEvents.input     = 1000 # reduce number of events for testing.
process.options.wantSummary = True # to suppress the long output at the end of the job


### ========
### Plug-ins
### ========

## ---
## PAT trigger matching
## --
Example #29
0
import FWCore.ParameterSet.Config as cms

process = cms.Process("Ntuple")

## load parameters
process.load("DumpNt.DumpNt.dumpnt_cfi")
process.ntuple.doMC = cms.bool(True)

#################
## Customization 
isMC = process.ntuple.doMC

import FWCore.Utilities.FileUtils as FileUtils
nameSourceMC = FileUtils.loadListFromFile ('../data/0_Original_MC.txt')
nameSourceDATA = FileUtils.loadListFromFile ('../data/1_PixelBarrelConnToST_MC.txt')
#nameSourceMC = cms.untracked.vstring('file:/raid/sandro/Geometria/Tracker_ECAL/CMSSW_5_2_5/src/DumpNt/DumpNt/test/SingleElectronPt35_cfi_py_RAW2DIGI_RECO.root')
#nameSourceDATA = cms.untracked.vstring('/store/data/Run2012B/DoubleElectron/AOD/08Jun2012-v1/0000/F68EAAC5-92B2-E111-B9BF-003048FFD736.root')

numEventsToRun = 1000

GloTagMC = cms.string('START52_V11C::All')
GloTagDATA = cms.string('GR_R_52_V9D::All')

nameOutputMC = cms.string("outfile_0_Original_MC.root")
nameOutputDATA = cms.string("outfile_0_Original_DATA.root")
#################

## MessageLogger
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000)
Example #30
0
import FWCore.ParameterSet.Config as cms
import FWCore.Utilities.FileUtils as FileUtils
mylist = FileUtils.loadListFromFile('/afs/cern.ch/user/k/ktos/BoostedDiTau/CMSSW_7_4_1_patch1/src/BoostedTauAnalysis/TauAnalyzer/FileLists/inFileList_BBA_a30_250.txt')

process = cms.Process("RecoTrigProducer")

process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.load('Configuration.EventContent.EventContent_cff')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'MCRUN2_71_V1::All', '')

####################
# Message Logger
####################
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000)
process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
## switch to uncheduled mode
#process.options.allowUnscheduled = cms.untracked.bool(True)

####################
# Input File List
####################
#process.source = cms.Source("PoolSource",
#    fileNames = cms.untracked.vstring('root://eoscms//eos/cms/store/user/ktos/RECO_Step2_BBA_a30/RECO_Step2_BBA_a30_NUM.root'),
#    skipEvents = cms.untracked.uint32(0)
#    )
readFiles = cms.untracked.vstring(*mylist)
process.source = cms.Source("PoolSource",
    fileNames = readFiles,