CMS 3D CMS Logo

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

Functions

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

Function Documentation

def L1Trigger_custom.customiseL1CaloAndGtEmulatorsFromRaw (   process)

Definition at line 250 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.itervalues():
279  iterable.replace( process.SimL1Emulator, SimL1Emulator)
280  for iterable in process.paths.itervalues():
281  iterable.replace( process.SimL1Emulator, SimL1Emulator)
282  for iterable in process.endpaths.itervalues():
283  iterable.replace( process.SimL1Emulator, SimL1Emulator)
284  process.SimL1Emulator = SimL1Emulator
285 
286  return process
def customiseL1CaloAndGtEmulatorsFromRaw
def L1Trigger_custom.customiseL1EmulatorFromRaw (   process)

Definition at line 155 of file L1Trigger_custom.py.

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

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.itervalues():
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
def L1Trigger_custom.customiseL1GtEmulatorFromRaw (   process)

Definition at line 185 of file L1Trigger_custom.py.

Referenced by customise_l1GtEmulatorFromRaw.customise().

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.itervalues():
240  iterable.replace( process.SimL1Emulator, SimL1Emulator)
241  for iterable in process.paths.itervalues():
242  iterable.replace( process.SimL1Emulator, SimL1Emulator)
243  for iterable in process.endpaths.itervalues():
244  iterable.replace( process.SimL1Emulator, SimL1Emulator)
245  process.SimL1Emulator = SimL1Emulator
246 
247  return process
def L1Trigger_custom.customiseL1Menu (   process)

Definition at line 84 of file L1Trigger_custom.py.

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

84 
85 def customiseL1Menu(process):
86 
87  # replace the L1 menu from the global tag with one of the following alternatives
88 
89  ####### user choices
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  ####### end of user choices - do not change the following
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
def L1Trigger_custom.customiseL1TriggerReport (   process)

Definition at line 289 of file L1Trigger_custom.py.

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

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)
def L1Trigger_custom.customiseOutputCommands (   process)

Definition at line 137 of file L1Trigger_custom.py.

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

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 
def L1Trigger_custom.customiseResetMasksAlgoTriggers (   process)

Definition at line 32 of file L1Trigger_custom.py.

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

32 
34 
35  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff")
36  process.es_prefer_l1GtTriggerMaskAlgoTrig = cms.ESPrefer(
37  "L1GtTriggerMaskAlgoTrigTrivialProducer", "l1GtTriggerMaskAlgoTrig")
38 
39  return (process)
def customiseResetMasksAlgoTriggers
def L1Trigger_custom.customiseResetMasksTechTriggers (   process)

Definition at line 42 of file L1Trigger_custom.py.

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

42 
44 
45  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff")
46  process.es_prefer_l1GtTriggerMaskTechTrig = cms.ESPrefer(
47  "L1GtTriggerMaskTechTrigTrivialProducer", "l1GtTriggerMaskTechTrig")
48 
49  return (process)
def customiseResetMasksTechTriggers
def L1Trigger_custom.customiseResetPrescalesAndMasks (   process)

Definition at line 72 of file L1Trigger_custom.py.

References customiseResetMasksAlgoTriggers(), customiseResetMasksTechTriggers(), customiseResetVetoMasksAlgoTriggers(), customiseResetVetoMasksTechTriggers(), customiseUnprescaleAlgoTriggers(), and customiseUnprescaleTechTriggers().

72 
74  process = customiseUnprescaleAlgoTriggers( process )
75  process = customiseUnprescaleTechTriggers( process )
76  process = customiseResetMasksAlgoTriggers( process )
77  process = customiseResetMasksTechTriggers( process )
78  process = customiseResetVetoMasksAlgoTriggers( process )
79  process = customiseResetVetoMasksTechTriggers( process )
80 
81  return (process)
def customiseResetPrescalesAndMasks
def customiseResetMasksAlgoTriggers
def customiseUnprescaleTechTriggers
def customiseUnprescaleAlgoTriggers
def customiseResetVetoMasksAlgoTriggers
def customiseResetMasksTechTriggers
def customiseResetVetoMasksTechTriggers
def L1Trigger_custom.customiseResetVetoMasksAlgoTriggers (   process)

Definition at line 52 of file L1Trigger_custom.py.

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

52 
54 
55  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskVetoAlgoTrigConfig_cff")
56  process.es_prefer_l1GtTriggerMaskVetoAlgoTrig = cms.ESPrefer(
57  "L1GtTriggerMaskVetoAlgoTrigTrivialProducer", "l1GtTriggerMaskVetoAlgoTrig")
58 
59  return (process)
def customiseResetVetoMasksAlgoTriggers
def L1Trigger_custom.customiseResetVetoMasksTechTriggers (   process)

Definition at line 62 of file L1Trigger_custom.py.

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

62 
64 
65  process.load("L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskVetoTechTrigConfig_cff")
66  process.es_prefer_l1GtTriggerMaskVetoTechTrig = cms.ESPrefer(
67  "L1GtTriggerMaskVetoTechTrigTrivialProducer", "l1GtTriggerMaskVetoTechTrig")
68 
69  return (process)
def customiseResetVetoMasksTechTriggers
def L1Trigger_custom.customiseUnprescaleAlgoTriggers (   process)

Definition at line 7 of file L1Trigger_custom.py.

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

7 
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)
def customiseUnprescaleAlgoTriggers
def L1Trigger_custom.customiseUnprescaleTechTriggers (   process)

Definition at line 20 of file L1Trigger_custom.py.

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

20 
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)
def customiseUnprescaleTechTriggers