CMS 3D CMS Logo

Functions
L1Trigger_custom Namespace Reference

Functions

def customiseL1CaloAndGtEmulatorsFromRaw (process)
 
def customiseL1EmulatorFromRaw (process)
 
def customiseL1GtEmulatorFromRaw (process)
 
def customiseL1Menu (process)
 
def customiseL1TriggerReport (process)
 
def customiseOutputCommands (process)
 
def customiseResetMasksAlgoTriggers (process)
 
def customiseResetMasksTechTriggers (process)
 
def customiseResetPrescalesAndMasks (process)
 
def customiseResetVetoMasksAlgoTriggers (process)
 
def customiseResetVetoMasksTechTriggers (process)
 
def customiseUnprescaleAlgoTriggers (process)
 
def customiseUnprescaleTechTriggers (process)
 

Function Documentation

◆ customiseL1CaloAndGtEmulatorsFromRaw()

def L1Trigger_custom.customiseL1CaloAndGtEmulatorsFromRaw (   process)

Definition at line 251 of file L1Trigger_custom.py.

252  # customization fragment to run calorimeter emulators (TPGs and L1 calorimeter emulators)
253  # and GT emulator starting from a RAW file assuming that "RawToDigi_cff" and "SimL1Emulator_cff"
254  # have already been loaded
255 
256  # run Calo TPGs on unpacked digis
257  process.load('L1Trigger.Configuration.CaloTriggerPrimitives_cff')
258  process.simEcalTriggerPrimitiveDigis.Label = 'ecalDigis'
259  process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
260  cms.InputTag('hcalDigis'),
261  cms.InputTag('hcalDigis')
262  )
263 
264  # do not run muon emulators - instead, use unpacked GMT digis for GT input
265  # (GMT digis produced by same module as the GT digis, as GT and GMT have common unpacker)
266  process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
267  process.simGtDigis.GmtInputTag = 'gtDigis'
268 
269  # run Calo TPGs, L1 GCT, technical triggers, L1 GT
270  SimL1Emulator = cms.Sequence(
271  process.CaloTriggerPrimitives +
272  process.simRctDigis +
273  process.simGctDigis +
274  process.SimL1TechnicalTriggers +
275  process.simGtDigis )
276 
277  # replace the SimL1Emulator in all paths and sequences
278  for iterable in process.sequences.values():
279  iterable.replace( process.SimL1Emulator, SimL1Emulator)
280  for iterable in process.paths.values():
281  iterable.replace( process.SimL1Emulator, SimL1Emulator)
282  for iterable in process.endpaths.values():
283  iterable.replace( process.SimL1Emulator, SimL1Emulator)
284  process.SimL1Emulator = SimL1Emulator
285 
286  return process
287 

◆ customiseL1EmulatorFromRaw()

def L1Trigger_custom.customiseL1EmulatorFromRaw (   process)

Definition at line 156 of file L1Trigger_custom.py.

156 def customiseL1EmulatorFromRaw(process):
157  # customization fragment to run L1 emulator starting from a RAW file
158 
159  # run trigger primitive generation on unpacked digis
160  process.load('L1Trigger.Configuration.CaloTriggerPrimitives_cff')
161 
162  process.CaloTPG_SimL1Emulator = cms.Sequence(
163  process.CaloTriggerPrimitives +
164  process.SimL1Emulator )
165 
166  for path in process._Process__paths.values():
167  path.replace(process.SimL1Emulator, process.CaloTPG_SimL1Emulator)
168 
169  # set the new input tags after RawToDigi
170  process.simEcalTriggerPrimitiveDigis.Label = 'ecalDigis'
171  process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
172  cms.InputTag('hcalDigis'),
173  cms.InputTag('hcalDigis')
174  )
175 
176  process.simDtTriggerPrimitiveDigis.digiTag = 'muonDTDigis'
177  process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCComparatorDigi' )
178  process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCWireDigi' )
179  process.simRpcTriggerDigis.label = 'muonRPCDigis'
180  process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
181 
182  return process
183 

Referenced by customise_l1EmulatorFromRaw.customise(), and customise_l1GtPatternGeneratorFromRaw.customise().

◆ customiseL1GtEmulatorFromRaw()

def L1Trigger_custom.customiseL1GtEmulatorFromRaw (   process)

Definition at line 186 of file L1Trigger_custom.py.

