Skip to content

Commit

Permalink
Merge pull request #24597 from CMSTrackerDPG/fixapvrestorerhybrid
Browse files Browse the repository at this point in the history
Hybrid zero suppression fixes
  • Loading branch information
cmsbuild committed Sep 24, 2018
2 parents ff5b239 + 77d2eda commit 4f2e47a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Configuration/PyReleaseValidation/python/relval_steps.py
Expand Up @@ -1562,7 +1562,7 @@ def lhegensim2017(fragment,howMuch):

steps['HYBRIDRepackHI2015VR']={'--eventcontent':'RAW',
'--datatier':'RAW',
'--conditions':'auto:run2_data',
'--conditions':'auto:run2_hlt_hi',
'--step':'RAW2DIGI,REPACK:DigiToHybridRawRepack',
'--scenario':'HeavyIons',
'--data':'',
Expand Down
Expand Up @@ -4,6 +4,7 @@
def runOnHybridZS(process):
process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
process.load("RecoLocalTracker.SiStripClusterizer.SiStripClusterizer_cfi")
process.siStripZeroSuppression.Algorithms.APVInspectMode = "Hybrid"
zsInputs = process.siStripZeroSuppression.RawDigiProducersList
clusInputs = process.siStripClusters.DigiProducersList
unpackedZS = cms.InputTag("siStripDigis", "ZeroSuppressed")
Expand Down Expand Up @@ -33,7 +34,7 @@ def addHybridEmulationBeforeRepack(process):
zs.Algorithms.APVInspectMode = "HybridEmulation"
zs.Algorithms.APVRestoreMode = ""
zs.Algorithms.CommonModeNoiseSubtractionMode = 'Median'
zs.Algorithms.MeanCM = 512
zs.Algorithms.MeanCM = 0
zs.Algorithms.DeltaCMThreshold = 20
zs.Algorithms.Use10bitsTruncation = True
zs.RawDigiProducersList = cms.VInputTag(cms.InputTag("siStripDigis", "VirginRaw"))
Expand Down
Expand Up @@ -46,8 +46,8 @@ SiStripAPVRestorer::SiStripAPVRestorer(const edm::ParameterSet& conf):
size_window_(conf.getParameter<int>("sizeWindow")),
width_cluster_(conf.getParameter<int>("widthCluster"))
{
if ( restoreAlgo_ == "BaselineFollower" && inspectAlgo_ != "BaselineFollower" )
throw cms::Exception("Incompatible Algorithm") << "The BaselineFollower restore method requires the BaselineFollower inspect method";
if ( restoreAlgo_ == "BaselineFollower" && inspectAlgo_ != "BaselineFollower" && inspectAlgo_ != "Hybrid" )
throw cms::Exception("Incompatible Algorithm") << "The BaselineFollower restore method requires the BaselineFollower (or Hybrid) inspect method";
}


Expand Down Expand Up @@ -323,8 +323,8 @@ inline uint16_t SiStripAPVRestorer::hybridEmulationInspect(uint16_t firstAPV, co
if ( useRealMeanCM_ && ( std::end(meanCMmap_) != itCMMap ) )
MeanAPVCM = itCMMap->second[iAPV];

const float DeltaCM = median_[iAPV] - MeanAPVCM;
if ( ( DeltaCM < 0 ) && ( std::abs(DeltaCM) > deltaCMThreshold_ ) ) {
const float DeltaCM = median_[iAPV] - (MeanAPVCM+1024)/2;
if ( ( DeltaCM < 0 ) && ( std::abs(DeltaCM) > deltaCMThreshold_/2 ) ) {
apvFlags_[iAPV] = "HybridEmulation";
++nAPVflagged;
}
Expand Down

0 comments on commit 4f2e47a

Please sign in to comment.