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

Switching b-taggers to a common TMVAEvaluator class #9673

Conversation

ferencek
Copy link
Contributor

The purpose of this PR is to replace three separate implementations of TMVA evaluators with one common implementation.

In the process, a bug in the soft electron tagger was discovered where one of the input variables (mva_e_pi) was not set correctly. A common TMVA evaluator should help reduce the likelihood of such bugs.

@ferencek ferencek changed the title Switching b-tagger to a common TMVAEvaluator class Switching b-taggers to a common TMVAEvaluator class Jun 19, 2015
@cmsbuild cmsbuild added this to the Next CMSSW_7_5_X milestone Jun 19, 2015
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ferencek (Dinko Ferencek) for CMSSW_7_5_X.

Switching b-taggers to a common TMVAEvaluator class

It involves the following packages:

CommonTools/Utils
RecoBTag/SecondaryVertex
RecoBTag/SoftLepton

@cmsbuild, @cvuosalo, @vadler, @monttj, @slava77 can you please review it and eventually sign? Thanks.
@ferencek, @makortel, @acaudron, @pvmulder, @imarches 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.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@slava77
Copy link
Contributor

slava77 commented Jun 19, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

for(std::vector<std::string>::const_iterator it = variables.begin(); it!=variables.end(); ++it)
{
mVariables.insert( std::pair<std::string,float>(*it,0.) );
mReader->AddVariable(it->c_str(), &mVariables.at(*it));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's a naive and stupid comment, but does this work? My worry comes from the fact that AddVariable records the memory location of a variable that is not bound to stay there. Increasing the size of the map could trigger reallocation of the map loosing the connection between the variable location in the map and what is recorded by TMVA.

Copy link
Contributor

Choose a reason for hiding this comment

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

When a map increases its size it does not affect the memory addresses for elements already in the map. Thus a map behaves differently than a vector when doing inserts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mverzett, I was worried about the exact same thing but after some googling I found what Chris just confirmed. Also, from my tests it all works as expected.

@cmsbuild
Copy link
Contributor

-1

Tested at: 8fcdc4f
I found errors in the following unit tests:

---> test testJetMETCorrectionsType1MET had ERRORS

you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9673/5571/summary.html

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs once checked with relvals in the development release cycle of CMSSW (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

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

8 participants