Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("OccupancyPlotsTest")
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.register ('HLTprocess',
0016                   "HLT",
0017                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0018                   VarParsing.VarParsing.varType.string,          # string, int, or float
0019                   "HLTProcess")
0020 options.register ('triggerPath',
0021                   "HLT_*",
0022                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0023                   VarParsing.VarParsing.varType.string,          # string, int, or float
0024                   "list of HLT paths")
0025 
0026 options.parseArguments()
0027 
0028 #
0029 
0030 process.options = cms.untracked.PSet(
0031     wantSummary = cms.untracked.bool(True),
0032     fileMode = cms.untracked.string("FULLMERGE")
0033     )
0034 
0035 process.load("FWCore.MessageService.MessageLogger_cfi")
0036 
0037 process.MessageLogger.cout.enable = True
0038 process.MessageLogger.cout.threshold = cms.untracked.string("INFO")
0039 #process.MessageLogger.cout.threshold = cms.untracked.string("WARNING")
0040 process.MessageLogger.debugModules = cms.untracked.vstring("*")
0041 process.MessageLogger.cout.default = cms.untracked.PSet(
0042     limit = cms.untracked.int32(0)
0043     )
0044 process.MessageLogger.files = dict(detids = cms.untracked.PSet(
0045     default = cms.untracked.PSet(
0046         limit = cms.untracked.int32(0)
0047         ),
0048     BuildingTrackerDetId = cms.untracked.PSet(
0049         limit = cms.untracked.int32(100000000)
0050         ),
0051     GeometricDetBuilding = cms.untracked.PSet(
0052         limit = cms.untracked.int32(100000000)
0053         ),
0054     SubDetectorGeometricDetType = cms.untracked.PSet(
0055         limit = cms.untracked.int32(100000000)
0056         ),
0057     BuildingGeomDetUnits = cms.untracked.PSet(
0058         limit = cms.untracked.int32(100000000)
0059         ),
0060     LookingForFirstStrip = cms.untracked.PSet(
0061         limit = cms.untracked.int32(100000000)
0062         ),
0063     BuildingSubDetTypeMap = cms.untracked.PSet(
0064         limit = cms.untracked.int32(100000000)
0065         ),
0066     SubDetTypeMapContent = cms.untracked.PSet(
0067         limit = cms.untracked.int32(100000000)
0068         ),
0069     NumberOfLayers = cms.untracked.PSet(
0070         limit = cms.untracked.int32(100000000)
0071         ),
0072     IsThereTest = cms.untracked.PSet(
0073         limit = cms.untracked.int32(100000000)
0074         ),
0075     threshold = cms.untracked.string("DEBUG")
0076     )    
0077 )
0078 process.MessageLogger.cout.DuplicateHitFinder = cms.untracked.PSet(
0079     limit = cms.untracked.int32(100000000)
0080     )
0081 process.MessageLogger.cout.FwkSummary = cms.untracked.PSet(
0082     limit = cms.untracked.int32(100000000)
0083     )
0084 process.MessageLogger.cout.FwkReport = cms.untracked.PSet(
0085     reportEvery = cms.untracked.int32(10000)
0086     )
0087 
0088 process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING")
0089 process.MessageLogger.cerr.default = cms.untracked.PSet(
0090     limit = cms.untracked.int32(10000000)
0091     )
0092 process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
0093     reportEvery = cms.untracked.int32(100000)
0094     )
0095 
0096 #------------------------------------------------------------------
0097 
0098 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0099 
0100 process.source = cms.Source("PoolSource",
0101                     fileNames = cms.untracked.vstring(options.inputFiles),
0102 #                    skipBadFiles = cms.untracked.bool(True),
0103                     inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0104                     )
0105 
0106 # HLT Selection ------------------------------------------------------------
0107 process.load("HLTrigger.HLTfilters.triggerResultsFilter_cfi")
0108 process.triggerResultsFilter.triggerConditions = cms.vstring(options.triggerPath)
0109 process.triggerResultsFilter.hltResults = cms.InputTag( "TriggerResults", "", options.HLTprocess )
0110 process.triggerResultsFilter.l1tResults = cms.InputTag( "" )
0111 process.triggerResultsFilter.throw = cms.bool(False)
0112 
0113 process.seqHLTSelection = cms.Sequence(process.triggerResultsFilter)
0114 if options.triggerPath=="*":
0115     process.seqHLTSelection = cms.Sequence()
0116 
0117 
0118 #--------------------------------------
0119 #from DPGAnalysis.SiStripTools.occupancyplotsselections_cff import *
0120 #from DPGAnalysis.SiStripTools.occupancyplotsselections_simplified_cff import *
0121 #from DPGAnalysis.SiStripTools.occupancyplotsselections_pixelphase1_cff import *
0122 from DPGAnalysis.SiStripTools.occupancyplotsselections_pixelphase1_detailed_cff import *
0123 
0124 process.ssclusmultprod = cms.EDProducer("SiStripClusterMultiplicityProducer",
0125                                         clusterdigiCollection = cms.InputTag("siStripClusters"),
0126                                         wantedSubDets = cms.VPSet()
0127                                         )
0128 process.ssclusmultprod.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets)
0129 process.ssclusmultprodontrack=process.ssclusmultprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0130 
0131 process.ssclusoccuprod = cms.EDProducer("SiStripClusterMultiplicityProducer",
0132                                         clusterdigiCollection = cms.InputTag("siStripClusters"),
0133                                         withClusterSize = cms.untracked.bool(True),
0134                                         wantedSubDets = cms.VPSet()
0135                                         )
0136 process.ssclusoccuprod.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets)
0137 process.ssclusoccuprodontrack=process.ssclusoccuprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0138 
0139 process.spclusmultprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0140                                         clusterdigiCollection = cms.InputTag("siPixelClusters"),
0141                                         wantedSubDets = cms.VPSet()
0142                                         )
0143 process.spclusmultprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0144 process.spclusmultprodontrack=process.spclusmultprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0145 
0146 process.spclusmultprodxy = process.spclusmultprod.clone()
0147 process.spclusmultprodxy.wantedSubDets = OccupancyPlotsFPIXmDetailedWantedSubDets
0148 process.spclusmultprodxy.wantedSubDets.extend(OccupancyPlotsFPIXpDetailedWantedSubDets)
0149 process.spclusmultprodxyontrack=process.spclusmultprodxy.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0150 
0151 process.spclusoccuprod = cms.EDProducer("SiPixelClusterMultiplicityProducer",
0152                                         clusterdigiCollection = cms.InputTag("siPixelClusters"),
0153                                         withClusterSize = cms.untracked.bool(True),
0154                                         wantedSubDets = cms.VPSet()
0155                                         )
0156 process.spclusoccuprod.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0157 process.spclusoccuprodontrack=process.spclusoccuprod.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0158 
0159 process.spclusoccuprodxy = process.spclusoccuprod.clone()
0160 process.spclusoccuprodxy.wantedSubDets = OccupancyPlotsFPIXmDetailedWantedSubDets
0161 process.spclusoccuprodxy.wantedSubDets.extend(OccupancyPlotsFPIXpDetailedWantedSubDets)
0162 process.spclusoccuprodxyontrack=process.spclusoccuprodxy.clone(clusterdigiCollection = cms.InputTag("AlignmentTrackSelector"))
0163 
0164 process.seqMultProd = cms.Sequence(process.ssclusmultprod + process.ssclusoccuprod +
0165                                    process.spclusmultprod + process.spclusoccuprod +
0166                                    process.ssclusmultprodontrack + process.ssclusoccuprodontrack +
0167                                    process.spclusmultprodontrack + process.spclusoccuprodontrack +
0168                                    process.spclusmultprodxy + process.spclusoccuprodxy +
0169                                    process.spclusmultprodxyontrack + process.spclusoccuprodxyontrack 
0170                                    )
0171 
0172 process.load("DPGAnalysis.SiStripTools.occupancyplots_cfi")
0173 process.occupancyplots.wantedSubDets = process.ssclusmultprod.wantedSubDets
0174 process.occupancyplots.file = cms.untracked.FileInPath("SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt")
0175 
0176 process.occupancyplotsontrack = process.occupancyplots.clone()
0177 process.occupancyplotsontrack.wantedSubDets = process.ssclusmultprodontrack.wantedSubDets
0178 process.occupancyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("ssclusmultprodontrack"))
0179 process.occupancyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("ssclusoccuprodontrack"))
0180 
0181 process.pixeloccupancyplots = process.occupancyplots.clone()
0182 process.pixeloccupancyplots.wantedSubDets = process.spclusmultprod.wantedSubDets
0183 process.pixeloccupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod"))
0184 process.pixeloccupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod"))
0185 
0186 process.pixeloccupancyxyplots = process.occupancyplots.clone()
0187 process.pixeloccupancyxyplots.wantedSubDets = process.spclusmultprodxy.wantedSubDets
0188 process.pixeloccupancyxyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodxy"))
0189 process.pixeloccupancyxyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodxy"))
0190 
0191 process.pixeloccupancyplotsontrack = process.occupancyplots.clone()
0192 process.pixeloccupancyplotsontrack.wantedSubDets = process.spclusmultprodontrack.wantedSubDets
0193 process.pixeloccupancyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodontrack"))
0194 process.pixeloccupancyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodontrack"))
0195 
0196 process.pixeloccupancyxyplotsontrack = process.pixeloccupancyxyplots.clone()
0197 process.pixeloccupancyxyplotsontrack.wantedSubDets = process.spclusmultprodxyontrack.wantedSubDets
0198 process.pixeloccupancyxyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodxyontrack"))
0199 process.pixeloccupancyxyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodxyontrack"))
0200 
0201 process.alloccupancyplots = process.occupancyplots.clone()
0202 process.alloccupancyplots.wantedSubDets = cms.VPSet()
0203 process.alloccupancyplots.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0204 process.alloccupancyplots.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets)
0205 process.alloccupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod"),cms.InputTag("ssclusmultprod"))
0206 process.alloccupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod"),cms.InputTag("ssclusoccuprod"))
0207 
0208 process.alloccupancyplotsontrack = process.occupancyplots.clone()
0209 process.alloccupancyplotsontrack.wantedSubDets = cms.VPSet()
0210 process.alloccupancyplotsontrack.wantedSubDets.extend(OccupancyPlotsPixelWantedSubDets)
0211 process.alloccupancyplotsontrack.wantedSubDets.extend(OccupancyPlotsStripWantedSubDets)
0212 process.alloccupancyplotsontrack.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprodontrack"),cms.InputTag("ssclusmultprodontrack"))
0213 process.alloccupancyplotsontrack.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprodontrack"),cms.InputTag("ssclusoccuprodontrack"))
0214 
0215 
0216 #process.load("TrackingPFG.Utilities.bxlumianalyzer_cfi")
0217 
0218 process.goodVertices = cms.EDFilter("VertexSelector",
0219    src = cms.InputTag("offlinePrimaryVertices"),
0220    cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),  
0221    filter = cms.bool(False),   # otherwise it won't filter the events, just produce an empty vertex collection.
0222 )
0223 
0224 #process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi")
0225 #process.primaryvertexanalyzer.pvCollection=cms.InputTag("goodVertices")
0226 #process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto=cms.untracked.bool(False)
0227 #process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoProfile=cms.untracked.bool(False)
0228 #process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoBXProfile=cms.untracked.bool(False)
0229 
0230 process.seqAnalyzers = cms.Sequence(
0231     #process.bxlumianalyzer +
0232 #    process.goodVertices + process.primaryvertexanalyzer +
0233     process.occupancyplots +     process.occupancyplotsontrack + 
0234     process.pixeloccupancyplots + process.pixeloccupancyplotsontrack + 
0235     process.alloccupancyplots +    process.alloccupancyplotsontrack +
0236     process.pixeloccupancyxyplots + process.pixeloccupancyxyplotsontrack)
0237 
0238 #-------------------------------------------------------------------------------------------
0239 
0240 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi")
0241 
0242 process.seqProducers = cms.Sequence(process.AlignmentTrackSelector + process.seqMultProd)
0243 
0244 process.load("DPGAnalysis.SiStripTools.trackcount_cfi")
0245 process.trackcount.trackCollection = cms.InputTag("generalTracks")
0246 
0247 process.load("DPGAnalysis.SiStripTools.duplicaterechits_cfi")
0248 
0249 #----GlobalTag ------------------------
0250 
0251 #process.load("Configuration.StandardSequences.GeometryDB_cff")
0252 process.load("Configuration.Geometry.GeometryExtended2017Reco_cff")
0253 #process.load("Configuration.Geometry.GeometryExtendedPhaseIPixel_cff")
0254 process.load('Configuration.StandardSequences.MagneticField_cff')
0255 process.load("Configuration.StandardSequences.Reconstruction_cff")
0256 
0257 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0258 from Configuration.AlCa.GlobalTag import GlobalTag
0259 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0260 
0261 from SLHCUpgradeSimulations.Configuration.phase1TkCustoms import *
0262 
0263 
0264 process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
0265 #    cms.PSet( record = cms.string("SiStripDetVOffRcd"),    tag    = cms.string("") ),
0266     cms.PSet( record = cms.string("SiStripDetCablingRcd"), tag    = cms.string("") ),
0267     cms.PSet( record = cms.string("RunInfoRcd"),           tag    = cms.string("") ),
0268     cms.PSet( record = cms.string("SiStripBadChannelRcd"), tag    = cms.string("") ),
0269     cms.PSet( record = cms.string("SiStripBadFiberRcd"),   tag    = cms.string("") ),
0270     cms.PSet( record = cms.string("SiStripBadModuleRcd"),  tag    = cms.string("") )
0271 )
0272 
0273 process.TFileService = cms.Service('TFileService',
0274 #                                   fileName = cms.string('OccupancyPlotsTest_newschema.root')
0275 #                                   fileName = cms.string('OccupancyPlotsTest_pixelphase1.root')
0276                                    fileName = cms.string('OccupancyPlotsTest_pixelphase1_'+options.tag+'.root')
0277                                    )
0278 
0279 process = customise_Reco(process,0)
0280 process = customise_condOverRides(process)
0281 
0282 process.myrereco = cms.Sequence(
0283     process.siPixelRecHits + process.siStripMatchedRecHits +
0284     process.trackingGlobalReco)
0285 
0286 process.p0 = cms.Path(
0287 #    process.myrereco +
0288     process.seqHLTSelection +
0289     process.seqProducers +
0290     process.seqAnalyzers +
0291     process.trackcount +
0292     process.duplicaterechits 
0293     )
0294 
0295 
0296 #print process.dumpPython()