Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:30:34

0001 import FWCore.ParameterSet.Config as cms
0002 process = cms.Process("RECO2")
0003 
0004 process.load('Configuration.StandardSequences.Services_cff')
0005 process.load('FWCore.MessageService.MessageLogger_cfi')
0006 process.load('Configuration.EventContent.EventContent_cff')
0007 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0008 process.load('Configuration.Geometry.GeometrySimDB_cff')
0009 process.load('Configuration.StandardSequences.MagneticField_cff')
0010 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0011 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0012 process.load('Configuration.StandardSequences.RawToDigi_cff')
0013 process.load('Configuration.StandardSequences.Reconstruction_cff')
0014 
0015 process.GlobalTag.globaltag = 'GR_R_74_V10A'
0016 process.GlobalTag.toGet = cms.VPSet(
0017     cms.PSet(record = cms.string("GeometryFileRcd"),
0018              tag = cms.string("XMLFILE_Geometry_2015_72YV2_Extended2015ZeroMaterial_mc"),
0019              connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_GEOMETRY_000"),
0020 #             label = cms.untracked.string("Extended2015ZeroMaterial")
0021              ),
0022     cms.PSet(record = cms.string("EcalTBWeightsRcd"),
0023              tag = cms.string("EcalTBWeights_3p5_time_mc"),
0024              connect = cms.untracked.string("frontier://FrontierPrep/CMS_COND_ECAL")
0025              )
0026     )
0027 
0028 #### CONFIGURE IT HERE
0029 isMC = True
0030 #####################
0031 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0032 
0033 # start from RAW format for more flexibility
0034 process.raw2digi_step = cms.Sequence(process.RawToDigi)
0035 
0036 # get uncalibrechits with global method / time from ratio
0037 import RecoLocalCalo.EcalRecProducers.ecalGlobalUncalibRecHit_cfi
0038 process.ecalGlobalUncalibRecHit = RecoLocalCalo.EcalRecProducers.ecalGlobalUncalibRecHit_cfi.ecalGlobalUncalibRecHit.clone()
0039 # get uncalib rechits from multifit method / time from ratio
0040 import RecoLocalCalo.EcalRecProducers.ecalMultiFitUncalibRecHit_cfi
0041 process.ecalMultiFitUncalibRecHit =  RecoLocalCalo.EcalRecProducers.ecalMultiFitUncalibRecHit_cfi.ecalMultiFitUncalibRecHit.clone()
0042 process.ecalMultiFitUncalibRecHit.algoPSet.activeBXs = cms.vint32(-5,-4,-3,-2,-1,0,1,2,3,4)
0043 process.ecalMultiFitUncalibRecHit.algoPSet.useLumiInfoRunHeader = cms.bool( False )
0044 # get uncalib rechits from multifit method / time from weights
0045 process.ecalMultiFit2UncalibRecHit =  RecoLocalCalo.EcalRecProducers.ecalMultiFitUncalibRecHit_cfi.ecalMultiFitUncalibRecHit.clone()
0046 process.ecalMultiFit2UncalibRecHit.algoPSet.timealgo = cms.string("WeightsMethod")
0047 process.ecalMultiFit2UncalibRecHit.algoPSet.activeBXs = cms.vint32(-5,-4,-3,-2,-1,0,1,2,3,4)
0048 process.ecalMultiFit2UncalibRecHit.algoPSet.useLumiInfoRunHeader = cms.bool ( False )
0049 
0050 # get the recovered digis
0051 if isMC:
0052     process.ecalDetIdToBeRecovered.ebSrFlagCollection = 'simEcalDigis:ebSrFlags'
0053     process.ecalDetIdToBeRecovered.eeSrFlagCollection = 'simEcalDigis:eeSrFlags'
0054     process.ecalRecHit.recoverEBFE = False
0055     process.ecalRecHit.recoverEEFE = False
0056     process.ecalRecHit.killDeadChannels = False
0057     process.ecalRecHit.ebDetIdToBeRecovered = ''
0058     process.ecalRecHit.eeDetIdToBeRecovered = ''
0059     process.ecalRecHit.ebFEToBeRecovered = ''
0060     process.ecalRecHit.eeFEToBeRecovered = ''
0061 
0062 
0063 process.ecalRecHitGlobal = process.ecalRecHit.clone()
0064 process.ecalRecHitGlobal.EBuncalibRecHitCollection = 'ecalGlobalUncalibRecHit:EcalUncalibRecHitsEB'
0065 process.ecalRecHitGlobal.EEuncalibRecHitCollection = 'ecalGlobalUncalibRecHit:EcalUncalibRecHitsEE'
0066 process.ecalRecHitGlobal.EBrechitCollection = 'EcalRecHitsGlobalEB'
0067 process.ecalRecHitGlobal.EErechitCollection = 'EcalRecHitsGlobalEE'
0068 
0069 process.ecalRecHitMultiFit = process.ecalRecHit.clone()
0070 process.ecalRecHitMultiFit.EBuncalibRecHitCollection = 'ecalMultiFitUncalibRecHit:EcalUncalibRecHitsEB'
0071 process.ecalRecHitMultiFit.EEuncalibRecHitCollection = 'ecalMultiFitUncalibRecHit:EcalUncalibRecHitsEE'
0072 process.ecalRecHitMultiFit.EBrechitCollection = 'EcalRecHitsMultiFitEB'
0073 process.ecalRecHitMultiFit.EErechitCollection = 'EcalRecHitsMultiFitEE'
0074 
0075 process.ecalRecHitMultiFit2 = process.ecalRecHit.clone()
0076 process.ecalRecHitMultiFit2.EBuncalibRecHitCollection = 'ecalMultiFit2UncalibRecHit:EcalUncalibRecHitsEB'
0077 process.ecalRecHitMultiFit2.EEuncalibRecHitCollection = 'ecalMultiFit2UncalibRecHit:EcalUncalibRecHitsEE'
0078 process.ecalRecHitMultiFit2.EBrechitCollection = 'EcalRecHitsMultiFit2EB'
0079 process.ecalRecHitMultiFit2.EErechitCollection = 'EcalRecHitsMultiFit2EE'
0080 
0081 process.maxEvents = cms.untracked.PSet(  input = cms.untracked.int32(1000) )
0082 path = '/store/data/Run2012D/DoubleElectron/RAW-RECO/ZElectron-22Jan2013-v1/10000/'
0083 process.source = cms.Source("PoolSource",
0084                             duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0085                             fileNames = cms.untracked.vstring(path+'0008202C-E78F-E211-AADB-0026189437FD.root'
0086                                                               ))
0087 
0088 
0089 process.out = cms.OutputModule("PoolOutputModule",
0090                                outputCommands = cms.untracked.vstring('drop *',
0091                                                                       'keep *_ecalUncalib*_*_RECO2',
0092                                                                       'keep *_ecalRecHit*_*_RECO2',
0093                                                                       'keep *_offlineBeamSpot_*_*',
0094                                                                       'keep *_addPileupInfo_*_*'
0095                                                                       ),
0096                                fileName = cms.untracked.string('reco2_pu40.root')
0097                                )
0098 
0099 
0100 process.ecalAmplitudeReco = cms.Sequence( process.ecalGlobalUncalibRecHit *
0101                                           process.ecalMultiFitUncalibRecHit *
0102                                           process.ecalMultiFit2UncalibRecHit
0103                                           )
0104 
0105 process.ecalRecHitsReco = cms.Sequence( process.ecalRecHitGlobal *
0106                                         process.ecalRecHitMultiFit *
0107                                         process.ecalRecHitMultiFit2 )
0108 
0109 process.ecalTestRecoLocal = cms.Sequence( process.raw2digi_step *
0110                                           process.ecalAmplitudeReco *
0111                                           process.ecalRecHitsReco )
0112 
0113 from PhysicsTools.PatAlgos.tools.helpers import *
0114 
0115 process.p = cms.Path(process.ecalTestRecoLocal)
0116 process.outpath = cms.EndPath(process.out)
0117 
0118 
0119 #########################
0120 #    Time Profiling     #
0121 #########################
0122 
0123 #https://twiki.cern.ch/twiki/bin/viewauth/CMS/FastTimerService
0124 process.MessageLogger.cerr.FastReport = cms.untracked.PSet( limit = cms.untracked.int32( 10000000 ) )
0125 
0126 # remove any instance of the FastTimerService
0127 if 'FastTimerService' in process.__dict__:
0128     del process.FastTimerService
0129     
0130 # instrument the menu with the FastTimerService
0131 process.load( "HLTrigger.Timer.FastTimerService_cfi" )
0132 
0133 # print a text summary at the end of the job
0134 process.FastTimerService.printJobSummary          = True
0135 
0136 # enable per-event DQM plots
0137 process.FastTimerService.enableDQM                = True
0138 
0139 # enable per-module DQM plots
0140 process.FastTimerService.enableDQMbyModule        = True
0141         
0142 # enable per-event DQM plots by lumisection
0143 process.FastTimerService.enableDQMbyLumiSection   = True
0144 process.FastTimerService.dqmLumiSectionsRange     = 2500    # lumisections (23.31 s)
0145 
0146 # set the time resolution of the DQM plots
0147 process.FastTimerService.dqmTimeRange             = 1000.   # ms
0148 process.FastTimerService.dqmTimeResolution        =    5.   # ms
0149 process.FastTimerService.dqmPathTimeRange         =  100.   # ms
0150 process.FastTimerService.dqmPathTimeResolution    =    0.5  # ms
0151 process.FastTimerService.dqmModuleTimeRange       = 1000.   # ms
0152 process.FastTimerService.dqmModuleTimeResolution  =    0.5  # ms
0153 
0154 # set the base DQM folder for the plots
0155 process.FastTimerService.dqmPath                  = "HLT/TimerService"
0156 process.FastTimerService.enableDQMbyProcesses     = True
0157 
0158 # save the DQM plots in the DQMIO format
0159 process.dqmOutput = cms.OutputModule("DQMRootOutputModule",
0160                                      fileName = cms.untracked.string("DQM_pu40.root")
0161                                      )
0162 process.FastTimerOutput = cms.EndPath( process.dqmOutput )