Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("OverlapProblem")
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 
0016 options.parseArguments()
0017 
0018 #
0019 process.load("DPGAnalysis.SiStripTools.processOptions_cff")
0020 process.load("DPGAnalysis.SiStripTools.MessageLogger_cff")
0021 
0022 process.MessageLogger.cout.enable = True
0023 #process.MessageLogger.cout.threshold = cms.untracked.string("INFO")
0024 process.MessageLogger.cout.threshold = cms.untracked.string("DEBUG")
0025 process.MessageLogger.debugModules = cms.untracked.vstring("*")
0026 process.MessageLogger.files = dict(tkdetlayers = cms.untracked.PSet (
0027     threshold = cms.untracked.string("INFO"),
0028     default = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0029     TkDetLayers = cms.untracked.PSet(limit = cms.untracked.int32(100000))
0030     )
0031 )
0032 process.MessageLogger.cout.default = cms.untracked.PSet(
0033     limit = cms.untracked.int32(0)
0034     )
0035 process.MessageLogger.cout.FwkSummary = cms.untracked.PSet(
0036     limit = cms.untracked.int32(100000000)
0037     )
0038 process.MessageLogger.cout.FwkReport = cms.untracked.PSet(
0039     reportEvery = cms.untracked.int32(1000)
0040     )
0041 process.MessageLogger.cout.NoCluster = cms.untracked.PSet(
0042     limit = cms.untracked.int32(100000)
0043     )
0044 process.MessageLogger.cout.DiskNames = cms.untracked.PSet(
0045     limit = cms.untracked.int32(100000)
0046     )
0047 process.MessageLogger.cout.ClusterFound = cms.untracked.PSet(
0048     limit = cms.untracked.int32(100000)
0049     )
0050 process.MessageLogger.cout.BuildingPixelForwardLayer = cms.untracked.PSet(
0051     limit = cms.untracked.int32(100000)
0052     )
0053 process.MessageLogger.cout.BuildingPhase2OTECRingedLayer = cms.untracked.PSet(
0054     limit = cms.untracked.int32(100000)
0055     )
0056 process.MessageLogger.cout.BuildingPhase2OTBarrelLayer = cms.untracked.PSet(
0057     limit = cms.untracked.int32(100000)
0058     )
0059 process.MessageLogger.cout.BuildingPixelBarrelLayer = cms.untracked.PSet(
0060     limit = cms.untracked.int32(100000)
0061     )
0062 process.MessageLogger.cout.BuildingPixelBarrel = cms.untracked.PSet(
0063     limit = cms.untracked.int32(100000)
0064     )
0065 process.MessageLogger.cout.Phase2OTBarrelRodRadii = cms.untracked.PSet(
0066     limit = cms.untracked.int32(100000)
0067     )
0068 
0069 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0070 
0071 process.source = cms.Source("PoolSource",
0072                             fileNames = cms.untracked.vstring(options.inputFiles),
0073                             #                    skipBadFiles = cms.untracked.bool(True),
0074                             inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0075                             )
0076 
0077 #process.load("Configuration.StandardSequences.GeometryDB_cff")
0078 process.load('Configuration.Geometry.GeometryExtended2023D3Reco_cff')
0079 process.load('Configuration.StandardSequences.MagneticField_cff')
0080 #process.load("Configuration.Geometry.GeometryExtendedPhaseIPixelReco_cff")
0081 #process.load("Configuration.Geometry.GeometryExtendedPhaseIPixel_cff")
0082 process.load("Configuration.StandardSequences.Reconstruction_cff")
0083 
0084 
0085 
0086 process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByHits_cfi")
0087 
0088 
0089 from SLHCUpgradeSimulations.Configuration.phase2TkCustomsBE5DPixel10D import *
0090 
0091 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0092 process.refittedTracks = process.TrackRefitter.clone(src = cms.InputTag("generalTracks"))
0093 #process.refittedTracks.src = cms.InputTag("AlignmentTrackSelector")
0094 process.refittedTracks.TTRHBuilder = cms.string('WithTrackAngle')
0095 
0096 # Need these until pixel templates are used
0097 process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
0098 # PixelCPEGeneric #
0099 process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
0100 process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
0101 process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
0102 process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
0103 process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
0104 process.PixelCPEGenericESProducer.DoCosmics = False
0105 
0106 process.seqTrackRefitting = cms.Sequence(process.refittedTracks)
0107 
0108 #process.KFFittingSmootherWithOutliersRejectionAndRK.LogPixelProbabilityCut = cms.double(-16.0)
0109 
0110 
0111 process.load("DPGAnalysis.SiStripTools.overlapproblemtsosanalyzer_cfi")
0112 process.overlapproblemtsosanalyzer.tsosHMConf.wanted2DHistos = cms.untracked.bool(True)
0113 
0114 from DPGAnalysis.SiStripTools.occupancyplotsselections_phase2_cff import *
0115 
0116 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets = OccupancyPlotsTECxWantedSubDets
0117 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets.extend(OccupancyPlotsTECxOddEvenWantedSubDets)
0118 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets.extend(OccupancyPlotsFPIXR1WantedSubDets)
0119 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets.extend(OccupancyPlotsFPIXR2WantedSubDets)
0120 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets.extend(OccupancyPlotsFPIXmDetailedWantedSubDets)
0121 process.overlapproblemtsosanalyzer.tsosHMConf.wantedSubDets.extend(OccupancyPlotsFPIXpDetailedWantedSubDets)
0122 
0123 process.overlapproblemtsosall = process.overlapproblemtsosanalyzer.clone()
0124 process.overlapproblemtsosall.tsosHMConf.wantedSubDets = OccupancyPlotsPixelWantedSubDets
0125 
0126 #process.overlapproblemtsosanalyzer.debugMode = cms.untracked.bool(True)
0127     
0128 process.spclusmultprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0129                                         clusterdigiCollection = cms.InputTag("siPixelClusters"),
0130                                         wantedSubDets = cms.VPSet()
0131                                         )
0132 process.spclusmultprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0133 process.spclusmultprodontrack=process.spclusmultprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0134 
0135 process.spclusmultprodxy = process.spclusmultprod.clone()
0136 process.spclusmultprodxy.wantedSubDets = OccupancyPlotsFPIXmDetailedWantedSubDets
0137 process.spclusmultprodxy.wantedSubDets.extend(OccupancyPlotsFPIXpDetailedWantedSubDets)
0138 process.spclusmultprodxyontrack=process.spclusmultprodxy.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0139 
0140 process.spclusoccuprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0141                                         clusterdigiCollection = cms.InputTag("siPixelClusters"),
0142                                         withClusterSize = cms.untracked.bool(True),
0143                                         wantedSubDets = cms.VPSet()
0144                                         )
0145 process.spclusoccuprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0146 process.spclusoccuprodontrack=process.spclusoccuprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0147 
0148 process.spclusoccuprodxy = process.spclusoccuprod.clone()
0149 process.spclusoccuprodxy.wantedSubDets = OccupancyPlotsFPIXmDetailedWantedSubDets
0150 process.spclusoccuprodxy.wantedSubDets.extend(OccupancyPlotsFPIXpDetailedWantedSubDets)
0151 process.spclusoccuprodxyontrack=process.spclusoccuprodxy.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0152 
0153 process.seqMultProd = cms.Sequence(
0154                                    process.spclusmultprod + process.spclusoccuprod +
0155                                    process.spclusmultprodontrack + process.spclusoccuprodontrack +
0156                                    process.spclusmultprodxy + process.spclusoccuprodxy +
0157                                    process.spclusmultprodxyontrack + process.spclusoccuprodxyontrack 
0158                                    )
0159 
0160 process.load("DPGAnalysis.SiStripTools.occupancyplots_cfi")
0161 process.occupancyplots.file = cms.untracked.FileInPath("SLHCUpgradeSimulations/Geometry/data/PhaseII/Tilted/PixelSkimmedGeometry.txt")
0162 
0163 process.pixeloccupancyplots = process.occupancyplots.clone()
0164 process.pixeloccupancyplots.wantedSubDets = process.spclusmultprod.wantedSubDets
0165 process.pixeloccupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod"))
0166 process.pixeloccupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod"))
0167 
0168 process.pixeloccupancyxyplots = process.occupancyplots.clone()
0169 process.pixeloccupancyxyplots.wantedSubDets = process.spclusmultprodxy.wantedSubDets
0170 process.pixeloccupancyxyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodxy"))
0171 process.pixeloccupancyxyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodxy"))
0172 
0173 process.pixeloccupancyplotsontrack = process.pixeloccupancyplots.clone()
0174 process.pixeloccupancyplotsontrack.wantedSubDets = process.spclusmultprodontrack.wantedSubDets
0175 process.pixeloccupancyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodontrack"))
0176 process.pixeloccupancyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodontrack"))
0177 
0178 process.pixeloccupancyxyplotsontrack = process.pixeloccupancyxyplots.clone()
0179 process.pixeloccupancyxyplotsontrack.wantedSubDets = process.spclusmultprodxyontrack.wantedSubDets
0180 process.pixeloccupancyxyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodxyontrack"))
0181 process.pixeloccupancyxyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodxyontrack"))
0182 
0183 process.goodVertices = cms.EDFilter("VertexSelector",
0184    src = cms.InputTag("offlinePrimaryVertices"),
0185    cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),  
0186    filter = cms.bool(False),   # otherwise it won't filter the events, just produce an empty vertex collection.
0187 )
0188 
0189 process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi")
0190 process.primaryvertexanalyzer.pvCollection=cms.InputTag("goodVertices")
0191 process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto=cms.untracked.bool(False)
0192 process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoProfile=cms.untracked.bool(False)
0193 process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoBXProfile=cms.untracked.bool(False)
0194 
0195 process.seqAnalyzers = cms.Sequence(
0196     process.goodVertices + process.primaryvertexanalyzer +
0197     process.pixeloccupancyplots + process.pixeloccupancyplotsontrack +
0198     process.pixeloccupancyxyplots + process.pixeloccupancyxyplotsontrack)
0199 
0200 #-------------------------------------------------------------------------------------------
0201 
0202 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
0203 process.AlignmentTrackSelector.etaMin = cms.double(-5.)
0204 process.AlignmentTrackSelector.etaMax = cms.double(5.)
0205 
0206 process.seqProducers = cms.Sequence(process.AlignmentTrackSelector + process.seqMultProd)
0207 
0208 process.load("DPGAnalysis.SiStripTools.trackcount_cfi")
0209 process.trackcount.trackCollection = cms.InputTag("generalTracks")
0210 process.trackcount.etaMin= cms.untracked.double(-4.)
0211 process.trackcount.etaMax= cms.untracked.double(4.)
0212 process.trackcount.netabin1D=cms.untracked.uint32(160)
0213 process.trackcount.netabin2D=cms.untracked.uint32(50)
0214 process.trackcount.nchi2bin1D=cms.untracked.uint32(1000)
0215 process.trackcount.nndofbin1D=cms.untracked.uint32(200)
0216 process.trackcount.nchi2bin2D=cms.untracked.uint32(400)
0217 process.trackcount.nndofbin2D=cms.untracked.uint32(100)
0218 process.trackcount.wanted2DHistos=cms.untracked.bool(True)
0219 
0220 
0221 #----GlobalTag ------------------------
0222 
0223 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0224 from Configuration.AlCa.GlobalTag import GlobalTag
0225 #process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0226 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '')
0227 
0228 process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
0229 #    cms.PSet( record = cms.string("SiStripDetVOffRcd"),    tag    = cms.string("") ),
0230     cms.PSet( record = cms.string("SiStripDetCablingRcd"), tag    = cms.string("") ),
0231     cms.PSet( record = cms.string("RunInfoRcd"),           tag    = cms.string("") ),
0232     cms.PSet( record = cms.string("SiStripBadChannelRcd"), tag    = cms.string("") ),
0233     cms.PSet( record = cms.string("SiStripBadFiberRcd"),   tag    = cms.string("") ),
0234     cms.PSet( record = cms.string("SiStripBadModuleRcd"),  tag    = cms.string("") )
0235 )
0236 
0237 process.TFileService = cms.Service('TFileService',
0238                                    fileName = cms.string('OverlapProblem_tpanalyzer_'+options.tag+'.root')
0239                                    )
0240 
0241 process = customise_Reco(process,0)
0242 process = customise_condOverRides(process)
0243 
0244 process.myrereco = cms.Sequence(
0245     process.siPixelRecHits +
0246     process.trackingGlobalReco)
0247 
0248 process.p0 = cms.Path(   process.myrereco +
0249                          process.seqTrackRefitting
0250                        + process.trackAssociatorByHits
0251                        + process.overlapproblemtsosanalyzer
0252                        + process.overlapproblemtsosall
0253                        + process.seqProducers
0254                        + process.seqAnalyzers
0255                        + process.trackcount
0256                        )
0257 
0258 #print process.dumpPython()