-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Replace TFormula in SimpleJetCorrector #11584
Replace TFormula in SimpleJetCorrector #11584
Conversation
SimpleJetCorrector places its variables and parameters into arrays instead of std::vector. Adding an adaptor for arrays allows for direct uses of the array without having to fill a temporary std::vector.
Threaded performance measurements using Intel's VTune showed that TFormula use was requiring many locks and was causing significant inefficiencies in CMSSW_7_4 with ROOT 6.02. Although much of the problem goes away in ROOT 6.04 with the new TFormula implementation, moving away from TFormula and to the completely thread efficient reco::FormulaEvaluator also makes construction of the formula thread efficient.
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_6_X. Replace TFormula in SimpleJetCorrector It involves the following packages: CommonTools/Utils @cvuosalo, @monttj, @cmsbuild, @slava77, @ggovi, @vadler can you please review it and eventually sign? Thanks. |
please test |
The tests are being triggered in jenkins. |
-1 runTheMatrix-results/135.4_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS/step1_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS.log ----- Begin Fatal Exception 01-Oct-2015 04:30:33 CEST----------------------- An exception of category 'FormulaEvaluatorParseError' occurred while [0] Processing run: 1 lumi: 1 event: 1 [1] Running path 'HLT_PFJet40_v2' [2] Calling event method for module LXXXCorrectorProducer/'hltAK4PFRelativeCorrector' Exception Message: While parsing '((x>=[6])*(([0]+([1]/((log10(x)^2)+[2])))+([3]*exp(-([4]*((log10(x)-[5])*(log10(x)-[5])))))))+((x<[6])*[7])' could not parse beyond '((x' ----- End Fatal Exception ------------------------------------------------- 1306.0 step2 runTheMatrix-results/1306.0_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15/step2_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15.log ----- Begin Fatal Exception 01-Oct-2015 04:37:51 CEST----------------------- An exception of category 'FormulaEvaluatorParseError' occurred while [0] Processing run: 1 lumi: 1 event: 1 [1] Running path 'MC_PFMET_v1' [2] Calling event method for module LXXXCorrectorProducer/'hltAK4PFRelativeCorrector' Exception Message: While parsing '((x>=[6])*(([0]+([1]/((log10(x)^2)+[2])))+([3]*exp(-([4]*((log10(x)-[5])*(log10(x)-[5])))))))+((x<[6])*[7])' could not parse beyond '((x' ----- End Fatal Exception ------------------------------------------------- 1330.0 step2 runTheMatrix-results/1330.0_ZMM_13+ZMM_13+DIGIUP15+RECOUP15+HARVESTUP15/step2_ZMM_13+ZMM_13+DIGIUP15+RECOUP15+HARVESTUP15.log ----- Begin Fatal Exception 01-Oct-2015 04:41:00 CEST----------------------- An exception of category 'FormulaEvaluatorParseError' occurred while [0] Processing run: 1 lumi: 1 event: 1 [1] Running path 'HLT_IsoMu20_eta2p1_CentralPFJet30_BTagCSV07_v2' [2] Calling event method for module LXXXCorrectorProducer/'hltAK4PFRelativeCorrector' Exception Message: While parsing '((x>=[6])*(([0]+([1]/((log10(x)^2)+[2])))+([3]*exp(-([4]*((log10(x)-[5])*(log10(x)-[5])))))))+((x<[6])*[7])' could not parse beyond '((x' ----- End Fatal Exception ------------------------------------------------- 50202.0 step2 runTheMatrix-results/50202.0_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50/step2_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50.log ----- Begin Fatal Exception 01-Oct-2015 04:48:14 CEST----------------------- An exception of category 'FormulaEvaluatorParseError' occurred while [0] Processing run: 1 lumi: 1 event: 1 [1] Running path 'HLT_PFHT350_PFMET100_NoiseCleaned_v1' [2] Calling event method for module LXXXCorrectorProducer/'hltAK4PFRelativeCorrector' Exception Message: While parsing '((x>=[6])*(([0]+([1]/((log10(x)^2)+[2])))+([3]*exp(-([4]*((log10(x)-[5])*(log10(x)-[5])))))))+((x<[6])*[7])' could not parse beyond '((x' ----- End Fatal Exception ------------------------------------------------- 25202.0 step2 runTheMatrix-results/25202.0_TTbar_13+TTbar_13+DIGIUP15_PU25+RECOUP15_PU25+HARVESTUP15_PU25/step2_TTbar_13+TTbar_13+DIGIUP15_PU25+RECOUP15_PU25+HARVESTUP15_PU25.log ----- Begin Fatal Exception 01-Oct-2015 04:50:02 CEST----------------------- An exception of category 'FormulaEvaluatorParseError' occurred while [0] Processing run: 1 lumi: 1 event: 1 [1] Running path 'HLT_PFJet40_v2' [2] Calling event method for module LXXXCorrectorProducer/'hltAK4PFRelativeCorrector' Exception Message: While parsing '((x>=[6])*(([0]+([1]/((log10(x)^2)+[2])))+([3]*exp(-([4]*((log10(x)-[5])*(log10(x)-[5])))))))+((x<[6])*[7])' could not parse beyond '((x' ----- End Fatal Exception ------------------------------------------------- you can see the results of the tests here: The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
SimpleJetCorrector uses TFormula expressions which include comparison operators.
please test |
The tests are being triggered in jenkins. |
Martin,
On 10/6/15 12:26 PM, Martin Grunewald wrote:
|
This change would fail this function since 'TMath::Power' is not a known function. Easy to add though. |
A std addON test (which works in plain 76X IB), but with some added PRs on top of a 76X IB and then it fails. I need to find out which PR it is; probably #11609 (are these formulas DB objects?) |
The formula uses both |
I've got a unit test that fails now for that specific formula and I'm working on modifying the FormulaEvaluator to handle this expression. |
On 10/6/15 1:38 PM, Martin Grunewald wrote:
Yes, the formulas for jet corrections are from DB.
|
@slava77 @Martin-Grunewald I am a bit confused. |
mh, maybe I can find the answer by myself by dumping the JEC payload for |
There it is:
where |
And that's why you did not get it before: the payload consumed by the tests run by @Martin-Grunewald are not containing
|
correction to myself: it would have failed anyhow:
and |
@mmusich this is something you might want to watch as well |
Yeah, re-running the jenkins test in #11609 now shows the same errors... |
@Dr15Jones what should we do? I see two options:
I'd go for 1., but maybe 2. is quicker... |
comment to myself: |
I found another bug in the parser which I'm tracking down. It would help if someone could dump all of the formulas from the database so I can add them as unit tests. |
@Dr15Jones I can dump the payloads currently in the DB of type |
@davidlange6 I think we should not make a pre7 without a fix to the problem. Chris, is the fix coming some time today? |
Right - we are in any case waiting for a GT with the right PF calibrations
|
I hope to have a fix today |
#11684 has the fix |
Threaded performance measurements using Intel's VTune showed that
TFormula use was requiring many locks and was causing significant
inefficiencies in CMSSW_7_4 with ROOT 6.02. Although much of the
problem goes away in ROOT 6.04 with the new TFormula implementation,
moving away from TFormula and to the completely thread efficient
reco::FormulaEvaluator also makes construction of the formula
thread efficient.