CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZmumuStandaloneSelectionAll.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 
3 import FWCore.ParameterSet.Config as cms
4 import os
5 
6 def customise(process):
7 
8  process._Process__name="EmbeddedINPUT"
9 
10  try:
11  outputModule = process.output
12  except:
13  pass
14  try:
15  outputModule = getattr(process, str(getattr(process, list(process.endpaths)[-1])))
16  except:
17  pass
18 
19  outputModule.outputCommands.extend(
20  cms.untracked.vstring("keep *_goodMuons_*_*",
21  "keep *_goodMuonsPFIso_*_*",
22  "keep *_highestPtMuPlus_*_*",
23  "keep *_highestPtMuMinus_*_*",
24  "keep *_highestPtMuPlusPFIso_*_*",
25  "keep *_highestPtMuMinusPFIso_*_*",
26  "keep *_goldenZmumuCandidatesGe0IsoMuons_*_*",
27  "keep *_goldenZmumuCandidatesGe1IsoMuons_*_*",
28  "keep *_goldenZmumuCandidatesGe2IsoMuons_*_*",
29  "keep TH2DMEtoEDM_MEtoEDMConverter_*_*",
30  "drop *_TriggerResults_*_EmbeddedINPUT"))
31 
32  process.load('Configuration.StandardSequences.GeometryDB_cff')
33  process.load('Configuration.StandardSequences.MagneticField_38T_cff')
34  process.load("TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
35  process.load("TauAnalysis/MCEmbeddingTools/ZmumuStandaloneSelection_cff")
36 
37  # DQM store output for muon acceptance histograms
38  process.load('DQMServices.Core.DQMStore_cfg')
39 
40  # Define configuration parameter default values
41  from TauAnalysis.MCEmbeddingTools.setDefaults import setDefaults
42  setDefaults(process)
43 
44  # Read configuration parameter values by command-line parsing
45  #from TauAnalysis.MCEmbeddingTools.embeddingCommandLineOptions import parseCommandLineOptions
46  #if process.options['parseCommandLine']:
47  # parseCommandLineOptions(process)
48 
49  process.load('HLTrigger.HLTfilters.triggerResultsFilter_cfi')
50  process.embedTriggerFilter = process.triggerResultsFilter.clone(
51  hltResults = cms.InputTag('TriggerResults', '', 'HLT'),
52  l1tResults = cms.InputTag(''),
53  triggerConditions = cms.vstring('HLT_Mu17_Mu8_v*')
54  )
55 
56  # Add mumu selection to schedule
57  if process.customization_options.isMC.value():
58  process.goldenZmumuFilterPath = cms.Path(process.embedTriggerFilter*process.goldenZmumuFilterSequence)
59  else:
60  process.goldenZmumuFilterPath = cms.Path(process.embedTriggerFilter*process.goldenZmumuFilterSequenceData)
61  process.goldenZmumuFilter.src = process.customization_options.ZmumuCollection
62  process.schedule.insert(0, process.goldenZmumuFilterPath)
63 
64  # Only write out events which have at least one muon pair
65  outputModule.SelectEvents = cms.untracked.PSet(
66  SelectEvents = cms.vstring('goldenZmumuFilterPath'))
67 
68  return process
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run