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

◆ customiseCleaning()

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

Definition at line 143 of file customisers.py.

143 def customiseCleaning(process, changeProcessname=True,reselect=False):
144  if changeProcessname:
145  process._Process__name = "CLEAN"
146  if reselect:
147  dataTier="RESELECT"
148  else:
149  dataTier="SELECT"
150 
151  from TrackingTools.TrackAssociator.default_cfi import TrackAssociatorParameterBlock
152  TrackAssociatorParameterBlock.TrackAssociatorParameters.CSCSegmentCollectionLabel = cms.InputTag("cscSegments","",dataTier)
153  TrackAssociatorParameterBlock.TrackAssociatorParameters.CaloTowerCollectionLabel = cms.InputTag("towerMaker","",dataTier)
154  TrackAssociatorParameterBlock.TrackAssociatorParameters.DTRecSegment4DCollectionLabel = cms.InputTag("dt4DSegments","",dataTier)
155  TrackAssociatorParameterBlock.TrackAssociatorParameters.EBRecHitCollectionLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB",dataTier)
156  TrackAssociatorParameterBlock.TrackAssociatorParameters.EERecHitCollectionLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE",dataTier)
157  TrackAssociatorParameterBlock.TrackAssociatorParameters.HBHERecHitCollectionLabel = cms.InputTag("hbhereco","",dataTier)
158  TrackAssociatorParameterBlock.TrackAssociatorParameters.HORecHitCollectionLabel = cms.InputTag("horeco","",dataTier)
159 
160 
161  MuonImput = cms.InputTag("selectedMuonsForEmbedding","","")
162  for akt_manimod in to_bemanipulate:
163  if "CLEAN" in akt_manimod.steps:
164  oldCollections_in = cms.VInputTag()
165  for instance in akt_manimod.instance:
166  oldCollections_in.append(cms.InputTag(akt_manimod.module_name,instance,dataTier))
167  setattr(process, akt_manimod.module_name, cms.EDProducer(akt_manimod.cleaner_name,MuonCollection = MuonImput,TrackAssociatorParameters = TrackAssociatorParameterBlock.TrackAssociatorParameters,oldCollection = oldCollections_in))
168  process.ecalPreshowerRecHit.TrackAssociatorParameters.usePreshower = cms.bool(True)
169  process = customisoptions(process)
170  return modify_outputModules(process,[keepSelected(dataTier),keepCleaned()],["MINIAODoutput"])
171 
172 

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

Referenced by customiseLHEandCleaning().

◆ customiseFilterTTbartoMuMu()

def customisers.customiseFilterTTbartoMuMu (   process)

Definition at line 461 of file customisers.py.

461 def customiseFilterTTbartoMuMu(process):
462  process.load("TauAnalysis.MCEmbeddingTools.TTbartoMuMuGenFilter_cfi")
463  process.MCFilter = cms.Path(process.TTbartoMuMuGenFilter)
464  return customiseMCFilter(process)
465 

References customiseMCFilter().

◆ customiseFilterZToMuMu()

def customisers.customiseFilterZToMuMu (   process)

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

Definition at line 455 of file customisers.py.

455 def customiseFilterZToMuMu(process):
456  process.load("TauAnalysis.MCEmbeddingTools.DYToMuMuGenFilter_cfi")
457  process.ZToMuMuFilter = cms.Path(process.dYToMuMuGenFilter)
458  process.schedule.insert(-1,process.ZToMuMuFilter)
459  return process
460 

◆ customiseGenerator()

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

Definition at line 215 of file customisers.py.

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

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

Referenced by customiseGenerator_Reselect().

◆ customiseGenerator_Reselect()

def customisers.customiseGenerator_Reselect (   process)

Definition at line 253 of file customisers.py.

253 def customiseGenerator_Reselect(process):
254  return customiseGenerator(process,reselect=True)
255 

References customiseGenerator().

◆ customiseKeepPrunedGenParticles()

def customisers.customiseKeepPrunedGenParticles (   process,
  reselect = False 
)

