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

Bin lookup in the JetCorrectorParameters class #17812

Merged
merged 15 commits into from Mar 22, 2017

Conversation

aperloff
Copy link
Contributor

@aperloff aperloff commented Mar 7, 2017

Summary:

  • An update to the the JetCorrectorParameters software in order to speed it up.
  • Involves a new class (JetCorrectorParametersHelper) and some minor changes to the existing code
  • All changes to the JetCorrectorParameters class are transient
  • Changes are backwards compatible

Problem:
The more binned parameters you add to the condition, the slower the correction lookup is. As a concrete example, when you go from being binned in (eta) to being binned in (eta,pt) the condition goes from from 82 records in the lookup to almost 3000 records. If moving from being binned in (eta) to being binned in (eta,rho,pt), you now have 64000 records. Before the fix this slowed down the lookup table substantially.

Solution/Benchmarking:
With the changes there is a speedup for every jet correction lookup, even with one dimension of binning. For 1D corrections (L2L3Residual like) we see a speedup of ~2.3x (assuming binned with 82 eta bins), for 2D (L2L3 MC truth like) we see ~96.6x, and for 3D we see a speedup of ~12000x . All of these were measured using igprof. Also beneficial is the fact that there should be no noticeable change in behavior for the users or to any existing code. Everything is backwards compatible and requires no change to the database (i.e. all of the new code was made transient).

