3 from FWCore.ParameterSet.Modules
import _Module
15 self.nextInChain=
"NONE"
16 self.prevInChain=
"NONE"
17 self.prevInChainCandidate=
"NONE"
25 self.lookFor = lookFor
28 return self.nextInChain
30 return self.prevInChain
33 if isinstance(visitee, _Module):
36 self.nextInChain=visitee
38 if visitee == self.lookFor:
40 self.prevInChain=self.prevInChainCandidate
42 self.prevInChainCandidate=visitee
52 process._Process__name=
"SELECTandSIM"
55 process.TFileService = cms.Service(
"TFileService", fileName = cms.string(
"histo_reconstruction.root") )
57 process.tmfTracks = cms.EDProducer(
"RecoTracksMixer",
58 trackCol1 = cms.InputTag(
"removedInputMuons",
"tracks"),
59 trackCol2 = cms.InputTag(
"generalTracks",
"",
"SELECTandSIM")
62 process.offlinePrimaryVerticesWithBS.TrackLabel = cms.InputTag(
"tmfTracks")
63 process.offlinePrimaryVertices.TrackLabel = cms.InputTag(
"tmfTracks")
64 process.muons.TrackExtractorPSet.inputTrackCollection = cms.InputTag(
"tmfTracks")
67 process.metreco.remove(process.BeamHaloId)
72 outputModule = process.output
76 outputModule = getattr(process,str(getattr(process,
list(process.endpaths)[-1])))
80 print "Changing eventcontent to AODSIM + misc "
81 outputModule.outputCommands = process.AODSIMEventContent.outputCommands
82 keepMC = cms.untracked.vstring(
"keep *_*_zMusExtracted_*",
83 "keep *_removedInputMuons_*_*",
84 "keep *_generator_*_*",
85 "keep *_tmfTracks_*_SELECTandSIM",
86 "keep *_offlinePrimaryVertices_*_SELECTandSIM",
87 "keep *_offlinePrimaryVerticesWithBS_*_SELECTandSIM",
88 "keep *_PhotonIDProd_*_*",
90 "keep *_photonCore_*_*",
91 "keep *_genParticles_*_*",
92 "keep *_particleFlow_*_*",
94 outputModule.outputCommands.extend(keepMC)
96 if hasattr(process,
"iterativeTracking" ) :
97 process.iterativeTracking.__iadd__(process.tmfTracks)
98 elif hasattr(process,
"trackCollectionMerging" ) :
99 process.trackCollectionMerging.__iadd__(process.tmfTracks)
101 raise "Cannot find tracking sequence"
103 process.particleFlowORG = process.particleFlow.clone()
104 if hasattr(process,
"famosParticleFlowSequence"):
105 process.famosParticleFlowSequence.remove(process.pfElectronTranslatorSequence)
106 process.famosParticleFlowSequence.remove(process.particleFlow)
107 process.famosParticleFlowSequence.__iadd__(process.particleFlowORG)
108 process.famosParticleFlowSequence.__iadd__(process.particleFlow)
109 process.famosParticleFlowSequence.__iadd__(process.pfElectronTranslatorSequence)
110 elif hasattr(process,
"particleFlowReco"):
111 process.particleFlowReco.remove(process.pfElectronTranslatorSequence)
112 process.particleFlowReco.remove(process.particleFlow)
113 process.particleFlowReco.__iadd__(process.particleFlowORG)
114 process.particleFlowReco.__iadd__(process.particleFlow)
115 process.particleFlowReco.__iadd__(process.pfElectronTranslatorSequence)
117 raise "Cannot find tracking sequence"
119 process.particleFlow = cms.EDProducer(
'PFCandidateMixer',
120 col1 = cms.untracked.InputTag(
"removedInputMuons",
"pfCands"),
121 col2 = cms.untracked.InputTag(
"particleFlowORG",
"")
126 from FWCore.ParameterSet.Types
import InputTag
127 for p
in process.paths:
128 i = getattr(process,p)
129 target = process.particleFlow
131 seqVis = SeqVisitor(target)
132 seqVis.prepareSearch()
133 seqVis.setLookFor(target)
135 while ( seqVis.catch != 1
and seqVis.found == 1 ):
137 target = seqVis.giveNext()
139 targetAttributes =
dir(target)
140 for targetAttribute
in targetAttributes:
141 attr=getattr(target,targetAttribute)
142 if isinstance(attr, InputTag)
and attr.getModuleLabel()==
"particleFlow":
143 if ( attr.getProductInstanceLabel()!=
"" ):
144 print "Changing: ", target,
" ", targetAttribute,
" ", attr,
" to particleFlowORG",
145 attr.setModuleLabel(
"particleFlowORG")
149 seqVis.prepareSearch()
150 seqVis.setLookFor(target)
157 process.source.duplicateCheckMode = cms.untracked.string(
'noDuplicateCheck')
159 import FWCore.ParameterSet.VarParsing
as VarParsing
162 options.register (
'overrideBeamSpot',
164 VarParsing.VarParsing.multiplicity.singleton,
165 VarParsing.VarParsing.varType.int,
166 "should I override beamspot in globaltag?")
169 options.register (
'primaryProcess',
171 VarParsing.VarParsing.multiplicity.singleton,
172 VarParsing.VarParsing.varType.string,
173 "original processName")
178 if hasattr(sys,
"argv") ==
True:
179 options.parseArguments()
183 process.offlinePrimaryVertices.beamSpotLabel = cms.InputTag(
"offlineBeamSpot",
"",options.primaryProcess)
184 process.offlinePrimaryVerticesWithBS.beamSpotLabel = cms.InputTag(
"offlineBeamSpot",
"",options.primaryProcess)
186 if options.overrideBeamSpot != 0:
187 bs = cms.string(
"BeamSpotObjects_2009_LumiBased_SigmaZ_v18_offline")
192 process.GlobalTag.toGet = cms.VPSet(
193 cms.PSet(record = cms.string(
"BeamSpotObjectsRcd"),
195 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_31X_BEAMSPOT")
198 print "BeamSpot in globaltag set to ", bs
200 print "BeamSpot in globaltag not changed"
202 print "#############################################################"
203 print " Warning! PFCandidates 'electron' collection is not mixed, "
204 print " and probably shouldnt be used. "
205 print "#############################################################"
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