Definition at line 265 of file customisers.py.

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

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

◆ customiseLHE()

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

Definition at line 197 of file customisers.py.

197 def customiseLHE(process, changeProcessname=True,reselect=False):
198  if reselect:
199  dataTier="RESELECT"
200  else:
201  dataTier="SELECT"
202  if changeProcessname:
203  process._Process__name = "LHEembedding"
204  process.load('TauAnalysis.MCEmbeddingTools.EmbeddingLHEProducer_cfi')
205  if reselect:
206  process.externalLHEProducer.vertices=cms.InputTag("offlineSlimmedPrimaryVertices","","RESELECT")
207  process.lheproduction = cms.Path(process.makeexternalLHEProducer)
208  process.schedule.insert(0,process.lheproduction)
209 
210 
211  process = customisoptions(process)
212  return modify_outputModules(process,[keepSelected(dataTier),keepCleaned(), keepLHE()],["MINIAODoutput"])
213 
214 

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

Referenced by customiseLHEandCleaning().

◆ customiseLHEandCleaning()

def customisers.customiseLHEandCleaning (   process,
  reselect = False 
)

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

Definition at line 430 of file customisers.py.

430 def customiseLHEandCleaning(process,reselect=False):
431  process._Process__name = "LHEembeddingCLEAN"
432  process = customiseCleaning(process,changeProcessname=False,reselect=reselect)
433  process = customiseLHE(process,changeProcessname=False,reselect=reselect)
434  return process
435 

References customiseCleaning(), and customiseLHE().

Referenced by customiseLHEandCleaning_Reselect().

◆ customiseLHEandCleaning_Reselect()

def customisers.customiseLHEandCleaning_Reselect (   process)

Definition at line 436 of file customisers.py.

437  return customiseLHEandCleaning(process,reselect=True)
438 

References customiseLHEandCleaning().

◆ customiseMCFilter()

def customisers.customiseMCFilter (   process)

Definition at line 466 of file customisers.py.

466 def customiseMCFilter(process):
467  process.schedule.insert(-1,process.MCFilter)
468  outputModulesList = [key for key,value in process.outputModules.items()]
469  for outputModule in outputModulesList:
470  outputModule = getattr(process, outputModule)
471  outputModule.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("MCFilter"))
472  return process
473 

Referenced by customiseFilterTTbartoMuMu().

◆ customiseMerging()

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

Definition at line 323 of file customisers.py.

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

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

Referenced by customiseMerging_Reselect().

◆ customiseMerging_Reselect()

def customisers.customiseMerging_Reselect (   process,
  changeProcessname = True 
)

Definition at line 425 of file customisers.py.

425 def customiseMerging_Reselect(process, changeProcessname=True):
426  return customiseMerging(process, changeProcessname=changeProcessname, reselect=True)
427 

References customiseMerging().

◆ customiseSelecting()

def customisers.customiseSelecting (   process,
  reselect = False 
)

Definition at line 97 of file customisers.py.

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  # don't rekey TrackExtra refs because the full original collections are anyways stored
107  process.slimmedMuons.trackExtraAssocs = []
108  process.patMuonsAfterKinCuts.src = cms.InputTag("slimmedMuons","",dataTier)
109  process.patMuonsAfterID = process.patMuonsAfterLooseID.clone()
110 
111  process.selecting = cms.Path(process.makePatMuonsZmumuSelection)
112  process.schedule.insert(-1, process.selecting)
113 
114  outputModulesList = [key for key,value in process.outputModules.items()]
115  for outputModule in outputModulesList:
116  outputModule = getattr(process, outputModule)
117  outputModule.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("selecting"))
118  outputModule.outputCommands.extend(keepSelected(dataTier))
119 
120  process = customisoptions(process)
121  return modify_outputModules(process,[keepSelected(dataTier)])
122 

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

Referenced by customiseSelecting_Reselect().

◆ customiseSelecting_Reselect()

def customisers.customiseSelecting_Reselect (   process)

