Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:47

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process( "CREATE" )
0004 
0005 Triggers = cms.VPSet(
0006     cms.PSet(
0007         listName = cms.string( 'TauTriggerForMuDataset' ),
0008         hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*'),
0009         dataTypeToInclude = cms.vstring('RealData','RealMuonsData'),
0010         ),    
0011     ## cms.PSet(
0012     ##     listName = cms.string( 'TauTriggerForSingleMuDataset' ),
0013     ##     hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*'),
0014     ##     dataTypeToInclude = cms.vstring('RealData','RealMuonsData'),
0015     ##     ),    
0016     cms.PSet(
0017         listName = cms.string( 'TauTriggerForJetDataset' ),
0018         hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*'),
0019         dataTypeToInclude = cms.vstring('RealData'),
0020         ),    
0021     cms.PSet(
0022         listName = cms.string( 'TauTriggerForMultiJetDataset' ),
0023         hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*'),
0024         dataTypeToInclude = cms.vstring('RealData'),
0025         ),    
0026     cms.PSet(
0027         listName = cms.string( 'TauTriggerForDoubleElectronDataset' ),
0028         hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*'),
0029         dataTypeToInclude = cms.vstring('RealElectronsData'),
0030         ),    
0031     cms.PSet(
0032         listName = cms.string( 'TauTriggerForTauPlusXDataset' ),
0033         hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*'),
0034         dataTypeToInclude = cms.vstring('RealElectronsData'),
0035         ),    
0036     )
0037 
0038 usedQCDTriggers = []
0039 usedMuTriggers = []
0040 usedEleTriggers = []
0041 for trigger in Triggers:
0042     if 'RealData' in trigger.dataTypeToInclude.value():
0043         usedQCDTriggers.extend(trigger.hltPaths.value())
0044     if 'RealMuonsData' in trigger.dataTypeToInclude.value():
0045         usedMuTriggers.extend(trigger.hltPaths.value())
0046     if 'RealElectronsData' in trigger.dataTypeToInclude.value():
0047         usedEleTriggers.extend(trigger.hltPaths.value())
0048 
0049 Triggers.append(
0050     cms.PSet(
0051         listName = cms.string( 'TauTriggerForALLQCDDataset' ),
0052         hltPaths = cms.vstring(list(set(usedQCDTriggers))),
0053         )
0054     )
0055 
0056 Triggers.append(
0057     cms.PSet(
0058         listName = cms.string( 'TauTriggerForALLMuDataset' ),
0059         hltPaths = cms.vstring(list(set(usedMuTriggers))),
0060         )
0061     )
0062 
0063 Triggers.append(
0064     cms.PSet(
0065         listName = cms.string( 'TauTriggerForALLEleDataset' ),
0066         hltPaths = cms.vstring(list(set(usedEleTriggers))),
0067         )
0068     )
0069 
0070 process.load( "FWCore.MessageLogger.MessageLogger_cfi" )
0071 process.MessageLogger.cerr.enable = False
0072 process.MessageLogger.cout = cms.untracked.PSet(
0073   enable = cms.untracked.bool(True),
0074   INFO = cms.untracked.PSet(
0075     reportEvery = cms.untracked.int32( 1 )
0076   )
0077 )
0078 
0079 process.source = cms.Source( "EmptySource")
0080 process.maxEvents = cms.untracked.PSet(
0081   input = cms.untracked.int32( 1 )
0082 )
0083 
0084 process.AlCaRecoTriggerBitsRcdCreate = cms.EDAnalyzer(
0085     "AlCaRecoTriggerBitsRcdUpdate",
0086     firstRunIOV = cms.uint32( 1 ),
0087     lastRunIOV  = cms.int32( -1 ),
0088     startEmpty  = cms.bool( True ),
0089     listNamesRemove = cms.vstring(),
0090     # parameter sets to define lists of logical expressions
0091     triggerListsAdd = Triggers,
0092 )
0093 
0094 import CondCore.DBCommon.CondDBSetup_cfi
0095 process.PoolDBOutputService = cms.Service(
0096     "PoolDBOutputService",
0097     CondCore.DBCommon.CondDBSetup_cfi.CondDBSetup,
0098     timetype = cms.untracked.string( 'runnumber' ),
0099     connect  = cms.string( 'sqlite_file:GenericTriggerEventFlag_AlCaRecoTriggerBits.db' ),
0100     toPut    = cms.VPSet(
0101         cms.PSet(
0102             record = cms.string( 'AlCaRecoTriggerBitsRcd' ),
0103             tag    = cms.string( 'PFTauDQMTrigger_v0' ),
0104             label = cms.untracked.string("PFTauDQMTrigger")
0105             ),
0106             ),
0107     )
0108 
0109 process.p = cms.Path(
0110   process.AlCaRecoTriggerBitsRcdCreate
0111 )