Drinking Kazu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Flash matching for SBN ## OpT0Finder * You can use [this docker image](https://hub.docker.com/layers/154629651/deeplearnphysics/dune-nd-sim/ub20.04-generator/images/sha256-8a264351a29cc7ee0cb72dbedc6484eb7e73a65188cfaf5bebf27de33a8ccc21?context=explore) to exactly replicate the environment. Otherwise we use root 6.22 and visualization tools need `plotly` with `dash` * [This](https://github.com/drinkingkazu/OpT0Finder) is the flashmatching repository. * Sample data files used: `muons_opflashana.root` and `muons_particleana.root` under ~~``/icarus/data/users/kterao/opflash_muon_p02/``~~ `/icarus/data/users/kterao/opflash_muon_p02` (updated 09/15/2021) * How to run a script: ~~`python3 bin/demo.py muons_particleana.root muons_opflashana.root out.csv`~~ `python3 bin/demo.py muons_particleana.root muons_opflashana.root out=out.csv` (updated 09/15/2021) * How to run an interactive playground `python3 bin/view_data.py -od muons_opflashana.root -pd muons_particleana.root` * [A quick look at plots](https://web.stanford.edu/~kterao/QuickLookFMatch.html) I show during demo (axis labels + comments will be added over the wkend) Here's a [movie](https://stanford.zoom.us/rec/share/pbVGkZd2xT8tn3uZ4HG1sbQtQhUMa0PTD6Gf--T-BtJDa8jAdhfmAoaEl8OiRFkj.2py9wFuz3sMamD2l) where I go step-by-step of how to run the code in both batch and interactive mode with a visualization tool. **WARNING**: note two changes including the data location and a slight modification on specifying the output files for running `demo.py` (see above). ## Milestones 1. Update the [sbncode implementation](https://github.com/SBNSoftware/sbncode/tree/develop/sbncode/OpT0Finder) with the latest version of [OpT0Finder](https://github.com/drinkingkazu/OpT0Finder) `develop` branch(!) following the experiment-agnostic implementation started by [Marco](mailto:mdeltutt@fnal.gov).~~ * **Done.** Compiles in LArSoft, reproduces the performance in the original version. The `sbncode` is currently in [this fork](https://github.com/drinkingkazu/sbncode), and assumes an update in `larana` in [this fork](https://github.com/drinkingkazu/larana). These will be kept updated. 2. Benchmark the resource usage of the code, mainly time. Adjust hyperparameters to make it usable for high statistics run. Feedback any change to the original OpT0Finder repository. * ~~**On-going, mostly done.** It is usable for ICARUS, to be demonstrated using/writing a driver module in icaruscode.~~ **Done.** Speed performance is same (in a single-thread mode). 3. Reproduce the [performance last presented](https://sbn-docdb.fnal.gov/cgi-bin/sso/RetrieveFile?docid=15995&filename=ICARUS%20OpReco%20meeting%2012_19_2019.pdf&version=1) using 4-6 (uniform sampling) muons simulated uniform position (including a little bit outside of the active volume). * [Kazu] ~~benchmark OpHit and OpFlash reconstruction performance on simulation samples (ntuples already exist, ask Kazu)~~ ... **pretty much done**, OpHit fix introduced. Need to be merged into larana ([this fork](https://github.com/drinkingkazu/larana)). * [Kazu] ~~Reproduce the matching performance in the stand-alone mode.~~ **Done**`larsoft_merge` branch merged back into `develop`. Photon library needs to be updated for those who use `develop` branch. * [Kazu] Implement the driver code in icaruscode and reproduce the performance using the exact same input samples between larsoft v.s. stand-alone OpT0Finder 4. Prepare a collection of T0-tagged tracks (need reconstructed space points and associated optical flash) and run flash matching. Main purpose: debugging to make it work with real data (not sim/data discrepancy study, but basic level debugging like interpretation of timing information, etc.). * [Jacob help get started] **Starting**... a module for identifying t0-tagged (using geometry) tracks exist. We can write our own module to write n-tuples for those t0-tagged tracks referrencing how it's done in the existing module used by the calibration group. Why we don't use the existing one as is? Because our goal is very specific and info to write out is also different. Be familiar with OpT0Finder input information needs first! then combine that knowledge with the existing module. * First samples only need less than 100 tracks. We want t0-tagged track space points, opflash info (these are the OpT0Finder input). But also full OpHit info (ch, time, area, PE) and optical waveform. First study is to understand the light yield / QE (how much PE we see for MIP) + time constants (i.e. how much fraction of PE do we see within 0.1, 2, 8 us of interaction) 5. Split T0-tagged tracks into half. Use one to calibrate global collection and quantum efficiencies. Use another half to benchmark the performance. [Here's slides](https://web.stanford.edu/~kterao/Random_Summary_OpRecoAndFlashMatch_2016_09_24.pdf) about this study in MicroBooNE. * **Not yet** 6. Study the flash-matching performance on simulated neutrino samples w/ cosmic rays * **Not yet** ## Timeline - Step 1-3, 4 in July - Step 5 in August - Step 6 in August Step 1-3 are pre-requisites. Step 4 must happen before 5. Step 5 is **most critical (and fun part)**, took about a month in MicroBooNE. Step 6 can start after step 1-3, but ultimately re-quantified after Step 5 is done. But Step 6 should not take long (compared to step 5).

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully