Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:30:45

0001 # ######################################################################
0002 #
0003 # pixelLumi.py
0004 #
0005 # ----------------------------------------------------------------------
0006 import os
0007 import FWCore.ParameterSet.Config as cms
0008 process = cms.Process("Lumi")
0009 
0010 # ----------------------------------------------------------------------
0011 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0012 process.MessageLogger.cerr.threshold = 'INFO'
0013 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0014 process.MessageLogger.HLTrigReport=dict()
0015 process.MessageLogger.L1GtTrigReport=dict()
0016 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0017 
0018 # -- Database configuration
0019 #process.load("CondCore.DBCommon.CondDBCommon_cfi")
0020 #process.load("CondCore.DBCommon.CondDBSetup_cfi")
0021 process.load("CondCore.CondDB.CondDB_cfi")
0022 # -- Conditions
0023 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0024 process.load("Configuration.StandardSequences.GeometryRecoDB_cff") # works for MC & data
0025 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")
0026 
0027 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0028 from Configuration.AlCa.GlobalTag import GlobalTag
0029 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0030 process.GlobalTag = GlobalTag(process.GlobalTag, '90X_upgrade2023_realistic_v1', '')
0031 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_hlt_GRun', '')
0032 
0033 process.load("Configuration.StandardSequences.Reconstruction_cff")
0034 
0035 # -- number of events
0036 process.maxEvents = cms.untracked.PSet(
0037     input = cms.untracked.int32(-1)
0038     )
0039 
0040 # -- skimming
0041 process.zerobiasfilter = cms.EDFilter("HLTHighLevel",
0042    TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0043    #HLTPaths = cms.vstring("HLT_ZeroBias_v*"),
0044    HLTPaths = cms.vstring("*ZeroBias*"),
0045    eventSetupPathsKey = cms.string(""),
0046    andOr = cms.bool(True),
0047    throw = cms.bool(False)
0048     )
0049 
0050 # the main Analyzer
0051 process.lumi = cms.EDAnalyzer(
0052     "PCCNTupler",
0053     verbose                      = cms.untracked.int32(0),
0054     #rootFileName                 = cms.untracked.string(rootFileName),
0055     #type                         = cms.untracked.string(getDataset(process.source.fileNames[0])),
0056     globalTag                    = process.GlobalTag.globaltag,
0057     dumpAllEvents                = cms.untracked.int32(0),
0058     vertexCollLabel              = cms.untracked.InputTag('offlinePrimaryVertices'),
0059     pixelClusterLabel            = cms.untracked.InputTag('siPixelClusters'),
0060     saveType                     = cms.untracked.string('Event'), # LumiSect, LumiNib, Event
0061     sampleType                   = cms.untracked.string('MC'), # MC, DATA
0062     includeVertexInformation     = cms.untracked.bool(True),
0063     includePixels                = cms.untracked.bool(False),
0064     splitByBX                    = cms.untracked.bool(True),
0065     L1GTReadoutRecordLabel       = cms.untracked.InputTag('gtDigis'), 
0066     hltL1GtObjectMap             = cms.untracked.InputTag('hltL1GtObjectMap'), 
0067     HLTResultsLabel              = cms.untracked.InputTag('TriggerResults::HLT')
0068     )
0069 
0070 # -- Path
0071 process.p = cms.Path(
0072     process.zerobiasfilter*
0073     process.lumi
0074     )
0075 
0076 
0077 outFile = 'pcc.root'
0078 process.TFileService = cms.Service("TFileService",fileName = cms.string(outFile)) 
0079 readFiles = cms.untracked.vstring() 
0080 secFiles = cms.untracked.vstring() 
0081 process.source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) 
0082 readFiles.extend([
0083 #'/store/mc/Spring14dr/Neutrino_Pt-2to20_gun/AODSIM/Flat0to10_POSTLS170_V5-v2/10000/00AE7E7E-6153-E411-9565-002590D0AFBE.root'
0084 #'/store/data/Run2012D/ZeroBias1/RECO/PromptReco-v1/000/206/251/F28DAF8D-7723-E211-80A1-BCAEC5364C4C.root'
0085 #'/store/relval/CMSSW_7_4_0_pre8/RelValMinBias_13/GEN-SIM-RECO/MCRUN2_74_V7-v1/00000/08A7F47B-B9BD-E411-97B0-0025905B85D6.root'
0086 ])