Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ready to use cfg for shifters #11995

Merged
merged 2 commits into from Oct 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
88 changes: 88 additions & 0 deletions DPGAnalysis/SiStripTools/test/APVShot_Selector_cfg.py
@@ -0,0 +1,88 @@
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

process = cms.Process("APVShotAnalyzer")

#prepare options

process.DQMStore=cms.Service("DQMStore")
process.TkDetMap=cms.Service("TkDetMap")
process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader")

options = VarParsing.VarParsing("analysis")

options.register ('globalTag',
"DONOTEXIST",
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"GlobalTag")

options.parseArguments()

#

process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(False),
fileMode = cms.untracked.string("FULLMERGE")
)

process.load("FWCore.MessageService.MessageLogger_cfi")


process.MessageLogger.debugModules=cms.untracked.vstring("apvshotfilter")
#------------------------------------------------------------------

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )

process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(options.inputFiles),
# skipBadFiles = cms.untracked.bool(True),
inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
)

#--------------------------------------
process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load("Configuration.StandardSequences.Reconstruction_cff")

process.froml1abcHEs = cms.EDProducer("EventWithHistoryProducerFromL1ABC",
l1ABCCollection=cms.InputTag("scalersRawToDigi")
)
process.load("DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi")
process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")

process.seqEventHistoryReco = process.seqEventHistoryReco = cms.Sequence(process.froml1abcHEs + process.APVPhases)
process.seqEventHistory = cms.Sequence(process.eventtimedistribution)

process.eventtimedistribution.historyProduct = cms.InputTag("froml1abcHEs")


process.load("DPGAnalysis.SiStripTools.apvshotsfilter_cfi")
process.apvshotsfilter.useCabling = cms.untracked.bool(True)

process.load("DPGAnalysis.SiStripTools.apvshotsanalyzer_cfi")
process.apvshotsanalyzer.historyProduct = cms.InputTag("froml1abcHEs")
process.apvshotsanalyzer.useCabling = cms.untracked.bool(True)

#----GlobalTag ------------------------

process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff")
from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag,options.globalTag, '')



process.p0 = cms.Path(
process.siStripDigis + process.siStripZeroSuppression +
process.scalersRawToDigi +
process.seqEventHistoryReco +
process.seqEventHistory +
process.apvshotsfilter +
process.apvshotsanalyzer
)

process.TFileService = cms.Service('TFileService',
fileName = cms.string('APVShotAnalyzer.root')
)

133 changes: 133 additions & 0 deletions DPGAnalysis/SiStripTools/test/ClusterMultiplicityRegionSelector_cfg.py
@@ -0,0 +1,133 @@
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing

process = cms.Process("BeamBackground")

options = VarParsing.VarParsing("analysis")

process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')

options.register ('globalTag',
"DONOTEXIST",
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"GlobalTag")

options.parseArguments()


process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(500)
)


process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(options.inputFiles),
secondaryFileNames = cms.untracked.vstring()
)


from HLTrigger.HLTfilters.triggerResultsFilter_cfi import *
process.hltSelection = triggerResultsFilter.clone(
triggerConditions = cms.vstring("HLT_ZeroBias_*"),
hltResults = cms.InputTag( "TriggerResults", "", "HLT" ),
l1tResults = cms.InputTag( "" ),
throw = cms.bool(False)
)


process.load("DPGAnalysis.SiStripTools.sipixelclustermultiplicityprod_cfi")
process.load("DPGAnalysis.SiStripTools.sistripclustermultiplicityprod_cfi")

ssclustermultprod = cms.EDProducer("SiStripClusterMultiplicityProducer",
clusterdigiCollection = cms.InputTag("siStripClusters"),
wantedSubDets = cms.VPSet(
cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("TK")),
cms.PSet(detSelection = cms.uint32(3),detLabel = cms.string("TIB")),
cms.PSet(detSelection = cms.uint32(4),detLabel = cms.string("TID")),
cms.PSet(detSelection = cms.uint32(5),detLabel = cms.string("TOB")),
cms.PSet(detSelection = cms.uint32(6),detLabel = cms.string("TEC"))
)
)


spclustermultprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
clusterdigiCollection = cms.InputTag("siPixelClusters"),
wantedSubDets = cms.VPSet(
cms.PSet(detSelection = cms.uint32(0),detLabel = cms.string("Pixel")),
cms.PSet(detSelection = cms.uint32(1),detLabel = cms.string("BPIX")),
cms.PSet(detSelection = cms.uint32(2),detLabel = cms.string("FPIX"))
)
)


process.load("DPGAnalysis.SiStripTools.multiplicitycorr_cfi")

process.multiplicitycorr.correlationConfigurations = cms.VPSet(
cms.PSet(xMultiplicityMap = cms.InputTag("ssclustermultprod"),
xDetSelection = cms.uint32(0), xDetLabel = cms.string("TK"), xBins = cms.uint32(3000), xMax=cms.double(100000),
yMultiplicityMap = cms.InputTag("spclustermultprod"),
yDetSelection = cms.uint32(0), yDetLabel = cms.string("Pixel"), yBins = cms.uint32(1000), yMax=cms.double(30000),
rBins = cms.uint32(200), scaleFactor = cms.untracked.double(10.4),#10.4 for 25ns // 7.7 for 50 ns
runHisto=cms.bool(True),runHistoBXProfile=cms.bool(True),runHistoBX=cms.bool(True),runHisto2D=cms.bool(True))
)


process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")


import DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi
process.APVPhases = DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi.APVPhases

process.load("DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi")

process.load("DPGAnalysis.SiStripTools.bysipixelvssistripclustmulteventfilter_cfi")

# mult2= Number of Strip Clusters; mult1= Number of Pixel Clusters

#filter for BeamBackground events
process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 7.4*(mult1-300))")) #7.4 for 25ns // 5.5 for 50 ns
process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 500)"))

#Filter for high strip noise
#process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns
#process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 26000)"))

#Filter for strip noise
#process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns
#process.NoZeroSClusters = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 26000)"))

#Filter for main diagonal
#process.offdiagonal = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 > 7.4*(mult1-300))")) #7.4 for 25ns // 5.5 for 50 ns
#process.offdiagonal1 = process.bysipixelvssistripclustmulteventfilter.clone(cut=cms.string("( mult2 < 7.4*(mult1+300))")) #7.4 for 25ns // 5.5 for 50 ns




process.multiplicitycorrAfter=process.multiplicitycorr.clone()

process.multiplicitycorrAfter.correlationConfigurations = cms.VPSet(
cms.PSet(xMultiplicityMap = cms.InputTag("ssclustermultprod"),
xDetSelection = cms.uint32(0), xDetLabel = cms.string("TK"), xBins = cms.uint32(3000), xMax=cms.double(100000),
yMultiplicityMap = cms.InputTag("spclustermultprod"),
yDetSelection = cms.uint32(0), yDetLabel = cms.string("Pixel"), yBins = cms.uint32(1000), yMax=cms.double(30000),
rBins = cms.uint32(200), scaleFactor = cms.untracked.double(10.4),#10.4 for 25 ns
runHisto=cms.bool(True),runHistoBXProfile=cms.bool(True),runHistoBX=cms.bool(True),runHisto2D=cms.bool(True))
)

process.eventtimedistributionAfter= process.eventtimedistribution.clone()

process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff")

from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag

process.GlobalTag = GlobalTag(process.GlobalTag,options.globalTag, '')

process.TFileService = cms.Service('TFileService',
fileName = cms.string('BeamBackground.root')
)

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)

process.p0 = cms.Path(process.MainSeq)