CMS 3D CMS Logo

dtChamberMasker_cff.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import FWCore.ParameterSet.Config as cms
3 import sys
4 
5 from SimMuon.DTDigitizer.dtChamberMasker_cfi import dtChamberMasker as _dtChamberMasker
6 
8 
9  if hasattr(process,'muonDTDigis') and hasattr(process,'RawToDigi'):
10 
11  sys.stderr.write("[appendDTChamberMasker] : Found muonDTDigis, applying filter\n")
12 
13  process.preDtDigis = process.muonDTDigis.clone()
14  process.muonDTDigis = _dtChamberMasker.clone()
15 
16  process.muonDTDigis.digiTag = cms.InputTag('preDtDigis')
17 
18  process.filteredDtDigiSequence = cms.Sequence(process.preDtDigis + process.muonDTDigis)
19  process.RawToDigi.replace(process.muonDTDigis, process.filteredDtDigiSequence)
20 
21  if hasattr(process,"dtTriggerEfficiencyMonitor") :
22  process.dtTriggerEfficiencyMonitor.inputTagDDU = 'preDtDigis'
23 
24  if hasattr(process,"RandomNumberGeneratorService") :
25  process.RandomNumberGeneratorService.muonDTDigis = cms.PSet(
26  initialSeed = cms.untracked.uint32(789342)
27  )
28  else :
29  process.RandomNumberGeneratorService = cms.Service(
30  "RandomNumberGeneratorService",
31  muonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
32  )
33 
34  return process
35 
37 
38  if hasattr(process,'hltMuonDTDigis') and \
39  ( hasattr(process,'HLTMuonLocalRecoSequence') or \
40  hasattr(process,'HLTMuonLocalRecoMeanTimerSequence')) :
41 
42  sys.stderr.write("[appendDTChamberMasker] : Found hltMuonDTDigis, applying filter\n")
43 
44  process.preHltDtDigis = process.hltMuonDTDigis.clone()
45  process.hltMuonDTDigis = _dtChamberMasker.clone()
46 
47  process.hltMuonDTDigis.digiTag = "preHltDtDigis"
48 
49  process.filteredHltDtDigiSequence = cms.Sequence(process.preHltDtDigis + process.hltMuonDTDigis)
50  if hasattr(process,'HLTMuonLocalRecoSequence') :
51  print("1")
52  process.HLTMuonLocalRecoSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
53  if hasattr(process,'HLTMuonLocalRecoMeanTimerSequence') :
54  print("2")
55  process.HLTMuonLocalRecoMeanTimerSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
56 
57  process.globalReplace("hltMuonDTDigis",filteredHltDtDigiSequence)
58 
59  if hasattr(process,"RandomNumberGeneratorService") :
60  process.RandomNumberGeneratorService.hltMuonDTDigis = cms.PSet(
61  initialSeed = cms.untracked.uint32(789342)
62  )
63  else :
64  process.RandomNumberGeneratorService = cms.Service(
65  "RandomNumberGeneratorService",
66  hltMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
67  )
68 
69  return process
70 
72 
73  if hasattr(process,'simDtTriggerPrimitiveDigis') and hasattr(process,'SimL1TMuonCommon') :
74 
75  sys.stderr.write("[appendDTChamberMasker] : Found simMuonDtTriggerPrimitivesDigis, applying filter\n")
76 
77  process.preSimDtTriggerDigis = _dtChamberMasker.clone()
78 
79  process.simDtTriggerPrimitiveDigis.digiTag = "preSimDtDigis"
80 
81  process.filteredSimDtTriggerSequence = cms.Sequence(process.preSimDtTriggerDigis + process.simDtTriggerPrimitiveDigis)
82  process.SimL1TMuonCommon.replace(process.simMuonDTDigis, process.filteredSimDtTriggerSequence)
83 
84  if hasattr(process,"RandomNumberGeneratorService") :
85  process.RandomNumberGeneratorService.simMuonDTDigis = cms.PSet(
86  initialSeed = cms.untracked.uint32(789342)
87  )
88  else :
89  process.RandomNumberGeneratorService = cms.Service(
90  "RandomNumberGeneratorService",
91  simMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
92  )
93 
94  return process
def appendDTChamberMaskerAtHLT(process)
def appendDTChamberMaskerBeforeL1Trigger(process)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def appendDTChamberMaskerAtUnpacking(process)