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.RawToDigiTask.add(process.preDtDigis)
19 
20  if hasattr(process,"dtTriggerEfficiencyMonitor") :
21  process.dtTriggerEfficiencyMonitor.inputTagDDU = 'preDtDigis'
22 
23  if hasattr(process,"RandomNumberGeneratorService") :
24  process.RandomNumberGeneratorService.muonDTDigis = cms.PSet(
25  initialSeed = cms.untracked.uint32(789342)
26  )
27  else :
28  process.RandomNumberGeneratorService = cms.Service(
29  "RandomNumberGeneratorService",
30  muonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
31  )
32 
33  return process
34 
36 
37  if hasattr(process,'hltMuonDTDigis') and \
38  ( hasattr(process,'HLTMuonLocalRecoSequence') or \
39  hasattr(process,'HLTMuonLocalRecoMeanTimerSequence')) :
40 
41  sys.stderr.write("[appendDTChamberMasker] : Found hltMuonDTDigis, applying filter\n")
42 
43  process.preHltDtDigis = process.hltMuonDTDigis.clone()
44  process.hltMuonDTDigis = _dtChamberMasker.clone()
45 
46  process.hltMuonDTDigis.digiTag = "preHltDtDigis"
47 
48  process.filteredHltDtDigiSequence = cms.Sequence(process.preHltDtDigis + process.hltMuonDTDigis)
49  if hasattr(process,'HLTMuonLocalRecoSequence') :
50  print("1")
51  process.HLTMuonLocalRecoSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
52  if hasattr(process,'HLTMuonLocalRecoMeanTimerSequence') :
53  print("2")
54  process.HLTMuonLocalRecoMeanTimerSequence.replace(process.hltMuonDTDigis, process.filteredHltDtDigiSequence)
55 
56  process.globalReplace("hltMuonDTDigis",filteredHltDtDigiSequence)
57 
58  if hasattr(process,"RandomNumberGeneratorService") :
59  process.RandomNumberGeneratorService.hltMuonDTDigis = cms.PSet(
60  initialSeed = cms.untracked.uint32(789342)
61  )
62  else :
63  process.RandomNumberGeneratorService = cms.Service(
64  "RandomNumberGeneratorService",
65  hltMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
66  )
67 
68  return process
69 
71 
72  if hasattr(process,'simDtTriggerPrimitiveDigis') and hasattr(process,'SimL1TMuonCommon') :
73 
74  sys.stderr.write("[appendDTChamberMasker] : Found simMuonDtTriggerPrimitivesDigis, applying filter\n")
75 
76  process.preSimDtTriggerDigis = _dtChamberMasker.clone()
77 
78  process.simDtTriggerPrimitiveDigis.digiTag = "preSimDtDigis"
79 
80  process.filteredSimDtTriggerSequence = cms.Sequence(process.preSimDtTriggerDigis + process.simDtTriggerPrimitiveDigis)
81  process.SimL1TMuonCommon.replace(process.simMuonDTDigis, process.filteredSimDtTriggerSequence)
82 
83  if hasattr(process,"RandomNumberGeneratorService") :
84  process.RandomNumberGeneratorService.simMuonDTDigis = cms.PSet(
85  initialSeed = cms.untracked.uint32(789342)
86  )
87  else :
88  process.RandomNumberGeneratorService = cms.Service(
89  "RandomNumberGeneratorService",
90  simMuonDTDigis = cms.PSet(initialSeed = cms.untracked.uint32(789342))
91  )
92 
93  return process
dtChamberMasker_cff.appendDTChamberMaskerAtUnpacking
def appendDTChamberMaskerAtUnpacking(process)
Definition: dtChamberMasker_cff.py:7
dtChamberMasker_cff.appendDTChamberMaskerAtHLT
def appendDTChamberMaskerAtHLT(process)
Definition: dtChamberMasker_cff.py:35
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
dtChamberMasker_cff.appendDTChamberMaskerBeforeL1Trigger
def appendDTChamberMaskerBeforeL1Trigger(process)
Definition: dtChamberMasker_cff.py:70