forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add customization function to remove SiStrip DCS checks from DQM and …
…modify 141.032 for re-reco without DCS
- Loading branch information
Showing
3 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
DQM/SiStripMonitorClient/python/customizeForNoTrackerDCS.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
Module to remove SiStrip DCS checks in Strip and Tracking Monitors | ||
""" | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
|
||
def producers_by_type(process, *types): | ||
return [module for module in process._Process__producers.values() if module._TypedParameterizable__type in types] | ||
|
||
def removeDCSChecks(process, acceptedParts): | ||
print('WARNING: removing SiStrip DCS Checks in Strip and Tracking Monitors') | ||
|
||
for producerType in ['SiStripMonitorTrack', 'SiStripMonitorCluster']: | ||
for producer in producers_by_type(process, producerType): | ||
producer.UseDCSFiltering = cms.bool(False) | ||
|
||
for producer in producers_by_type(process, 'SiStripMonitorCluster'): | ||
producer.StripDCSfilter.dcsPartitions = cms.vint32(acceptedParts) | ||
|
||
for producer in producers_by_type(process, 'TrackingMonitor'): | ||
producer.genericTriggerEventPSet.dcsPartitions = cms.vint32(acceptedParts) | ||
|
||
return process | ||
|
||
def removeStripDCSChecks(process): | ||
removeDCSChecks(process, [28, 29]) # keep 28-29: pixel | ||
return process | ||
|
||
def removePixelDCSChecks(process): | ||
removeDCSChecks(process, [24, 25, 26, 27]) # keep 24-27: strip | ||
return process | ||
|
||
def removeTrackerDCSChecks(process): | ||
removeDCSChecks(process, []) # do not keep anything | ||
return process |