CMS 3D CMS Logo

Classes | Functions | Variables
customisers Namespace Reference

Classes

class  module_manipulate
 Customizer for skimming ########################### There are four different parts. More...
 

Functions

def customiseCleaning (process, changeProcessname=True, reselect=False)
 
def customiseFilterTTbartoMuMu (process)
 
def customiseFilterZToMuMu (process)
 MC specific Customizer ###########################. More...
 
def customiseGenerator (process, changeProcessname=True, reselect=False)
 
def customiseGenerator_Reselect (process)
 
def customiseKeepPrunedGenParticles (process, reselect=False)
 
def customiseLHE (process, changeProcessname=True, reselect=False)
 
def customiseLHEandCleaning (process, reselect=False)
 cross Customizers ########################### More...
 
def customiseLHEandCleaning_Reselect (process)
 
def customiseMCFilter (process)
 
def customiseMerging (process, changeProcessname=True, reselect=False)
 
def customiseMerging_Reselect (process, changeProcessname=True)
 
def customiseSelecting (process, reselect=False)
 
def customiseSelecting_Reselect (process)
 
def customisoptions (process)
 additionla Customizer ########################### More...
 
def fix_input_tags (process, formodules=["generalTracks", cscSegments, dt4DSegments, rpcRecHits)
 
def keepCleaned ()
 Customizer for cleaining ###########################. More...
 
def keepLHE ()
 Customizer for simulaton ###########################. More...
 
def keepMerged (dataTier="SELECT")
 Customizer for merging ###########################. More...
 
def keepSelected (dataTier)
 Customizer for Selecting ###########################. More...
 
def keepSimulated ()
 
def modify_outputModules (process, keep_drop_list=[], module_veto_list=[])
 

Variables

 instance
 
 manipulator_name
 
 module_name
 
 steps
 
 to_bemanipulate
 

Function Documentation

def customisers.customiseCleaning (   process,
  changeProcessname = True,
  reselect = False 
)

Definition at line 141 of file customisers.py.

References customisoptions(), keepCleaned(), keepSelected(), and modify_outputModules().

Referenced by customiseLHEandCleaning().

141 def customiseCleaning(process, changeProcessname=True,reselect=False):
142  if changeProcessname:
143  process._Process__name = "CLEAN"
144  if reselect:
145  dataTier="RESELECT"
146  else:
147  dataTier="SELECT"
148  ## Needed for the Calo Cleaner, could also be put into a function wich fix the input parameters
149  from TrackingTools.TrackAssociator.default_cfi import TrackAssociatorParameterBlock
150  TrackAssociatorParameterBlock.TrackAssociatorParameters.CSCSegmentCollectionLabel = cms.InputTag("cscSegments","",dataTier)
151  TrackAssociatorParameterBlock.TrackAssociatorParameters.CaloTowerCollectionLabel = cms.InputTag("towerMaker","",dataTier)
152  TrackAssociatorParameterBlock.TrackAssociatorParameters.DTRecSegment4DCollectionLabel = cms.InputTag("dt4DSegments","",dataTier)
153  TrackAssociatorParameterBlock.TrackAssociatorParameters.EBRecHitCollectionLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB",dataTier)
154  TrackAssociatorParameterBlock.TrackAssociatorParameters.EERecHitCollectionLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE",dataTier)
155  TrackAssociatorParameterBlock.TrackAssociatorParameters.HBHERecHitCollectionLabel = cms.InputTag("hbhereco","",dataTier)
156  TrackAssociatorParameterBlock.TrackAssociatorParameters.HORecHitCollectionLabel = cms.InputTag("horeco","",dataTier)
157 
158 
159  MuonImput = cms.InputTag("selectedMuonsForEmbedding","","") ## This are the muon
160  for akt_manimod in to_bemanipulate:
161  if "CLEAN" in akt_manimod.steps:
162  oldCollections_in = cms.VInputTag()
163  for instance in akt_manimod.instance:
164  oldCollections_in.append(cms.InputTag(akt_manimod.module_name,instance,dataTier))
165  setattr(process, akt_manimod.module_name, cms.EDProducer(akt_manimod.cleaner_name,MuonCollection = MuonImput,TrackAssociatorParameters = TrackAssociatorParameterBlock.TrackAssociatorParameters,oldCollection = oldCollections_in))
166  process.ecalPreshowerRecHit.TrackAssociatorParameters.usePreshower = cms.bool(True)
167  process = customisoptions(process)
168  return modify_outputModules(process,[keepSelected(dataTier),keepCleaned()],["MINIAODoutput"])
169 
170 
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:125
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
def customiseCleaning(process, changeProcessname=True, reselect=False)
Definition: customisers.py:141
def customisers.customiseFilterTTbartoMuMu (   process)

Definition at line 452 of file customisers.py.

References customiseMCFilter().

453  process.load("TauAnalysis.MCEmbeddingTools.TTbartoMuMuGenFilter_cfi")
454  process.MCFilter = cms.Path(process.TTbartoMuMuGenFilter)
455  return customiseMCFilter(process)
456 
def customiseMCFilter(process)
Definition: customisers.py:457
def customiseFilterTTbartoMuMu(process)
Definition: customisers.py:452
def customisers.customiseFilterZToMuMu (   process)

MC specific Customizer ###########################.

Definition at line 446 of file customisers.py.

447  process.load("TauAnalysis.MCEmbeddingTools.DYToMuMuGenFilter_cfi")
448  process.ZToMuMuFilter = cms.Path(process.dYToMuMuGenFilter)
449  process.schedule.insert(-1,process.ZToMuMuFilter)
450  return process
451 
def customiseFilterZToMuMu(process)
MC specific Customizer ###########################.
Definition: customisers.py:446
def customisers.customiseGenerator (   process,
  changeProcessname = True,
  reselect = False 
)

Definition at line 213 of file customisers.py.

References customisoptions(), keepCleaned(), keepSelected(), keepSimulated(), and modify_outputModules().

Referenced by customiseGenerator_Reselect().

213 def customiseGenerator(process, changeProcessname=True,reselect=False):
214  if reselect:
215  dataTier="RESELECT"
216  else:
217  dataTier="SELECT"
218  if changeProcessname:
219  process._Process__name = "SIMembedding"
220 
221  ## here correct the vertex collection
222 
223  process.load('TauAnalysis.MCEmbeddingTools.EmbeddingVertexCorrector_cfi')
224  process.VtxSmeared = process.VtxCorrectedToInput.clone()
225  print "Correcting Vertex in genEvent to one from input. Replaced 'VtxSmeared' with the Corrector."
226 
227  # Remove BeamSpot Production, use the one from selected data instead.
228  process.reconstruction.remove(process.offlineBeamSpot)
229 
230  # Disable noise simulation
231  process.mix.digitizers.castor.doNoise = cms.bool(False)
232 
233  process.mix.digitizers.ecal.doESNoise = cms.bool(False)
234  process.mix.digitizers.ecal.doENoise = cms.bool(False)
235 
236  process.mix.digitizers.hcal.doNoise = cms.bool(False)
237  process.mix.digitizers.hcal.doThermalNoise = cms.bool(False)
238  process.mix.digitizers.hcal.doHPDNoise = cms.bool(False)
239 
240  process.mix.digitizers.pixel.AddNoisyPixels = cms.bool(False)
241  process.mix.digitizers.pixel.AddNoise = cms.bool(False)
242 
243  process.mix.digitizers.strip.Noise = cms.bool(False)
244 
245 
246  process = customisoptions(process)
247  ##process = fix_input_tags(process)
248 
249  return modify_outputModules(process,[keepSelected(dataTier),keepCleaned(),keepSimulated()],["AODSIMoutput"])
250 
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:125
def customiseGenerator(process, changeProcessname=True, reselect=False)
Definition: customisers.py:213
def keepSimulated()
Definition: customisers.py:179
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
def customisers.customiseGenerator_Reselect (   process)

Definition at line 251 of file customisers.py.

References customiseGenerator().

252  return customiseGenerator(process,reselect=True)
253 
def customiseGenerator(process, changeProcessname=True, reselect=False)
Definition: customisers.py:213
def customiseGenerator_Reselect(process)
Definition: customisers.py:251
def customisers.customiseKeepPrunedGenParticles (   process,
  reselect = False 
)

Definition at line 263 of file customisers.py.

References customisoptions(), keepMerged(), and modify_outputModules().

263 def customiseKeepPrunedGenParticles(process,reselect=False):
264  if reselect:
265  dataTier="RESELECT"
266  else:
267  dataTier="SELECT"
268 
269  process.load('PhysicsTools.PatAlgos.slimming.genParticles_cff')
270  process.merge_step += process.prunedGenParticlesWithStatusOne
271  process.load('PhysicsTools.PatAlgos.slimming.prunedGenParticles_cfi')
272  process.merge_step += process.prunedGenParticles
273  process.load('PhysicsTools.PatAlgos.slimming.packedGenParticles_cfi')
274  process.merge_step += process.packedGenParticles
275 
276  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.muonMatch_cfi')
277  process.merge_step += process.muonMatch
278  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.electronMatch_cfi')
279  process.merge_step += process.electronMatch
280  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.photonMatch_cfi')
281  process.merge_step += process.photonMatch
282  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.tauMatch_cfi')
283  process.merge_step += process.tauMatch
284  process.load('PhysicsTools.JetMCAlgos.TauGenJets_cfi')
285  process.merge_step += process.tauGenJets
286  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.jetFlavourId_cff')
287  process.merge_step += process.patJetPartons
288  process.load('PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi')
289  process.merge_step += process.patJetPartonMatch
290 
291  process.muonMatch.matched = "prunedGenParticles"
292  process.electronMatch.matched = "prunedGenParticles"
293  process.electronMatch.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
294  process.photonMatch.matched = "prunedGenParticles"
295  process.photonMatch.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
296  process.tauMatch.matched = "prunedGenParticles"
297  process.tauGenJets.GenParticles = "prunedGenParticles"
298  ##Boosted taus
299  #process.tauMatchBoosted.matched = "prunedGenParticles"
300  #process.tauGenJetsBoosted.GenParticles = "prunedGenParticles"
301  process.patJetPartons.particles = "prunedGenParticles"
302  process.patJetPartonMatch.matched = "prunedGenParticles"
303  process.patJetPartonMatch.mcStatus = [ 3, 23 ]
304  process.patJetGenJetMatch.matched = "slimmedGenJets"
305  process.patJetGenJetMatchAK8.matched = "slimmedGenJetsAK8"
306  process.patMuons.embedGenMatch = False
307  process.patElectrons.embedGenMatch = False
308  process.patPhotons.embedGenMatch = False
309  process.patTaus.embedGenMatch = False
310  process.patTausBoosted.embedGenMatch = False
311  process.patJets.embedGenPartonMatch = False
312  #also jet flavour must be switched
313  process.patJetFlavourAssociation.rParam = 0.4
314 
315  process.schedule.insert(0,process.merge_step)
316  process = customisoptions(process)
317  return modify_outputModules(process, [keepMerged(dataTier)])
318 
319 
def customiseKeepPrunedGenParticles(process, reselect=False)
Definition: customisers.py:263
def keepMerged(dataTier="SELECT")
Customizer for merging ###########################.
Definition: customisers.py:255
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def customisers.customiseLHE (   process,
  changeProcessname = True,
  reselect = False 
)

Definition at line 195 of file customisers.py.

References customisoptions(), keepCleaned(), keepLHE(), keepSelected(), and modify_outputModules().

Referenced by customiseLHEandCleaning().

195 def customiseLHE(process, changeProcessname=True,reselect=False):
196  if reselect:
197  dataTier="RESELECT"
198  else:
199  dataTier="SELECT"
200  if changeProcessname:
201  process._Process__name = "LHEembedding"
202  process.load('TauAnalysis.MCEmbeddingTools.EmbeddingLHEProducer_cfi')
203  if reselect:
204  process.externalLHEProducer.vertices=cms.InputTag("offlineSlimmedPrimaryVertices","","RESELECT")
205  process.lheproduction = cms.Path(process.makeexternalLHEProducer)
206  process.schedule.insert(0,process.lheproduction)
207 
208 
209  process = customisoptions(process)
210  return modify_outputModules(process,[keepSelected(dataTier),keepCleaned(), keepLHE()],["MINIAODoutput"])
211 
212 
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:125
def keepLHE()
Customizer for simulaton ###########################.
Definition: customisers.py:172
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def customiseLHE(process, changeProcessname=True, reselect=False)
Definition: customisers.py:195
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
def customisers.customiseLHEandCleaning (   process,
  reselect = False 
)

cross Customizers ###########################

Definition at line 421 of file customisers.py.

References customiseCleaning(), and customiseLHE().

Referenced by customiseLHEandCleaning_Reselect().

421 def customiseLHEandCleaning(process,reselect=False):
422  process._Process__name = "LHEembeddingCLEAN"
423  process = customiseCleaning(process,changeProcessname=False,reselect=reselect)
424  process = customiseLHE(process,changeProcessname=False,reselect=reselect)
425  return process
426 
def customiseLHEandCleaning(process, reselect=False)
cross Customizers ###########################
Definition: customisers.py:421
def customiseLHE(process, changeProcessname=True, reselect=False)
Definition: customisers.py:195
def customiseCleaning(process, changeProcessname=True, reselect=False)
Definition: customisers.py:141
def customisers.customiseLHEandCleaning_Reselect (   process)

Definition at line 427 of file customisers.py.

References customiseLHEandCleaning().

428  return customiseLHEandCleaning(process,reselect=True)
429 
def customiseLHEandCleaning_Reselect(process)
Definition: customisers.py:427
def customiseLHEandCleaning(process, reselect=False)
cross Customizers ###########################
Definition: customisers.py:421
def customisers.customiseMCFilter (   process)

Definition at line 457 of file customisers.py.

Referenced by customiseFilterTTbartoMuMu().

457 def customiseMCFilter(process):
458  process.schedule.insert(-1,process.MCFilter)
459  outputModulesList = [key for key,value in process.outputModules.iteritems()]
460  for outputModule in outputModulesList:
461  outputModule = getattr(process, outputModule)
462  outputModule.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("MCFilter"))
463  return process
464 
def customiseMCFilter(process)
Definition: customisers.py:457
def customisers.customiseMerging (   process,
  changeProcessname = True,
  reselect = False 
)

