CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
CustomConfigs Namespace Reference

Functions

def Base
 
def HLTDropPrevious
 
def L1REPACK
 
def L1T
 
def L1THLT
 
def MassReplaceInputTag
 
def MassReplaceParameter
 
def ProcessName
 

Variables

tuple process = ProcessName(process)
 override the GlobalTag, connection string and pfnPrefix if 'GlobalTag' in process.__dict__: process.GlobalTag.connect = 'frontier://FrontierProd/CMS_CONDITIONS' process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://Frontie#rProd/') More...
 

Function Documentation

def CustomConfigs.Base (   process)

Definition at line 18 of file CustomConfigs.py.

Referenced by gen::DataCardFileWriter.DataCardFileWriter(), models.generate(), HLTDropPrevious(), L1T(), and L1THLT().

18 
19 def Base(process):
20 # default modifications
21 
22  process.options.wantSummary = cms.untracked.bool(True)
23 
24  process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
25  process.MessageLogger.categories.append('L1GtTrigReport')
26  process.MessageLogger.categories.append('HLTrigReport')
27 
28 #
# No longer override - instead use GT config as provided via cmsDriver
def CustomConfigs.HLTDropPrevious (   process)

Definition at line 74 of file CustomConfigs.py.

References Base(), and reco.return().

74 
75 def HLTDropPrevious(process):
76 # drop on input the previous HLT results
77  process.source.inputCommands = cms.untracked.vstring (
78  'keep *',
79  'drop *_hltL1GtObjectMap_*_*',
80  'drop *_TriggerResults_*_*',
81  'drop *_hltTriggerSummaryAOD_*_*',
82  )
83 
84  process=Base(process)
85 
86  return(process)
87 
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.L1REPACK (   process)

Definition at line 106 of file CustomConfigs.py.

107 def L1REPACK(process):
108 # Replace only the L1 parts and keep the rest
109  if 'DigiToRaw' in process.__dict__:
110  process.DigiToRaw = cms.Sequence(process.l1tDigiToRawSeq + process.l1GtPack + process.l1GtEvmPack + process.rawDataCollector)
111  if 'rawDataCollector' in process.__dict__:
112  process.rawDataCollector.RawCollectionList = cms.VInputTag(
113  cms.InputTag('gctDigiToRaw'),
114  cms.InputTag('l1tDigiToRaw'),
115  cms.InputTag('l1GtPack'),
116  cms.InputTag('l1GtEvmPack'),
117  cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
118  )
119 
120  process=L1T(process)
121 
122  return process
def CustomConfigs.L1T (   process)

Definition at line 41 of file CustomConfigs.py.

References Base(), and reco.return().

41 
42 def L1T(process):
43 # modifications when running L1T only
44 
45  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
46  labels = ['gtDigis','simGtDigis','newGtDigis','hltGtDigis']
47  for label in labels:
48  if label in process.__dict__:
49  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( label )
50 
51  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
52  process.schedule.append(process.L1AnalyzerEndpath)
53 
54  process=Base(process)
55 
56  return(process)
57 
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.L1THLT (   process)

Definition at line 58 of file CustomConfigs.py.

References Base(), and reco.return().

58 
59 def L1THLT(process):
60 # modifications when running L1T+HLT
61 
62  if not ('HLTAnalyzerEndpath' in process.__dict__) :
63  from HLTrigger.Configuration.HLT_FULL_cff import fragment
64  process.hltGtDigis = fragment.hltGtDigis
65  process.hltL1GtTrigReport = fragment.hltL1GtTrigReport
66  process.hltTrigReport = fragment.hltTrigReport
67  process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtDigis + process.hltL1GtTrigReport + process.hltTrigReport)
68  process.schedule.append(process.HLTAnalyzerEndpath)
69 
70  process=Base(process)
71 
72  return(process)
73 
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.MassReplaceInputTag (   process,
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False,
  moduleLabelOnly = False,
  skipLabelTest = False 
)

Definition at line 88 of file CustomConfigs.py.

References relativeConstraints.keys, helpers.massSearchReplaceAnyInputTag(), and reco.return().

88 
89 def MassReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker",verbose=False,moduleLabelOnly=False,skipLabelTest=False):
90 # replace InputTag values (adapted from Configuration/Applications/python/ConfigBuilder.py)
91  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
92  for s in process.paths_().keys():
93  massSearchReplaceAnyInputTag(getattr(process,s),old,new,verbose,moduleLabelOnly,skipLabelTest)
94  for s in process.endpaths_().keys():
95  massSearchReplaceAnyInputTag(getattr(process,s),old,new,verbose,moduleLabelOnly,skipLabelTest)
96  return(process)
def massSearchReplaceAnyInputTag
Definition: helpers.py:262
def MassReplaceInputTag
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.MassReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False 
)

Definition at line 97 of file CustomConfigs.py.

References relativeConstraints.keys, helpers.massSearchReplaceParam(), and reco.return().

Referenced by customizeHLTforMC.customizeHLTforMC().

97 
98 def MassReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker",verbose=False):
99 # replace values of named parameters
100  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceParam
101  for s in process.paths_().keys():
102  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
103  for s in process.endpaths_().keys():
104  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
105  return(process)
def massSearchReplaceParam
Definition: helpers.py:249
return(e1-e2)*(e1-e2)+dp *dp
def MassReplaceParameter
def CustomConfigs.ProcessName (   process)

Definition at line 3 of file CustomConfigs.py.

References reco.return().

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

3 
4 def ProcessName(process):
5 # processname modifications
6 
7  if 'hltTrigReport' in process.__dict__:
8  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
9 
10  if 'hltDQMHLTScalers' in process.__dict__:
11  process.hltDQMHLTScalers.triggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
12 
13  if 'hltDQML1SeedLogicScalers' in process.__dict__:
14  process.hltDQML1SeedLogicScalers.processname = process.name_()
15 
16  return(process)
17 
return(e1-e2)*(e1-e2)+dp *dp

Variable Documentation

tuple CustomConfigs.process = ProcessName(process)

override the GlobalTag, connection string and pfnPrefix if 'GlobalTag' in process.__dict__: process.GlobalTag.connect = 'frontier://FrontierProd/CMS_CONDITIONS' process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://Frontie#rProd/')

process.GlobalTag.snapshotTime = cms.string("9999-12-31 23:59:59.000")

Definition at line 36 of file CustomConfigs.py.