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