Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:25:46

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ##################################################################
0004 
0005 # useful options
0006 gtDigisExist=0  # =1 use existing gtDigis on the input file, =0 extract gtDigis from the RAW data collection
0007 isData=0 # =1 running on real data, =1 running on MC
0008 
0009 OUTPUT_HIST='hltbits.root'
0010 NEVTS=1000
0011 
0012 ##################################################################
0013 
0014 process = cms.Process("ANALYSIS")
0015 
0016 process.load("FWCore.MessageService.MessageLogger_cfi")
0017 process.MessageLogger.cerr.FwkReport.reportEvery = 100
0018 
0019 process.options = cms.untracked.PSet(
0020     wantSummary = cms.untracked.bool(False)
0021 )
0022 
0023 process.source = cms.Source("PoolSource",
0024     fileNames = cms.untracked.vstring(
0025                                 'rfio:/castor/cern.ch/user/h/hartl/0301-232138__hlt_hpu_skim_presc7e33/outputA.root'
0026 #         '/store/relval/CMSSW_4_2_0_pre8/RelValWE/GEN-SIM-DIGI-RAW-HLTDEBUG/START42_V7-v1/0045/167F1B19-E956-E011-BD41-002618943969.root'
0027     )
0028 )
0029 
0030 process.maxEvents = cms.untracked.PSet(
0031     input = cms.untracked.int32( NEVTS ),
0032     skipBadFiles = cms.bool(True)
0033     )
0034 
0035 process.load('Configuration/StandardSequences/GeometryExtended_cff')
0036 process.load('Configuration/StandardSequences/MagneticField_38T_cff')
0037 
0038 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0039 # Which AlCa condition for what. Available from pre11
0040 # * DESIGN_31X_V1 - no smearing, alignment and calibration constants = 1.  No bad channels.
0041 # * MC_31X_V1 (was IDEAL_31X) - conditions intended for 31X physics MC production: no smearing,
0042 #   alignment and calibration constants = 1.  Bad channels are masked.
0043 # * STARTUP_31X_V1 (was STARTUP_31X) - conditions needed for HLT 8E29 menu studies: As MC_31X_V1 (including bad channels),
0044 #   but with alignment and calibration constants smeared according to knowledge from CRAFT.
0045 # * CRAFT08_31X_V1 (was CRAFT_31X) - conditions for CRAFT08 reprocessing.
0046 # * CRAFT_31X_V1P, CRAFT_31X_V1H - initial conditions for 2009 cosmic data taking - as CRAFT08_31X_V1 but with different
0047 #   tag names to allow append IOV, and DT cabling map corresponding to 2009 configuration (10 FEDs).
0048 # Meanwhile...:
0049 #process.GlobalTag.globaltag = 'MC_31X_V9::All'
0050 #process.GlobalTag.globaltag = 'START42_V9::All'
0051 process.GlobalTag.globaltag = 'GR_R_52_V1::All'
0052 process.GlobalTag.pfnPrefix=cms.untracked.string('frontier://FrontierProd/')
0053 
0054 process.load('Configuration/StandardSequences/SimL1Emulator_cff')
0055 
0056 # OpenHLT specificss
0057 # Define the HLT reco paths
0058 process.load("HLTrigger.HLTanalyzers.HLT_FULL_cff")
0059 # Remove the PrescaleService which, in 31X, it is expected once HLT_XXX_cff is imported
0060 
0061 process.DQM = cms.Service( "DQM",)
0062 process.DQMStore = cms.Service( "DQMStore",)
0063 
0064 # AlCa OpenHLT specific settings
0065 
0066 # Define the analyzer modules
0067 process.load("HLTrigger.HLTanalyzers.HLTBitAnalyser_cfi")
0068 process.hltbitanalysis.hltresults = cms.InputTag( 'TriggerResults','','TEST' )
0069 process.hltbitanalysis.RunParameters.HistogramFile=OUTPUT_HIST
0070 
0071 if (gtDigisExist):
0072     process.analyzeThis = cms.Path( process.hltbitanalysis )
0073 else:
0074     process.analyzeThis = cms.Path(process.HLTBeginSequence + process.hltbitanalysis )
0075     process.hltbitanalysis.l1GtReadoutRecord = cms.InputTag( 'hltGtDigis','',process.name_() )
0076 
0077 
0078 # pdt
0079 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0080 
0081 # Schedule the whole thing
0082 process.schedule = cms.Schedule( 
0083     process.analyzeThis )
0084 
0085 #########################################################################################
0086 #
0087 #nc=0
0088 if (isData):  # replace all instances of "rawDataCollector" with "source" in InputTags
0089     from FWCore.ParameterSet import Mixins
0090     for module in process.__dict__.values():
0091         if isinstance(module, Mixins._Parameterizable):
0092             for parameter in module.__dict__.values():
0093                 if isinstance(parameter, cms.InputTag):
0094                     if parameter.moduleLabel == 'rawDataCollector':
0095                         parameter.moduleLabel = 'source'
0096                         #print "Replacing in module: ", module
0097                         #nc=nc+1
0098 #print "Number of replacements: ", nc