Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:12

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("bsvsbpix")
0005 
0006 #prepare options
0007 
0008 options = VarParsing.VarParsing("analysis")
0009 
0010 options.register ('globalTag',
0011                   "DONOTEXIST",
0012                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0013                   VarParsing.VarParsing.varType.string,          # string, int, or float
0014                   "GlobalTag")
0015 #options.globalTag = "DONOTEXIST"
0016 
0017 options.parseArguments()
0018 
0019 #
0020 process.options = cms.untracked.PSet(
0021     wantSummary = cms.untracked.bool(True),
0022     fileMode = cms.untracked.string("FULLMERGE")
0023     )
0024 
0025 process.load("FWCore.MessageService.MessageLogger_cfi")
0026 
0027 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0028 process.MessageLogger.cout.threshold = cms.untracked.string("INFO")
0029 process.MessageLogger.cout.default = cms.untracked.PSet(
0030     limit = cms.untracked.int32(10000000)
0031     )
0032 process.MessageLogger.cout.FwkReport = cms.untracked.PSet(
0033     reportEvery = cms.untracked.int32(10000)
0034     )
0035 
0036 process.MessageLogger.cerr.enable = cms.untracked.bool(True)
0037 process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING")
0038 process.MessageLogger.cerr.default = cms.untracked.PSet(
0039     limit = cms.untracked.int32(10000000)
0040     )
0041 process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
0042     reportEvery = cms.untracked.int32(100000)
0043     )
0044 
0045 #----Remove too verbose PrimaryVertexProducer
0046 
0047 process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive")
0048 process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS")
0049 
0050 #----Remove too verbose BeamSpotOnlineProducer
0051 
0052 process.MessageLogger.suppressInfo.append("testBeamSpot")
0053 process.MessageLogger.suppressInfo.append("onlineBeamSpot")
0054 process.MessageLogger.suppressWarning.append("testBeamSpot")
0055 process.MessageLogger.suppressWarning.append("onlineBeamSpot")
0056 
0057 #----Remove too verbose TrackRefitter
0058 
0059 process.MessageLogger.suppressInfo.append("newTracksFromV0")
0060 process.MessageLogger.suppressInfo.append("newTracksFromOtobV0")
0061 
0062 
0063 #------------------------------------------------------------------
0064 
0065 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0066 
0067 process.source = cms.Source("PoolSource",
0068                     fileNames = cms.untracked.vstring(options.inputFiles),
0069 #                    skipBadFiles = cms.untracked.bool(True),
0070                     inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0071                     )
0072 
0073 process.load("RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi")
0074 process.onlineBeamSpotProducer.setSigmaZ = cms.double(-1.)
0075 
0076 from DPGAnalysis.SiStripTools.occupancyplotsselections_bpixladders_cff import *
0077 
0078 process.spclusoccuprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0079                                         clusterdigiCollection = cms.InputTag("siPixelClusters"),
0080                                         withClusterSize = cms.untracked.bool(True),
0081                                         wantedSubDets = cms.VPSet()
0082                                         )
0083 process.spclusoccuprod.wantedSubDets.extend(OccupancyPlotsBPIXLadders)
0084 process.spclusmultprod = process.spclusoccuprod.clone(withClusterSize = cms.untracked.bool(False))
0085 
0086 process.load("DPGAnalysis.SiStripTools.occupancyplots_cfi")
0087 process.occupancyplots.wantedSubDets = process.spclusmultprod.wantedSubDets
0088 process.occupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod"))
0089 process.occupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod"))
0090 
0091 process.load("Validation.RecoVertex.bspvanalyzer_cfi")
0092 process.bspvanalyzer.pvCollection = cms.InputTag("goodVertices")
0093 process.bspvanalyzer.bspvHistogramMakerPSet.histoParameters = cms.untracked.PSet(
0094     nBinX = cms.untracked.uint32(2000), xMin=cms.untracked.double(-0.2), xMax=cms.untracked.double(0.2),
0095     nBinY = cms.untracked.uint32(2000), yMin=cms.untracked.double(-0.2), yMax=cms.untracked.double(0.2),
0096     nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-30.), zMax=cms.untracked.double(30.),
0097     nBinZProfile = cms.untracked.uint32(60), zMinProfile=cms.untracked.double(-30.), zMaxProfile=cms.untracked.double(30.)
0098     )
0099 #process.bspvanalyzer.bspvHistogramMakerPSet.runHisto = cms.untracked.bool(True) # This is true by default
0100 process.bspvanalyzer.bspvHistogramMakerPSet.runHistoBX2D = cms.untracked.bool(True)
0101 
0102 process.bspvnoslope = process.bspvanalyzer.clone()
0103 process.bspvnoslope.bspvHistogramMakerPSet.useSlope = cms.bool(False)
0104 
0105 process.load("Validation.RecoVertex.beamspotanalyzer_cfi")
0106 process.onlinebeamspotanalyzer = process.beamspotanalyzer.clone(bsCollection = cms.InputTag("onlineBeamSpotProducer"))
0107 
0108 
0109 process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi")
0110 process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoBXProfile2D = cms.untracked.bool(True)
0111 process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto2D = cms.untracked.bool(True)
0112 
0113 process.load("Validation.RecoVertex.pvSelectionSequence_cff")
0114 
0115 
0116 process.p0 = cms.Path(process.onlineBeamSpotProducer +
0117                       process.spclusoccuprod + process.spclusmultprod +
0118                       process.occupancyplots +
0119                       process.goodVertices + 
0120                       process.beamspotanalyzer + process.onlinebeamspotanalyzer + 
0121                       process.primaryvertexanalyzer + 
0122                       process.bspvanalyzer + process.bspvnoslope)
0123 
0124 #----GlobalTag ------------------------
0125 
0126 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0127 from Configuration.AlCa.GlobalTag import GlobalTag
0128 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0129 
0130 process.load("Configuration.StandardSequences.GeometryDB_cff")
0131 
0132 process.TFileService = cms.Service('TFileService',
0133                                    fileName = cms.string('bsvsbpix.root')
0134                                    )
0135