Documentation:
All of this work is documented in a report I gave to the JERC group (https://indico.cern.ch/event/617090/contributions/2490770/attachments/1420000/2175622/2017_02_23-Alexx-JetCorrectorParameters.pdf).

@kpedro88 @schoef

Alexx Perloff and others added 12 commits February 15, 2017 13:13
…ds which holds the correct parameters was using a linear search through all of the possible bins. Not only that, but inside of that loop was an additional loop through all of the binned variables. This is a O(N^2) process. For one binned dimension this is fine and maybe even acceptable for two dimensions, but the slowdown was huge for three dimensions of binned variables. There is now a new way of searching for the right mRecords bin when there are three binned dimensions. This is a O(ln(n_d1)+ln(n_d2)+ln(n_d3)+2) process where n_di is the number of bins in each dimension. Dimensions d<3 must have overlapping bin boundaries (although they don't need the same exact number of bins). The last dimension (3) can have bin boundaries which aren't sharred among the (d1,d2) bins. In addition to this change there was a bug fix to how the code reads the upper and lower bounds of the binned dimensions.
…function. Create a new helper class called JetCorrectorParametersHelper and put most of the new code in there. This version of the code will not compile due to a serialization error.
…rrectorParameters class. Also untemplate the JetCorrectorParametersHelper class and set a maximum number of binned variables to 3.
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2017

A new Pull Request was created by @aperloff (Alexx Perloff) for master.

It involves the following packages:

CondFormats/JetMETObjects
CondFormats/Serialization

@ggovi, @cmsbuild, @monttj, @davidlange6 can you please review it and eventually sign? Thanks.
@TaiSakuma, @ahinzmann, @mmarionncern, @rappoccio, @jdolen, @nhanvtran, @gkasieczka, @apfeiffer1, @schoef, @mariadalfonso this is something you requested to watch as well.
@Muzaffar, @davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@kpedro88
Copy link
Contributor

kpedro88 commented Mar 7, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18231/console Started: 2017/03/07 22:05

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2017

-1

Tested at: c7427a4

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

I found follow errors while testing this PR

Failed tests: UnitTests RelVals AddOn

  • Unit Tests:

I found errors in the following unit tests:

---> test runtestPhysicsToolsPatAlgos had ERRORS

  • RelVals:

When I ran the RelVals I found an error in the following worklfows:
5.1 step1

runTheMatrix-results/5.1_TTbar+TTbarFS+HARVESTFS/step1_TTbar+TTbarFS+HARVESTFS.log

140.53 step2
runTheMatrix-results/140.53_RunHI2011+RunHI2011+RECOHID11+HARVESTDHI/step2_RunMinBias2012A+RunMinBias2012A+RECODDQM+HARVESTDDQM.log

1003.0 step2
runTheMatrix-results/1003.0_RunMinBias2012A+RunMinBias2012A+RECODDQM+HARVESTDDQM/step2_RunMinBias2012A+RunMinBias2012A+RECODDQM+HARVESTDDQM.log

1001.0 step2
runTheMatrix-results/1001.0_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5/step2_RunMinBias2011A+RunMinBias2011A+TIER0EXP+ALCAEXP+ALCAHARVD1+ALCAHARVD2+ALCAHARVD3+ALCAHARVD4+ALCAHARVD5.log

1000.0 step2
runTheMatrix-results/1000.0_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT/step2_RunMinBias2011A+RunMinBias2011A+TIER0+SKIMD+HARVESTDfst2+ALCASPLIT.log

136.731 step2
runTheMatrix-results/136.731_RunSinglePh2016B+RunSinglePh2016B+HLTDR2_2016+RECODR2_2016reHLT_skimSinglePh_HIPM+HARVESTDR2/step2_RunSinglePh2016B+RunSinglePh2016B+HLTDR2_2016+RECODR2_2016reHLT_skimSinglePh_HIPM+HARVESTDR2.log

4.53 step3
runTheMatrix-results/4.53_RunPhoton2012B+RunPhoton2012B+HLTD+RECODR1reHLT+HARVESTDR1reHLT/step3_RunPhoton2012B+RunPhoton2012B+HLTD+RECODR1reHLT+HARVESTDR1reHLT.log

135.4 step1
runTheMatrix-results/135.4_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS/step1_ZEE_13+ZEEFS_13+HARVESTUP15FS+MINIAODMCUP15FS.log

1306.0 step2
runTheMatrix-results/1306.0_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15/step2_SingleMuPt1_UP15+SingleMuPt1_UP15+DIGIUP15+RECOUP15+HARVESTUP15.log

1330.0 step2
runTheMatrix-results/1330.0_ZMM_13+ZMM_13+DIGIUP15+RECOUP15+HARVESTUP15/step2_ZMM_13+ZMM_13+DIGIUP15+RECOUP15+HARVESTUP15.log

10021.0 step2
runTheMatrix-results/10021.0_TenMuE_0_200+TenMuE_0_200_pythia8_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017/step2_TenMuE_0_200+TenMuE_0_200_pythia8_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017.log

20034.0 step3
runTheMatrix-results/20034.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D7_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D7+RecoFullGlobal_2023D7+HARVESTFullGlobal_2023D7/step3_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D7_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D7+RecoFullGlobal_2023D7+HARVESTFullGlobal_2023D7.log

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

10024.0 step2
runTheMatrix-results/10024.0_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017/step2_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2017_GenSimFull+DigiFull_2017+RecoFull_2017+ALCAFull_2017+HARVESTFull_2017.log

10824.0 step3
runTheMatrix-results/10824.0_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2018_GenSimFull+DigiFull_2018+RecoFull_2018+ALCAFull_2018+HARVESTFull_2018/step3_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST.log

9.0 step3
runTheMatrix-results/9.0_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST/step3_Higgs200ChargedTaus+Higgs200ChargedTaus+DIGI+RECO+HARVEST.log

25.0 step3
runTheMatrix-results/25.0_TTbar+TTbar+DIGI+RECOAlCaCalo+HARVEST+ALCATT/step3_TTbar+TTbar+DIGI+RECOAlCaCalo+HARVEST+ALCATT.log

50202.0 step3
runTheMatrix-results/50202.0_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50/step3_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50.log

21234.0 step3
runTheMatrix-results/21234.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D4_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D4+RecoFullGlobal_2023D4+HARVESTFullGlobal_2023D4/step3_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D4_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D4+RecoFullGlobal_2023D4+HARVESTFullGlobal_2023D4.log

23234.0 step3
runTheMatrix-results/23234.0_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D8_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D8+RecoFullGlobal_2023D8+HARVESTFullGlobal_2023D8/step3_TTbar_14TeV+TTbar_14TeV_TuneCUETP8M1_2023D8_GenSimHLBeamSpotFull14+DigiFullTrigger_2023D8+RecoFullGlobal_2023D8+HARVESTFullGlobal_2023D8.log

  • AddOn:

I found errors in the following addon tests:

cmsDriver.py TTbar_8TeV_TuneCUETP8M1_cfi --conditions auto:run1_mc --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot Realistic8TeVCollision : FAILED - time: date Tue Mar 7 22:44:31 2017-date Tue Mar 7 22:41:50 2017 s - exit: 35584
cmsRun /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_1_X_2017-03-07-1100/src/PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py : FAILED - time: date Tue Mar 7 22:42:36 2017-date Tue Mar 7 22:41:54 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_PRef.py realData=True globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:51:26 2017-date Tue Mar 7 22:41:55 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:PRef,RAW2DIGI,L1Reco,RECO --data --scenario=pp -n 10 --conditions auto:run2_data_PRef --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_PRef_DATA.root --fileout file:RelVal_Raw_PRef_DATA_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:51:26 2017-date Tue Mar 7 22:41:55 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_HIon.py realData=True globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:46:17 2017-date Tue Mar 7 22:41:58 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:HIon,RAW2DIGI,L1Reco,RECO --data --scenario=HeavyIons -n 10 --conditions auto:run2_data_HIon --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016,Run2_HI --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_HIon_DATA.root --fileout file:RelVal_Raw_HIon_DATA_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:46:17 2017-date Tue Mar 7 22:41:58 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_GRun.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:50:04 2017-date Tue Mar 7 22:42:00 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:GRun,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run2_mc_GRun --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_GRun_MC.root --fileout file:RelVal_Raw_GRun_MC_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:50:04 2017-date Tue Mar 7 22:42:00 2017 s - exit: 35584
cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_25ns --magField 38T_PostLS1 : FAILED - time: date Tue Mar 7 22:45:05 2017-date Tue Mar 7 22:42:05 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_PRef.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:49:09 2017-date Tue Mar 7 22:42:08 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:PRef,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run2_mc_PRef --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_PRef_MC.root --fileout file:RelVal_Raw_PRef_MC_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:49:09 2017-date Tue Mar 7 22:42:08 2017 s - exit: 35584
cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_2016 --magField 38T_PostLS1 : FAILED - time: date Tue Mar 7 22:46:08 2017-date Tue Mar 7 22:42:10 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_PIon.py realData=True globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:51:34 2017-date Tue Mar 7 22:42:14 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:PIon,RAW2DIGI,L1Reco,RECO --data --scenario=pp -n 10 --conditions auto:run2_data_PIon --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_PIon_DATA.root --fileout file:RelVal_Raw_PIon_DATA_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:51:34 2017-date Tue Mar 7 22:42:14 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_HIon.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:48:55 2017-date Tue Mar 7 22:42:16 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:HIon,RAW2DIGI,L1Reco,RECO --mc --scenario=HeavyIons -n 10 --conditions auto:run2_mc_HIon --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016,Run2_HI --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_HIon_MC.root --fileout file:RelVal_Raw_HIon_MC_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:48:55 2017-date Tue Mar 7 22:42:16 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_GRun.py realData=True globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:48:40 2017-date Tue Mar 7 22:42:28 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:GRun,RAW2DIGI,L1Reco,RECO --data --scenario=pp -n 10 --conditions auto:run2_data_GRun --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_25ns --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_GRun_DATA.root --fileout file:RelVal_Raw_GRun_DATA_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:48:40 2017-date Tue Mar 7 22:42:28 2017 s - exit: 35584
cmsRun /cvmfs/cms-ib.cern.ch/week0/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_1_X_2017-03-07-1100/src/HLTrigger/Configuration/test/OnLine_HLT_PIon.py realData=False globalTag=@ inputFiles=@ : FAILED - time: date Tue Mar 7 22:49:55 2017-date Tue Mar 7 22:42:31 2017 s - exit: 35584
cmsDriver.py RelVal -s HLT:PIon,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run2_mc_PIon --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --era Run2_2016 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_PIon_MC.root --fileout file:RelVal_Raw_PIon_MC_HLT_RECO.root : FAILED - time: date Tue Mar 7 22:49:55 2017-date Tue Mar 7 22:42:31 2017 s - exit: 35584

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2017

Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped)

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 10, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18317/console Started: 2017/03/10 02:56

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-17812/18317/summary.html

There are some workflows for which there are errors in the baseline:
25.0 step 5
10024.0 step 4
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

@@ -38,7 +38,8 @@ float SimpleJetCorrector::correction(const std::vector<float>& fX,const std::vec
float result = 1.;
float tmp = 0.0;
float cor = 0.0;
int bin = mParameters.binIndex(fX);
int bin = -1;
bin = (fX.size()<=3 && fX.size()>0) ? mParameters.binIndexN(fX) : mParameters.binIndex(fX);
Copy link
Contributor

Choose a reason for hiding this comment

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

@aperloff

I have a quick question.
Isn't is necessary to have this conditional statement?
I don't see the difference.

Regards,
Taejeong

Copy link
Contributor

Choose a reason for hiding this comment

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

The first case uses the new, efficient algorithm binIndexN (note the N at the end); the second case uses the old, brute-force algorithm binIndex.

The new algorithm requires the maximum number of dimensions to be defined at compile time, so this logic is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to second what @kpedro88 said. An additional reason is that we want to use the new algorithm for all the dimensions it has been tested for (1,2,3), but right now we are using the original, brute-force algorithm as a catch-all for untested numbers of dimensions. I would expect the new algorithm, binIndexN, to have much better performance than this original, so this limit can always be raised/removed if and when we find it necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I am sorry I missed "N" at the end.
Thank you for the details.

Taejeong

@monttj
Copy link
Contributor

monttj commented Mar 19, 2017

+1

@kpedro88
Copy link
Contributor

@ggovi please sign

@ggovi
Copy link
Contributor

ggovi commented Mar 21, 2017

+1

@cmsbuild
Copy link
Contributor

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

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 8138984 into cms-sw:master Mar 22, 2017
if (value < min || value > max)
{
std::stringstream sserr;
sserr<<"Value for dimension "<<dim<<" is outside of the bin boundaries"<<std::endl
Copy link
Contributor

Choose a reason for hiding this comment

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

HI @aperloff - looks like our testing logs are full of this message. Presumably its a sign of a problem missed in validation, so we'll revert this PR for now.

https://cmssdt.cern.ch/buildlogs/slc6_amd64_gcc530/www/wed/9.1.ROOT6-wed-11/CMSSW_9_1_ROOT6_X_2017-03-22-1100/pyRelValPartialLogs/4.61_RunMinBias2012C+RunMinBias2012C+HLTD+RECODR1reHLT+HARVESTDR1reHLT

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @davidlange6 - This is not a new error mode. The same issue (being outside the bin boundaries) happened in the original binIndex function. The only difference here is that in the new code an error message is printed. So while this is annoying for the log files, there is no change in the functionality of the binIndex(N) codes.

I've commented out this error message and committed the code to my cmssw repo/branch. How would you like me to proceed? Should I do a new pull request and reference this one and the revert? I'm not sure of the procedure now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @aperloff - just make a new pull request that includes this one + your fix. Thanks! (4MB/event of printout is a bit more than "annoying"...)

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

6 participants