Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-11 16:23:24

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ####
0004 # Run the DT validation in local mode (additional histos activated), starting from a RECO input,
0005 # optionally re-reconstructing segments from hits
0006 #
0007 # Configurable options:
0008 
0009 reReco = False         # Set this to True to re-reconstruct hits
0010 skipDeltaSuppr = False # Skip DRR (only when reReco=True)
0011 step2FromDigi = False  # Remake step-2 hits instead of bypassing step-2; useful when re-fitting segments from hits since hits in 2D segments are otherwise non updated. 
0012 
0013 # Optional DB for DT uncertainties, es.  "DTRecoUncertainties.db"
0014 uncertDB = ""
0015 
0016 doAngleCorr = False
0017 
0018 #SAMPLE = "536"
0019 #SAMPLE = "5312"
0020 #SAMPLE = "620p6"
0021 #SAMPLE = "700p4"
0022 SAMPLE = "700p7"
0023 
0024 
0025 ####
0026 
0027 process = cms.Process("DTValidationFromRECO")
0028 process.maxEvents = cms.untracked.PSet(
0029         input = cms.untracked.int32(-1)
0030         )
0031 
0032 ## Conditions
0033 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0034 
0035 
0036 ## Uncertainty DB
0037 if uncertDB != "" : 
0038     process.GlobalTag.toGet = cms.VPSet(
0039         cms.PSet(record = cms.string("DTRecoConditionsUncertRcd"),
0040                  tag = cms.string("UncertDB"),
0041                  connect = cms.untracked.string("sqlite_file:"+uncertDB))
0042         )
0043 
0044 
0045 
0046 process.load("Configuration.StandardSequences.MagneticField_cff")
0047 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0048 
0049 # DQM services
0050 process.load("DQMServices.Core.DQMStore_cfg")
0051 process.load("DQMServices.Components.DQMEnvironment_cfi")
0052 process.dqmSaver.convention = 'Offline'
0053 # FIXME: correct this
0054 process.dqmSaver.workflow = '/Cosmics/CMSSW_2_2_X-Testing/RECO'
0055 
0056 # Validation RecHits
0057 process.load("Validation.DTRecHits.DTRecHitQualityAll_cfi")
0058 process.load("Validation.DTRecHits.DTRecHitClients_cfi")
0059 ##process.rechivalidation.doStep2 = False
0060 # process.rechivalidation.recHitLabel = 'hltDt1DRecHits'
0061 # process.rechivalidation.segment4DLabel = 'hltDt4DSegments'
0062 # process.seg2dsuperphivalidation.segment4DLabel = 'hltDt4DSegments'
0063 # process.seg4dvalidation.segment4DLabel = 'hltDt4DSegments'
0064 
0065 # Set local mode
0066 process.rechivalidation.doall = True
0067 process.rechivalidation.local = True
0068 process.seg4dvalidation.doall = True
0069 process.seg4dvalidation.local = True
0070 
0071 # Debug validation
0072 #process.rechivalidation.debug = True
0073 #process.seg4dvalidation.debug = True
0074 
0075 
0076 process.options = cms.untracked.PSet(
0077     #FailPath = cms.untracked.vstring('ProductNotFound'),
0078     makeTriggerResults = cms.untracked.bool(True),
0079     wantSummary = cms.untracked.bool(True)
0080 )
0081 
0082 process.load("FWCore.MessageService.MessageLogger_cfi")
0083 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0084 
0085 
0086 
0087 if SAMPLE == "536" : 
0088     process.GlobalTag.globaltag = "START53_V7G::All"
0089     process.source = cms.Source("PoolSource",
0090                             fileNames = cms.untracked.vstring( 
0091         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-RECO/v2/00000/08C1D822-F629-E211-A6B1-003048679188.root',
0092         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-RECO/v2/00000/76156813-F529-E211-917B-003048678FA6.root',
0093                                 ),
0094                             secondaryFileNames = cms.untracked.vstring(
0095         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/v2/00000/EEEFF6D0-EC29-E211-94BB-003048678AC8.root',
0096         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/v2/00000/C4AE2DAC-EB29-E211-8135-003048678BAC.root',
0097         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/v2/00000/7A9F10B4-EB29-E211-88F1-003048FFCBA8.root',
0098         '/store/relval/CMSSW_5_3_6-START53_V14/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/v2/00000/64ECECBC-ED29-E211-AB98-002618943939.root'
0099                                 )
0100         )
0101 
0102 elif SAMPLE == "5312" : 
0103     process.GlobalTag.globaltag = "START53_LV2::All"
0104     process.source = cms.Source("PoolSource",
0105                             fileNames = cms.untracked.vstring(
0106        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-RECO/START53_LV2-v1/00000/28D552C4-A82B-E311-952C-002590596486.root', 
0107        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-RECO/START53_LV2-v1/00000/EA8973F4-A92B-E311-A0A6-00261894396D.root', 
0108                                 ),
0109                             secondaryFileNames = cms.untracked.vstring(
0110        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START53_LV2-v1/00000/1AC2E0AF-912B-E311-B9DE-003048679080.root',
0111        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START53_LV2-v1/00000/6247C454-912B-E311-BCCC-0025905822B6.root',
0112        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START53_LV2-v1/00000/CE2C4A01-9F2B-E311-8A2A-00261894395B.root',
0113        '/store/relval/CMSSW_5_3_12_patch2/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/START53_LV2-v1/00000/F6429A09-9F2B-E311-A76F-003048FFCC18.root'
0114                                 )
0115         )
0116 
0117 elif SAMPLE == "620p6" : 
0118     process.GlobalTag.globaltag = "PRE_ST62_V6::All"
0119     process.source = cms.Source("PoolSource",
0120                             fileNames = cms.untracked.vstring(                                 
0121 #       '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValSingleMuPt100/GEN-SIM-RECO/PRE_ST62_V6-v1/00000/E4C71BBB-EDBE-E211-8CAF-002590593920.root'
0122 
0123        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-RECO/PRE_ST62_V6-v1/00000/1A1EDFF1-D5BE-E211-AE75-003048FFCB9E.root',
0124        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-RECO/PRE_ST62_V6-v1/00000/3E430421-D9BE-E211-B2EB-0026189438A2.root'
0125                                ),
0126                            secondaryFileNames = cms.untracked.vstring(
0127 #       '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValSingleMuPt100/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/005D0C6A-D9BE-E211-A130-0026189438D6.root'
0128                               
0129        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/4A3DC569-C9BE-E211-9B0B-003048678ED4.root',
0130        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/5446A469-C3BE-E211-9E1C-00259059642E.root',
0131        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/7025B923-D1BE-E211-8FE8-0026189438AA.root',
0132        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/861065B9-C5BE-E211-B254-003048678A7E.root',
0133        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/B085805B-C3BE-E211-9207-0026189437E8.root',
0134        '/store/relval/CMSSW_6_2_0_pre6_patch1/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V6-v1/00000/C637F0BC-C5BE-E211-831A-00261894397B.root'
0135 
0136      )
0137     )
0138 
0139 elif SAMPLE == "700p4" :
0140     process.GlobalTag.globaltag = "PRE_ST62_V8::All"    
0141     process.source = cms.Source("PoolSource",
0142                             fileNames = cms.untracked.vstring(
0143        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/086DEE6A-1325-E311-BEB2-003048FFD752.root',
0144        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/A8B465D7-1025-E311-B656-003048D3C010.root'
0145                                 ),
0146                             secondaryFileNames = cms.untracked.vstring(
0147        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v1/00000/04C8F739-0225-E311-B778-00261894385A.root',
0148        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v1/00000/429368D4-0125-E311-B80D-002618943882.root',
0149        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v1/00000/8E337AD2-FB24-E311-8208-00261894397E.root',
0150        '/store/relval/CMSSW_7_0_0_pre4/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v1/00000/E47362B8-0025-E311-AA6C-003048FFCBA4.root'
0151                                 )
0152     )
0153 
0154 elif SAMPLE == "700p7" :
0155     #RelValZMM/CMSSW_7_0_0_pre7-PRE_ST62_V8-v2
0156     process.GlobalTag.globaltag = "PRE_ST62_V8::All"
0157     process.source = cms.Source("PoolSource",
0158                             fileNames = cms.untracked.vstring(
0159        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-RECO/PRE_ST62_V8-v2/00000/1A18DD97-1946-E311-9689-003048FFD7A2.root',
0160        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-RECO/PRE_ST62_V8-v2/00000/7CEB59F4-0F46-E311-BE5C-0025905964B2.root'
0161                                 ),
0162                             secondaryFileNames = cms.untracked.vstring(
0163        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v2/00000/022794E1-0346-E311-8A49-0026189438FD.root',
0164        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v2/00000/4C9B84CF-0246-E311-BBAD-003048FFCB84.root',
0165        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v2/00000/BE8B527A-0E46-E311-92DC-0026189438F7.root',
0166        '/store/relval/CMSSW_7_0_0_pre7/RelValZMM/GEN-SIM-DIGI-RAW-HLTDEBUG/PRE_ST62_V8-v2/00000/C65E52BB-FC45-E311-B207-00304867916E.root'
0167                                 )
0168 
0169     )
0170 
0171 process.source.inputCommands = cms.untracked.vstring("drop *",
0172                                                      "keep PSimHits_g4SimHits_MuonDTHits_SIM",
0173                                                      "keep DT*_*_*_*",
0174                                                      )
0175 
0176 process.source.dropDescendantsOfDroppedBranches=cms.untracked.bool(False)
0177 
0178 
0179 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
0180 process.load("Configuration/StandardSequences/Reconstruction_cff")
0181 
0182 
0183 process.analysis = cms.Sequence(process.dtLocalRecoValidation_no2D)
0184 process.clients = cms.Sequence(process.dtLocalRecoValidationClients)
0185 
0186 
0187 ### Skip DRR
0188 if (skipDeltaSuppr) :
0189     process.dt4DSegments.Reco4DAlgoConfig.perform_delta_rejecting = False;
0190     process.dt4DSegments.Reco4DAlgoConfig.Reco2DAlgoConfig.perform_delta_rejecting = False;
0191 
0192 if (doAngleCorr) :
0193     process.dt4DSegments.Reco4DAlgoConfig.recAlgoConfig.doAngleCorr = True;
0194     process.dt4DSegments.Reco4DAlgoConfig.Reco2DAlgoConfig.doAngleCorr = True; #Note: hit recomputation @step2 is not activated anyhow!
0195 
0196 if (step2FromDigi) :
0197     process.dt4DSegments.Reco4DAlgoConfig.recAlgoConfig.stepTwoFromDigi = True;
0198     process.dt4DSegments.Reco4DAlgoConfig.Reco2DAlgoConfig.recAlgoConfig.stepTwoFromDigi = True;
0199 
0200 
0201 if (reReco) :
0202     #add  process.dt2DSegments if needed
0203 #    process.jobPath = cms.Path(process.muonDTDigis*process.dtlocalreco+process.muonreco+process.dtLocalRecoAnal)
0204     process.jobPath = cms.Path(process.dt4DSegments+process.analysis + process.dqmSaver)
0205 
0206 else :
0207     process.jobPath = cms.Path(process.analysis + process.dqmSaver)
0208