Skip to content

Move algorithm into a class

Tom Dealtry requested to merge github/fork/tdealtry/library into master

Created by: tdealtry

The algorithm is very useful, but currently tied into a very specific macro. I've

  • extracted the algorithm into a new class (WCSimEBonsai - a better is very welcome!)
    • made some hardcoded parameters setable for easier development
  • modified energetic_bonsai.C to use the new class
  • included a Makefile
  • included a root wrapper rootebonsai
  • expanded the README

The changes make energetic bonsai more versitile. e.g.

  • Test it with other vertex-finders (e.g. the new LEAF)
  • Test it in the SN trigger chain (this is my interest)

And it's also faster than what's currently in the repo. Running over 1000 20 MeV electrons in SK takes (using a TStopwatch over the event loop)

Type Time
New code, running energetic_bonsai.C+ 26 seconds
Old code, running energetic_bonsai.C+ (after fixes) 25 seconds
Old code, running energetic_bonsai.C 5 minutes 4 seconds

Attached is a validation plot for 1000 20 MeV electrons in SK. The lines are

  • Old - current repo as is
  • Old compiled - current repo, with modifications to
    • Make it run compiled (minor changes)
    • Add a -1 in every call to WCSimRootGeom::GetPMT(). This is because you get PMTs in the range 0...N-1, while the actual labelling is in the range 1...N. It is a confusing feature of WCSim
  • New - this PR, with SK fTopBottomDistanceLo and fTopBottomDistanceHi set to HK values (as in the current code)

energetic_bonsai_validation

Merge request reports

Loading