Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:23

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_lumicorrTest.root'
0010 NEVTS=-1
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 '/store/data/Run2012D/MinimumBias/RAW/v1/000/204/113/8CCB7FDC-280D-E211-9A6C-003048F118AA.root',
0026 '/store/data/Run2012D/MinimumBias/RAW/v1/000/204/113/8C9B1286-2B0D-E211-956C-5404A63886C4.root'
0027 
0028     )
0029 )
0030 
0031 process.maxEvents = cms.untracked.PSet(
0032     input = cms.untracked.int32( NEVTS ),
0033     skipBadFiles = cms.bool(True)
0034     )
0035 
0036 process.load('Configuration/StandardSequences/GeometryExtended_cff')
0037 process.load('Configuration/StandardSequences/MagneticField_38T_cff')
0038 
0039 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0040 # Which AlCa condition for what. Available from pre11
0041 # * DESIGN_31X_V1 - no smearing, alignment and calibration constants = 1.  No bad channels.
0042 # * MC_31X_V1 (was IDEAL_31X) - conditions intended for 31X physics MC production: no smearing,
0043 #   alignment and calibration constants = 1.  Bad channels are masked.
0044 # * STARTUP_31X_V1 (was STARTUP_31X) - conditions needed for HLT 8E29 menu studies: As MC_31X_V1 (including bad channels),
0045 #   but with alignment and calibration constants smeared according to knowledge from CRAFT.
0046 # * CRAFT08_31X_V1 (was CRAFT_31X) - conditions for CRAFT08 reprocessing.
0047 # * CRAFT_31X_V1P, CRAFT_31X_V1H - initial conditions for 2009 cosmic data taking - as CRAFT08_31X_V1 but with different
0048 #   tag names to allow append IOV, and DT cabling map corresponding to 2009 configuration (10 FEDs).
0049 # Meanwhile...:
0050 #process.GlobalTag.globaltag = 'START53_V7A::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 # Uncomment to run the LumiProducer on the fly, if no RECO is available
0057 #from RecoLuminosity.LumiProducer.lumiProducer_cff import *
0058 #process.load('RecoLuminosity.LumiProducer.lumiProducer_cff')
0059 
0060 #Lumi corrections
0061 process.LumiCorrectionSource=cms.ESSource("LumiCorrectionSource",
0062                                           authpath=cms.untracked.string('/afs/cern.ch/cms/lumi/DB'),
0063                                           connect=cms.string('oracle://cms_orcon_adg/cms_lumi_prod')
0064                                           )
0065 
0066 
0067 # OpenHLT specificss
0068 # Define the HLT reco paths
0069 process.load("HLTrigger.HLTanalyzers.HLT_FULL_cff")
0070 # Remove the PrescaleService which, in 31X, it is expected once HLT_XXX_cff is imported
0071 
0072 process.DQM = cms.Service( "DQM",)
0073 process.DQMStore = cms.Service( "DQMStore",)
0074 
0075 # AlCa OpenHLT specific settings
0076 
0077 # Define the analyzer modules
0078 process.load("HLTrigger.HLTanalyzers.HLTBitAnalyser_cfi")
0079 process.hltbitanalysis.hltresults = cms.InputTag( 'TriggerResults','','HLT' )
0080 process.hltbitanalysis.RunParameters.HistogramFile=OUTPUT_HIST
0081 
0082 if (gtDigisExist):
0083     process.analyzeThis = cms.Path( process.hltbitanalysis )
0084 else:
0085     process.analyzeThis = cms.Path(process.HLTBeginSequence + process.hltbitanalysis )
0086     # Uncomment to run the LumiProducer on the fly, if no RECO is available
0087     # process.analyzeThis = cms.Path(process.lumiProducer + process.HLTBeginSequence + process.hltbitanalysis )
0088     process.hltbitanalysis.l1GtReadoutRecord = cms.InputTag( 'hltGtDigis','',process.name_() )
0089 
0090 
0091 # pdt
0092 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0093 
0094 # Schedule the whole thing
0095 process.schedule = cms.Schedule( 
0096     process.analyzeThis )
0097 
0098 #########################################################################################
0099 #
0100 #nc=0
0101 if (isData):  # replace all instances of "rawDataCollector" with "source" in InputTags
0102     from FWCore.ParameterSet import Mixins
0103     for module in process.__dict__.values():
0104         if isinstance(module, Mixins._Parameterizable):
0105             for parameter in module.__dict__.values():
0106                 if isinstance(parameter, cms.InputTag):
0107                     if parameter.moduleLabel == 'rawDataCollector':
0108                         parameter.moduleLabel = 'source'
0109                         #print "Replacing in module: ", module
0110                         #nc=nc+1
0111 #print "Number of replacements: ", nc