186 def customiseL1GtEmulatorFromRaw(process):
187  # customization fragment to run L1 GT emulator starting from a RAW file, with input from unpacked GCT and GMT products
188  # assuming that "RawToDigi_cff" (or "RawToDigi_data_cff") and "SimL1Emulator_cff" have already been loaded
189 
190  # producers for technical triggers:
191  # they must be re-run as their output is not available from RAW2DIGI
192 
193  # BSC Technical Trigger
194  # Note: will normally not work, it requires SimHits (not available from RAW2DIGI)
195  # works only on some MC samples where the SimHits are saved together with the FEDRaw
196  import L1TriggerOffline.L1Analyzer.bscTrigger_cfi
197  process.simBscDigis = L1TriggerOffline.L1Analyzer.bscTrigger_cfi.bscTrigger.clone()
198 
199  # RPC Technical Trigger
200  import L1Trigger.RPCTechnicalTrigger.rpcTechnicalTrigger_cfi
201  process.simRpcTechTrigDigis = L1Trigger.RPCTechnicalTrigger.rpcTechnicalTrigger_cfi.rpcTechnicalTrigger.clone()
202 
203  process.simRpcTriggerDigis.label = 'muonRPCDigis'
204  process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
205 
206  # HCAL Technical Trigger
208  process.simHcalTechTrigDigis = SimCalorimetry.HcalTrigPrimProducers.hcalTTPRecord_cfi.simHcalTTPRecord.clone()
209 
210 
211  # Global Trigger emulator
212 
213  # do not run calo emulators - instead, use unpacked GCT digis for GT input
214  process.simGtDigis.GctInputTag = 'gctDigis'
215 
216  # do not run muon emulators - instead, use unpacked GMT digis for GT input
217  # (GMT digis produced by same module as the GT digis, as GT and GMT have common unpacker)
218  process.simGtDigis.GmtInputTag = 'gtDigis'
219 
220  # technical triggers
221  process.simGtDigis.TechnicalTriggersInputTags = cms.VInputTag(
222  cms.InputTag( 'simBscDigis' ),
223  cms.InputTag( 'simRpcTechTrigDigis' ),
224  cms.InputTag( 'simHcalTechTrigDigis' )
225  )
226 
227  process.SimL1TechnicalTriggers = cms.Sequence(
228  process.simBscDigis +
229  process.simRpcTechTrigDigis +
230  process.simHcalTechTrigDigis
231  )
232 
233  # run producers for technical triggers, L1 GT emulator only
234  SimL1Emulator = cms.Sequence(
235  process.SimL1TechnicalTriggers +
236  process.simGtDigis )
237 
238  # replace the SimL1Emulator in all paths and sequences
239  for iterable in process.sequences.values():
240  iterable.replace( process.SimL1Emulator, SimL1Emulator)
241  for iterable in process.paths.values():
242  iterable.replace( process.SimL1Emulator, SimL1Emulator)
243  for iterable in process.endpaths.values():
244  iterable.replace( process.SimL1Emulator, SimL1Emulator)
245  process.SimL1Emulator = SimL1Emulator
246 
247  return process
248 

Referenced by customise_l1GtEmulatorFromRaw.customise().

◆ customiseL1Menu()

def L1Trigger_custom.customiseL1Menu (   process)

Definition at line 85 of file L1Trigger_custom.py.

