CMS 3D CMS Logo

Functions
CustomConfigs Namespace Reference

Functions

def Base (process)
 
def HLTDropPrevious (process)
 
def L1REPACK (process, sequence="Full")
 
def L1T (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...
 
def L1THLT (process)
 
def L1XML (process, xmlFile=None)
 
def ProcessName (process)
 

Function Documentation

def CustomConfigs.Base (   process)

Definition at line 17 of file CustomConfigs.py.

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

Referenced by gen::DataCardFileWriter.DataCardFileWriter(), models.generate(), HLTDropPrevious(), L1T(), L1THLT(), AbsFFTJetObjectFactory< Base >.~AbsFFTJetObjectFactory(), and HitPairGeneratorFromLayerPair.~HitPairGeneratorFromLayerPair().

17 def Base(process):
18 # default modifications
19 
20  process.options.wantSummary = cms.untracked.bool(True)
21  process.options.numberOfThreads = cms.untracked.uint32( 4 )
22  process.options.numberOfStreams = cms.untracked.uint32( 0 )
23  process.options.sizeOfStackForThreadsInKB = cms.untracked.uint32( 10*1024 )
24 
25  process.MessageLogger.categories.append('TriggerSummaryProducerAOD')
26  process.MessageLogger.categories.append('L1GtTrigReport')
27  process.MessageLogger.categories.append('L1TGlobalSummary')
28  process.MessageLogger.categories.append('HLTrigReport')
29 
30 # No longer override - instead use GT config as provided via cmsDriver
def Base(process)
def CustomConfigs.HLTDropPrevious (   process)

Definition at line 97 of file CustomConfigs.py.

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

97 def HLTDropPrevious(process):
98 # drop on input the previous HLT results
99  process.source.inputCommands = cms.untracked.vstring (
100  'keep *',
101  'drop *_hltL1GtObjectMap_*_*',
102  'drop *_TriggerResults_*_*',
103  'drop *_hltTriggerSummaryAOD_*_*',
104  )
105 
106  process=Base(process)
107 
108  return(process)
109 
110 
def Base(process)
def HLTDropPrevious(process)
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.L1REPACK (   process,
  sequence = "Full" 
)

Definition at line 111 of file CustomConfigs.py.

References edm::eventsetup::heterocontainer.insert().

111 def L1REPACK(process,sequence="Full"):
112 
113  from Configuration.StandardSequences.Eras import eras
114 
115  l1repack = cms.Process('L1REPACK',eras.Run2_2018)
116  l1repack.load('Configuration.StandardSequences.SimL1EmulatorRepack_'+sequence+'_cff')
117 
118  for module in l1repack.es_sources_():
119  if (not hasattr(process,module)):
120  setattr(process,module,getattr(l1repack,module))
121  for module in l1repack.es_producers_():
122  if (not hasattr(process,module)):
123  setattr(process,module,getattr(l1repack,module))
124 
125  for module in l1repack.SimL1Emulator.expandAndClone().moduleNames():
126  setattr(process,module,getattr(l1repack,module))
127  for sequence in l1repack.sequences_():
128  setattr(process,sequence,getattr(l1repack,sequence))
129  process.SimL1Emulator = l1repack.SimL1Emulator
130 
131  for path in process.paths_():
132  getattr(process,path).insert(0,process.SimL1Emulator)
133  for path in process.endpaths_():
134  getattr(process,path).insert(0,process.SimL1Emulator)
135 
136  # special L1T cleanup
137  for obj in ('SimL1TCalorimeter','SimL1TMuonCommon','SimL1TMuon','SimL1TechnicalTriggers','SimL1EmulatorCore','ecalDigiSequence','hcalDigiSequence','calDigi','me0TriggerPseudoDigiSequence','hgcalTriggerGeometryESProducer'):
138  if hasattr(process,obj):
139  delattr(process,obj)
140 
141  return process
142 
def L1REPACK(process, sequence="Full")
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
def CustomConfigs.L1T (   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 43 of file CustomConfigs.py.

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

43 def L1T(process):
44 # modifications when running L1T only
45 
46  labels = ['gtDigis','simGtDigis','newGtDigis','hltGtDigis']
47  for label in labels:
48  if label in process.__dict__:
49  process.load('L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
50  process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( label )
51  process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
52  process.schedule.append(process.L1AnalyzerEndpath)
53 
54  labels = ['gtStage2Digis','simGtStage2Digis','newGtStage2Digis','hltGtStage2Digis']
55  for label in labels:
56  if label in process.__dict__:
57  process.load('L1Trigger.L1TGlobal.L1TGlobalSummary_cfi')
58  process.L1TGlobalSummary.AlgInputTag = cms.InputTag( label )
59  process.L1TGlobalSummary.ExtInputTag = cms.InputTag( label )
60  process.L1TAnalyzerEndpath = cms.EndPath(process.L1TGlobalSummary )
61  process.schedule.append(process.L1TAnalyzerEndpath)
62 
63  if hasattr(process,'TriggerMenu'):
64  delattr(process,'TriggerMenu')
65 
66  process=Base(process)
67 
68  return(process)
69 
70 
def L1T(process)
override the GlobalTag, connection string and pfnPrefix if &#39;GlobalTag&#39; in process.__dict__: process.GlobalTag.connect = &#39;frontier://FrontierProd/CMS_CONDITIONS&#39; process.GlobalTag.pfnPrefix = cms.untracked.string(&#39;frontier://Frontie#rProd/&#39;)
def Base(process)
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.L1THLT (   process)

Definition at line 71 of file CustomConfigs.py.

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

71 def L1THLT(process):
72 # modifications when running L1T+HLT
73 
74  if not ('HLTAnalyzerEndpath' in process.__dict__) :
75  if 'hltGtDigis' in process.__dict__:
76  from HLTrigger.Configuration.HLT_Fake_cff import fragment
77  process.hltL1GtTrigReport = fragment.hltL1GtTrigReport
78  process.hltTrigReport = fragment.hltTrigReport
79  process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtDigis + process.hltL1GtTrigReport + process.hltTrigReport)
80  process.schedule.append(process.HLTAnalyzerEndpath)
81 
82  if 'hltGtStage2ObjectMap' in process.__dict__:
83  from HLTrigger.Configuration.HLT_FULL_cff import fragment
84  process.hltL1TGlobalSummary = fragment.hltL1TGlobalSummary
85  process.hltTrigReport = fragment.hltTrigReport
86  process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtStage2Digis + process.hltL1TGlobalSummary + process.hltTrigReport)
87  process.schedule.append(process.HLTAnalyzerEndpath)
88 
89  if hasattr(process,'TriggerMenu'):
90  delattr(process,'TriggerMenu')
91 
92  process=Base(process)
93 
94  return(process)
95 
96 
def L1THLT(process)
def Base(process)
return(e1-e2)*(e1-e2)+dp *dp
def CustomConfigs.L1XML (   process,
  xmlFile = None 
)

Definition at line 143 of file CustomConfigs.py.

143 def L1XML(process,xmlFile=None):
144 
145 # xmlFile="L1Menu_Collisions2016_dev_v3.xml"
146 
147  if ((xmlFile is None) or (xmlFile=="")):
148  return process
149 
150  process.L1TriggerMenu= cms.ESProducer("L1TUtmTriggerMenuESProducer",
151  L1TriggerMenuFile= cms.string(xmlFile)
152  )
153  process.ESPreferL1TXML = cms.ESPrefer("L1TUtmTriggerMenuESProducer","L1TriggerMenu")
154 
155  return process
156 
def L1XML(process, xmlFile=None)
def CustomConfigs.ProcessName (   process)

Definition at line 8 of file CustomConfigs.py.

References reco.return().

Referenced by Base(), and ConfigBuilder.ConfigBuilder.prepare_HLT().

8 def ProcessName(process):
9 # processname modifications
10 
11  if 'hltTrigReport' in process.__dict__:
12  process.hltTrigReport.HLTriggerResults = cms.InputTag( 'TriggerResults','',process.name_() )
13 
14  return(process)
15 
16 
def ProcessName(process)
Definition: CustomConfigs.py:8
return(e1-e2)*(e1-e2)+dp *dp