Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:25

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("myproc")
0004 
0005 process.maxEvents = cms.untracked.PSet(
0006     input = cms.untracked.int32(10)
0007 )
0008 
0009 process.source = cms.Source("PoolSource",
0010 #
0011 # input dataset is a SuperPointing Skim
0012     fileNames = cms.untracked.vstring('file:SuperPointingSkim_GEN-SIM-RAW-RECO.root')                     
0013 #
0014 # input dataset is two-files GEN-SIM-RECO and GEN-SIM-RAW
0015 #    fileNames = cms.untracked.vstring('file:RECOSIM.root'),
0016 #    secondaryFileNames = cms.untracked.vstring('file:RAWSIM.root')    
0017 #
0018 )
0019 
0020 # MessageLogger
0021 process.load("FWCore.MessageService.MessageLogger_cfi")
0022 
0023 #process.MessageLogger.debugModules = cms.untracked.vstring("testanalyzer","muonAssociatorByHits","process.muonTrackProducer")
0024 process.MessageLogger.cerr = cms.untracked.PSet(
0025     noTimeStamps = cms.untracked.bool(True),
0026 
0027     threshold = cms.untracked.string('WARNING'),
0028 
0029     testReader = cms.untracked.PSet(
0030         limit = cms.untracked.int32(0)
0031     ),
0032     MuonAssociatorEDProducer = cms.untracked.PSet(
0033         limit = cms.untracked.int32(0)
0034     ),
0035     MuonTrackProducer = cms.untracked.PSet(
0036         limit = cms.untracked.int32(0)
0037     ),
0038     MuonAssociatorByHits = cms.untracked.PSet(
0039         limit = cms.untracked.int32(0)
0040     ),
0041     DTHitAssociator = cms.untracked.PSet(
0042         limit = cms.untracked.int32(0)
0043     ),
0044     RPCHitAssociator = cms.untracked.PSet(
0045         limit = cms.untracked.int32(0)
0046     ),
0047     MuonTruth = cms.untracked.PSet(
0048         limit = cms.untracked.int32(0)
0049     )
0050 )
0051 
0052 process.MessageLogger.cout = cms.untracked.PSet(
0053     enable = cms.untracked.bool(True),
0054     noTimeStamps = cms.untracked.bool(True),
0055     
0056 #    threshold = cms.untracked.string('DEBUG'),
0057     threshold = cms.untracked.string('INFO'),
0058     
0059     default = cms.untracked.PSet(
0060         limit = cms.untracked.int32(0)
0061     ),
0062     testReader = cms.untracked.PSet(
0063         limit = cms.untracked.int32(10000000)
0064     ),
0065     MuonAssociatorEDProducer = cms.untracked.PSet(
0066         limit = cms.untracked.int32(10000000)
0067     ),
0068     MuonTrackProducer = cms.untracked.PSet(
0069         limit = cms.untracked.int32(10000000)
0070     ),
0071     MuonAssociatorByHits = cms.untracked.PSet(
0072         limit = cms.untracked.int32(10000000)
0073     ),
0074     DTHitAssociator = cms.untracked.PSet(
0075         limit = cms.untracked.int32(10000000)
0076     ),
0077     RPCHitAssociator = cms.untracked.PSet(
0078         limit = cms.untracked.int32(10000000)
0079     ),
0080     MuonTruth = cms.untracked.PSet(
0081         limit = cms.untracked.int32(10000000)
0082     ),
0083     MixingModule = cms.untracked.PSet(
0084         limit = cms.untracked.int32(0)
0085     ),
0086     FwkReport = cms.untracked.PSet(
0087         reportEvery = cms.untracked.int32(1),
0088         limit = cms.untracked.int32(10000000)
0089     ),
0090     FwkSummary = cms.untracked.PSet(
0091         reportEvery = cms.untracked.int32(1),
0092         limit = cms.untracked.int32(10000000)
0093     ),
0094     FwkJob = cms.untracked.PSet(
0095         limit = cms.untracked.int32(0)
0096     ),
0097     Root_NoDictionary = cms.untracked.PSet(
0098         limit = cms.untracked.int32(0)
0099     )
0100 )
0101 
0102 #process.MessageLogger.cout.enableStatistics = cms.untracked.bool(True)
0103 
0104 #process.Tracer = cms.Service("Tracer")
0105 
0106 # Standard Sequences
0107 process.load('Configuration.StandardSequences.Services_cff')
0108 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0109 process.load("Configuration.StandardSequences.GeometryDB_cff")
0110 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0111 process.load('Configuration.StandardSequences.DigiCosmics_cff')
0112 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0113 
0114 # set the GlobalTag according to the input MC sample
0115 #
0116 process.GlobalTag.globaltag = cms.string('COSMC_42_PEAB::All')
0117 #process.GlobalTag.globaltag = cms.string('COSMC_42_DECB::All')
0118 
0119 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0120 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0121 process.load('Configuration.StandardSequences.RawToDigi_cff')
0122 process.load('Configuration.StandardSequences.ReconstructionCosmics_cff')
0123 process.load('Configuration.EventContent.EventContentCosmics_cff')
0124 
0125 # MuonAssociatorByHits
0126 process.load("SimMuon.MCTruth.MuonAssociatorByHits_cfi")
0127 #process.muonAssociatorByHits.tracksTag = cms.InputTag("cosmicMuons1Leg")
0128 #process.muonAssociatorByHits.UseTracker = cms.bool(False)
0129 #process.muonAssociatorByHits.UseMuon = cms.bool(True)
0130 process.muonAssociatorByHits.tracksTag = cms.InputTag("globalCosmicMuons1Leg")
0131 process.muonAssociatorByHits.UseTracker = cms.bool(True)
0132 process.muonAssociatorByHits.UseMuon = cms.bool(True)
0133 
0134 # test analysis
0135 process.testanalyzer = cms.EDAnalyzer("testReader",
0136     tpTag = process.muonAssociatorByHits.tpTag,
0137     tracksTag = process.muonAssociatorByHits.tracksTag,
0138     assoMapsTag = cms.InputTag("muonAssociatorByHits")
0139 )
0140 
0141 # example output
0142 process.MyOut = cms.OutputModule("PoolOutputModule",
0143     outputCommands = cms.untracked.vstring('drop *', 
0144         'keep recoTracks_cosmicMuons1Leg_*_*', 
0145         'keep recoTracks_globalCosmicMuons1Leg_*_*', 
0146         'keep TrackingParticles_mergedtruth_MergedTrackTruth_*',
0147         'keep *_muonAssociatorByHits_*_*'),
0148     fileName = cms.untracked.string('test.root')
0149 )
0150 
0151 # restore random number generator seeds corresponding to the input events
0152 process.RandomNumberGeneratorService.restoreStateLabel = cms.untracked.string('randomEngineStateProducer')
0153 
0154 # paths and schedule
0155 process.mixing = cms.Path(process.mix)
0156 process.TPs = cms.Path(process.trackingParticles)
0157 process.trackerDigis = cms.Path(process.trDigi)
0158 #process.MuonDigis = cms.Path(process.muonDigi)
0159 process.muonAssociator = cms.Path(process.muonAssociatorByHits)
0160 process.test = cms.Path(process.testanalyzer)
0161 process.output = cms.EndPath(process.MyOut)
0162 
0163 #process.digitisation_step = cms.Path(process.pdigi)
0164 process.allDigis = cms.Path(process.trDigi+process.calDigi+process.muonDigi)
0165 process.L1simulation_step = cms.Path(process.SimL1Emulator)
0166 process.digi2raw_step = cms.Path(process.DigiToRaw)
0167 process.raw2digi_step = cms.Path(process.RawToDigi)
0168 process.reconstruction_step = cms.Path(process.reconstructionCosmics)
0169 
0170 
0171 # Reinstate TrackingParticles and tracker DigiSimLinks needed for the associator (no ReReconstruction here)
0172 process.schedule = cms.Schedule(process.mixing, process.TPs,
0173                                 process.trackerDigis, #process.MuonDigis,
0174                                 process.muonAssociator, process.test, process.output)
0175 
0176 # ReDigi & ReReco
0177 #process.schedule = cms.Schedule(process.mixing, process.TPs,
0178 #                                process.allDigis, process.L1simulation_step, process.digi2raw_step, process.raw2digi_step, process.reconstruction_step, 
0179 #                                process.muonAssociator, process.test, process.output)