Definition at line 320 of file customisers.py.

References customisoptions(), keepMerged(), and modify_outputModules().

Referenced by customiseMerging_Reselect().

320 def customiseMerging(process, changeProcessname=True,reselect=False):
321  if changeProcessname:
322  process._Process__name = "MERGE"
323  if reselect:
324  dataTier="RESELECT"
325  else:
326  dataTier="SELECT"
327 
328 
329  process.source.inputCommands = cms.untracked.vstring()
330  process.source.inputCommands.append("keep *_*_*_*")
331 
332  #process.source.inputCommands.append("drop *_*_*_SELECT")
333  #process.source.inputCommands.append("drop *_*_*_SIMembedding")
334  #process.source.inputCommands.append("drop *_*_*_LHEembeddingCLEAN")
335  #process.source.inputCommands.extend(keepSimulated())
336  #process.source.inputCommands.extend(keepCleaned())
337 
338  process.load('Configuration.StandardSequences.Reconstruction_Data_cff')
339  process.merge_step = cms.Path()
340 
341 
342  for akt_manimod in to_bemanipulate:
343  if "MERGE" in akt_manimod.steps:
344  #if akt_manimod.module_name != 'particleFlowTmp':
345  # continue
346  print akt_manimod.module_name
347  mergCollections_in = cms.VInputTag()
348  for instance in akt_manimod.instance:
349  mergCollections_in.append(cms.InputTag(akt_manimod.merge_prefix+akt_manimod.module_name,instance,"SIMembedding"))
350  mergCollections_in.append(cms.InputTag(akt_manimod.merge_prefix+akt_manimod.module_name,instance,"LHEembeddingCLEAN"))## Mayb make some process history magic which finds out if it was CLEAN or LHEembeddingCLEAN step
351  setattr(process, akt_manimod.module_name, cms.EDProducer(akt_manimod.merger_name,
352  mergCollections = mergCollections_in
353  )
354  )
355  process.merge_step +=getattr(process, akt_manimod.module_name)
356 
357 
358  process.merge_step += process.doAlldEdXEstimators
359  process.merge_step += process.vertexreco
360  process.unsortedOfflinePrimaryVertices.beamSpotLabel = cms.InputTag("offlineBeamSpot","",dataTier)
361  process.ak4CaloJetsForTrk.srcPVs = cms.InputTag("firstStepPrimaryVertices","",dataTier)
362 
363  process.muons.FillDetectorBasedIsolation = cms.bool(False)
364  process.muons.FillSelectorMaps = cms.bool(False)
365  process.muons.FillShoweringInfo = cms.bool(False)
366  process.muons.FillCosmicsIdMap = cms.bool(False)
367 
368 
369  process.merge_step += process.highlevelreco
370 
371  #process.merge_step.remove(process.reducedEcalRecHitsEE)
372  #process.merge_step.remove(process.reducedEcalRecHitsEB)
373 
374  process.merge_step.remove(process.ak4JetTracksAssociatorExplicit)
375 
376  process.merge_step.remove(process.pfTrack)
377  process.merge_step.remove(process.pfConversions)
378  process.merge_step.remove(process.pfV0)
379  process.merge_step.remove(process.particleFlowDisplacedVertexCandidate)
380  process.merge_step.remove(process.particleFlowDisplacedVertex)
381  process.merge_step.remove(process.pfDisplacedTrackerVertex)
382  process.merge_step.remove(process.pfTrackElec)
383  process.merge_step.remove(process.electronsWithPresel)
384  process.merge_step.remove(process.mvaElectrons)
385  process.merge_step.remove(process.particleFlowBlock)
386  process.merge_step.remove(process.particleFlowEGamma)
387  process.merge_step.remove(process.gedGsfElectronCores)
388  # process.merge_step.remove(process.gedGsfElectronsTmp)
389  process.merge_step.remove(process.gedPhotonCore)
390  process.merge_step.remove(process.ecalDrivenGsfElectronCores)
391  process.merge_step.remove(process.ecalDrivenGsfElectrons)
392  process.merge_step.remove(process.uncleanedOnlyElectronSeeds)
393  process.merge_step.remove(process.uncleanedOnlyAllConversions)
394  process.merge_step.remove(process.uncleanedOnlyPfTrack)
395  process.merge_step.remove(process.uncleanedOnlyPfTrackElec)
396  process.merge_step.remove(process.uncleanedOnlyGsfElectrons)
397  process.merge_step.remove(process.uncleanedOnlyElectronCkfTrackCandidates)
398  process.merge_step.remove(process.cosmicsVeto)
399  process.merge_step.remove(process.cosmicsVetoTrackCandidates)
400  # process.merge_step.remove(process.ecalDrivenGsfElectronCores)
401  # process.merge_step.remove(process.ecalDrivenGsfElectrons)
402  # process.merge_step.remove(process.gedPhotonsTmp)
403  # process.merge_step.remove(process.particleFlowTmp)
404  process.merge_step.remove(process.hcalnoise)
405 
406  process.load('CommonTools.ParticleFlow.genForPF2PAT_cff')
407 
408  process.merge_step += process.genForPF2PATSequence
409 
410  process.schedule.insert(0,process.merge_step)
411  # process.load('PhysicsTools.PatAlgos.slimming.slimmedGenJets_cfi')
412 
413  process = customisoptions(process)
414  return modify_outputModules(process, [keepMerged(dataTier)])
415 
def keepMerged(dataTier="SELECT")
Customizer for merging ###########################.
Definition: customisers.py:255
def customiseMerging(process, changeProcessname=True, reselect=False)
Definition: customisers.py:320
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def customisers.customiseMerging_Reselect (   process,
  changeProcessname = True 
)

Definition at line 416 of file customisers.py.

References customiseMerging().

416 def customiseMerging_Reselect(process, changeProcessname=True):
417  return customiseMerging(process, changeProcessname=changeProcessname, reselect=True)
418 
def customiseMerging(process, changeProcessname=True, reselect=False)
Definition: customisers.py:320
def customiseMerging_Reselect(process, changeProcessname=True)
Definition: customisers.py:416
def customisers.customiseSelecting (   process,
  reselect = False 
)

Definition at line 97 of file customisers.py.

References customisoptions(), keepSelected(), and modify_outputModules().

Referenced by customiseSelecting_Reselect().

97 def customiseSelecting(process,reselect=False):
98  if reselect:
99  process._Process__name = "RESELECT"
100  dataTier="RESELECT"
101  else:
102  process._Process__name = "SELECT"
103  dataTier="SELECT"
104 
105  process.load('TauAnalysis.MCEmbeddingTools.SelectingProcedure_cff')
106  process.patMuonsAfterKinCuts.src = cms.InputTag("slimmedMuons","",dataTier)
107  process.patMuonsAfterID = process.patMuonsAfterLooseID.clone()
108 
109  process.selecting = cms.Path(process.makePatMuonsZmumuSelection)
110  process.schedule.insert(-1, process.selecting)
111 
112  outputModulesList = [key for key,value in process.outputModules.iteritems()]
113  for outputModule in outputModulesList:
114  outputModule = getattr(process, outputModule)
115  outputModule.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("selecting"))
116  outputModule.outputCommands.extend(keepSelected(dataTier))
117 
118  process = customisoptions(process)
119  return modify_outputModules(process,[keepSelected(dataTier)])
120 
def customiseSelecting(process, reselect=False)
Definition: customisers.py:97
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
def customisers.customiseSelecting_Reselect (   process)

