Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBHE: Fix uninitialized vectors (to avoid crash) #15695

Merged
merged 1 commit into from Sep 3, 2016

Conversation

mariadalfonso
Copy link
Contributor

@mariadalfonso mariadalfonso commented Sep 1, 2016

@kpedro88 @slava77 @igv4321
Fixed crash due to uninitialized vectors, due to #15499
Pass the runTheMatrix.py -l 140.53

  • updated some switch inside for HPD/siPM qie8-qui10

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 1, 2016

A new Pull Request was created by @mariadalfonso for CMSSW_8_1_X.

It involves the following packages:

RecoLocalCalo/HcalRecAlgos

@cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@argiro this is something you requested to watch as well.
@slava77, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

if(channelData.id().subdet() == HcalSubdetector::HcalBarrel) noiseADCArr[ip] = psfPtr_->sigmaHPDQIE8(chargeArr[ip]);
if(channelData.id().subdet() == HcalSubdetector::HcalEndcap) noiseADCArr[ip] = psfPtr_->sigmaSiPMQIE10(chargeArr[ip]);
if(!channelData.hasTimeInfo()) noiseADCArr[ip] = psfPtr_->sigmaHPDQIE8(chargeArr[ip]);
if(channelData.hasTimeInfo()) noiseADCArr[ip] = psfPtr_->sigmaSiPMQIE10(chargeArr[ip]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is technically a new feature.
The code looks more correct for the completed phase-1 (HB as well).
... isn't it going to be QIE11, actually? Consider changing the name of the methods to either QIExx neutral or simply add the same method with QIE11 in the name if they are identical anyways (but may need to be different at some point for some reason)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[posted too soon]
this is technically a new feature. [... ]
Please make sure to note this in the PR description.

@slava77
Copy link
Contributor

slava77 commented Sep 1, 2016

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 1, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/14890/console

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 1, 2016

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 1, 2016

@@ -340,6 +341,13 @@ void PulseShapeFitOOTPileupCorrection::apply(const CaloSamples & cs,
fitParsVec.push_back(0.);
fitParsVec.push_back(999.);
fitParsVec.push_back(false);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the old behavior is restored this way: old version (pre10) passed a vector of parameters of size 1 on output and in this case the default settings (time = -9999 and ampl = 0) were used. OK.

Note that this method is called with ts4Min == 0 and it looks like we end up in this last "else" only if tsTOTen == 0.
Is this case singled out for a reason or was it an old bug in the method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slava77 This extra else was in practice done inside the producer where the size of the returned vector was checked.
https://github.com/cms-sw/cmssw/blob/CMSSW_8_0_X/RecoLocalCalo/HcalRecAlgos/src/HcalSimpleRecAlgo.cc#L366-L369

The initial parameters I pick (time = -9999 and ampl = 0) are basically this one
https://github.com/cms-sw/cmssw/blob/CMSSW_8_0_X/RecoLocalCalo/HcalRecAlgos/src/HcalSimpleRecAlgo.cc#L322-L326

For now I just restored the old behavior, there is no need to single out this case.
I prefer to fix this workflow crash now. I can came back to this later, but prefer to have new feature in later PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mariadalfonso
Thanks for confirming that tsTOTen == 0 doesn't need to be singled out.
It can indeed be addressed later.

@slava77
Copy link
Contributor

slava77 commented Sep 3, 2016

+1

for #15695 8be2d3b

  • changes are in line with the description
  • jenkins tests pass (140.53 workflows which crashes is still disabled for an unrelated reason)
  • local tests confirm that 140.53 breaks in the baseline and runs with this PR applied

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2016

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants