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

Cluster charge cut, take two #162

Merged
merged 11 commits into from
Sep 17, 2018
Merged

Cluster charge cut, take two #162

merged 11 commits into from
Sep 17, 2018

Conversation

areinsvo
Copy link
Collaborator

The commits got messed up in PR161 The code on this branch is unchanged with respect to the previous pull request, but here the history should be fixed. Thanks @kmcdermo for your help.

This PR includes the implementation of the cluster charge cut (CCC) that I have been working on and presented at the last two group meetings. The default value of the cut is 1620, and the --apply-ccc flag has to be called when running writeMemoryFile in order for the cut to be applied. The flag --apply-ccc can also take an argument to change the value of the cut.

In addition, there is a minor change to tkNtuple/Makefile to properly include ../lib in the path. I've also included Mario's script to compare efficiencies, duplicate rates, and fake rates before and after changes. This can now be found in the plotting directory.

Merging this pull request should wait until the changes to the benchmarking procedure are merged and after phiphi is available for testing.

@cerati
Copy link
Collaborator

cerati commented Aug 27, 2018

Do we want to have a place where the negative hit indices are documented?
This PR is adding '-9' to the list.

I am not suggesting to delay this PR, just bringing up the issue.

@kmcdermo
Copy link
Collaborator

@areinsvo thanks! This looks much better :). Feel free to close #161. From a review standpoint: this looks ready to go, although as already mentioned, lets wait until #154 and #160 are merged, rebase again (such fun), and then run the validation.

@cerati I think this is a fair point. Thankfully, with #160, we now have a pretty thorough documentation of the code, and I think we can add it to the list of things that need to be added after this PR and #160 are merged.

I will open an issue on what still needs to go into the README. Documenting the hit index meanings can also go in another .txt file, in the vein of cmssw-trackerinfo-desc.txt and validation-desc.txt, appending the list of resources in Section 8 of the README to point to this new file.

@cerati
Copy link
Collaborator

cerati commented Aug 31, 2018

We need to remember to update the memory files when we merge this PR (otherwise it will have no effect...)

@kmcdermo
Copy link
Collaborator

We need to remember to update the memory files when we merge this PR (otherwise it will have no effect...)

For sure, this is a few line change in: ./xeon_scripts/benchmark-cmssw-ttbar-fulldet-build.sh and ./val_scripts/validation-cmssw-benchmarks.sh.

@slava77 Do we have the memory files with this cut for all the different samples we use? We also need to copy them to the disks of phi1 and phi2 for benchmarking. Or as @osschar , we could always alias just one set, and have the different platforms read across different machines... although this would convolute in I/O as well (especially since the compute tests are concurrent on different platforms).

samples (off the top of my head)

  • ttbar PU 70 HS
  • ttbar PU 35
  • ttbar noPU
  • 10mu 0.5 < pt < 10
  • 10 mu low pt

@slava77
Copy link
Collaborator

slava77 commented Aug 31, 2018

@slava77 Do we have the memory files with this cut for all the different samples we use?

I didn't try to remake the files yet.
Should I?

@areinsvo
Copy link
Collaborator Author

@slava77 do you have a script to generate all of the necessary memory files? If not, could you specify which flags are used for the different naming conventions? I'll probably add a string to the name to indicate which value of the CCC was used.

It doesn't matter to me which of us makes them. I already have some of the files, but I would probably regenerate them anyway to be 100% sure the appropriate flags are set.

@slava77
Copy link
Collaborator

slava77 commented Aug 31, 2018 via email

@areinsvo
Copy link
Collaborator Author

areinsvo commented Sep 6, 2018

@slava77 apologies for not getting to this earlier in the week. Thanks for sending the command to generate the memory files. I don't have permission to write in the directories within /data2/slava77/samples/2017/pass-c93773a/initialStep/ but the files can be found at /home/users/areinsvo/memoryFiles. Would you be able to move them to your area so everything is together? I generated four memory files for each sample: with and without clean tracks x with and without the CCC. As @kmcdermo pointed out, these might need to be copied to phi1 and phi2 as well.

