File indexing completed on 2024-04-06 11:59:56
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from FWCore.ParameterSet.VarParsing import VarParsing
0004 options = VarParsing()
0005 options.register("inputFiles", "", VarParsing.multiplicity.list, VarParsing.varType.string, "Files to process")
0006 options.register("runNumber", 0, VarParsing.multiplicity.singleton, VarParsing.varType.int, "Run number")
0007 options.parseArguments()
0008
0009 process = cms.Process("HitEff")
0010 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0011 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0012
0013 from Configuration.AlCa.GlobalTag import GlobalTag
0014 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0015
0016 process.source = cms.Source("EmptyIOVSource",
0017 firstValue = cms.uint64(options.runNumber),
0018 lastValue = cms.uint64(options.runNumber),
0019 timetype = cms.string('runnumber'),
0020 interval = cms.uint64(1)
0021 )
0022
0023 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1))
0024
0025 process.SiStripHitEff = cms.EDAnalyzer("SiStripHitEffFromCalibTree",
0026 CalibTreeFilenames = cms.untracked.vstring(options.inputFiles),
0027 Threshold = cms.double(0.1),
0028 nModsMin = cms.int32(5),
0029 doSummary = cms.int32(0),
0030
0031 SinceAppendMode = cms.bool(True),
0032 IOVMode = cms.string('Run'),
0033 Record = cms.string('SiStripBadStrip'),
0034 doStoreOnDB = cms.bool(True),
0035 BadModulesFile = cms.untracked.string("BadModules_input.txt"),
0036 AutoIneffModTagging = cms.untracked.bool(True),
0037 ClusterMatchingMethod = cms.untracked.int32(4),
0038 ClusterTrajDist = cms.untracked.double(15),
0039 StripsApvEdge = cms.untracked.double(10),
0040 UseOnlyHighPurityTracks = cms.untracked.bool(True),
0041 SpaceBetweenTrains = cms.untracked.int32(25),
0042 ShowEndcapSides = cms.untracked.bool(True),
0043 ShowRings = cms.untracked.bool(False),
0044 showTOB6TEC9 = cms.untracked.bool(False),
0045 TkMapMin = cms.untracked.double(0.90),
0046 EffPlotMin = cms.untracked.double(0.90),
0047 Title = cms.string(' Hit Efficiency - run {0:d}'.format(options.runNumber))
0048 )
0049
0050 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0051 BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0052 DBParameters = cms.PSet(
0053 authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0054 ),
0055 timetype = cms.untracked.string('runnumber'),
0056 connect = cms.string('sqlite_file:dbfile.db'),
0057 toPut = cms.VPSet(cms.PSet(
0058 record = cms.string('SiStripBadStrip'),
0059 tag = cms.string('SiStripHitEffBadModules')
0060 ))
0061 )
0062
0063 process.TFileService = cms.Service("TFileService",
0064 fileName = cms.string('SiStripHitEffHistos_run{0:d}.root'.format(options.runNumber))
0065 )
0066
0067 process.allPath = cms.Path(process.SiStripHitEff)