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 247 of file L1Trigger_custom.py.

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

Definition at line 169 of file L1Trigger_custom.py.

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

170 def customiseL1EmulatorFromRaw(process):
171  # customization fragment to run L1 emulator starting from a RAW file
172 
173  # run trigger primitive generation on unpacked digis
174  process.load('L1Trigger.Configuration.CaloTriggerPrimitives_cff')
175 
176  process.CaloTPG_SimL1Emulator = cms.Sequence(
177  process.CaloTriggerPrimitives +
178  process.SimL1Emulator )
179 
180  for path in process._Process__paths.itervalues():
181  path.replace(process.SimL1Emulator, process.CaloTPG_SimL1Emulator)
182 
183  # set the new input tags after RawToDigi
184  process.simEcalTriggerPrimitiveDigis.Label = 'ecalDigis'
185  process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
186  cms.InputTag('hcalDigis'),
187  cms.InputTag('hcalDigis')
188  )
189 
190  process.simDtTriggerPrimitiveDigis.digiTag = 'muonDTDigis'
191  process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCComparatorDigi' )
192  process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag( 'muonCSCDigis', 'MuonCSCWireDigi' )
193  process.simRpcTriggerDigis.label = 'muonRPCDigis'
194  process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
195 
196  return process
def L1Trigger_custom.customiseL1GtEmulatorFromRaw (   process)

Definition at line 199 of file L1Trigger_custom.py.

Referenced by customise_l1GtEmulatorFromRaw.customise().

200 def customiseL1GtEmulatorFromRaw(process):
201  # customization fragment to run L1 GT emulator starting from a RAW file
202 
203  # producers for technical triggers:
204  # they must be re-run as their output is not available from RAW2DIGI
205 
206  # BSC Technical Trigger
207  # Note: will normally not work, it requires SimHits (not available from RAW2DIGI)
208  # works only on some MC samples where the SimHits are saved together with the FEDRaw
209  import L1TriggerOffline.L1Analyzer.bscTrigger_cfi
210  process.simBscDigis = L1TriggerOffline.L1Analyzer.bscTrigger_cfi.bscTrigger.clone()
211 
212  # RPC Technical Trigger
213  import L1Trigger.RPCTechnicalTrigger.rpcTechnicalTrigger_cfi
214  process.simRpcTechTrigDigis = L1Trigger.RPCTechnicalTrigger.rpcTechnicalTrigger_cfi.rpcTechnicalTrigger.clone()
215 
216  process.simRpcTriggerDigis.label = 'muonRPCDigis'
217  process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
218 
219  # HCAL Technical Trigger
221  process.simHcalTechTrigDigis = SimCalorimetry.HcalTrigPrimProducers.hcalTTPRecord_cfi.simHcalTTPRecord.clone()
222 
223 
224  # Global Trigger emulator
225  simGtDigis.TechnicalTriggersInputTags = cms.VInputTag(
226  cms.InputTag( 'simBscDigis' ),
227  cms.InputTag( 'simRpcTechTrigDigis' ),
228  cms.InputTag( 'simHcalTechTrigDigis' )
229  )
230 
231  process.SimL1TechnicalTriggers = cms.Sequence(
232  process.simBscDigis +
233  process.simRpcTechTrigDigis +
234  process.simHcalTechTrigDigis
235  )
236 
237  process.L1GtEmulator = cms.Sequence(
238  process.SimL1TechnicalTriggers +
239  process.simGtDigis )
240 
241  for path in process._Process__paths.itervalues():
242  path.replace(process.SimL1Emulator, process.L1GtEmulator)
243 
244  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/sqlFile/L1Menu_CollisionsHeavyIons2010_v0_mc.db'
99  menuDbTag = 'L1GtTriggerMenu_L1Menu_CollisionsHeavyIons2010_v0_mc'
100  elif l1MenuSource == 'xmlFile' :
101  # the menu will be read from an XML file instead of the global tag
102  luminosityDirectory = "startup"
103  useXmlFile = 'L1Menu_CollisionsHeavyIons2010_v0_L1T_Scales_20080926_startup_Imp0_0x101b.xml'
104 
105  else :
106  print ' Using default L1 trigger menu from Global Tag '
107 
108  ####### end of user choices - do not change the
109 
110  if l1MenuSource == 'xmlFile' :
111  print ' Retrieve L1 trigger menu only from XML file '
112  print ' ', useXmlFile
113  print ' '
114 
115  process.load('L1TriggerConfig.L1GtConfigProducers.l1GtTriggerMenuXml_cfi')
116  process.l1GtTriggerMenuXml.TriggerMenuLuminosity = luminosityDirectory
117  process.l1GtTriggerMenuXml.DefXmlFile = useXmlFile
118 
119  process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMenuConfig_cff')
120  process.es_prefer_l1GtParameters = cms.ESPrefer('L1GtTriggerMenuXmlProducer','l1GtTriggerMenuXml')
121 
122 
123 
124  elif l1MenuSource == 'sqlFile' :
125  if useSqlFile != '' :
126  print ' Retrieve L1 trigger menu only from SQLlite file '
127  print ' ', useSqlFile
128  print ' '
129 
130  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
131  process.l1conddb = cms.ESSource("PoolDBESSource",
132  CondDBSetup,
133  connect = cms.string('sqlite_file:' + useSqlFile),
134  toGet = cms.VPSet(cms.PSet(
135  record = cms.string('L1GtTriggerMenuRcd'),
136  tag = cms.string(menuDbTag))),
137  BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService')
138  )
139  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource", "l1conddb")
140 
141  else :
142  print ' Error: no SQL file is given; please provide a valid SQL file for option sqlFile'
143 
144  else :
145  print ''
146 
147 
148  return process
def L1Trigger_custom.customiseL1TriggerReport (   process)

Definition at line 286 of file L1Trigger_custom.py.

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

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

Definition at line 151 of file L1Trigger_custom.py.

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

152 def customiseOutputCommands(process):
153 
154  # customization of output commands, on top of the output commands selected
155  # in cmsDriver command
156 
157  # examples
158 
159  # drop all products, keep only the products from L1EmulRaw process and the FEDRawDataCollection_
160  #process.output.outputCommands.append('drop *_*_*_*')
161  #process.output.outputCommands.append('keep *_*_*_L1EmulRaw')
162  #process.output.outputCommands.append('keep FEDRawDataCollection_*_*_*')
163 
164 
165  return process
166 
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