{
applyCCC = true;
if( next_arg_option(mArgs, i))
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

the indentation looks off

layerHits_[ilay].push_back(hit);
MCHitInfo hitInfo(simTkIdx, ilay, layerHits_[ilay].size()-1, totHits);
simHitsInfo_.push_back(hitInfo);
totHits++;
Copy link
Collaborator

Choose a reason for hiding this comment

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

please indent the block inside the if

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@slava77 I fixed the first indentation, but in lines 950 to 953 the block is already indented, as far as I can tell.

Copy link
Collaborator

Choose a reason for hiding this comment

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

that's not what I see in the browser.
It seems to be a tab vs space issue.

@areinsvo
Copy link
Collaborator Author

It looked indented to me in the browser, but I made another commit where the indentation should be more obvious.

@slava77
Copy link
Collaborator

slava77 commented Sep 11, 2018

It looked indented to me in the browser, but I made another commit where the indentation should be more obvious.

thank you.
it looks indented to me now.

@slava77
Copy link
Collaborator

slava77 commented Sep 11, 2018

I finally finished redistributing the files

  • phi3:/data2/slava77/samples/2017/pass-c93773a/initialStep
  • phi2:/data1/work/slava77/samples/2017/pass-c93773a/initialStep
  • phi1:/data2/nfsmic/slava77/samples/2017/pass-c93773a/initialStep

perhaps someone with sudo could ln -s to avoid the differences.
Full file relocation may be less trivial because of possible underlying hardware differences.
I think that the files should be on the faster disks.

In each directory there is a

  • memoryFile.fv3.clean.writeAll.recT.082418-25daeda.bin without CCC
  • memoryFile.fv3.clean.writeAll.CCC1620.recT.082418-25daeda.bin with CCC

@areinsvo thank you for making these.
I didn't copy the versions without "clean.writeAll", because I don't think these are actually useful anymore.

@areinsvo
Copy link
Collaborator Author

I tried running the benchmark scripts on the new memory files, but I ran into an issue with the validation. With @kmcdermo's help I narrowed down the problem, but it hasn't been solved yet. The summary of the problem is below:

  • validation fails with MEIF + CCC 1620 file + CMSSW tracks for SIMVAL
  • validation works with all other combination of options, including
    • MEIF + file without CCC 1620 + CMSSW tracks for SIMVAL
    • MEIF + CCC 1620 file + std/ce tracks for SIMVAL
    • no MEIF + CCC 1620 file + CMSSW tracks for SIMVAL

For now, the plots I have (everything except the SIMVAL plots) can be found at http://areinsvo.web.cern.ch/areinsvo/pull162/
I will generate the SIMVAL plots without MEIF and include those there as well.

@areinsvo
Copy link
Collaborator Author

The SIMVAL plots for events in flight = 1 can now be found at http://areinsvo.web.cern.ch/areinsvo/pull162/SIMVAL_NoMEIF/SIMVAL/

Also, I committed changes to the benchmark and validation scripts to point to the new memory files (thanks @slava77 for copying those), and I updated the documentation slightly to clarify a few minor issues I had setting up my website for plots.

kmcdermo and others added 4 commits September 15, 2018 10:37
    * deregister context of TFile to allow writing from multiple threads
    * make TFile's and TTree's std::unique_ptr
    * set directory of TTree to 0 when initialized, then set to file at the end
Fix MEIF with ROOT validation + CCC cut
@areinsvo
Copy link
Collaborator Author

@kmcdermo fixed the issues with MEIF and found one issue with the CCC. His changes have been merged with my branch. The full set of validation plots after his changes can be found here:
https://kmcdermo.web.cern.ch/kmcdermo/mictrk/PR162_fixMEIFval_v2/

If you want to compare these to the validation plots for the new memory file without the cluster charge cut, those can be found here:
http://areinsvo.web.cern.ch/areinsvo/pull162NoCCC_AfterPR/

As expected, the CMSSW performance lines are exactly the same between the two memory files. The weird behavior we saw at the end of last week must have been due to the bugs that Kevin fixed.

@kmcdermo
Copy link
Collaborator

Ah, this is great! Okay, I will merge this now.

One point to mention: we noticed that the simtrack validation changed slightly between the two versions of the old and new memory files.

Compare:

  1. This PR + old memory file: https://kmcdermo.web.cern.ch/kmcdermo/mictrk/pr160/forPR/SIMVAL/SKL-SP_CMSSW_TTbar_PU70_eff_eta_build_pt0p0_SIMVAL.png
  2. This PR + new no CCC applied memory file: http://areinsvo.web.cern.ch/areinsvo/pull162NoCCC_AfterPR/SIMVAL/SKL-SP_CMSSW_TTbar_PU70_eff_eta_build_pt0p0_SIMVAL.png
  3. This PR + new CCC applied memory file: https://kmcdermo.web.cern.ch/kmcdermo/mictrk/PR162_fixMEIFval_v2/SIMVAL/SKL-SP_CMSSW_TTbar_PU70_eff_eta_build_pt0p0_SIMVAL.png

As Allie already stated the cmssw track efficiency are the same in 2. and 3. (as they should be!), and the mkFit tracks move up in efficiency. This same effect was already seen with the old memory files, applying the CCC by hand.

However, both mkFit and cmssw tracks change w.r.t. to 1., although this looks mostly statistical. Perhaps different events/tracks were written to the memory file? Just looking at the top lines of the text file dumps, it is clear different tracks and/or events were saved:

So, I think this can be safely merged, although it would be great to understand why the memory file would write different tracks/events.

@kmcdermo kmcdermo merged commit 6dfdc46 into trackreco:devel Sep 17, 2018
@slava77
Copy link
Collaborator

slava77 commented Sep 17, 2018 via email

@kmcdermo
Copy link
Collaborator

ah, okay, thanks for the clarification!

@areinsvo areinsvo deleted the CCCv2 branch September 17, 2018 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants