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

PileupJetId falling back to Muon::bestTrack for PFCandidate muon without a trackRef #7273

Conversation

slava77
Copy link
Contributor

@slava77 slava77 commented Jan 20, 2015

Fixes a crash in PileupJetId https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc6_amd64_gcc491/CMSSW_7_4_X_2015-01-18-0200/pyRelValMatrixLogs/run/50202.0_TTbar_13+TTbar_13INPUT+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15+MINIAODMCUP1550/step5_TTbar_13+TTbar_13INPUT+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15+MINIAODMCUP1550.log

Recent change in
ce1863b#diff-34b721ce73bd0269273004088c8a715fL400

- reco::Track impactTrack = (lPack==nullptr)?(*pfTrk):(lPack->pseudoTrack());
+ const reco::Track& impactTrack = (lPack==nullptr)?(*pfTrk):(lPack->pseudoTrack());

exposed a problem with pfTrk being a nullptr and we
With the const ref used now we end up with an invalid reference and a segfault.

It's curious that the result of the following depends on optimization flags:

#include  <iostream>

class AS {
public:
  float x;
};

int main(){
  AS* anullP = nullptr;
  AS anullV = *anullP;
  std::cout<<"Really: "<<anullV.x<<std::endl;

  return 0;
}

gives:

gcc -o a.exe test_null.cc -lstdc++ -std=c++11 -O0
~>./a.exe 
Segmentation fault: 11
gcc -o a.exe test_null.cc -lstdc++ -std=c++11 -O1
~>./a.exe 
Really: 0

@slava77
Copy link
Contributor Author

slava77 commented Jan 20, 2015

@cmsbuild please test

@cmsbuild cmsbuild added this to the Next CMSSW_7_4_X milestone Jan 20, 2015
@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @slava77 (Slava Krutelyov) for CMSSW_7_4_X.

PileupJetId falling back to Muon::bestTrack for PFCandidate muon without a trackRef

It involves the following packages:

RecoJets/JetProducers

@cmsbuild, @cvuosalo, @nclopezo, @slava77 can you please review it and eventually sign? Thanks.
@rappoccio, @ahinzmann, @TaiSakuma, @yslai, @nhanvtran, @schoef, @mariadalfonso this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.

@slava77
Copy link
Contributor Author

slava77 commented Jan 20, 2015

+1

for #7273 c51260b
tested in CMSSW_7_4_X_2015-01-18-0200 test area sign492-devel
the affected producer runs only in the miniAOD step.
50202 now runs ok to completion.

@mmarionncern @TaiSakuma
Tai and Matthieu, please check that this king of muons actually make sense for the algorithm, the algorithm doesn't really give a way to skip the candidate, something should be done to every jet constituent in this case.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes or unless it breaks tests.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes (tests are also fine). This pull request will be automatically merged.

cmsbuild added a commit that referenced this pull request Jan 20, 2015
…-PUPI-wf50202

PileupJetId falling back to Muon::bestTrack for PFCandidate muon without a trackRef
@cmsbuild cmsbuild merged commit 323235e into cms-sw:CMSSW_7_4_X Jan 20, 2015
@cmsbuild
Copy link
Contributor

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

3 participants