Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:43

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("BeamBackground")
0005 
0006 options = VarParsing.VarParsing("analysis")
0007 
0008 process.load('Configuration.StandardSequences.Services_cff')
0009 process.load('FWCore.MessageService.MessageLogger_cfi')
0010 
0011 options.register ('globalTag',
0012                   "DONOTEXIST",
0013                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0014                   VarParsing.VarParsing.varType.string,          # string, int, or float
0015                   "GlobalTag")
0016 
0017 options.parseArguments()
0018 
0019 
0020 process.maxEvents = cms.untracked.PSet(
0021     input = cms.untracked.int32(500)
0022 )
0023 
0024 
0025 process.source = cms.Source("PoolSource",
0026                     fileNames = cms.untracked.vstring(options.inputFiles),
0027                     secondaryFileNames = cms.untracked.vstring()
0028 )
0029 
0030 
0031 from HLTrigger.HLTfilters.triggerResultsFilter_cfi import *
0032 process.hltSelection = triggerResultsFilter.clone(
0033                                           triggerConditions = cms.vstring("HLT_ZeroBias_*"),
0034                                           hltResults = cms.InputTag( "TriggerResults", "", "HLT" ),
0035                                           l1tResults = cms.InputTag( "" ),
0036                                           throw = cms.bool(False)
0037                                           )
0038 
0039 
0040 process.load("DPGAnalysis.SiStripTools.sipixelclustermultiplicityprod_cfi")
0041 process.load("DPGAnalysis.SiStripTools.sistripclustermultiplicityprod_cfi")
0042 
0043 ssclustermultprod = cms.EDProducer("SiStripClusterMultiplicityProducer",
0044                                    clusterdigiCollection = cms.InputTag("siStripClusters"),
0045                                    wantedSubDets = cms.VPSet(    
0046                                                           cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK")),
0047                                                           cms.PSet(detSelection = cms.uint32(3),detLabel = cms.string("TIB")),
0048                                                           cms.PSet(detSelection = cms.uint32(4),detLabel = cms.string("TID")),
0049                                                           cms.PSet(detSelection = cms.uint32(5),detLabel = cms.string("TOB")),
0050                                                           cms.PSet(detSelection = cms.uint32(6),detLabel = cms.string("TEC"))
0051                                                           )
0052                                 )
0053 
0054 
0055 spclustermultprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0056                                    clusterdigiCollection = cms.InputTag("siPixelClusters"),
0057                                    wantedSubDets = cms.VPSet(    
0058                                                           cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel")),
0059                                                           cms.PSet(detSelection = cms.uint32(1),detLabel = cms.string("BPIX")),
0060                                                           cms.PSet(detSelection = cms.uint32(2),detLabel = cms.string("FPIX"))
0061                                                           )
0062                                 )
0063 
0064 
0065 process.load("DPGAnalysis.SiStripTools.multiplicitycorr_cfi")
0066 
0067 process.multiplicitycorr.correlationConfigurations = cms.VPSet(
0068    cms.PSet(xMultiplicityMap = cms.InputTag("ssclustermultprod"),
0069             xDetSelection = cms.uint32(0), xDetLabel = cms.string("TK"), xBins = cms.uint32(3000), xMax=cms.double(100000), 
0070             yMultiplicityMap = cms.InputTag("spclustermultprod"),
0071             yDetSelection = cms.uint32(0), yDetLabel = cms.string("Pixel"), yBins = cms.uint32(1000), yMax=cms.double(30000),
0072             rBins = cms.uint32(200), scaleFactor = cms.untracked.double(10.4),#10.4 for 25ns //  7.7 for 50 ns
0073             runHisto=cms.bool(True),runHistoBXProfile=cms.bool(True),runHistoBX=cms.bool(True),runHisto2D=cms.bool(True))
0074 )
0075 
0076 
0077 process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")
0078 
0079 
0080 import DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi 
0081 process.APVPhases = DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi.APVPhases 
0082 
0083 process.load("DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi")
0084 
0085 process.load("DPGAnalysis.SiStripTools.bysipixelvssistripclustmulteventfilter_cfi")
0086 
0087 # mult2= Number of Strip Clusters; mult1= Number of Pixel Clusters
0088 
0089 #filter for BeamBackground events
0090 process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 7.4*(mult1-300))")) #7.4 for 25ns // 5.5 for 50 ns
0091 process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 500)"))
0092 
0093 #Filter for high strip noise
0094 #process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns
0095 #process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 26000)"))
0096 
0097 #Filter for strip noise
0098 #process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns
0099 #process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 26000)"))
0100 
0101 #Filter for main diagonal
0102 #process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1-300))")) #7.4 for 25ns // 5.5 for 50 ns
0103 #process.offdiagonal1 = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns
0104 
0105 
0106 
0107 
0108 process.multiplicitycorrAfter=process.multiplicitycorr.clone()
0109 
0110 process.multiplicitycorrAfter.correlationConfigurations = cms.VPSet(
0111    cms.PSet(xMultiplicityMap = cms.InputTag("ssclustermultprod"),
0112             xDetSelection = cms.uint32(0), xDetLabel = cms.string("TK"), xBins = cms.uint32(3000), xMax=cms.double(100000), 
0113             yMultiplicityMap = cms.InputTag("spclustermultprod"),
0114             yDetSelection = cms.uint32(0), yDetLabel = cms.string("Pixel"), yBins = cms.uint32(1000), yMax=cms.double(30000),
0115             rBins = cms.uint32(200), scaleFactor = cms.untracked.double(10.4),#10.4 for 25 ns
0116             runHisto=cms.bool(True),runHistoBXProfile=cms.bool(True),runHistoBX=cms.bool(True),runHisto2D=cms.bool(True))
0117 )
0118 
0119 process.eventtimedistributionAfter= process.eventtimedistribution.clone()
0120 
0121 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0122 
0123 from Configuration.AlCa.GlobalTag import GlobalTag
0124 
0125 process.GlobalTag = GlobalTag(process.GlobalTag,options.globalTag, '')
0126 
0127 process.TFileService = cms.Service('TFileService',
0128                                    fileName = cms.string('BeamBackground.root')
0129                                    )
0130 
0131 process.MainSeq= cms.Sequence(process.hltSelection+process.consecutiveHEs+process.APVPhases+process.ssclustermultprod+process.spclustermultprod+process.eventtimedistribution+process.multiplicitycorr+process.NoZeroSClusters+process.offdiagonal+process.eventtimedistributionAfter+process.multiplicitycorrAfter)
0132 
0133 process.p0 = cms.Path(process.MainSeq)