Skip to content

Commit

Permalink
Merge pull request #14363 from bsunanda/Run2-hcx80
Browse files Browse the repository at this point in the history
bsunanda:Run2-hcx80 Get rid of parameter set HcalRelabel
  • Loading branch information
cmsbuild committed May 10, 2016
2 parents cee6ecf + 03e2930 commit e5c7fcd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 22 deletions.
5 changes: 0 additions & 5 deletions Geometry/HcalEventSetup/python/HcalRelabel_cfi.py

This file was deleted.

4 changes: 2 additions & 2 deletions SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py
Expand Up @@ -4,7 +4,7 @@ def customise_HcalPhase0(process):
process.load("CalibCalorimetry/HcalPlugins/Hcal_Conditions_forGlobalTag_cff")

if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
process.mix.digitizers.hcal.HcalReLabel.RelabelHits=cms.untracked.bool(True)
process.mix.digitizers.hcal.TestNumbering=True

process.es_hardcode.HEreCalibCutoff = cms.double(20.) #for aging

Expand Down Expand Up @@ -126,7 +126,7 @@ def customise_Digi(process):
process.mix.digitizers.hcal.he.photoelectronsToAnalog = cms.vdouble([10.]*16)
process.mix.digitizers.hcal.he.pixels = cms.int32(4500*4*2)
process.mix.digitizers.hcal.HFUpgradeQIE = True
process.mix.digitizers.hcal.HcalReLabel.RelabelHits=cms.untracked.bool(True)
process.mix.digitizers.hcal.TestNumbering = True

if hasattr(process,'simHcalDigis'):
process.simHcalDigis.useConfigZSvalues=cms.int32(1)
Expand Down
Expand Up @@ -66,7 +66,7 @@
#HcalTopologyIdealEP.SLHCMode = cms.untracked.bool(True)

#turn on hit relabeling and set depth segmentation
HcalReLabel.RelabelHits = cms.untracked.bool(True)
mix.digitizers.hcal.TestNumbering = cms.bool(True)

#
doAllDigi = cms.Sequence(trDigi+calDigi+muonDigi)
Expand Down
Expand Up @@ -66,7 +66,7 @@
#HcalTopologyIdealEP.SLHCMode = cms.untracked.bool(True)

#turn on hit relabeling and set depth segmentation
HcalReLabel.RelabelHits = cms.untracked.bool(True)
mix.digitizers.hcal.TestNumbering = cms.bool(True)

#
doAllDigi = cms.Sequence(trDigi+calDigi+muonDigi)
Expand Down
2 changes: 1 addition & 1 deletion SimCalorimetry/HcalSimProducers/interface/HcalDigitizer.h
Expand Up @@ -148,7 +148,7 @@ class HcalDigitizer
std::vector<DetId> theHFQIE8DetIds, theHFQIE10DetIds;

bool isZDC,isHCAL,zdcgeo,hbhegeo,hogeo,hfgeo;
bool relabel_;
bool testNumbering_;

std::string hitsProducer_;

Expand Down
@@ -1,6 +1,5 @@
import FWCore.ParameterSet.Config as cms
from SimCalorimetry.HcalSimProducers.hcalSimParameters_cfi import *
from Geometry.HcalEventSetup.HcalRelabel_cfi import HcalReLabel

# make a block so other modules, such as the data mixing module, can
# also run simulation
Expand Down Expand Up @@ -41,8 +40,8 @@
injectTestHits = cms.bool(False),
ChangeResponse = cms.bool(False),
CorrFactorFile = cms.FileInPath("SimCalorimetry/HcalSimProducers/data/calor_corr01.txt"),
HcalReLabel = HcalReLabel,
DelivLuminosity = cms.double(0),
TestNumbering = cms.bool(False),
HEDarkening = cms.bool(False),
HFDarkening = cms.bool(False),
minFCToDelay=cms.double(5.) # old TC model! set to 5 for the new one
Expand Down
17 changes: 8 additions & 9 deletions SimCalorimetry/HcalSimProducers/src/HcalDigitizer.cc
Expand Up @@ -287,10 +287,9 @@ HcalDigitizer::HcalDigitizer(const edm::ParameterSet& ps, edm::ConsumesCollector
}
theZDCDigitizer = new ZDCDigitizer(theZDCResponse, theZDCElectronicsSim, doEmpty);

edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
// std::cout << "Flag to see if Hit Relabeller to be initiated " << relabel_ << std::endl;
if (relabel_) theRelabeller=new HcalHitRelabeller(ps0);
testNumbering_ = ps.getParameter<bool>("TestNumbering");
// std::cout << "Flag to see if Hit Relabeller to be initiated " << testNumbering_ << std::endl;
if (testNumbering_) theRelabeller=new HcalHitRelabeller(ps);

bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
if(doHPDNoise) {
Expand Down Expand Up @@ -458,11 +457,11 @@ void HcalDigitizer::accumulateCaloHits(edm::Handle<std::vector<PCaloHit> > const
hcalHits.reserve(hcalHitsOrig.size());

//evaluate darkening before relabeling
if(m_HEDarkening || m_HFRecalibration){
darkening(hcalHitsOrig);
}
// Relabel PCaloHits if necessary
if (relabel_) {
if (testNumbering_) {
if(m_HEDarkening || m_HFRecalibration){
darkening(hcalHitsOrig);
}
// Relabel PCaloHits if necessary
edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
theRelabeller->process(hcalHitsOrig);
}
Expand Down
2 changes: 1 addition & 1 deletion SimGeneral/MixingModule/python/hcalDigitizer_cfi.py
Expand Up @@ -21,7 +21,7 @@
eras.phase2_hgcal.toModify( hcalDigitizer,
HBHEUpgradeQIE = cms.bool(True),
HFUpgradeQIE = cms.bool(True),
HcalReLabel = dict( RelabelHits = cms.untracked.bool(True) ),
TestNumbering = cms.bool(True),
hb = dict( siPMCells =cms.vint32([1]),
photoelectronsToAnalog = cms.vdouble([10.]*16),
pixels = cms.int32(4500*4*2)
Expand Down

0 comments on commit e5c7fcd

Please sign in to comment.