85 def customiseL1Menu(process):
86 
87  # replace the L1 menu from the global tag with one of the following alternatives
88 
89 
90 
91  #l1MenuSource='globalTag'
92  #l1MenuSource='sqlFile'
93  l1MenuSource='xmlFile'
94 
95 
96  if l1MenuSource == 'sqlFile' :
97  # the menu will be read from the SQL file instead of the global tag
98  useSqlFile = '/afs/cern.ch/user/g/ghete/public/L1Menu/L1Menu_Collisions2015_25ns_v2/sqlFile/L1Menu_Collisions2015_25ns_v2_mc.db'
99  menuDbTag = 'L1GtTriggerMenu_L1Menu_Collisions2015_25ns_v2_mc'
100  elif l1MenuSource == 'xmlFile' :
101  # the menu will be read from an XML file instead of the global tag - must copy the file in luminosityDirectory
102  luminosityDirectory = "startup"
103  useXmlFile = 'L1Menu_Collisions2015_25ns_v2_L1T_Scales_20141121_Imp0_0x1030.xml'
104  else :
105  # use the default L1 trigger menu from the global tag
106  pass
107 
108 
109 
110  if l1MenuSource == 'xmlFile' :
111  process.load('L1TriggerConfig.L1GtConfigProducers.l1GtTriggerMenuXml_cfi')
112  process.l1GtTriggerMenuXml.TriggerMenuLuminosity = luminosityDirectory
113  process.l1GtTriggerMenuXml.DefXmlFile = useXmlFile
114 
115  process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMenuConfig_cff')
116  process.es_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
117 
118  elif l1MenuSource == 'sqlFile' :
119  if useSqlFile != '' :
120  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
121  process.l1conddb = cms.ESSource("PoolDBESSource",
122  CondDBSetup,
123  connect = cms.string('sqlite_file:' + useSqlFile),
124  toGet = cms.VPSet(cms.PSet(
125  record = cms.string('L1GtTriggerMenuRcd'),
126  tag = cms.string(menuDbTag))),
127  BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService')
128  )
129  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource", "l1conddb")
130 
131  else :
132  print(' Error: no SQL file is given; please provide a valid SQL file for option sqlFile')
133 
134  return process
135 

References print().

Referenced by customise_overwriteL1Menu.customise(), and customise_l1TriggerConfiguration.customiseL1TriggerConfiguration().

◆ customiseL1TriggerReport()

def L1Trigger_custom.customiseL1TriggerReport (   process)

Definition at line 290 of file L1Trigger_custom.py.

290 def customiseL1TriggerReport(process):
291 
292  process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
293 
294  # boolean flag to select the input record
295  # if true, it will use L1GlobalTriggerRecord
296  #process.l1GtTrigReport.UseL1GlobalTriggerRecord = True
297 
298  # input tag for GT record:
299  # GT emulator: gtDigis (DAQ record)
300  # GT unpacker: gtDigis (DAQ record)
301  # GT lite record: l1GtRecord
302  process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
303 
304  process.l1GtTrigReport.PrintVerbosity = 10
305  process.l1GtTrigReport.PrintOutput = 0
306 
307 
308 
309  #
310  return (process)
311 

Referenced by customise_l1EmulatorFromRaw.customise(), customise_l1GtEmulatorFromRaw.customise(), and customise_l1GtPatternGeneratorFromRaw.customise().

◆ customiseOutputCommands()

def L1Trigger_custom.customiseOutputCommands (   process)

Definition at line 138 of file L1Trigger_custom.py.

138 def customiseOutputCommands(process):
139 
140  # customization of output commands, on top of the output commands selected
141  # in cmsDriver command
142 
143  # examples
144 
145  # drop all products, keep only the products from L1EmulRaw process and the FEDRawDataCollection_
146  #process.output.outputCommands.append('drop *_*_*_*')
147  #process.output.outputCommands.append('keep *_*_*_L1EmulRaw')
148  #process.output.outputCommands.append('keep FEDRawDataCollection_*_*_*')
149 
150 
151  return process
152 
153 

Referenced by customise_l1EmulatorFromRaw.customise(), customise_l1GtEmulatorFromRaw.customise(), and customise_l1GtPatternGeneratorFromRaw.customise().

◆ customiseResetMasksAlgoTriggers()

def L1Trigger_custom.customiseResetMasksAlgoTriggers (   process)

Definition at line 33 of file L1Trigger_custom.py.

34 
35  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff")
36  process.es_prefer_l1GtTriggerMaskAlgoTrig = cms.ESPrefer(
37  "L1GtTriggerMaskAlgoTrigTrivialProducer", "l1GtTriggerMaskAlgoTrig")
38 
39  return (process)
40 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

◆ customiseResetMasksTechTriggers()

def L1Trigger_custom.customiseResetMasksTechTriggers (   process)

Definition at line 43 of file L1Trigger_custom.py.

44 
45  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff")
46  process.es_prefer_l1GtTriggerMaskTechTrig = cms.ESPrefer(
47  "L1GtTriggerMaskTechTrigTrivialProducer", "l1GtTriggerMaskTechTrig")
48 
49  return (process)
50 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

◆ customiseResetPrescalesAndMasks()

def L1Trigger_custom.customiseResetPrescalesAndMasks (   process)

◆ customiseResetVetoMasksAlgoTriggers()

def L1Trigger_custom.customiseResetVetoMasksAlgoTriggers (   process)