Definition at line 123 of file customisers.py.

123 def customiseSelecting_Reselect(process):
124  return customiseSelecting(process,reselect=True)
125 

References customiseSelecting().

◆ customisoptions()

def customisers.customisoptions (   process)

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

Definition at line 441 of file customisers.py.

441 def customisoptions(process):
442  if not hasattr(process, "options"):
443  process.options = cms.untracked.PSet()
444  process.options.emptyRunLumiMode = cms.untracked.string('doNotHandleEmptyRunsAndLumis')
445  if not hasattr(process, "bunchSpacingProducer"):
446  process.bunchSpacingProducer = cms.EDProducer("BunchSpacingProducer")
447  process.bunchSpacingProducer.bunchSpacingOverride = cms.uint32(25)
448  process.bunchSpacingProducer.overrideBunchSpacing = cms.bool(True)
449  process.options.numberOfThreads = cms.untracked.uint32(1)
450  process.options.numberOfStreams = cms.untracked.uint32(0)
451  return process
452 

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

◆ fix_input_tags()

def customisers.fix_input_tags (   process,
  formodules = ["generalTracks","cscSegments","dt4DSegments","rpcRecHits"] 
)

Definition at line 474 of file customisers.py.

474 def fix_input_tags(process, formodules = ["generalTracks","cscSegments","dt4DSegments","rpcRecHits"]):
475  def change_tags_process(test_input):
476  if isinstance(test_input, cms.InputTag):
477  if test_input.getModuleLabel() in formodules:
478  test_input.setProcessName(process._Process__name)
479 
480  def search_for_tags(pset):
481  if isinstance(pset, dict):
482  for key in pset:
483  if isinstance(pset[key], cms.VInputTag):
484  for akt_inputTag in pset[key]:
485  change_tags_process(akt_inputTag)
486  elif isinstance(pset[key], cms.PSet):
487  search_for_tags(pset[key].__dict__)
488  elif isinstance(pset[key], cms.VPSet):
489  for akt_pset in pset[key]:
490  search_for_tags(akt_pset.__dict__)
491  else:
492  change_tags_process(pset[key])
493  else:
494  print("must be python dict not a ",type(pset))
495 
496  for module in process.producers_():
497  search_for_tags(getattr(process, module).__dict__)
498  for module in process.filters_():
499  search_for_tags(getattr(process, module).__dict__)
500  for module in process.analyzers_():
501  search_for_tags(getattr(process, module).__dict__)
502 
503  return process

References print().

◆ keepCleaned()

def customisers.keepCleaned ( )

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

Definition at line 127 of file customisers.py.

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

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

◆ keepLHE()

def customisers.keepLHE ( )

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

Definition at line 174 of file customisers.py.

174 def keepLHE():
175  ret_vstring = cms.untracked.vstring()
176  ret_vstring.append("keep *_externalLHEProducer_*_LHEembedding")
177  ret_vstring.append("keep *_externalLHEProducer_*_LHEembeddingCLEAN")
178  return ret_vstring
179 
180 

Referenced by customiseLHE().

◆ keepMerged()

def customisers.keepMerged (   dataTier = "SELECT")

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

Definition at line 257 of file customisers.py.

257 def keepMerged(dataTier="SELECT"):
258  ret_vstring = cms.untracked.vstring()
259  ret_vstring.append("drop *_*_*_"+dataTier)
260  ret_vstring.append("keep *_prunedGenParticles_*_MERGE")
261  ret_vstring.append("keep *_generator_*_SIMembedding")
262  return ret_vstring
263 
264 

Referenced by customiseKeepPrunedGenParticles(), and customiseMerging().

◆ keepSelected()

def customisers.keepSelected (   dataTier)

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

Definition at line 82 of file customisers.py.

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 

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

◆ keepSimulated()

def customisers.keepSimulated ( )

Definition at line 181 of file customisers.py.

