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
Switching b-taggers to a common TMVAEvaluator class #9673
Conversation
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 @cmsbuild, @cvuosalo, @vadler, @monttj, @slava77 can you please review it and eventually sign? Thanks. |
@cmsbuild please test |
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)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
-1 Tested at: 8fcdc4f ---> test testJetMETCorrectionsType1MET had ERRORS you can see the results of the tests here: |
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 |
+1 |
…ing_from-CMSSW_7_5_X_2015-06-18-1100 Switching b-taggers to a common TMVAEvaluator class
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.