Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TkVal")
0004 process.load("FWCore.MessageService.MessageLogger_cfi")
0005 
0006 ### standard includes
0007 process.load('Configuration.StandardSequences.GeometryDB_cff')
0008 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0009 process.load("Configuration.StandardSequences.RawToDigi_cff")
0010 process.load("Configuration.EventContent.EventContent_cff")
0011 process.load("Configuration.StandardSequences.Reconstruction_cff")
0012 process.load("SimGeneral.MixingModule.mixNoPU_cfi")
0013 
0014 ### conditions
0015 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0016 process.GlobalTag.globaltag = 'GLOBALTAG::All'
0017 
0018 
0019 process.maxEvents = cms.untracked.PSet(
0020     input = cms.untracked.int32(NEVENT)
0021 )
0022 process.source = source
0023 
0024 ### validation-specific includes
0025 #process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByChi2_cfi")
0026 #process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByHits_cfi")
0027 process.load("SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi")
0028 process.load("Validation.RecoTrack.cuts_cff")
0029 process.load("Validation.RecoTrack.MultiTrackValidator_cff")
0030 process.load("SimGeneral.TrackingAnalysis.trackingParticles_cfi")
0031 process.load("DQMServices.Components.EDMtoMEConverter_cff")
0032 
0033 process.load("Validation.Configuration.postValidation_cff")
0034 
0035 #process.TrackAssociatorByHits.SimToRecoDenominator = cms.string('reco')
0036 #process.TrackAssociatorByHits.Purity_SimToReco = cms.double(0.75)
0037 #process.TrackAssociatorByHits.Cut_RecoToSim = cms.double(0.75)
0038 
0039 process.quickTrackAssociatorByHits.SimToRecoDenominator = cms.string('reco')
0040 process.quickTrackAssociatorByHits.Purity_SimToReco = cms.double(0.75)
0041 process.quickTrackAssociatorByHits.Cut_RecoToSim = cms.double(0.75)
0042 
0043 
0044 ### configuration MultiTrackValidator ###
0045 process.cutsRecoTracks.algorithm = cms.vstring(ALGORITHM)
0046 process.cutsRecoTracks.quality = cms.vstring(QUALITY)
0047 
0048 #process.multiTrackValidator.associators = ['trackAssociatorByHits']
0049 process.multiTrackValidator.associators = ['quickTrackAssociatorByHits']
0050 process.multiTrackValidator.useLogPt=cms.untracked.bool(True)
0051 process.multiTrackValidator.minpT = cms.double(0.1)
0052 process.multiTrackValidator.maxpT = cms.double(1000)
0053 process.multiTrackValidator.nintpT = cms.int32(40)
0054 
0055 process.multiTrackValidator.label = ['TRACKS']
0056 #if (process.multiTrackValidator.label[0] == 'generalTracks'):
0057 #    process.multiTrackValidator.UseAssociators = cms.bool(False)
0058 #else:
0059 #    process.multiTrackValidator.UseAssociators = cms.bool(True)
0060 ######
0061 
0062 
0063 #process.source = cms.Source("PoolSource",
0064 #    fileNames = cms.untracked.vstring (
0065 #    FILENAMES
0066 #    )
0067 #)
0068 #process.extend("RelValTTbar_cff")
0069 
0070 process.options = cms.untracked.PSet(
0071     wantSummary = cms.untracked.bool(True)
0072 )
0073 
0074 
0075 process.digi2track = cms.Sequence(process.siPixelDigis*process.siStripDigis*
0076                                   process.trackerlocalreco*
0077                                   process.ckftracks*
0078                                   process.cutsRecoTracks*
0079                                   process.quickTrackAssociatorByHits*
0080                                   process.multiTrackValidator)
0081 #redo also tracking particles
0082 process.digi2track_and_TP = cms.Sequence(process.mix*process.trackingParticles*
0083                                   process.siPixelDigis*process.siStripDigis*
0084                                   process.trackerlocalreco*
0085                                   process.ckftracks*
0086                                   process.cutsRecoTracks*
0087                                   process.quickTrackAssociatorByHits*
0088                                   process.multiTrackValidator)
0089 
0090 process.re_tracking = cms.Sequence(process.siPixelRecHits*process.siStripMatchedRecHits*
0091                                    process.ckftracks*
0092                                    process.cutsRecoTracks*
0093                                    process.quickTrackAssociatorByHits*
0094                                    process.multiTrackValidator
0095                                    )
0096 
0097 process.re_tracking_and_TP = cms.Sequence(process.mix*process.trackingParticles*
0098                                    process.siPixelRecHits*process.siStripMatchedRecHits*
0099                                    process.ckftracks*
0100                                    process.cutsRecoTracks*
0101                                    process.quickTrackAssociatorByHits*
0102                                    process.multiTrackValidator
0103                                    )
0104 
0105 if (process.multiTrackValidator.label[0] == 'generalTracks'):
0106     process.only_validation = cms.Sequence(process.quickTrackAssociatorByHits*process.multiTrackValidator)
0107 else:
0108     process.only_validation = cms.Sequence(process.cutsRecoTracks*process.quickTrackAssociatorByHits*process.multiTrackValidator)
0109     
0110 if (process.multiTrackValidator.label[0] == 'generalTracks'):
0111     process.only_validation_and_TP = cms.Sequence(process.mix*process.trackingParticles*process.quickTrackAssociatorByHits*process.multiTrackValidator)
0112 else:
0113     process.only_validation_and_TP = cms.Sequence(process.mix*process.trackingParticles*process.cutsRecoTracks*
0114                                                   process.quickTrackAssociatorByHits*
0115                                                   process.multiTrackValidator)
0116 
0117 ### customized versoin of the OutputModule
0118 ### it save the mininal information which is necessary to perform tracking validation (tracks, tracking particles, 
0119 ### digiSimLink,etc..)
0120 
0121 process.customEventContent = cms.PSet(
0122      outputCommands = cms.untracked.vstring('drop *')
0123  )
0124 
0125 process.customEventContent.outputCommands.extend(process.RecoTrackerRECO.outputCommands)
0126 process.customEventContent.outputCommands.extend(process.BeamSpotRECO.outputCommands)
0127 process.customEventContent.outputCommands.extend(process.SimGeneralFEVTDEBUG.outputCommands)
0128 process.customEventContent.outputCommands.extend(process.RecoLocalTrackerRECO.outputCommands)
0129 process.customEventContent.outputCommands.append('keep *_simSiStripDigis_*_*')
0130 process.customEventContent.outputCommands.append('keep *_simSiPixelDigis_*_*')
0131 process.customEventContent.outputCommands.append('drop SiStripDigiedmDetSetVector_simSiStripDigis_*_*')
0132 process.customEventContent.outputCommands.append('drop PixelDigiedmDetSetVector_simSiPixelDigis_*_*')
0133 
0134 
0135 process.OUTPUT = cms.OutputModule("PoolOutputModule",
0136                                   process.customEventContent,
0137                                   fileName = cms.untracked.string('output.SAMPLE.root')
0138                                   )
0139 
0140 ValidationSequence="SEQUENCE"
0141 
0142 if ValidationSequence=="harvesting":
0143 
0144     process.dqmSaver.convention = 'Offline'
0145 
0146     process.dqmSaver.saveByRun = cms.untracked.int32(-1)
0147     process.dqmSaver.saveAtJobEnd = cms.untracked.bool(True)
0148     process.dqmSaver.forceRunNumber = cms.untracked.int32(1)
0149 
0150 
0151     process.dqmSaver.workflow = "/GLOBALTAG/SAMPLE/Validation"
0152     process.DQMStore.verbose=3
0153 
0154     process.options = cms.untracked.PSet(
0155         fileMode = cms.untracked.string('FULLMERGE')
0156         )
0157     for filter in (getattr(process,f) for f in process.filters_()):
0158         if hasattr(filter,"outputFile"):
0159             filter.outputFile=""
0160 
0161 
0162 process.EDMtoMEConverter.convertOnEndLumi = False
0163 process.harvesting= cms.Sequence(process.EDMtoMEConverter*process.postValidation*process.dqmSaver)
0164 
0165 
0166 
0167 
0168 ### final path and endPath
0169 process.p = cms.Path(process.SEQUENCE)
0170 #process.outpath = cms.EndPath(process.OUTPUT)
0171