CALIFA data processing concept - R3BRootGroup/R3BRoot GitHub Wiki

Overview

This is an overview of the relevant classes for CALIFA data analysis and simulation and how they interact with each other.

Stuff in italics is planned (by Philipp and their cabal). This is a proposal only and does not reflect collaboration consensus.

The definition of the container classes is over here. The stages for experiment data are Mapped, CrystalCal and Cluster (formerly Hit).

R3BCalifaReader

The ucesb reader code. Note that it generally only works correctly if the following preconditions are met:

  • The data was processed with the CALIFA eventbuilder
  • The data was timestitched
  • The ucesb spec file used for the unpacker uses califa.spec

R3BCalifaMappedData

Mapped contains the data read from the unpacker. This includes all the fields sent by the Califa Febex firmware (except for traces) as well as the interpolated WRTS. TODO: This will become an associative TClonesArray with the tuple (CrystalId, Range) serving as the key. CrystalId will go from one to 2432, Range will be an enum containing HIGH_GAIN and LOW_GAIN.

R3BCalifaMapped2CrystalCal

Applies the calibration. Over/Underflows will be rejected (set to NAN todo: set to INFINITY).

R3BCalifaCrystalCalData

The output of the calibration.

TODO: This will become an associative TClonesArray with the tuple (CrystalId, Range, Method) serving as the key. CrystalId and Range as in Mapped. Method will be one of AMPLITUDE and TOT.

For a single crystal for IPhos, which is read out with dual range preamplifiers, there are two Mapped entries. If TOT was enabled, this will result in four entries in the cal level: {HIGH_GAIN, LOW_GAIN} x {AMPLITUDE, TOT}. TOT entries will have set N_f and N_s to NAN.

Alternative concept: TOT is stored with in the same entry. In that case, the key stays (CrystalId, Range). There are three fields for energy: fEnAmp, fEnTot and fEn. The last one is fEnAmp iff fEnAmp is valid and fEnTot otherwise.

R3BCalifaCrystalCal2Cluster

This is the clustering algorithm.

The different methods of determining if two crystals are neighbors will be moved to separate classes. An interface called R3BCalifaNeighborhood will allow to instantiate Cal2Cluster with any neighborhood definition (such as cone, "rectangular" etc).

Optionally, making the hits unique per crystalID may be separated to an interface class. We will have up to four different candidates for an energy measurement. Rules include:

  • Prefer AMPLITUDE to TOT
  • For AMPLITUDE signals, the LOW_GAIN energy will determine which signal gets used. If it is below some threshold, the HIGH_GAIN signal will be used.
  • For TOT signals, always prefer LOW_GAIN.

The crystal ID of the hit which was used as a pivot element shall be the key of the cluster entry.

This key will be stored with an otherwise zero field fClusterId in CalData.

R3BCalifaClusterData

Beyond the energy, QPID and timing entries this class will have additional fields which are initialized as invalid (NAN, zero for integers) and can be filled by following tasks. Filled during instantiation by Cal2Cluster:

  • fEnDet: The energy measured in the detector
  • fDirDet: a TVector3 containing the direction estimated by the crystals being hit (or later from tracking)

Filled later:

  • For DirectionSmearer:
    • fDirSmeared: a smeared version of the direction which avoids binning effects due to our crystals having fixed theta and phi values.
  • For QPID:
    • fPDG: The best-estimate PDG code for the particle as determined by QPID. This may default to assuming that punch-throughs are protons.
    • fEnReco: The energy that particle had. For stopped particles, the energy measured. For others, E(deltaE) is used. (Atima?). This may be initialized with fEnergy.
  • For CalifaLorentz:
    • fBeta: For debugging, the 3-vector boost which was applied.
    • fEnCMS: EnReco transformed to the CMS.
    • fDirCMS: The direction the particle had in the center of mass system.

DirectionSmearer (TODO)

This will smear the direction using either Gabriels per channel histograms or a simplified method based on assuming a rectangular distribution within the crystal.

QPIDParser (TODO)

This will use the QPID to determine which type of particle a stopped particle was. Punch-throughs will be assumed to be protons. fEnReco will be calculated for punch-through protons.

CalifaLorentz (WIP)

This will transform the momentum direction and energy to the CMS system.