Data Analysis Challenge

This last section is test how much a user has learnt throughout the workshop regarding data analysis using gm2 analysis framework.
You are required to send me (khaw84@uw,edu) a plot at the end of this session. Well, more plots are welcome though.
The challenge will be revealed here before the challenge starts.

Challenge - Truth Analysis (related to materials from day 1)

  • Truth hit position versus reconstructed hit position (logarithmic weighted, using truth crystal energy deposition) as a function of energy
  • Analyzer: Please refer to the, for example
  • Dataset: /pnfs/GM2/scratch/users/kkhaw/production_v7_03_01/2017-02-21-18-27-40/data/
  • Hint 3: How to transform the information in XtalArtRecord so that you can use the findPosition() function
    First you need to include the header information,
    #include "gm2dataproducts/calo/CrystalHitArtRecord.hh" 

    and then you can do the following:
    double xtalHitEDep[54]={};
      for (const auto& xtalHit : xtalData) {
            xtalHitEDep[xtalHit.xtalNum] += xtalHit.edep;
    gm2calo::MatrixCrystalHitArtRecord matrixXtalHit;
        for(int j=0;j<54;j++){
                gm2calo::CrystalHitArtRecord xtalHit;
                xtalHit.xtalNum = j;
       = xtalHitEDep[j];
    double w0_ = 3.2;
    auto position = findPosition(matrixXtalHit, w0_);
  • Hint 4: Coordinate transformation (coordinates defined in the XtalArtRecord is offset compared to the ones in findPosition)
    truthInfo_.x = xtalHit.r/25.2 + 4.5;
    truthInfo_.y = xtalHit.v/25.2 + 3.0;
  • Hint 5: Example TTree variables to store
    typedef struct {
          Double_t x;
          Double_t y;
          Double_t ePrimary;
          Double_t eDep;
          Int_t caloNum;
          Int_t xtalNum;
      } truthHit;
    typedef struct {
          Double_t x;
          Double_t y;  
      } reconHit;