Definition at line 53 of file L1Trigger_custom.py.

54 
55  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskVetoAlgoTrigConfig_cff")
56  process.es_prefer_l1GtTriggerMaskVetoAlgoTrig = cms.ESPrefer(
57  "L1GtTriggerMaskVetoAlgoTrigTrivialProducer", "l1GtTriggerMaskVetoAlgoTrig")
58 
59  return (process)
60 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

◆ customiseResetVetoMasksTechTriggers()

def L1Trigger_custom.customiseResetVetoMasksTechTriggers (   process)

Definition at line 63 of file L1Trigger_custom.py.

64 
65  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskVetoTechTrigConfig_cff")
66  process.es_prefer_l1GtTriggerMaskVetoTechTrig = cms.ESPrefer(
67  "L1GtTriggerMaskVetoTechTrigTrivialProducer", "l1GtTriggerMaskVetoTechTrig")
68 
69  return (process)
70 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

◆ customiseUnprescaleAlgoTriggers()

def L1Trigger_custom.customiseUnprescaleAlgoTriggers (   process)

Definition at line 8 of file L1Trigger_custom.py.

9 
10  # temporary solution FIXME
11 
12  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtPrescaleFactorsAlgoTrigConfig_cff")
13  process.es_prefer_l1GtPrescaleFactorsAlgoTrig = cms.ESPrefer(
14  "L1GtPrescaleFactorsAlgoTrigTrivialProducer", "l1GtPrescaleFactorsAlgoTrig")
15 
16 
17  return (process)
18 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

◆ customiseUnprescaleTechTriggers()

def L1Trigger_custom.customiseUnprescaleTechTriggers (   process)

Definition at line 21 of file L1Trigger_custom.py.

22 
23  # temporary solution FIXME
24 
25  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtPrescaleFactorsTechTrigConfig_cff")
26  process.es_prefer_l1GtPrescaleFactorsTechTrig = cms.ESPrefer(
27  "L1GtPrescaleFactorsTechTrigTrivialProducer", "l1GtPrescaleFactorsTechTrig")
28 
29  return (process)
30 

Referenced by customise_l1TriggerConfiguration.customiseL1TriggerConfiguration(), and customiseResetPrescalesAndMasks().

L1Trigger_custom.customiseL1CaloAndGtEmulatorsFromRaw
def customiseL1CaloAndGtEmulatorsFromRaw(process)
Definition: L1Trigger_custom.py:251
hcalTTPRecord_cfi
L1Trigger_custom.customiseResetMasksAlgoTriggers
def customiseResetMasksAlgoTriggers(process)
Definition: L1Trigger_custom.py:33
L1Trigger_custom.customiseResetMasksTechTriggers
def customiseResetMasksTechTriggers(process)
Definition: L1Trigger_custom.py:43
L1Trigger_custom.customiseResetVetoMasksTechTriggers
def customiseResetVetoMasksTechTriggers(process)
Definition: L1Trigger_custom.py:63
L1Trigger_custom.customiseL1TriggerReport
def customiseL1TriggerReport(process)
Definition: L1Trigger_custom.py:290
L1Trigger_custom.customiseL1GtEmulatorFromRaw
def customiseL1GtEmulatorFromRaw(process)
Definition: L1Trigger_custom.py:186
L1Trigger_custom.customiseResetPrescalesAndMasks
def customiseResetPrescalesAndMasks(process)
Definition: L1Trigger_custom.py:73
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
L1Trigger_custom.customiseL1EmulatorFromRaw
def customiseL1EmulatorFromRaw(process)
Definition: L1Trigger_custom.py:156
L1Trigger_custom.customiseUnprescaleTechTriggers
def customiseUnprescaleTechTriggers(process)
Definition: L1Trigger_custom.py:21
L1Trigger_custom.customiseL1Menu
def customiseL1Menu(process)
Definition: L1Trigger_custom.py:85
L1Trigger_custom.customiseOutputCommands
def customiseOutputCommands(process)
Definition: L1Trigger_custom.py:138
L1Trigger_custom.customiseResetVetoMasksAlgoTriggers
def customiseResetVetoMasksAlgoTriggers(process)
Definition: L1Trigger_custom.py:53
L1Trigger_custom.customiseUnprescaleAlgoTriggers
def customiseUnprescaleAlgoTriggers(process)
Definition: L1Trigger_custom.py:8
CondDBSetup_cfi