181 def keepSimulated():
182  ret_vstring = cms.untracked.vstring()
183  for akt_manimod in to_bemanipulate:
184  if "MERGE" in akt_manimod.steps:
185  ret_vstring.append("keep *_"+akt_manimod.module_name+"_*_SIMembedding")
186  ret_vstring.append("keep *_genParticles_*_SIMembedding")
187  ret_vstring.append("keep *_standAloneMuons_*_SIMembedding")
188  ret_vstring.append("keep *_glbTrackQual_*_SIMembedding")
189  ret_vstring.append("keep *_generator_*_SIMembedding")
190  ret_vstring.append("keep *_addPileupInfo_*_SIMembedding")
191  ret_vstring.append("keep *_slimmedAddPileupInfo_*_*")
192  return ret_vstring
193 
194 
195 
196 

Referenced by customiseGenerator().

◆ modify_outputModules()

def customisers.modify_outputModules (   process,
  keep_drop_list = [],
  module_veto_list = [] 
)

Definition at line 68 of file customisers.py.

68 def modify_outputModules(process, keep_drop_list = [], module_veto_list = [] ):
69  outputModulesList = [key for key,value in process.outputModules.items()]
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 

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

Variable Documentation

◆ instance

customisers.instance

Definition at line 46 of file customisers.py.

◆ manipulator_name

customisers.manipulator_name

Definition at line 39 of file customisers.py.

◆ module_name

customisers.module_name

Definition at line 39 of file customisers.py.

Referenced by FastTimerService::PlotsPerJob.book().

◆ steps

customisers.steps

◆ to_bemanipulate

customisers.to_bemanipulate

Definition at line 36 of file customisers.py.

customisers.keepLHE
def keepLHE()
Customizer for simulaton ###########################.
Definition: customisers.py:174
customisers.customiseKeepPrunedGenParticles
def customiseKeepPrunedGenParticles(process, reselect=False)
Definition: customisers.py:265
customisers.customiseMCFilter
def customiseMCFilter(process)
Definition: customisers.py:466
customisers.customiseLHEandCleaning
def customiseLHEandCleaning(process, reselect=False)
cross Customizers ###########################
Definition: customisers.py:430
customisers.customiseLHEandCleaning_Reselect
def customiseLHEandCleaning_Reselect(process)
Definition: customisers.py:436
customisers.keepSimulated
def keepSimulated()
Definition: customisers.py:181
customisers.customiseLHE
def customiseLHE(process, changeProcessname=True, reselect=False)
Definition: customisers.py:197
customisers.customiseSelecting
def customiseSelecting(process, reselect=False)
Definition: customisers.py:97
customisers.customiseFilterZToMuMu
def customiseFilterZToMuMu(process)
MC specific Customizer ###########################.
Definition: customisers.py:455
customisers.modify_outputModules
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:68
customisers.fix_input_tags
def fix_input_tags(process, formodules=["generalTracks","cscSegments","dt4DSegments","rpcRecHits"])
Definition: customisers.py:474
customisers.keepSelected
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:82
default_cfi
customisers.customiseGenerator_Reselect
def customiseGenerator_Reselect(process)
Definition: customisers.py:253
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
customisers.customiseCleaning
def customiseCleaning(process, changeProcessname=True, reselect=False)
Definition: customisers.py:143
customisers.customiseFilterTTbartoMuMu
def customiseFilterTTbartoMuMu(process)
Definition: customisers.py:461
customisers.customiseSelecting_Reselect
def customiseSelecting_Reselect(process)
Definition: customisers.py:123
customisers.keepMerged
def keepMerged(dataTier="SELECT")
Customizer for merging ###########################.
Definition: customisers.py:257
customisers.customiseMerging_Reselect
def customiseMerging_Reselect(process, changeProcessname=True)
Definition: customisers.py:425
customisers.customiseMerging
def customiseMerging(process, changeProcessname=True, reselect=False)
Definition: customisers.py:323
customisers.keepCleaned
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:127
customisers.customiseGenerator
def customiseGenerator(process, changeProcessname=True, reselect=False)
Definition: customisers.py:215
customisers.customisoptions
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:441