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 144 of file customisers.py.

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

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

Referenced by customiseLHEandCleaning().

◆ customiseFilterTTbartoMuMu()

def customisers.customiseFilterTTbartoMuMu (   process)

Definition at line 458 of file customisers.py.

458 def customiseFilterTTbartoMuMu(process):
459  process.load("TauAnalysis.MCEmbeddingTools.TTbartoMuMuGenFilter_cfi")
460  process.MCFilter = cms.Path(process.TTbartoMuMuGenFilter)
461  return customiseMCFilter(process)
462 

References customiseMCFilter().

◆ customiseFilterZToMuMu()

def customisers.customiseFilterZToMuMu (   process)

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

Definition at line 452 of file customisers.py.

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

◆ customiseGenerator()

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

Definition at line 216 of file customisers.py.

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

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

Referenced by customiseGenerator_Reselect().

◆ customiseGenerator_Reselect()

def customisers.customiseGenerator_Reselect (   process)

Definition at line 254 of file customisers.py.

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

References customiseGenerator().

◆ customiseKeepPrunedGenParticles()

def customisers.customiseKeepPrunedGenParticles (   process,
  reselect = False 
)

Definition at line 266 of file customisers.py.

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

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

◆ customiseLHE()

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

Definition at line 198 of file customisers.py.

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

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

Referenced by customiseLHEandCleaning().

◆ customiseLHEandCleaning()

def customisers.customiseLHEandCleaning (   process,
  reselect = False 
)

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

Definition at line 427 of file customisers.py.

427 def customiseLHEandCleaning(process,reselect=False):
428  process._Process__name = "LHEembeddingCLEAN"
429  process = customiseCleaning(process,changeProcessname=False,reselect=reselect)
430  process = customiseLHE(process,changeProcessname=False,reselect=reselect)
431  return process
432 

References customiseCleaning(), and customiseLHE().

Referenced by customiseLHEandCleaning_Reselect().

◆ customiseLHEandCleaning_Reselect()

def customisers.customiseLHEandCleaning_Reselect (   process)

Definition at line 433 of file customisers.py.

434  return customiseLHEandCleaning(process,reselect=True)
435 

References customiseLHEandCleaning().

◆ customiseMCFilter()

def customisers.customiseMCFilter (   process)

Definition at line 463 of file customisers.py.

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

Referenced by customiseFilterTTbartoMuMu().

◆ customiseMerging()

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

Definition at line 324 of file customisers.py.

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

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

Referenced by customiseMerging_Reselect().

◆ customiseMerging_Reselect()

def customisers.customiseMerging_Reselect (   process,
  changeProcessname = True 
)

Definition at line 422 of file customisers.py.

422 def customiseMerging_Reselect(process, changeProcessname=True):
423  return customiseMerging(process, changeProcessname=changeProcessname, reselect=True)
424 

References customiseMerging().

◆ customiseSelecting()

def customisers.customiseSelecting (   process,
  reselect = False 
)

Definition at line 98 of file customisers.py.

98 def customiseSelecting(process,reselect=False):
99  if reselect:
100  process._Process__name = "RESELECT"
101  dataTier="RESELECT"
102  else:
103  process._Process__name = "SELECT"
104  dataTier="SELECT"
105 
106  process.load('TauAnalysis.MCEmbeddingTools.SelectingProcedure_cff')
107  # don't rekey TrackExtra refs because the full original collections are anyways stored
108  process.slimmedMuons.trackExtraAssocs = []
109  process.patMuonsAfterKinCuts.src = cms.InputTag("slimmedMuons","",dataTier)
110  process.patMuonsAfterID = process.patMuonsAfterLooseID.clone()
111 
112  process.selecting = cms.Path(process.makePatMuonsZmumuSelection)
113  process.schedule.insert(-1, process.selecting)
114 
115  outputModulesList = [key for key,value in six.iteritems(process.outputModules)]
116  for outputModule in outputModulesList:
117  outputModule = getattr(process, outputModule)
118  outputModule.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("selecting"))
119  outputModule.outputCommands.extend(keepSelected(dataTier))
120 
121  process = customisoptions(process)
122  return modify_outputModules(process,[keepSelected(dataTier)])
123 

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

Referenced by customiseSelecting_Reselect().

◆ customiseSelecting_Reselect()