Definition at line 121 of file customisers.py.

References customiseSelecting().

122  return customiseSelecting(process,reselect=True)
123 
def customiseSelecting(process, reselect=False)
Definition: customisers.py:97
def customiseSelecting_Reselect(process)
Definition: customisers.py:121
def customisers.customisoptions (   process)

additionla Customizer ###########################

Definition at line 432 of file customisers.py.

Referenced by customiseCleaning(), customiseGenerator(), customiseKeepPrunedGenParticles(), customiseLHE(), customiseMerging(), and customiseSelecting().

432 def customisoptions(process):
433  if not hasattr(process, "options"):
434  process.options = cms.untracked.PSet()
435  process.options.emptyRunLumiMode = cms.untracked.string('doNotHandleEmptyRunsAndLumis')
436  if not hasattr(process, "bunchSpacingProducer"):
437  process.bunchSpacingProducer = cms.EDProducer("BunchSpacingProducer")
438  process.bunchSpacingProducer.bunchSpacingOverride = cms.uint32(25)
439  process.bunchSpacingProducer.overrideBunchSpacing = cms.bool(True)
440  process.options.numberOfThreads = cms.untracked.uint32(1)
441  process.options.numberOfStreams = cms.untracked.uint32(0)
442  return process
443 
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:432
def customisers.fix_input_tags (   process,
  formodules = ["generalTracks",
  cscSegments,
  dt4DSegments,
  rpcRecHits 
)

Definition at line 465 of file customisers.py.

465 def fix_input_tags(process, formodules = ["generalTracks","cscSegments","dt4DSegments","rpcRecHits"]):
466  def change_tags_process(test_input):
467  if isinstance(test_input, cms.InputTag):
468  if test_input.getModuleLabel() in formodules:
469  test_input.setProcessName(process._Process__name)
470 
471  def search_for_tags(pset):
472  if isinstance(pset, dict):
473  for key in pset:
474  if isinstance(pset[key], cms.VInputTag):
475  for akt_inputTag in pset[key]:
476  change_tags_process(akt_inputTag)
477  elif isinstance(pset[key], cms.PSet):
478  search_for_tags(pset[key].__dict__)
479  elif isinstance(pset[key], cms.VPSet):
480  for akt_pset in pset[key]:
481  search_for_tags(akt_pset.__dict__)
482  else:
483  change_tags_process(pset[key])
484  else:
485  print "must be python dict not a ",type(pset)
486 
487  for module in process.producers_():
488  search_for_tags(getattr(process, module).__dict__)
489  for module in process.filters_():
490  search_for_tags(getattr(process, module).__dict__)
491  for module in process.analyzers_():
492  search_for_tags(getattr(process, module).__dict__)
493 
494  return process
495 
def fix_input_tags(process, formodules=["generalTracks", cscSegments, dt4DSegments, rpcRecHits)
Definition: customisers.py:465
def customisers.keepCleaned ( )

Customizer for cleaining ###########################.

Definition at line 125 of file customisers.py.

Referenced by customiseCleaning(), customiseGenerator(), and customiseLHE().

126  ret_vstring = cms.untracked.vstring(
127 # "drop *_*_*_LHEembeddingCLEAN",
128 # "drop *_*_*_CLEAN"
129  )
130 
131  for akt_manimod in to_bemanipulate:
132  if "MERGE" in akt_manimod.steps:
133  ret_vstring.append("keep *_"+akt_manimod.module_name+"_*_LHEembeddingCLEAN")
134  ret_vstring.append("keep *_"+akt_manimod.module_name+"_*_CLEAN")
135  ret_vstring.append("keep *_standAloneMuons_*_LHEembeddingCLEAN")
136  ret_vstring.append("keep *_glbTrackQual_*_LHEembeddingCLEAN")
137  return ret_vstring
138 
139 
140 
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:125
def customisers.keepLHE ( )

Customizer for simulaton ###########################.

Definition at line 172 of file customisers.py.

Referenced by customiseLHE().

172 def keepLHE():
173  ret_vstring = cms.untracked.vstring()
174  ret_vstring.append("keep *_externalLHEProducer_*_LHEembedding")
175  ret_vstring.append("keep *_externalLHEProducer_*_LHEembeddingCLEAN")
176  return ret_vstring
177 
178 
def keepLHE()
Customizer for simulaton ###########################.
Definition: customisers.py:172
def customisers.keepMerged (   dataTier = "SELECT")

Customizer for merging ###########################.

Definition at line 255 of file customisers.py.

Referenced by customiseKeepPrunedGenParticles(), and customiseMerging().

255 def keepMerged(dataTier="SELECT"):
256  ret_vstring = cms.untracked.vstring()
257  ret_vstring.append("drop *_*_*_"+dataTier)
258  ret_vstring.append("keep *_prunedGenParticles_*_MERGE")
259  ret_vstring.append("keep *_generator_*_SIMembedding")
260  return ret_vstring
261 
262 
def keepMerged(dataTier="SELECT")
Customizer for merging ###########################.
Definition: customisers.py:255
def customisers.keepSelected (   dataTier)

Customizer for Selecting ###########################.

Definition at line 82 of file customisers.py.

Referenced by customiseCleaning(), customiseGenerator(), customiseLHE(), and customiseSelecting().

82 def keepSelected(dataTier):
83  ret_vstring = cms.untracked.vstring(
84  # "drop *_*_*_"+dataTier,
85  "keep *_patMuonsAfterID_*_"+dataTier,
86  "keep *_slimmedMuons_*_"+dataTier,
87  "keep *_selectedMuonsForEmbedding_*_"+dataTier,
88  "keep recoVertexs_offlineSlimmedPrimaryVertices_*_"+dataTier,
89  "keep *_firstStepPrimaryVertices_*_"+dataTier,
90  "keep *_offlineBeamSpot_*_"+dataTier
91  )
92  for akt_manimod in to_bemanipulate:
93  if "CLEAN" in akt_manimod.steps:
94  ret_vstring.append("keep *_"+akt_manimod.module_name+"_*_"+dataTier)
95  return ret_vstring
96 
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
def customisers.keepSimulated ( )

Definition at line 179 of file customisers.py.

Referenced by customiseGenerator().

180  ret_vstring = cms.untracked.vstring()
181  for akt_manimod in to_bemanipulate:
182  if "MERGE" in akt_manimod.steps:
183  ret_vstring.append("keep *_"+akt_manimod.module_name+"_*_SIMembedding")
184  ret_vstring.append("keep *_genParticles_*_SIMembedding")
185  ret_vstring.append("keep *_standAloneMuons_*_SIMembedding")
186  ret_vstring.append("keep *_glbTrackQual_*_SIMembedding")
187  ret_vstring.append("keep *_generator_*_SIMembedding")
188  ret_vstring.append("keep *_addPileupInfo_*_SIMembedding")
189  ret_vstring.append("keep *_slimmedAddPileupInfo_*_*")
190  return ret_vstring
191 
192 
193 
194 
def keepSimulated()
Definition: customisers.py:179
def customisers.modify_outputModules (   process,
  keep_drop_list = [],
  module_veto_list = [] 
)

Definition at line 68 of file customisers.py.

Referenced by customiseCleaning(), customiseGenerator(), customiseKeepPrunedGenParticles(), customiseLHE(), customiseMerging(), and customiseSelecting().

68 def modify_outputModules(process, keep_drop_list = [], module_veto_list = [] ):
69  outputModulesList = [key for key,value in process.outputModules.iteritems()]
70  for outputModule in outputModulesList:
71  if outputModule in module_veto_list:
72  continue
73  outputModule = getattr(process, outputModule)
74  for add_element in keep_drop_list:
75  outputModule.outputCommands.extend(add_element)
76  return process
77 
78 
79 
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68

Variable Documentation

customisers.instance

Definition at line 46 of file customisers.py.

customisers.manipulator_name

Definition at line 39 of file customisers.py.

customisers.module_name

Definition at line 39 of file customisers.py.

Referenced by FastTimerService::PlotsPerJob.book().

customisers.to_bemanipulate

Definition at line 36 of file customisers.py.