Skip to content

MCS momentum fit for ICARUS: Gran Sasso algorithm update - #940

Open
giovannichiello wants to merge 10 commits into
developfrom
feature/mcs-giovanni
Open

giovannichiello wants to merge 10 commits into
developfrom
feature/mcs-giovanni

Conversation

@giovannichiello

Copy link
Copy Markdown
Collaborator

MCS momentum fit for ICARUS: Gran Sasso algorithm update (producer, fitter and data product)

This PR updates the Multiple Coulomb Scattering (MCS) momentum fit in icaruscode/TPC/Tracking/MCS:
the producer MCSFitProducerICARUS, the fitter trkf::TrajectoryMCSFitterICARUS and the data product recob::MCSFitResultGS.

Producer (MCSFitProducerICARUS_module.cc)

  • Track selection is configurable with selectionMode: 0 is default and applies the cosmic stopping-muon selection
    (same cuts as TrackCaloSkimmer), other selection cuts are on their way.
  • T0 is taken from the PFParticle or, if missing, from the CRT match, and passed to the fitter.

Fitter (TrajectoryMCSFitterICARUS)

  • Segmentation: the track is split into segments of segmentLength, with a forced break at the cathode crossing.
  • Point selection: a single helper (UsePoint) applies the plane (planeMode), the cathode distance
    (cathode position from TPCGeo::GetCathodeCenter() required to be greater than 15 cm) and the TPC, according to fullTrackMode.
    • 0 = first TPC
    • 1 = last TPC
    • 2 = full track
  • 2D hit coordinates: computed from geometry and detector properties (drift coordinate corrected for T0).
  • Track lengths: L1D/L2D/L3D are computed separately in each TPC and summed for fullTrackMode = 2.
  • Segment window: ThetaCheck returns the window of segments used in the fit, and the same window is used by
    fitMcs, the C2 function and the likelihood.
    • Modes 0 and 1 use the longest contiguous run of valid angles.
    • Mode 2 goes from the first to the last valid angle, skipping holes such as the cathode crossing.
    • The number of used segments is checked once against minNumSegments.
  • C2 fit: returns a ScanResultC2. When the fit fails or is out of range, the linear interpolation
    fallback reuses the existing scan. If C2 never crosses 1, the momentum
    is set to the edge of the fit range, with the full range as error.
  • Likelihood fit: returns a ScanResultLL with best momentum, asymmetric errors (ΔNLL = 0.5),
    minimum NLL and the full scan.
  • sigma3p: computed on the hits of the selected plane.
  • Output: all printout is controlled by verbose (0/1/2).

Data product (MCSFitResultGS)

  • Stored content:
    • for both the C2 fit and the likelihood fit: best momentum, error and full scan (test momenta and function values);
    • sigma3p and delta3p;
    • L1D/L2D/L3D;
    • segment information (lengths, hits, sides, used/total segments);
    • measured linear and polygonal angles;
    • validity flag.
  • Storage: everything is stored in double precision.
  • Dictionary: the class version was updated in classes_def.xml.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @giovannichiello -- thanks for this! I noticed you’re adding a new data product, recob::MCSFitResultGS, in icaruscode (icaruscode/TPC/Tracking/MCS/MCSFitResultGS.h/.cxx, plus the dictionary entries).

Is the end goal to use this product to fill variables in the CAF?
If so, icaruscode is not the right place for it.

The CAFMaker lives in sbncode so it won't be able to include the header or read this product.
I strongly suggest moving the data product directly in sbnobj:

  • Move MCSFitResultGS.h/.cxx and their classes.h / classes_def.xml entries to a suitable place in sbnobj (e.g. next to the other ICARUS or common reco products), and open a companion PR.
  • Keep the producer (MCSFitProducerICARUS) and the fitter (trkf::TrajectoryMCSFitterICARUS) here, and have them include the header from sbnobj.

You could move it later, but it would be a pain.

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.

3 participants