def customisers.customiseSelecting_Reselect (   process)

Definition at line 124 of file customisers.py.

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

References customiseSelecting().

◆ customisoptions()

def customisers.customisoptions (   process)

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

Definition at line 438 of file customisers.py.

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

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 471 of file customisers.py.

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

References print().

◆ keepCleaned()

def customisers.keepCleaned ( )

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

Definition at line 128 of file customisers.py.

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

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

◆ keepLHE()

def customisers.keepLHE ( )

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

Definition at line 175 of file customisers.py.

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

Referenced by customiseLHE().

◆ keepMerged()

def customisers.keepMerged (   dataTier = "SELECT")

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

Definition at line 258 of file customisers.py.

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

Referenced by customiseKeepPrunedGenParticles(), and customiseMerging().

◆ keepSelected()

def customisers.keepSelected (   dataTier)

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

Definition at line 83 of file customisers.py.

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

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

◆ keepSimulated()

def customisers.keepSimulated ( )

Definition at line 182 of file customisers.py.

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

Referenced by customiseGenerator().

◆ modify_outputModules()

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

Definition at line 69 of file customisers.py.

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

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

Variable Documentation

◆ instance

customisers.instance

Definition at line 47 of file customisers.py.

◆ manipulator_name

customisers.manipulator_name

Definition at line 40 of file customisers.py.

◆ module_name

customisers.module_name

Definition at line 40 of file customisers.py.

Referenced by FastTimerService::PlotsPerJob.book().

◆ steps

customisers.steps

◆ to_bemanipulate

customisers.to_bemanipulate

Definition at line 37 of file customisers.py.

customisers.keepLHE
def keepLHE()
Customizer for simulaton ###########################.
Definition: customisers.py:175
customisers.customiseKeepPrunedGenParticles
def customiseKeepPrunedGenParticles(process, reselect=False)
Definition: customisers.py:266
customisers.customiseMCFilter
def customiseMCFilter(process)
Definition: customisers.py:463
customisers.customiseLHEandCleaning
def customiseLHEandCleaning(process, reselect=False)
cross Customizers ###########################
Definition: customisers.py:427
customisers.customiseLHEandCleaning_Reselect
def customiseLHEandCleaning_Reselect(process)
Definition: customisers.py:433
customisers.keepSimulated
def keepSimulated()
Definition: customisers.py:182
customisers.customiseLHE
def customiseLHE(process, changeProcessname=True, reselect=False)
Definition: customisers.py:198
customisers.customiseSelecting
def customiseSelecting(process, reselect=False)
Definition: customisers.py:98
customisers.customiseFilterZToMuMu
def customiseFilterZToMuMu(process)
MC specific Customizer ###########################.
Definition: customisers.py:452
customisers.modify_outputModules
def modify_outputModules(process, keep_drop_list=[], module_veto_list=[])
Definition: customisers.py:69
customisers.fix_input_tags
def fix_input_tags(process, formodules=["generalTracks","cscSegments","dt4DSegments","rpcRecHits"])
Definition: customisers.py:471
customisers.keepSelected
def keepSelected(dataTier)
Customizer for Selecting ###########################.
Definition: customisers.py:83
default_cfi
customisers.customiseGenerator_Reselect
def customiseGenerator_Reselect(process)
Definition: customisers.py:254
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:144
customisers.customiseFilterTTbartoMuMu
def customiseFilterTTbartoMuMu(process)
Definition: customisers.py:458
customisers.customiseSelecting_Reselect
def customiseSelecting_Reselect(process)
Definition: customisers.py:124
customisers.keepMerged
def keepMerged(dataTier="SELECT")
Customizer for merging ###########################.
Definition: customisers.py:258
customisers.customiseMerging_Reselect
def customiseMerging_Reselect(process, changeProcessname=True)
Definition: customisers.py:422
customisers.customiseMerging
def customiseMerging(process, changeProcessname=True, reselect=False)
Definition: customisers.py:324
customisers.keepCleaned
def keepCleaned()
Customizer for cleaining ###########################.
Definition: customisers.py:128
customisers.customiseGenerator
def customiseGenerator(process, changeProcessname=True, reselect=False)
Definition: customisers.py:216
customisers.customisoptions
def customisoptions(process)
additionla Customizer ###########################
Definition: customisers.py:438