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 
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, 'auto:run2_hlt_GRun', '')
0031 
0032 process.load("Configuration.StandardSequences.Reconstruction_cff")
0033 
0034 # -- number of events
0035 process.maxEvents = cms.untracked.PSet(
0036     input = cms.untracked.int32(-1)
0037     )
0038 
0039 # -- skimming
0040 process.zerobiasfilter = cms.EDFilter("HLTHighLevel",
0041    TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0042    #HLTPaths = cms.vstring("HLT_ZeroBias_v*"),
0043    HLTPaths = cms.vstring("*ZeroBias*"),
0044    eventSetupPathsKey = cms.string(""),
0045    andOr = cms.bool(True),
0046    throw = cms.bool(False)
0047     )
0048 
0049 # the main Analyzer
0050 process.lumi = cms.EDAnalyzer(
0051     "PCCNTupler",
0052     verbose                      = cms.untracked.int32(0),
0053     #rootFileName                 = cms.untracked.string(rootFileName),
0054     #type                         = cms.untracked.string(getDataset(process.source.fileNames[0])),
0055     globalTag                    = process.GlobalTag.globaltag,
0056     dumpAllEvents                = cms.untracked.int32(0),
0057     vertexCollLabel              = cms.untracked.InputTag('offlinePrimaryVertices'),
0058     pixelClusterLabel            = cms.untracked.InputTag('siPixelClustersForLumi'),
0059     saveType                     = cms.untracked.string('LumiSect'), # LumiSect, LumiNib, Event
0060     sampleType                   = cms.untracked.string('DATA'), # MC, DATA
0061     includeVertexInformation     = cms.untracked.bool(False),
0062     includePixels                = cms.untracked.bool(True),
0063     splitByBX                    = cms.untracked.bool(True),
0064     L1GTReadoutRecordLabel       = cms.untracked.InputTag('gtDigis'), 
0065     hltL1GtObjectMap             = cms.untracked.InputTag('hltL1GtObjectMap'), 
0066     HLTResultsLabel              = cms.untracked.InputTag('TriggerResults::HLT')
0067     )
0068 
0069 # -- Path
0070 process.p = cms.Path(
0071     process.zerobiasfilter*
0072     process.lumi
0073     )
0074 
0075 
0076 outFile = 'pcc_Data_Pix_LS.root'
0077 process.TFileService = cms.Service("TFileService",fileName = cms.string(outFile)) 
0078 readFiles = cms.untracked.vstring() 
0079 secFiles = cms.untracked.vstring() 
0080 process.source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) 
0081 readFiles.extend([
0082 '/store/data/Run2015C/AlCaLumiPixels/ALCARECO/LumiPixels-PromptReco-v1/000/253/684/00000/5C6B6D62-BB3E-E511-943E-02163E01431C.root',
0083 '/store/data/Run2015B/AlCaLumiPixels/ALCARECO/LumiPixels-PromptReco-v1/000/251/497/00000/28D83B84-E428-E511-8F44-02163E0138B3.root',])