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 ###### ADDED FOR RAW
0035 #### standard includes
0036 process.load('Configuration/StandardSequences/Services_cff')
0037 process.load('Configuration.StandardSequences.MagneticField_cff')
0038 process.load("Configuration.StandardSequences.RawToDigi_cff")
0039 process.load("Configuration.EventContent.EventContent_cff")
0040 process.load("Configuration.StandardSequences.Reconstruction_cff")
0041 process.load("Configuration.StandardSequences.PostRecoGenerator_cff")
0042 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0043 process.load('Configuration.StandardSequences.L1Reco_cff')
0044 
0045 process.particleFlowClusterECAL.energyCorrector.autoDetectBunchSpacing = False
0046 process.particleFlowClusterECAL.energyCorrector.bunchSpacing = cms.int32(25)
0047 
0048 process.ecalMultiFitUncalibRecHit.algoPSet = cms.PSet( #for CMSSW >=750pre1
0049     activeBXs = cms.vint32(-5,-4,-3,-2,-1,0,1,2,3,4),
0050     useLumiInfoRunHeader = cms.bool(False)
0051 )
0052 
0053 # Path and EndPath definitions
0054 process.raw2digi_step = cms.Path(process.RawToDigi)
0055 process.L1Reco_step = cms.Path(process.L1Reco)
0056 process.reconstruction_step = cms.Path(process.reconstruction)
0057 
0058 # Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.postLS1Customs
0059 from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1
0060 
0061 #call to customisation function customisePostLS1 imported from SLHCUpgradeSimulations.Configuration.postLS1Customs
0062 process = customisePostLS1(process)
0063 
0064 # for HLT
0065 if hasattr(process, 'hltCsc2DRecHits'):
0066     process.hltCsc2DRecHits.wireDigiTag  = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi")
0067     process.hltCsc2DRecHits.stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi")
0068 # for the L1 emulator
0069 if hasattr(process, 'cscReEmulTriggerPrimitiveDigis'):
0070     process.cscReEmulTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCComparatorDigi")
0071     process.cscReEmulTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi")
0072 
0073 ## END ADDED FOR RAW
0074 
0075 
0076 # -- number of events
0077 process.maxEvents = cms.untracked.PSet(
0078     input = cms.untracked.int32(-1)
0079     )
0080 
0081 # -- skimming
0082 process.zerobiasfilter = cms.EDFilter("HLTHighLevel",
0083    TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0084    #HLTPaths = cms.vstring("HLT_ZeroBias_v*"),
0085    HLTPaths = cms.vstring("*ZeroBias*"),
0086    eventSetupPathsKey = cms.string(""),
0087    andOr = cms.bool(True),
0088    throw = cms.bool(False)
0089     )
0090 
0091 process.lumi = cms.EDAnalyzer(
0092     "PCCNTupler",
0093     verbose                      = cms.untracked.int32(0),
0094     #rootFileName                 = cms.untracked.string(rootFileName),
0095     #type                         = cms.untracked.string(getDataset(process.source.fileNames[0])),
0096     globalTag                    = process.GlobalTag.globaltag,
0097     dumpAllEvents                = cms.untracked.int32(0),
0098     vertexCollLabel              = cms.untracked.InputTag('offlinePrimaryVertices'),
0099     pixelClusterLabel            = cms.untracked.InputTag('siPixelClusters'),
0100     saveType                     = cms.untracked.string('Event'), # LumiSect, LumiNib, Event
0101     sampleType                   = cms.untracked.string('MC'), # MC, DATA
0102     includeVertexInformation     = cms.untracked.bool(True),
0103     includePixels                = cms.untracked.bool(True),
0104     splitByBX                    = cms.untracked.bool(True),
0105     L1GTReadoutRecordLabel       = cms.untracked.InputTag('gtDigis'), 
0106     hltL1GtObjectMap             = cms.untracked.InputTag('hltL1GtObjectMap'), 
0107     HLTResultsLabel              = cms.untracked.InputTag('TriggerResults::HLT')
0108     )
0109 
0110 process.endjob_step = cms.EndPath(process.lumi*process.endOfProcess)
0111 process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step)
0112 
0113 outFile = 'pcc_MC_fromRAW.root'
0114 process.TFileService = cms.Service("TFileService",fileName = cms.string(outFile)) 
0115 readFiles = cms.untracked.vstring() 
0116 secFiles = cms.untracked.vstring() 
0117 process.source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) 
0118 readFiles.extend([
0119 '/store/mc/Phys14DR/Neutrino_Pt-2to20_gun/GEN-SIM-RAW/AVE20BX25_tsg_PHYS14_25_V3-v1/00000/00128B2A-C88E-E411-AFB9-0025905A48D6.root',
0120 ])