소스 검색

Updates to use automatically generated collection accessors and
TrackingNtuple V928

Caleb Fangmeier 7 년 전
부모
커밋
cee220ac36
11개의 변경된 파일2756개의 추가작업 그리고 2429개의 파일을 삭제
  1. 1 0
      .gitignore
  2. 4 2
      CMakeLists.txt
  3. 0 1196
      analysis/TrackingNtuple.h
  4. 1 0
      analysis/TrackingNtuple.h
  5. 1416 0
      analysis/TrackingNtuple928.h
  6. 808 0
      analysis/TrackingNtupleObjs.hpp
  7. 383 0
      analysis/TrackingNtupleObjs.yaml
  8. 6 6
      analysis/common.hpp
  9. 0 1063
      analysis/obj_types.cpp
  10. 136 161
      analysis/tracking_validation.cpp
  11. 1 1
      filval

+ 1 - 0
.gitignore

@@ -8,5 +8,6 @@ analysis/figures/
 
 tags
 .ipynb_checkpoints/
+*.plist
 
 */__pycache__/

+ 4 - 2
CMakeLists.txt

@@ -58,7 +58,9 @@ SET( CLINGDICTFILE ${CMAKE_CURRENT_BINARY_DIR}/clingdict.cpp )
 ROOT_GENERATE_DICTIONARY( "" ${CMAKE_CURRENT_SOURCE_DIR}/filval/root/LinkDef.hpp ${CLINGDICTFILE} "" )
 ADD_LIBRARY( filval SHARED ${CLINGDICTFILE} )
 
+SET(EXE_LIBS filval ${ROOT_LIBRARIES} ${CMAKE_CURRENT_SOURCE_DIR}/filval/yaml-cpp/build/libyaml-cpp.so)
+
 # Compiles main analysis routine
-ADD_EXECUTABLE(tracking_validation ${CMAKE_CURRENT_SOURCE_DIR}/analysis/tracking_validation.cpp)
-TARGET_LINK_LIBRARIES( tracking_validation filval ${ROOT_LIBRARIES} ${CMAKE_CURRENT_SOURCE_DIR}/filval/yaml-cpp/build/libyaml-cpp.so )
+ADD_EXECUTABLE( tracking_validation ${CMAKE_CURRENT_SOURCE_DIR}/analysis/tracking_validation.cpp )
+TARGET_LINK_LIBRARIES( tracking_validation ${EXE_LIBS} )
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1196
analysis/TrackingNtuple.h


+ 1 - 0
analysis/TrackingNtuple.h

@@ -0,0 +1 @@
+TrackingNtuple928.h

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1416 - 0
analysis/TrackingNtuple928.h


+ 808 - 0
analysis/TrackingNtupleObjs.hpp

@@ -0,0 +1,808 @@
+/** ../analysis/TrackingNtupleObjs.hpp created on 2017-11-08 12:56:35.449308 by generate_class.py
+ * AVOID EDITING THIS FILE BY HAND!! Instead edit ../analysis/TrackingNtupleObjs.yaml and re-run
+ * generate_class.py
+ */
+#include "filval/filval.hpp"
+#include "filval/root/filval.hpp"
+
+#include<cmath>
+
+#include "TrackingNtuple.h"
+
+using namespace std;
+using namespace fv;
+using namespace fv::root;
+
+typedef TreeDataSet<TrackingNtuple> TrackingDataSet;
+struct PixRecHit;
+
+class PixRecHitCollection {
+  public:
+    class iter {
+      public:
+        iter(const PixRecHitCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const PixRecHit operator*() const;
+      private:
+        const PixRecHitCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<unsigned short>>* val_subdet;
+    Value<vector<unsigned short>>* val_layer;
+    Value<vector<unsigned short>>* val_ladder;
+    Value<vector<unsigned int>>* val_detId;
+    Value<vector<unsigned short>>* val_simType;
+    Value<vector<float>>* val_x;
+    Value<vector<float>>* val_y;
+    Value<vector<float>>* val_z;
+    Value<vector<float>>* val_xx;
+    Value<vector<float>>* val_xy;
+    Value<vector<float>>* val_yy;
+    Value<vector<float>>* val_yz;
+    Value<vector<float>>* val_zz;
+    Value<vector<float>>* val_zx;
+    Value<vector<float>>* val_radL;
+    Value<vector<float>>* val_bbxi;
+    Value<vector<vector<int>>>* val_trkIdx;
+    Value<vector<vector<int>>>* val_seeIdx;
+    Value<vector<vector<int>>>* val_simHitIdx;
+    Value<vector<vector<float>>>* val_chargeFraction;
+
+    PixRecHitCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_subdet = tds.track_branch_obj<vector<unsigned short>>("pix_subdet");
+        val_layer = tds.track_branch_obj<vector<unsigned short>>("pix_layer");
+        val_ladder = tds.track_branch_obj<vector<unsigned short>>("pix_ladder");
+        val_detId = tds.track_branch_obj<vector<unsigned int>>("pix_detId");
+        val_simType = tds.track_branch_obj<vector<unsigned short>>("pix_simType");
+        val_x = tds.track_branch_obj<vector<float>>("pix_x");
+        val_y = tds.track_branch_obj<vector<float>>("pix_y");
+        val_z = tds.track_branch_obj<vector<float>>("pix_z");
+        val_xx = tds.track_branch_obj<vector<float>>("pix_xx");
+        val_xy = tds.track_branch_obj<vector<float>>("pix_xy");
+        val_yy = tds.track_branch_obj<vector<float>>("pix_yy");
+        val_yz = tds.track_branch_obj<vector<float>>("pix_yz");
+        val_zz = tds.track_branch_obj<vector<float>>("pix_zz");
+        val_zx = tds.track_branch_obj<vector<float>>("pix_zx");
+        val_radL = tds.track_branch_obj<vector<float>>("pix_radL");
+        val_bbxi = tds.track_branch_obj<vector<float>>("pix_bbxi");
+        val_trkIdx = tds.track_branch_obj<vector<vector<int>>>("pix_trkIdx");
+        val_seeIdx = tds.track_branch_obj<vector<vector<int>>>("pix_seeIdx");
+        val_simHitIdx = tds.track_branch_obj<vector<vector<int>>>("pix_simHitIdx");
+        val_chargeFraction = tds.track_branch_obj<vector<vector<float>>>("pix_chargeFraction");
+    }
+
+    size_t size() const { return val_subdet->get_value().size();}
+
+    const PixRecHit operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct PixRecHit {
+    const PixRecHitCollection* collection;
+    const size_t idx;
+    PixRecHit(const PixRecHitCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const unsigned short& subdet() const {return collection->val_subdet->get_value().at(idx);}
+    const unsigned short& layer() const {return collection->val_layer->get_value().at(idx);}
+    const unsigned short& ladder() const {return collection->val_ladder->get_value().at(idx);}
+    const unsigned int& detId() const {return collection->val_detId->get_value().at(idx);}
+    const unsigned short& simType() const {return collection->val_simType->get_value().at(idx);}
+    const float& x() const {return collection->val_x->get_value().at(idx);}
+    const float& y() const {return collection->val_y->get_value().at(idx);}
+    const float& z() const {return collection->val_z->get_value().at(idx);}
+    const float& xx() const {return collection->val_xx->get_value().at(idx);}
+    const float& xy() const {return collection->val_xy->get_value().at(idx);}
+    const float& yy() const {return collection->val_yy->get_value().at(idx);}
+    const float& yz() const {return collection->val_yz->get_value().at(idx);}
+    const float& zz() const {return collection->val_zz->get_value().at(idx);}
+    const float& zx() const {return collection->val_zx->get_value().at(idx);}
+    const float& radL() const {return collection->val_radL->get_value().at(idx);}
+    const float& bbxi() const {return collection->val_bbxi->get_value().at(idx);}
+    const vector<int>& trkIdx() const {return collection->val_trkIdx->get_value().at(idx);}
+    const vector<int>& seeIdx() const {return collection->val_seeIdx->get_value().at(idx);}
+    const vector<int>& simHitIdx() const {return collection->val_simHitIdx->get_value().at(idx);}
+    const vector<float>& chargeFraction() const {return collection->val_chargeFraction->get_value().at(idx);}
+};
+
+const PixRecHit PixRecHitCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const PixRecHit PixRecHitCollection::operator[](size_t idx) const {
+    return {this, idx};
+}
+struct SimHit;
+
+class SimHitCollection {
+  public:
+    class iter {
+      public:
+        iter(const SimHitCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const SimHit operator*() const;
+      private:
+        const SimHitCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<unsigned short>>* val_subdet;
+    Value<vector<unsigned short>>* val_layer;
+    Value<vector<unsigned int>>* val_detId;
+    Value<vector<float>>* val_x;
+    Value<vector<float>>* val_y;
+    Value<vector<float>>* val_z;
+    Value<vector<int>>* val_particle;
+    Value<vector<short>>* val_process;
+    Value<vector<float>>* val_eloss;
+    Value<vector<float>>* val_tof;
+    Value<vector<int>>* val_simTrkIdx;
+    Value<vector<vector<int>>>* val_hitIdx;
+    Value<vector<vector<int>>>* val_hitType;
+
+    SimHitCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_subdet = tds.track_branch_obj<vector<unsigned short>>("simhit_subdet");
+        val_layer = tds.track_branch_obj<vector<unsigned short>>("simhit_layer");
+        val_detId = tds.track_branch_obj<vector<unsigned int>>("simhit_detId");
+        val_x = tds.track_branch_obj<vector<float>>("simhit_x");
+        val_y = tds.track_branch_obj<vector<float>>("simhit_y");
+        val_z = tds.track_branch_obj<vector<float>>("simhit_z");
+        val_particle = tds.track_branch_obj<vector<int>>("simhit_particle");
+        val_process = tds.track_branch_obj<vector<short>>("simhit_process");
+        val_eloss = tds.track_branch_obj<vector<float>>("simhit_eloss");
+        val_tof = tds.track_branch_obj<vector<float>>("simhit_tof");
+        val_simTrkIdx = tds.track_branch_obj<vector<int>>("simhit_simTrkIdx");
+        val_hitIdx = tds.track_branch_obj<vector<vector<int>>>("simhit_hitIdx");
+        val_hitType = tds.track_branch_obj<vector<vector<int>>>("simhit_hitType");
+    }
+
+    size_t size() const { return val_subdet->get_value().size();}
+
+    const SimHit operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct SimHit {
+    const SimHitCollection* collection;
+    const size_t idx;
+    SimHit(const SimHitCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const unsigned short& subdet() const {return collection->val_subdet->get_value().at(idx);}
+    const unsigned short& layer() const {return collection->val_layer->get_value().at(idx);}
+    const unsigned int& detId() const {return collection->val_detId->get_value().at(idx);}
+    const float& x() const {return collection->val_x->get_value().at(idx);}
+    const float& y() const {return collection->val_y->get_value().at(idx);}
+    const float& z() const {return collection->val_z->get_value().at(idx);}
+    const int& particle() const {return collection->val_particle->get_value().at(idx);}
+    const short& process() const {return collection->val_process->get_value().at(idx);}
+    const float& eloss() const {return collection->val_eloss->get_value().at(idx);}
+    const float& tof() const {return collection->val_tof->get_value().at(idx);}
+    const int& simTrkIdx() const {return collection->val_simTrkIdx->get_value().at(idx);}
+    const vector<int>& hitIdx() const {return collection->val_hitIdx->get_value().at(idx);}
+    const vector<int>& hitType() const {return collection->val_hitType->get_value().at(idx);}
+};
+
+const SimHit SimHitCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const SimHit SimHitCollection::operator[](size_t idx) const {
+    return {this, idx};
+}
+struct Seed;
+
+class SeedCollection {
+  public:
+    class iter {
+      public:
+        iter(const SeedCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const Seed operator*() const;
+      private:
+        const SeedCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<short>>* val_fitok;
+    Value<vector<float>>* val_px;
+    Value<vector<float>>* val_py;
+    Value<vector<float>>* val_pz;
+    Value<vector<float>>* val_pt;
+    Value<vector<float>>* val_eta;
+    Value<vector<float>>* val_phi;
+    Value<vector<float>>* val_dxy;
+    Value<vector<float>>* val_dz;
+    Value<vector<float>>* val_ptErr;
+    Value<vector<float>>* val_etaErr;
+    Value<vector<float>>* val_phiErr;
+    Value<vector<float>>* val_dxyErr;
+    Value<vector<float>>* val_dzErr;
+    Value<vector<float>>* val_chi2;
+    Value<vector<int>>* val_q;
+    Value<vector<unsigned int>>* val_nValid;
+    Value<vector<unsigned int>>* val_nPixel;
+    Value<vector<unsigned int>>* val_nGlued;
+    Value<vector<unsigned int>>* val_nStrip;
+    Value<vector<unsigned int>>* val_algo;
+    Value<vector<unsigned int>>* val_algoOriginal;
+    Value<vector<int>>* val_trkIdx;
+    Value<vector<vector<float>>>* val_shareFrac;
+    Value<vector<vector<int>>>* val_simTrkIdx;
+    Value<vector<vector<int>>>* val_hitIdx;
+    Value<vector<vector<int>>>* val_hitType;
+    Value<vector<unsigned int>>* val_offset;
+    Value<vector<unsigned char>>* val_hitsMask;
+    Value<vector<int>>* val_subDet2;
+    Value<vector<float>>* val_dRz2;
+    Value<vector<float>>* val_dPhi2;
+    Value<vector<float>>* val_dRz2Pos;
+    Value<vector<float>>* val_dPhi2Pos;
+    Value<vector<int>>* val_subDet1;
+    Value<vector<float>>* val_dRz1;
+    Value<vector<float>>* val_dPhi1;
+    Value<vector<float>>* val_dRz1Pos;
+    Value<vector<float>>* val_dPhi1Pos;
+    Value<vector<float>>* val_superClusterEnergy;
+    Value<vector<float>>* val_superClusterEta;
+    Value<vector<float>>* val_superClusterPhi;
+    Value<vector<float>>* val_superClusterEt;
+    Value<vector<int>>* val_superClusterIdx;
+    Value<vector<unsigned int>>* val_ecalDriven;
+    Value<vector<unsigned int>>* val_trkDriven;
+
+    SeedCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_fitok = tds.track_branch_obj<vector<short>>("see_fitok");
+        val_px = tds.track_branch_obj<vector<float>>("see_px");
+        val_py = tds.track_branch_obj<vector<float>>("see_py");
+        val_pz = tds.track_branch_obj<vector<float>>("see_pz");
+        val_pt = tds.track_branch_obj<vector<float>>("see_pt");
+        val_eta = tds.track_branch_obj<vector<float>>("see_eta");
+        val_phi = tds.track_branch_obj<vector<float>>("see_phi");
+        val_dxy = tds.track_branch_obj<vector<float>>("see_dxy");
+        val_dz = tds.track_branch_obj<vector<float>>("see_dz");
+        val_ptErr = tds.track_branch_obj<vector<float>>("see_ptErr");
+        val_etaErr = tds.track_branch_obj<vector<float>>("see_etaErr");
+        val_phiErr = tds.track_branch_obj<vector<float>>("see_phiErr");
+        val_dxyErr = tds.track_branch_obj<vector<float>>("see_dxyErr");
+        val_dzErr = tds.track_branch_obj<vector<float>>("see_dzErr");
+        val_chi2 = tds.track_branch_obj<vector<float>>("see_chi2");
+        val_q = tds.track_branch_obj<vector<int>>("see_q");
+        val_nValid = tds.track_branch_obj<vector<unsigned int>>("see_nValid");
+        val_nPixel = tds.track_branch_obj<vector<unsigned int>>("see_nPixel");
+        val_nGlued = tds.track_branch_obj<vector<unsigned int>>("see_nGlued");
+        val_nStrip = tds.track_branch_obj<vector<unsigned int>>("see_nStrip");
+        val_algo = tds.track_branch_obj<vector<unsigned int>>("see_algo");
+        val_algoOriginal = tds.track_branch_obj<vector<unsigned int>>("see_algoOriginal");
+        val_trkIdx = tds.track_branch_obj<vector<int>>("see_trkIdx");
+        val_shareFrac = tds.track_branch_obj<vector<vector<float>>>("see_shareFrac");
+        val_simTrkIdx = tds.track_branch_obj<vector<vector<int>>>("see_simTrkIdx");
+        val_hitIdx = tds.track_branch_obj<vector<vector<int>>>("see_hitIdx");
+        val_hitType = tds.track_branch_obj<vector<vector<int>>>("see_hitType");
+        val_offset = tds.track_branch_obj<vector<unsigned int>>("see_offset");
+        val_hitsMask = tds.track_branch_obj<vector<unsigned char>>("see_hitsMask");
+        val_subDet2 = tds.track_branch_obj<vector<int>>("see_subDet2");
+        val_dRz2 = tds.track_branch_obj<vector<float>>("see_dRz2");
+        val_dPhi2 = tds.track_branch_obj<vector<float>>("see_dPhi2");
+        val_dRz2Pos = tds.track_branch_obj<vector<float>>("see_dRz2Pos");
+        val_dPhi2Pos = tds.track_branch_obj<vector<float>>("see_dPhi2Pos");
+        val_subDet1 = tds.track_branch_obj<vector<int>>("see_subDet1");
+        val_dRz1 = tds.track_branch_obj<vector<float>>("see_dRz1");
+        val_dPhi1 = tds.track_branch_obj<vector<float>>("see_dPhi1");
+        val_dRz1Pos = tds.track_branch_obj<vector<float>>("see_dRz1Pos");
+        val_dPhi1Pos = tds.track_branch_obj<vector<float>>("see_dPhi1Pos");
+        val_superClusterEnergy = tds.track_branch_obj<vector<float>>("see_superClusterEnergy");
+        val_superClusterEta = tds.track_branch_obj<vector<float>>("see_superClusterEta");
+        val_superClusterPhi = tds.track_branch_obj<vector<float>>("see_superClusterPhi");
+        val_superClusterEt = tds.track_branch_obj<vector<float>>("see_superClusterEt");
+        val_superClusterIdx = tds.track_branch_obj<vector<int>>("see_superClusterIdx");
+        val_ecalDriven = tds.track_branch_obj<vector<unsigned int>>("see_ecalDriven");
+        val_trkDriven = tds.track_branch_obj<vector<unsigned int>>("see_trkDriven");
+    }
+
+    size_t size() const { return val_fitok->get_value().size();}
+
+    const Seed operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct Seed {
+    const SeedCollection* collection;
+    const size_t idx;
+    Seed(const SeedCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const short& fitok() const {return collection->val_fitok->get_value().at(idx);}
+    const float& px() const {return collection->val_px->get_value().at(idx);}
+    const float& py() const {return collection->val_py->get_value().at(idx);}
+    const float& pz() const {return collection->val_pz->get_value().at(idx);}
+    const float& pt() const {return collection->val_pt->get_value().at(idx);}
+    const float& eta() const {return collection->val_eta->get_value().at(idx);}
+    const float& phi() const {return collection->val_phi->get_value().at(idx);}
+    const float& dxy() const {return collection->val_dxy->get_value().at(idx);}
+    const float& dz() const {return collection->val_dz->get_value().at(idx);}
+    const float& ptErr() const {return collection->val_ptErr->get_value().at(idx);}
+    const float& etaErr() const {return collection->val_etaErr->get_value().at(idx);}
+    const float& phiErr() const {return collection->val_phiErr->get_value().at(idx);}
+    const float& dxyErr() const {return collection->val_dxyErr->get_value().at(idx);}
+    const float& dzErr() const {return collection->val_dzErr->get_value().at(idx);}
+    const float& chi2() const {return collection->val_chi2->get_value().at(idx);}
+    const int& q() const {return collection->val_q->get_value().at(idx);}
+    const unsigned int& nValid() const {return collection->val_nValid->get_value().at(idx);}
+    const unsigned int& nPixel() const {return collection->val_nPixel->get_value().at(idx);}
+    const unsigned int& nGlued() const {return collection->val_nGlued->get_value().at(idx);}
+    const unsigned int& nStrip() const {return collection->val_nStrip->get_value().at(idx);}
+    const unsigned int& algo() const {return collection->val_algo->get_value().at(idx);}
+    const unsigned int& algoOriginal() const {return collection->val_algoOriginal->get_value().at(idx);}
+    const int& trkIdx() const {return collection->val_trkIdx->get_value().at(idx);}
+    const vector<float>& shareFrac() const {return collection->val_shareFrac->get_value().at(idx);}
+    const vector<int>& simTrkIdx() const {return collection->val_simTrkIdx->get_value().at(idx);}
+    const vector<int>& hitIdx() const {return collection->val_hitIdx->get_value().at(idx);}
+    const vector<int>& hitType() const {return collection->val_hitType->get_value().at(idx);}
+    const unsigned int& offset() const {return collection->val_offset->get_value().at(idx);}
+    const unsigned char& hitsMask() const {return collection->val_hitsMask->get_value().at(idx);}
+    const int& subDet2() const {return collection->val_subDet2->get_value().at(idx);}
+    const float& dRz2() const {return collection->val_dRz2->get_value().at(idx);}
+    const float& dPhi2() const {return collection->val_dPhi2->get_value().at(idx);}
+    const float& dRz2Pos() const {return collection->val_dRz2Pos->get_value().at(idx);}
+    const float& dPhi2Pos() const {return collection->val_dPhi2Pos->get_value().at(idx);}
+    const int& subDet1() const {return collection->val_subDet1->get_value().at(idx);}
+    const float& dRz1() const {return collection->val_dRz1->get_value().at(idx);}
+    const float& dPhi1() const {return collection->val_dPhi1->get_value().at(idx);}
+    const float& dRz1Pos() const {return collection->val_dRz1Pos->get_value().at(idx);}
+    const float& dPhi1Pos() const {return collection->val_dPhi1Pos->get_value().at(idx);}
+    const float& superClusterEnergy() const {return collection->val_superClusterEnergy->get_value().at(idx);}
+    const float& superClusterEta() const {return collection->val_superClusterEta->get_value().at(idx);}
+    const float& superClusterPhi() const {return collection->val_superClusterPhi->get_value().at(idx);}
+    const float& superClusterEt() const {return collection->val_superClusterEt->get_value().at(idx);}
+    const int& superClusterIdx() const {return collection->val_superClusterIdx->get_value().at(idx);}
+    const unsigned int& ecalDriven() const {return collection->val_ecalDriven->get_value().at(idx);}
+    const unsigned int& trkDriven() const {return collection->val_trkDriven->get_value().at(idx);}
+};
+
+const Seed SeedCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const Seed SeedCollection::operator[](size_t idx) const {
+    return {this, idx};
+}
+struct Track;
+
+class TrackCollection {
+  public:
+    class iter {
+      public:
+        iter(const TrackCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const Track operator*() const;
+      private:
+        const TrackCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<float>>* val_px;
+    Value<vector<float>>* val_py;
+    Value<vector<float>>* val_pz;
+    Value<vector<float>>* val_pt;
+    Value<vector<float>>* val_inner_px;
+    Value<vector<float>>* val_inner_py;
+    Value<vector<float>>* val_inner_pz;
+    Value<vector<float>>* val_inner_pt;
+    Value<vector<float>>* val_outer_px;
+    Value<vector<float>>* val_outer_py;
+    Value<vector<float>>* val_outer_pz;
+    Value<vector<float>>* val_outer_pt;
+    Value<vector<float>>* val_eta;
+    Value<vector<float>>* val_lambda;
+    Value<vector<float>>* val_cotTheta;
+    Value<vector<float>>* val_phi;
+    Value<vector<float>>* val_dxy;
+    Value<vector<float>>* val_dz;
+    Value<vector<float>>* val_ptErr;
+    Value<vector<float>>* val_etaErr;
+    Value<vector<float>>* val_lambdaErr;
+    Value<vector<float>>* val_phiErr;
+    Value<vector<float>>* val_dxyErr;
+    Value<vector<float>>* val_dzErr;
+    Value<vector<float>>* val_refpoint_x;
+    Value<vector<float>>* val_refpoint_y;
+    Value<vector<float>>* val_refpoint_z;
+    Value<vector<float>>* val_nChi2;
+    Value<vector<int>>* val_q;
+    Value<vector<unsigned int>>* val_nValid;
+    Value<vector<unsigned int>>* val_nInvalid;
+    Value<vector<unsigned int>>* val_nPixel;
+    Value<vector<unsigned int>>* val_nStrip;
+    Value<vector<unsigned int>>* val_nPixelLay;
+    Value<vector<unsigned int>>* val_nStripLay;
+    Value<vector<unsigned int>>* val_n3DLay;
+    Value<vector<unsigned int>>* val_nOuterLost;
+    Value<vector<unsigned int>>* val_nInnerLost;
+    Value<vector<unsigned int>>* val_algo;
+    Value<vector<unsigned int>>* val_originalAlgo;
+    Value<vector<ULong64_t>>* val_algoMask;
+    Value<vector<unsigned int>>* val_stopReason;
+    Value<vector<short>>* val_isHP;
+    Value<vector<int>>* val_seedIdx;
+    Value<vector<float>>* val_vtxx;
+    Value<vector<float>>* val_vtxy;
+    Value<vector<float>>* val_vtxz;
+    Value<vector<vector<float>>>* val_shareFrac;
+    Value<vector<vector<int>>>* val_simTrkIdx;
+    Value<vector<vector<int>>>* val_hitIdx;
+    Value<vector<vector<int>>>* val_hitType;
+    Value<vector<int>>* val_genIdx;
+    Value<vector<float>>* val_genDR;
+
+    TrackCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_px = tds.track_branch_obj<vector<float>>("trk_px");
+        val_py = tds.track_branch_obj<vector<float>>("trk_py");
+        val_pz = tds.track_branch_obj<vector<float>>("trk_pz");
+        val_pt = tds.track_branch_obj<vector<float>>("trk_pt");
+        val_inner_px = tds.track_branch_obj<vector<float>>("trk_inner_px");
+        val_inner_py = tds.track_branch_obj<vector<float>>("trk_inner_py");
+        val_inner_pz = tds.track_branch_obj<vector<float>>("trk_inner_pz");
+        val_inner_pt = tds.track_branch_obj<vector<float>>("trk_inner_pt");
+        val_outer_px = tds.track_branch_obj<vector<float>>("trk_outer_px");
+        val_outer_py = tds.track_branch_obj<vector<float>>("trk_outer_py");
+        val_outer_pz = tds.track_branch_obj<vector<float>>("trk_outer_pz");
+        val_outer_pt = tds.track_branch_obj<vector<float>>("trk_outer_pt");
+        val_eta = tds.track_branch_obj<vector<float>>("trk_eta");
+        val_lambda = tds.track_branch_obj<vector<float>>("trk_lambda");
+        val_cotTheta = tds.track_branch_obj<vector<float>>("trk_cotTheta");
+        val_phi = tds.track_branch_obj<vector<float>>("trk_phi");
+        val_dxy = tds.track_branch_obj<vector<float>>("trk_dxy");
+        val_dz = tds.track_branch_obj<vector<float>>("trk_dz");
+        val_ptErr = tds.track_branch_obj<vector<float>>("trk_ptErr");
+        val_etaErr = tds.track_branch_obj<vector<float>>("trk_etaErr");
+        val_lambdaErr = tds.track_branch_obj<vector<float>>("trk_lambdaErr");
+        val_phiErr = tds.track_branch_obj<vector<float>>("trk_phiErr");
+        val_dxyErr = tds.track_branch_obj<vector<float>>("trk_dxyErr");
+        val_dzErr = tds.track_branch_obj<vector<float>>("trk_dzErr");
+        val_refpoint_x = tds.track_branch_obj<vector<float>>("trk_refpoint_x");
+        val_refpoint_y = tds.track_branch_obj<vector<float>>("trk_refpoint_y");
+        val_refpoint_z = tds.track_branch_obj<vector<float>>("trk_refpoint_z");
+        val_nChi2 = tds.track_branch_obj<vector<float>>("trk_nChi2");
+        val_q = tds.track_branch_obj<vector<int>>("trk_q");
+        val_nValid = tds.track_branch_obj<vector<unsigned int>>("trk_nValid");
+        val_nInvalid = tds.track_branch_obj<vector<unsigned int>>("trk_nInvalid");
+        val_nPixel = tds.track_branch_obj<vector<unsigned int>>("trk_nPixel");
+        val_nStrip = tds.track_branch_obj<vector<unsigned int>>("trk_nStrip");
+        val_nPixelLay = tds.track_branch_obj<vector<unsigned int>>("trk_nPixelLay");
+        val_nStripLay = tds.track_branch_obj<vector<unsigned int>>("trk_nStripLay");
+        val_n3DLay = tds.track_branch_obj<vector<unsigned int>>("trk_n3DLay");
+        val_nOuterLost = tds.track_branch_obj<vector<unsigned int>>("trk_nOuterLost");
+        val_nInnerLost = tds.track_branch_obj<vector<unsigned int>>("trk_nInnerLost");
+        val_algo = tds.track_branch_obj<vector<unsigned int>>("trk_algo");
+        val_originalAlgo = tds.track_branch_obj<vector<unsigned int>>("trk_originalAlgo");
+        val_algoMask = tds.track_branch_obj<vector<ULong64_t>>("trk_algoMask");
+        val_stopReason = tds.track_branch_obj<vector<unsigned int>>("trk_stopReason");
+        val_isHP = tds.track_branch_obj<vector<short>>("trk_isHP");
+        val_seedIdx = tds.track_branch_obj<vector<int>>("trk_seedIdx");
+        val_vtxx = tds.track_branch_obj<vector<float>>("trk_vtxx");
+        val_vtxy = tds.track_branch_obj<vector<float>>("trk_vtxy");
+        val_vtxz = tds.track_branch_obj<vector<float>>("trk_vtxz");
+        val_shareFrac = tds.track_branch_obj<vector<vector<float>>>("trk_shareFrac");
+        val_simTrkIdx = tds.track_branch_obj<vector<vector<int>>>("trk_simTrkIdx");
+        val_hitIdx = tds.track_branch_obj<vector<vector<int>>>("trk_hitIdx");
+        val_hitType = tds.track_branch_obj<vector<vector<int>>>("trk_hitType");
+        val_genIdx = tds.track_branch_obj<vector<int>>("trk_genIdx");
+        val_genDR = tds.track_branch_obj<vector<float>>("trk_genDR");
+    }
+
+    size_t size() const { return val_px->get_value().size();}
+
+    const Track operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct Track {
+    const TrackCollection* collection;
+    const size_t idx;
+    Track(const TrackCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const float& px() const {return collection->val_px->get_value().at(idx);}
+    const float& py() const {return collection->val_py->get_value().at(idx);}
+    const float& pz() const {return collection->val_pz->get_value().at(idx);}
+    const float& pt() const {return collection->val_pt->get_value().at(idx);}
+    const float& inner_px() const {return collection->val_inner_px->get_value().at(idx);}
+    const float& inner_py() const {return collection->val_inner_py->get_value().at(idx);}
+    const float& inner_pz() const {return collection->val_inner_pz->get_value().at(idx);}
+    const float& inner_pt() const {return collection->val_inner_pt->get_value().at(idx);}
+    const float& outer_px() const {return collection->val_outer_px->get_value().at(idx);}
+    const float& outer_py() const {return collection->val_outer_py->get_value().at(idx);}
+    const float& outer_pz() const {return collection->val_outer_pz->get_value().at(idx);}
+    const float& outer_pt() const {return collection->val_outer_pt->get_value().at(idx);}
+    const float& eta() const {return collection->val_eta->get_value().at(idx);}
+    const float& lambda() const {return collection->val_lambda->get_value().at(idx);}
+    const float& cotTheta() const {return collection->val_cotTheta->get_value().at(idx);}
+    const float& phi() const {return collection->val_phi->get_value().at(idx);}
+    const float& dxy() const {return collection->val_dxy->get_value().at(idx);}
+    const float& dz() const {return collection->val_dz->get_value().at(idx);}
+    const float& ptErr() const {return collection->val_ptErr->get_value().at(idx);}
+    const float& etaErr() const {return collection->val_etaErr->get_value().at(idx);}
+    const float& lambdaErr() const {return collection->val_lambdaErr->get_value().at(idx);}
+    const float& phiErr() const {return collection->val_phiErr->get_value().at(idx);}
+    const float& dxyErr() const {return collection->val_dxyErr->get_value().at(idx);}
+    const float& dzErr() const {return collection->val_dzErr->get_value().at(idx);}
+    const float& refpoint_x() const {return collection->val_refpoint_x->get_value().at(idx);}
+    const float& refpoint_y() const {return collection->val_refpoint_y->get_value().at(idx);}
+    const float& refpoint_z() const {return collection->val_refpoint_z->get_value().at(idx);}
+    const float& nChi2() const {return collection->val_nChi2->get_value().at(idx);}
+    const int& q() const {return collection->val_q->get_value().at(idx);}
+    const unsigned int& nValid() const {return collection->val_nValid->get_value().at(idx);}
+    const unsigned int& nInvalid() const {return collection->val_nInvalid->get_value().at(idx);}
+    const unsigned int& nPixel() const {return collection->val_nPixel->get_value().at(idx);}
+    const unsigned int& nStrip() const {return collection->val_nStrip->get_value().at(idx);}
+    const unsigned int& nPixelLay() const {return collection->val_nPixelLay->get_value().at(idx);}
+    const unsigned int& nStripLay() const {return collection->val_nStripLay->get_value().at(idx);}
+    const unsigned int& n3DLay() const {return collection->val_n3DLay->get_value().at(idx);}
+    const unsigned int& nOuterLost() const {return collection->val_nOuterLost->get_value().at(idx);}
+    const unsigned int& nInnerLost() const {return collection->val_nInnerLost->get_value().at(idx);}
+    const unsigned int& algo() const {return collection->val_algo->get_value().at(idx);}
+    const unsigned int& originalAlgo() const {return collection->val_originalAlgo->get_value().at(idx);}
+    const ULong64_t& algoMask() const {return collection->val_algoMask->get_value().at(idx);}
+    const unsigned int& stopReason() const {return collection->val_stopReason->get_value().at(idx);}
+    const short& isHP() const {return collection->val_isHP->get_value().at(idx);}
+    const int& seedIdx() const {return collection->val_seedIdx->get_value().at(idx);}
+    const float& vtxx() const {return collection->val_vtxx->get_value().at(idx);}
+    const float& vtxy() const {return collection->val_vtxy->get_value().at(idx);}
+    const float& vtxz() const {return collection->val_vtxz->get_value().at(idx);}
+    const vector<float>& shareFrac() const {return collection->val_shareFrac->get_value().at(idx);}
+    const vector<int>& simTrkIdx() const {return collection->val_simTrkIdx->get_value().at(idx);}
+    const vector<int>& hitIdx() const {return collection->val_hitIdx->get_value().at(idx);}
+    const vector<int>& hitType() const {return collection->val_hitType->get_value().at(idx);}
+    const int& genIdx() const {return collection->val_genIdx->get_value().at(idx);}
+    const float& genDR() const {return collection->val_genDR->get_value().at(idx);}
+};
+
+const Track TrackCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const Track TrackCollection::operator[](size_t idx) const {
+    return {this, idx};
+}
+struct SimTrack;
+
+class SimTrackCollection {
+  public:
+    class iter {
+      public:
+        iter(const SimTrackCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const SimTrack operator*() const;
+      private:
+        const SimTrackCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<int>>* val_event;
+    Value<vector<int>>* val_bunchCrossing;
+    Value<vector<int>>* val_pdgId;
+    Value<vector<float>>* val_px;
+    Value<vector<float>>* val_py;
+    Value<vector<float>>* val_pz;
+    Value<vector<float>>* val_pt;
+    Value<vector<float>>* val_eta;
+    Value<vector<float>>* val_phi;
+    Value<vector<float>>* val_pca_pt;
+    Value<vector<float>>* val_pca_eta;
+    Value<vector<float>>* val_pca_lambda;
+    Value<vector<float>>* val_pca_cotTheta;
+    Value<vector<float>>* val_pca_phi;
+    Value<vector<float>>* val_pca_dxy;
+    Value<vector<float>>* val_pca_dz;
+    Value<vector<int>>* val_q;
+    Value<vector<unsigned int>>* val_nValid;
+    Value<vector<unsigned int>>* val_nPixel;
+    Value<vector<unsigned int>>* val_nStrip;
+    Value<vector<unsigned int>>* val_nLay;
+    Value<vector<unsigned int>>* val_nPixelLay;
+    Value<vector<unsigned int>>* val_n3DLay;
+    Value<vector<vector<int>>>* val_trkIdx;
+    Value<vector<vector<float>>>* val_shareFrac;
+    Value<vector<int>>* val_parentVtxIdx;
+    Value<vector<vector<int>>>* val_decayVtxIdx;
+    Value<vector<vector<int>>>* val_simHitIdx;
+
+    SimTrackCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_event = tds.track_branch_obj<vector<int>>("sim_event");
+        val_bunchCrossing = tds.track_branch_obj<vector<int>>("sim_bunchCrossing");
+        val_pdgId = tds.track_branch_obj<vector<int>>("sim_pdgId");
+        val_px = tds.track_branch_obj<vector<float>>("sim_px");
+        val_py = tds.track_branch_obj<vector<float>>("sim_py");
+        val_pz = tds.track_branch_obj<vector<float>>("sim_pz");
+        val_pt = tds.track_branch_obj<vector<float>>("sim_pt");
+        val_eta = tds.track_branch_obj<vector<float>>("sim_eta");
+        val_phi = tds.track_branch_obj<vector<float>>("sim_phi");
+        val_pca_pt = tds.track_branch_obj<vector<float>>("sim_pca_pt");
+        val_pca_eta = tds.track_branch_obj<vector<float>>("sim_pca_eta");
+        val_pca_lambda = tds.track_branch_obj<vector<float>>("sim_pca_lambda");
+        val_pca_cotTheta = tds.track_branch_obj<vector<float>>("sim_pca_cotTheta");
+        val_pca_phi = tds.track_branch_obj<vector<float>>("sim_pca_phi");
+        val_pca_dxy = tds.track_branch_obj<vector<float>>("sim_pca_dxy");
+        val_pca_dz = tds.track_branch_obj<vector<float>>("sim_pca_dz");
+        val_q = tds.track_branch_obj<vector<int>>("sim_q");
+        val_nValid = tds.track_branch_obj<vector<unsigned int>>("sim_nValid");
+        val_nPixel = tds.track_branch_obj<vector<unsigned int>>("sim_nPixel");
+        val_nStrip = tds.track_branch_obj<vector<unsigned int>>("sim_nStrip");
+        val_nLay = tds.track_branch_obj<vector<unsigned int>>("sim_nLay");
+        val_nPixelLay = tds.track_branch_obj<vector<unsigned int>>("sim_nPixelLay");
+        val_n3DLay = tds.track_branch_obj<vector<unsigned int>>("sim_n3DLay");
+        val_trkIdx = tds.track_branch_obj<vector<vector<int>>>("sim_trkIdx");
+        val_shareFrac = tds.track_branch_obj<vector<vector<float>>>("sim_shareFrac");
+        val_parentVtxIdx = tds.track_branch_obj<vector<int>>("sim_parentVtxIdx");
+        val_decayVtxIdx = tds.track_branch_obj<vector<vector<int>>>("sim_decayVtxIdx");
+        val_simHitIdx = tds.track_branch_obj<vector<vector<int>>>("sim_simHitIdx");
+    }
+
+    size_t size() const { return val_event->get_value().size();}
+
+    const SimTrack operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct SimTrack {
+    const SimTrackCollection* collection;
+    const size_t idx;
+    SimTrack(const SimTrackCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const int& event() const {return collection->val_event->get_value().at(idx);}
+    const int& bunchCrossing() const {return collection->val_bunchCrossing->get_value().at(idx);}
+    const int& pdgId() const {return collection->val_pdgId->get_value().at(idx);}
+    const float& px() const {return collection->val_px->get_value().at(idx);}
+    const float& py() const {return collection->val_py->get_value().at(idx);}
+    const float& pz() const {return collection->val_pz->get_value().at(idx);}
+    const float& pt() const {return collection->val_pt->get_value().at(idx);}
+    const float& eta() const {return collection->val_eta->get_value().at(idx);}
+    const float& phi() const {return collection->val_phi->get_value().at(idx);}
+    const float& pca_pt() const {return collection->val_pca_pt->get_value().at(idx);}
+    const float& pca_eta() const {return collection->val_pca_eta->get_value().at(idx);}
+    const float& pca_lambda() const {return collection->val_pca_lambda->get_value().at(idx);}
+    const float& pca_cotTheta() const {return collection->val_pca_cotTheta->get_value().at(idx);}
+    const float& pca_phi() const {return collection->val_pca_phi->get_value().at(idx);}
+    const float& pca_dxy() const {return collection->val_pca_dxy->get_value().at(idx);}
+    const float& pca_dz() const {return collection->val_pca_dz->get_value().at(idx);}
+    const int& q() const {return collection->val_q->get_value().at(idx);}
+    const unsigned int& nValid() const {return collection->val_nValid->get_value().at(idx);}
+    const unsigned int& nPixel() const {return collection->val_nPixel->get_value().at(idx);}
+    const unsigned int& nStrip() const {return collection->val_nStrip->get_value().at(idx);}
+    const unsigned int& nLay() const {return collection->val_nLay->get_value().at(idx);}
+    const unsigned int& nPixelLay() const {return collection->val_nPixelLay->get_value().at(idx);}
+    const unsigned int& n3DLay() const {return collection->val_n3DLay->get_value().at(idx);}
+    const vector<int>& trkIdx() const {return collection->val_trkIdx->get_value().at(idx);}
+    const vector<float>& shareFrac() const {return collection->val_shareFrac->get_value().at(idx);}
+    const int& parentVtxIdx() const {return collection->val_parentVtxIdx->get_value().at(idx);}
+    const vector<int>& decayVtxIdx() const {return collection->val_decayVtxIdx->get_value().at(idx);}
+    const vector<int>& simHitIdx() const {return collection->val_simHitIdx->get_value().at(idx);}
+};
+
+const SimTrack SimTrackCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const SimTrack SimTrackCollection::operator[](size_t idx) const {
+    return {this, idx};
+}
+struct SuperCluster;
+
+class SuperClusterCollection {
+  public:
+    class iter {
+      public:
+        iter(const SuperClusterCollection* collection, size_t idx)
+          :collection(collection), idx(idx) { }
+        iter operator++() { ++idx; return *this; }
+        bool operator!=(const iter & other) { return idx != other.idx; }
+        const SuperCluster operator*() const;
+      private:
+        const SuperClusterCollection* collection;
+        size_t idx;
+    };
+
+    Value<vector<float>>* val_e;
+    Value<vector<float>>* val_px;
+    Value<vector<float>>* val_py;
+    Value<vector<float>>* val_pz;
+    Value<vector<float>>* val_x;
+    Value<vector<float>>* val_y;
+    Value<vector<float>>* val_z;
+    Value<vector<vector<int>>>* val_charge;
+    Value<vector<vector<int>>>* val_lay1;
+    Value<vector<vector<int>>>* val_lay2;
+    Value<vector<vector<int>>>* val_subDet1;
+    Value<vector<vector<int>>>* val_subDet2;
+    Value<vector<vector<float>>>* val_dRz1;
+    Value<vector<vector<float>>>* val_dPhi1;
+    Value<vector<vector<float>>>* val_dRz2;
+    Value<vector<vector<float>>>* val_dPhi2;
+    Value<vector<vector<int>>>* val_seedType;
+    Value<vector<vector<unsigned char>>>* val_hitsMask;
+
+    SuperClusterCollection() { }
+
+    void init(TrackingDataSet& tds){
+        val_e = tds.track_branch_obj<vector<float>>("scl_e");
+        val_px = tds.track_branch_obj<vector<float>>("scl_px");
+        val_py = tds.track_branch_obj<vector<float>>("scl_py");
+        val_pz = tds.track_branch_obj<vector<float>>("scl_pz");
+        val_x = tds.track_branch_obj<vector<float>>("scl_x");
+        val_y = tds.track_branch_obj<vector<float>>("scl_y");
+        val_z = tds.track_branch_obj<vector<float>>("scl_z");
+        val_charge = tds.track_branch_obj<vector<vector<int>>>("scl_charge");
+        val_lay1 = tds.track_branch_obj<vector<vector<int>>>("scl_lay1");
+        val_lay2 = tds.track_branch_obj<vector<vector<int>>>("scl_lay2");
+        val_subDet1 = tds.track_branch_obj<vector<vector<int>>>("scl_subDet1");
+        val_subDet2 = tds.track_branch_obj<vector<vector<int>>>("scl_subDet2");
+        val_dRz1 = tds.track_branch_obj<vector<vector<float>>>("scl_dRz1");
+        val_dPhi1 = tds.track_branch_obj<vector<vector<float>>>("scl_dPhi1");
+        val_dRz2 = tds.track_branch_obj<vector<vector<float>>>("scl_dRz2");
+        val_dPhi2 = tds.track_branch_obj<vector<vector<float>>>("scl_dPhi2");
+        val_seedType = tds.track_branch_obj<vector<vector<int>>>("scl_seedType");
+        val_hitsMask = tds.track_branch_obj<vector<vector<unsigned char>>>("scl_hitsMask");
+    }
+
+    size_t size() const { return val_e->get_value().size();}
+
+    const SuperCluster operator[](size_t) const;
+    iter begin() const { return iter(this, 0); }
+    iter end() const { return iter(this, size()); }
+};
+
+struct SuperCluster {
+    const SuperClusterCollection* collection;
+    const size_t idx;
+    SuperCluster(const SuperClusterCollection* collection, const size_t idx)
+      :collection(collection), idx(idx) { }
+
+    const float& e() const {return collection->val_e->get_value().at(idx);}
+    const float& px() const {return collection->val_px->get_value().at(idx);}
+    const float& py() const {return collection->val_py->get_value().at(idx);}
+    const float& pz() const {return collection->val_pz->get_value().at(idx);}
+    const float& x() const {return collection->val_x->get_value().at(idx);}
+    const float& y() const {return collection->val_y->get_value().at(idx);}
+    const float& z() const {return collection->val_z->get_value().at(idx);}
+    const vector<int>& charge() const {return collection->val_charge->get_value().at(idx);}
+    const vector<int>& lay1() const {return collection->val_lay1->get_value().at(idx);}
+    const vector<int>& lay2() const {return collection->val_lay2->get_value().at(idx);}
+    const vector<int>& subDet1() const {return collection->val_subDet1->get_value().at(idx);}
+    const vector<int>& subDet2() const {return collection->val_subDet2->get_value().at(idx);}
+    const vector<float>& dRz1() const {return collection->val_dRz1->get_value().at(idx);}
+    const vector<float>& dPhi1() const {return collection->val_dPhi1->get_value().at(idx);}
+    const vector<float>& dRz2() const {return collection->val_dRz2->get_value().at(idx);}
+    const vector<float>& dPhi2() const {return collection->val_dPhi2->get_value().at(idx);}
+    const vector<int>& seedType() const {return collection->val_seedType->get_value().at(idx);}
+    const vector<unsigned char>& hitsMask() const {return collection->val_hitsMask->get_value().at(idx);}
+};
+
+const SuperCluster SuperClusterCollection::iter::operator*() const {
+    return {collection, idx};
+}
+const SuperCluster SuperClusterCollection::operator[](size_t idx) const {
+    return {this, idx};
+}

+ 383 - 0
analysis/TrackingNtupleObjs.yaml

@@ -0,0 +1,383 @@
+PixRecHit:
+    treename_prefix: pix
+    fields:
+      - name: subdet
+        type: unsigned short
+      - name: layer
+        type: unsigned short
+      - name: ladder
+        type: unsigned short
+      - name: detId
+        type: unsigned int
+      - name: simType
+        type: unsigned short
+      - name: x
+        type: float
+      - name: y
+        type: float
+      - name: z
+        type: float
+      - name: xx
+        type: float
+      - name: xy
+        type: float
+      - name: yy
+        type: float
+      - name: yz
+        type: float
+      - name: zz
+        type: float
+      - name: zx
+        type: float
+      - name: radL
+        type: float
+      - name: bbxi
+        type: float
+      - name: trkIdx
+        type: vector<int>
+      - name: seeIdx
+        type: vector<int>
+      - name: simHitIdx
+        type: vector<int>
+      - name: chargeFraction
+        type: vector<float>
+
+SimHit:
+    treename_prefix: simhit
+    fields:
+      - name: subdet
+        type: unsigned short
+      - name: layer
+        type: unsigned short
+      - name: detId
+        type: unsigned int
+      - name: x
+        type: float
+      - name: y
+        type: float
+      - name: z
+        type: float
+      - name: particle
+        type: int
+      - name: process
+        type: short
+      - name: eloss
+        type: float
+      - name: tof
+        type: float
+      - name: simTrkIdx
+        type: int
+      - name: hitIdx
+        type: vector<int>
+      - name: hitType
+        type: vector<int>
+
+Seed:
+    treename_prefix: see
+    fields:
+      - name: fitok
+        type: short
+      - name: px
+        type: float
+      - name: py
+        type: float
+      - name: pz
+        type: float
+      - name: pt
+        type: float
+      - name: eta
+        type: float
+      - name: phi
+        type: float
+      - name: dxy
+        type: float
+      - name: dz
+        type: float
+      - name: ptErr
+        type: float
+      - name: etaErr
+        type: float
+      - name: phiErr
+        type: float
+      - name: dxyErr
+        type: float
+      - name: dzErr
+        type: float
+      - name: chi2
+        type: float
+      - name: q
+        type: int
+      - name: nValid
+        type: unsigned int
+      - name: nPixel
+        type: unsigned int
+      - name: nGlued
+        type: unsigned int
+      - name: nStrip
+        type: unsigned int
+      - name: algo
+        type: unsigned int
+      - name: algoOriginal
+        type: unsigned int
+      - name: trkIdx
+        type: int
+      - name: shareFrac
+        type: vector<float>
+      - name: simTrkIdx
+        type: vector<int>
+      - name: hitIdx
+        type: vector<int>
+      - name: hitType
+        type: vector<int>
+      - name: offset
+        type: unsigned int
+      - name: hitsMask
+        type: unsigned char
+      - name: subDet2
+        type: int
+      - name: dRz2
+        type: float
+      - name: dPhi2
+        type: float
+      - name: dRz2Pos
+        type: float
+      - name: dPhi2Pos
+        type: float
+      - name: subDet1
+        type: int
+      - name: dRz1
+        type: float
+      - name: dPhi1
+        type: float
+      - name: dRz1Pos
+        type: float
+      - name: dPhi1Pos
+        type: float
+      - name: superClusterEnergy
+        type: float
+      - name: superClusterEta
+        type: float
+      - name: superClusterPhi
+        type: float
+      - name: superClusterEt
+        type: float
+      - name: superClusterIdx
+        type: int
+      - name: ecalDriven
+        type: unsigned int
+      - name: trkDriven
+        type: unsigned int
+
+Track:
+    treename_prefix: trk
+    fields:
+      - name: px
+        type: float
+      - name: py
+        type: float
+      - name: pz
+        type: float
+      - name: pt
+        type: float
+      - name: inner_px
+        type: float
+      - name: inner_py
+        type: float
+      - name: inner_pz
+        type: float
+      - name: inner_pt
+        type: float
+      - name: outer_px
+        type: float
+      - name: outer_py
+        type: float
+      - name: outer_pz
+        type: float
+      - name: outer_pt
+        type: float
+      - name: eta
+        type: float
+      - name: lambda
+        type: float
+      - name: cotTheta
+        type: float
+      - name: phi
+        type: float
+      - name: dxy
+        type: float
+      - name: dz
+        type: float
+      - name: ptErr
+        type: float
+      - name: etaErr
+        type: float
+      - name: lambdaErr
+        type: float
+      - name: phiErr
+        type: float
+      - name: dxyErr
+        type: float
+      - name: dzErr
+        type: float
+      - name: refpoint_x
+        type: float
+      - name: refpoint_y
+        type: float
+      - name: refpoint_z
+        type: float
+      - name: nChi2
+        type: float
+      - name: q
+        type: int
+      - name: nValid
+        type: unsigned int
+      - name: nInvalid
+        type: unsigned int
+      - name: nPixel
+        type: unsigned int
+      - name: nStrip
+        type: unsigned int
+      - name: nPixelLay
+        type: unsigned int
+      - name: nStripLay
+        type: unsigned int
+      - name: n3DLay
+        type: unsigned int
+      - name: nOuterLost
+        type: unsigned int
+      - name: nInnerLost
+        type: unsigned int
+      - name: algo
+        type: unsigned int
+      - name: originalAlgo
+        type: unsigned int
+      - name: algoMask
+        type: ULong64_t
+      - name: stopReason
+        type: unsigned int
+      - name: isHP
+        type: short
+      - name: seedIdx
+        type: int
+      - name: vtxx
+        type: float
+      - name: vtxy
+        type: float
+      - name: vtxz
+        type: float
+      - name: shareFrac
+        type: vector<float>
+      - name: simTrkIdx
+        type: vector<int>
+      - name: hitIdx
+        type: vector<int>
+      - name: hitType
+        type: vector<int>
+      - name: genIdx
+        type: int
+      - name: genDR
+        type: float
+
+SimTrack:
+    treename_prefix: sim
+    fields:
+      - name: event
+        type: int
+      - name: bunchCrossing
+        type: int
+      - name: pdgId
+        type: int
+      - name: px
+        type: float
+      - name: py
+        type: float
+      - name: pz
+        type: float
+      - name: pt
+        type: float
+      - name: eta
+        type: float
+      - name: phi
+        type: float
+      - name: pca_pt
+        type: float
+      - name: pca_eta
+        type: float
+      - name: pca_lambda
+        type: float
+      - name: pca_cotTheta
+        type: float
+      - name: pca_phi
+        type: float
+      - name: pca_dxy
+        type: float
+      - name: pca_dz
+        type: float
+      - name: q
+        type: int
+      - name: nValid
+        type: unsigned int
+      - name: nPixel
+        type: unsigned int
+      - name: nStrip
+        type: unsigned int
+      - name: nLay
+        type: unsigned int
+      - name: nPixelLay
+        type: unsigned int
+      - name: n3DLay
+        type: unsigned int
+      - name: trkIdx
+        type: vector<int>
+      - name: shareFrac
+        type: vector<float>
+      - name: parentVtxIdx
+        type: int
+      - name: decayVtxIdx
+        type: vector<int>
+      - name: simHitIdx
+        type: vector<int>
+
+SuperCluster:
+    treename_prefix: scl
+    fields:
+      - name: e
+        type: float
+      - name: px
+        type: float
+      - name: py
+        type: float
+      - name: pz
+        type: float
+      - name: x
+        type: float
+      - name: y
+        type: float
+      - name: z
+        type: float
+      - name: charge
+        type: vector<int>
+      - name: lay1
+        type: vector<int>
+      - name: lay2
+        type: vector<int>
+      # - name: ladder1
+      #   type: vector<int>
+      # - name: ladder2
+      #   type: vector<int>
+      - name: subDet1
+        type: vector<int>
+      - name: subDet2
+        type: vector<int>
+      - name: dRz1
+        type: vector<float>
+      - name: dPhi1
+        type: vector<float>
+      - name: dRz2
+        type: vector<float>
+      - name: dPhi2
+        type: vector<float>
+      - name: seedType
+        type: vector<int>
+      - name: hitsMask
+        type: vector<unsigned char>

+ 6 - 6
analysis/common.hpp

@@ -5,14 +5,14 @@
 
 template<typename A, typename B>
 float displacement(const A& a, const B& b){
-    return std::sqrt(pow(a.x-b.x, 2) +
-                     pow(a.y-b.y, 2) +
-                     pow(a.z-b.z, 2));
+    return std::sqrt(pow(a.x()-b.x(), 2) +
+                     pow(a.y()-b.y(), 2) +
+                     pow(a.z()-b.z(), 2));
 }
 
 template<typename T>
 float rho(const T& t){
-    return std::sqrt(pow(t.x,2)+pow(t.y,2));
+    return std::sqrt(pow(t.x(),2)+pow(t.y(),2));
 }
 
 float pseudorapidity(float z, float r){
@@ -27,7 +27,7 @@ float pseudorapidity(float x, float y, float z){
 
 template<typename T>
 float pseudorapidity(const T &t){
-    return pseudorapidity(t.x, t.y, t.z);
+    return pseudorapidity(t.x(), t.y(), t.z());
 }
 
 float pseudorapidityP(float px, float py, float pz){
@@ -37,7 +37,7 @@ float pseudorapidityP(float px, float py, float pz){
 
 template<typename T>
 float pseudorapidityP(const T &t){
-    return pseudorapidityP(t.px, t.py, t.pz);
+    return pseudorapidityP(t.px(), t.py(), t.pz());
 }
 
 #endif // COMMON_HPP

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1063
analysis/obj_types.cpp


+ 136 - 161
analysis/tracking_validation.cpp

@@ -13,7 +13,7 @@
 #include <boost/format.hpp>
 
 #include "analysis/TrackingNtuple.h"
-#include "analysis/obj_types.cpp"
+#include "analysis/TrackingNtupleObjs.hpp"
 #include "analysis/common.hpp"
 
 using namespace std;
@@ -34,22 +34,22 @@ enum PixSubDet{
 
 struct PixDetElem{
     PixSubDet subdet;
-    unsigned char lay;
+    unsigned char layer;
 
-    PixDetElem():subdet(PixSubDet::Void), lay(0) {}
+    PixDetElem():subdet(PixSubDet::Void), layer(0) {}
 
-    PixDetElem(const PixSubDet& subdet, const unsigned char& lay){
+    PixDetElem(const PixSubDet& subdet, const unsigned char& layer){
         this->subdet = subdet;
-        this->lay = lay;
+        this->layer = layer;
     }
 
     template<typename T>
     bool contains(const T& obj) const{
-        return obj.det == subdet && obj.lay == lay;
+        return obj.subdet() == subdet && obj.layer() == layer;
     }
 
-    bool contains(const PixSubDet& subdet, const unsigned char& lay) const{
-        return subdet == this->subdet && lay == this->lay;
+    bool contains(const PixSubDet& subdet, const unsigned char& layer) const{
+        return subdet == this->subdet && layer == this->layer;
     }
 };
 
@@ -67,12 +67,12 @@ vector<string> seedTypes =
      "pixelPairElectronSeeds",
      "stripPairElectronSeeds"};
 
-Value<vector<SuperCluster>>* super_clusters;
-Value<vector<Seed>>* seeds;
-Value<vector<PixRecHit>>* pixrec_hits;
-Value<vector<Track>>* tracks;
-Value<vector<SimHit>>* sim_hits;
-Value<vector<SimTrack>>* sim_tracks;
+SuperClusterCollection super_clusters;
+SeedCollection seeds;
+PixRecHitCollection pixrec_hits;
+TrackCollection tracks;
+SimHitCollection sim_hits;
+SimTrackCollection sim_tracks;
 
 void setup_hit_pair_functions(){
 
@@ -83,7 +83,7 @@ void setup_hit_pair_functions(){
             for(auto hit_pair : hit_pairs){
                 auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
                 auto& sim_hit = std::get<SimHit>(hit_pair);
-                dphis.push_back(atan2(sim_hit.x, sim_hit.y) - atan2(pixrec_hit.x, pixrec_hit.y));
+                dphis.push_back(atan2(sim_hit.x(), sim_hit.y()) - atan2(pixrec_hit.x(), pixrec_hit.y()));
                 etas.push_back(pseudorapidity(pixrec_hit));
             }
             return std::make_pair(etas, dphis);
@@ -109,7 +109,7 @@ void setup_hit_pair_functions(){
             for(auto hit_pair : hit_pairs){
                 auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
                 auto& sim_hit = std::get<SimHit>(hit_pair);
-                dzs.push_back(sim_hit.z - pixrec_hit.z);
+                dzs.push_back(sim_hit.z() - pixrec_hit.z());
                 etas.push_back(pseudorapidity(pixrec_hit));
             }
             return std::make_pair(etas, dzs);
@@ -130,15 +130,12 @@ void setup_hit_pair_functions(){
 }
 
 void register_objects(TrackingDataSet& tds){
-    super_clusters = register_super_clusters(tds);
-    seeds = register_seeds(tds);
-
-    pixrec_hits = register_pixrec_hits(tds);
-    tracks = register_tracks(tds);
-
-    sim_hits = register_sim_hits(tds);
-    sim_tracks = register_sim_tracks(tds);
-
+    super_clusters.init(tds);
+    seeds.init(tds);
+    pixrec_hits.init(tds);
+    tracks.init(tds);
+    sim_hits.init(tds);
+    sim_tracks.init(tds);
 }
 
 void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
@@ -146,53 +143,43 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
     /* Finds SimHit/RecHit pairs
      */
     auto find_matched_nth_hit_in_layer_with_skip =
-    func<vector<HitPair>(vector<Seed>,
-                         vector<PixRecHit>,
-                         vector<SimHit>,
-                         vector<Track>,
-                         vector<SimTrack>,
-                         PixDetElem, int, bool)>("find_matched_nth_hit_in_layer_with_skip",
-        FUNC(([](const vector<Seed>& seeds,
-                 const vector<PixRecHit>& pixrec_hits,
-                 const vector<SimHit>& sim_hits,
-                 const vector<Track>& tracks,
-                 const vector<SimTrack>& sim_tracks,
-                 const PixDetElem&& pixdet,
+    func<vector<HitPair>(PixDetElem, int, bool)>("find_matched_nth_hit_in_layer_with_skip",
+        FUNC(([](const PixDetElem&& pixdet,
                  const unsigned int&& skip,
                  const bool&& first){
             vector<HitPair> matched_hits;
-            for(const Track &trk : tracks){ // loop over all tracks
-                const Seed &seed = seeds[trk.seedIdx];
+            for(auto trk : tracks){ // loop over all tracks
+                auto seed = seeds[trk.seedIdx()];
 
                 // Require seed's source algorithm is one of those in seedTypes
-                if(seed.algoOriginal < 0 || seed.algoOriginal >= seedTypes.size()) continue;
+                if(seed.algoOriginal() < 0 || seed.algoOriginal() >= seedTypes.size()) continue;
                 // Require seed w/ at least 2 hits
-                if(seed.hitIdx.size() < 2) continue;
+                if(seed.hitIdx().size() < 2) continue;
                 // take only pixel hits for now
-                if(seed.hitType[0] != HIT_TYPE_PIXEL || seed.hitType[1] != HIT_TYPE_PIXEL)   continue;
+                if(seed.hitType()[0] != HIT_TYPE_PIXEL || seed.hitType()[1] != HIT_TYPE_PIXEL)   continue;
 
-                const PixRecHit &rec_hit1 = pixrec_hits[seed.hitIdx[0]];
-                const PixRecHit &rec_hit2 = pixrec_hits[seed.hitIdx[1]];
+                auto rec_hit1 = pixrec_hits[seed.hitIdx()[0]];
+                auto rec_hit2 = pixrec_hits[seed.hitIdx()[1]];
                 if(first){ // Looking at first hit in the pair
-                    if(pixdet.contains(rec_hit1) && pixdet.contains((PixSubDet)rec_hit2.det, rec_hit2.lay-1-skip)){
+                    if(pixdet.contains(rec_hit1) && pixdet.contains((PixSubDet)rec_hit2.subdet(), rec_hit2.layer()-1-skip)){
                         // We have the RecHit we want to work with, now find a properly* matched SimHit
-                        if(rec_hit1.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
-                        if(trk.simTrkIdx.size() == 0) continue; // if track is matched to no simtracks, give up.
-                        const int &simTrkIdx = trk.simTrkIdx[0];  // get first matched track
-                        for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
-                            if(simHitIdx == rec_hit1.simHitIdx[0]) // take first matched simhit (should be the closest one)
-                                matched_hits.push_back({rec_hit1, sim_hits[rec_hit1.simHitIdx[0]]});
+                        if(rec_hit1.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
+                        if(trk.simTrkIdx().size() == 0) continue; // if track is matched to no simtracks, give up.
+                        const int &simTrkIdx = trk.simTrkIdx()[0];  // get first matched track
+                        for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
+                            if(simHitIdx == rec_hit1.simHitIdx()[0]) // take first matched simhit (should be the closest one)
+                                matched_hits.push_back({rec_hit1, sim_hits[rec_hit1.simHitIdx()[0]]});
                         }
                     }
                 }else{  // Looking at second hit in the pair
-                    if(pixdet.contains(rec_hit2) && pixdet.contains((PixSubDet)rec_hit1.det, rec_hit2.lay+1+skip)){
+                    if(pixdet.contains(rec_hit2) && pixdet.contains((PixSubDet)rec_hit1.subdet(), rec_hit2.layer()+1+skip)){
                         // We have the RecHit we want to work with, now find a properly* matched SimHit
-                        if(rec_hit2.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
-                        if(trk.simTrkIdx.size() == 0) continue; // if track is matched to no simtracks, give up.
-                        const int &simTrkIdx = trk.simTrkIdx[0];  // get first matched track
-                        for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
-                            if(simHitIdx == rec_hit1.simHitIdx[0]) // take first matched simhit (should be the closest one)
-                                matched_hits.push_back({rec_hit2, sim_hits[rec_hit2.simHitIdx[0]]});
+                        if(rec_hit2.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
+                        if(trk.simTrkIdx().size() == 0) continue; // if track is matched to no simtracks, give up.
+                        const int &simTrkIdx = trk.simTrkIdx()[0];  // get first matched track
+                        for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
+                            if(simHitIdx == rec_hit1.simHitIdx()[0]) // take first matched simhit (should be the closest one)
+                                matched_hits.push_back({rec_hit2, sim_hits[rec_hit2.simHitIdx()[0]]});
                         }
                     }
                 }
@@ -214,27 +201,27 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
 
     // First hit on 1st/2nd bpix layers and second hit in 2nd/3rd
     auto first_hits_in_B1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, skip_zero, first), "first_hits_in_B1_skip_zero");
+            fv::tuple(BPIX_L1, skip_zero, first), "first_hits_in_B1_skip_zero");
     auto first_hits_in_B2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, skip_zero, first), "first_hits_in_B2_skip_zero");
+            fv::tuple(BPIX_L2, skip_zero, first), "first_hits_in_B2_skip_zero");
 
 
     // First hit on 1st/2nd fpix layers and second hit in 2nd/3rd
     auto first_hits_in_F1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, skip_zero, first), "first_hits_in_F1_skip_zero");
+            fv::tuple(FPIX_L1, skip_zero, first), "first_hits_in_F1_skip_zero");
     auto first_hits_in_F2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, skip_zero, first), "first_hits_in_F2_skip_zero");
+            fv::tuple(FPIX_L2, skip_zero, first), "first_hits_in_F2_skip_zero");
 
     // First hit on 1st/2nd fpix layers and second hit in 3rd/4th
     auto first_hits_in_B1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, skip_one, first), "first_hits_in_B1_skip_one");
+            fv::tuple(BPIX_L1, skip_one, first), "first_hits_in_B1_skip_one");
     auto first_hits_in_B2_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, skip_one, first), "first_hits_in_B2_skip_one");
+            fv::tuple(BPIX_L2, skip_one, first), "first_hits_in_B2_skip_one");
 
 
     // First hit on 1st fpix layer and second hit in 3rd layer
     auto first_hits_in_F1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, skip_one, first), "first_hits_in_F1_skip_one");
+            fv::tuple(FPIX_L1, skip_one, first), "first_hits_in_F1_skip_one");
 
 
     TH2Params params_dz = {"$\\eta$",       100, -4,   4,
@@ -270,40 +257,31 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
 void setup_first_hit_pairs(TrackingDataSet& tds){
 
     auto find_matched_nth_hit_in_layer =
-    func<vector<HitPair>(vector<Seed>,
-                         vector<PixRecHit>,
-                         vector<SimHit>,
-                         vector<Track>,
-                         vector<SimTrack>,
-                         PixDetElem, int)>("find_matched_nth_hit_in_layer",
-        FUNC(([](const vector<Seed>& seeds,
-                 const vector<PixRecHit>& pixrec_hits,
-                 const vector<SimHit>& sim_hits,
-                 const vector<Track>& tracks,
-                 const vector<SimTrack>& sim_tracks,
-                 const PixDetElem&& pixdet,
+    func<vector<HitPair>(PixDetElem, int)>("find_matched_nth_hit_in_layer",
+        FUNC(([](const PixDetElem&& pixdet,
                  const unsigned int&& hit_number){
             vector<HitPair> matched_hits;
-            for(const Track &trk : tracks){ // loop over all tracks
-                const Seed &seed = seeds[trk.seedIdx];
-                if(seed.hitIdx.size() <= hit_number) continue; // looking for hit_number'th hit
-                if(seed.algoOriginal < 0 || seed.algoOriginal >= seedTypes.size()) continue;
-                if(seed.hitType[hit_number] != HIT_TYPE_PIXEL) continue; // take only pixel hits for now
-                const PixRecHit &rec_hit = pixrec_hits[seed.hitIdx[hit_number]];
+            for(auto track : tracks){ // loop over all tracks
+                auto seed = seeds[track.seedIdx()];
+                if(seed.hitIdx().size() <= hit_number) continue; // looking for hit_number'th hit
+                if(seed.algoOriginal() < 0 || seed.algoOriginal() >= seedTypes.size()) continue;
+                if(seed.hitType()[hit_number] != HIT_TYPE_PIXEL) continue; // take only pixel hits for now
+                auto rec_hit = pixrec_hits[seed.hitIdx()[hit_number]];
                 if(pixdet.contains(rec_hit)){
                     // We have the RecHit we want to work with, now find a properly* matched SimHit
-                    if(rec_hit.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
-                    if(trk.simTrkIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
-                    const int &simTrkIdx = trk.simTrkIdx[0];  // get first matched track
-                    for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
-                        if(simHitIdx == rec_hit.simHitIdx[0]) // take first matched simhit (should be the closest one)
-                            matched_hits.push_back({rec_hit, sim_hits[rec_hit.simHitIdx[0]]});
+                    if(rec_hit.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
+                    if(track.simTrkIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
+                    const int &simTrkIdx = track.simTrkIdx()[0];  // get first matched track
+                    for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
+                        if(simHitIdx == rec_hit.simHitIdx()[0]) // take first matched simhit (should be the closest one)
+                            matched_hits.push_back({rec_hit, sim_hits[rec_hit.simHitIdx()[0]]});
                     }
                 }
             }
             return matched_hits;
         })));
 
+    //**//**
     auto BPIX_L1 = constant("BPIX_L1", PixDetElem(PixSubDet::Barrel, 1));
     auto BPIX_L2 = constant("BPIX_L2", PixDetElem(PixSubDet::Barrel, 2));
     auto BPIX_L3 = constant("BPIX_L3", PixDetElem(PixSubDet::Barrel, 3));
@@ -317,53 +295,53 @@ void setup_first_hit_pairs(TrackingDataSet& tds){
 
     // First hits on inner two bpix layers
     auto first_hits_in_B1 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, first_hit), "first_hits_in_B1");
+            fv::tuple(BPIX_L1, first_hit), "first_hits_in_B1");
     auto first_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, first_hit), "first_hits_in_B2");
+            fv::tuple(BPIX_L2, first_hit), "first_hits_in_B2");
 
     // Second hits on outer three bpix layers
     auto second_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, second_hit), "second_hits_in_B2");
+            fv::tuple(BPIX_L2, second_hit), "second_hits_in_B2");
     auto second_hits_in_B3 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L3, second_hit), "second_hits_in_B3");
+            fv::tuple(BPIX_L3, second_hit), "second_hits_in_B3");
     auto second_hits_in_B4 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L4, second_hit), "second_hits_in_B4");
+            fv::tuple(BPIX_L4, second_hit), "second_hits_in_B4");
 
     auto first_hits_in_F1 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, first_hit), "first_hits_in_F1");
+            fv::tuple(FPIX_L1, first_hit), "first_hits_in_F1");
     auto first_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, first_hit), "first_hits_in_F2");
+            fv::tuple(FPIX_L2, first_hit), "first_hits_in_F2");
 
     auto second_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, second_hit), "second_hits_in_F2");
+            fv::tuple(FPIX_L2, second_hit), "second_hits_in_F2");
     auto second_hits_in_F3 = fv::tup_apply(find_matched_nth_hit_in_layer,
-            fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L3, second_hit), "second_hits_in_F3");
+            fv::tuple(FPIX_L3, second_hit), "second_hits_in_F3");
 
     // Even vs Odd Ladders
     auto even = constant("even", false);
     auto odd = constant("odd", true);
 
-    auto select_even_odd_ladder_blade_hit_pairs =
-    func<vector<HitPair>(vector<HitPair>, bool)>("select_even_odd_ladder_blade_hit_pairs",
+    auto select_even_odd_ladder_hit_pairs =
+    func<vector<HitPair>(vector<HitPair>, bool)>("select_even_odd_ladder_hit_pairs",
         FUNC(([](const vector<HitPair>& hit_pairs,
                  const bool &&odd){
             vector<HitPair> even_pairs;
             for(const HitPair &hit_pair : hit_pairs){ // loop over all seeds
-                if(std::get<PixRecHit>(hit_pair).ladder_blade % 2 == odd){
+                if(std::get<PixRecHit>(hit_pair).ladder() % 2 == odd){
                     even_pairs.push_back(hit_pair);
                 }
             }
             return even_pairs;
         })));
 
-    auto first_hits_in_B1_even_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
+    auto first_hits_in_B1_even_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
             fv::tuple(first_hits_in_B1, even), "first_hits_in_B1_even_ladder");
-    auto first_hits_in_B1_odd_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
+    auto first_hits_in_B1_odd_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
             fv::tuple(first_hits_in_B1, odd), "first_hits_in_B1_odd_ladder");
 
-    auto first_hits_in_B2_even_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
+    auto first_hits_in_B2_even_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
             fv::tuple(first_hits_in_B2, even), "first_hits_in_B2_even_ladder");
-    auto first_hits_in_B2_odd_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
+    auto first_hits_in_B2_odd_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
             fv::tuple(first_hits_in_B2, odd), "first_hits_in_B2_odd_ladder");
 
     //Plots for dPhi of collections defined above
@@ -540,37 +518,37 @@ void sc_value_hists_for_lb(TrackingDataSet& tds, std::function<bool(int)>& parit
 
     auto pcheck = constant(label, parity_check);
     auto sc_hit_residuals = lookup_function<
-        pair_vec(vector<SuperCluster>, PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals");
+        pair_vec(PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals");
 
     // First hits on inner three bpix layers
     auto sc_first_hits_in_B1_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L1, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B1_dz"));
+            fv::tuple(BPIX_L1, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B1_dz"));
     auto sc_first_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L2, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B2_dz"));
+            fv::tuple(BPIX_L2, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B2_dz"));
     auto sc_first_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L3, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B3_dz"));
+            fv::tuple(BPIX_L3, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B3_dz"));
 
     auto sc_first_hits_in_B1_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L1, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B1_dphi"));
+            fv::tuple(BPIX_L1, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B1_dphi"));
     auto sc_first_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L2, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B2_dphi"));
+            fv::tuple(BPIX_L2, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B2_dphi"));
     auto sc_first_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L3, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B3_dphi"));
+            fv::tuple(BPIX_L3, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B3_dphi"));
 
     // Second hits on outer three bpix layers
     auto sc_second_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L2, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B2_dz"));
+            fv::tuple(BPIX_L2, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B2_dz"));
     auto sc_second_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L3, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B3_dz"));
+            fv::tuple(BPIX_L3, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B3_dz"));
     auto sc_second_hits_in_B4_dz = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L4, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B4_dz"));
+            fv::tuple(BPIX_L4, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B4_dz"));
 
     auto sc_second_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L2, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B2_dphi"));
+            fv::tuple(BPIX_L2, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B2_dphi"));
     auto sc_second_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L3, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B3_dphi"));
+            fv::tuple(BPIX_L3, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B3_dphi"));
     auto sc_second_hits_in_B4_dphi = fv::tup_apply(sc_hit_residuals,
-            fv::tuple(super_clusters, BPIX_L4, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B4_dphi"));
+            fv::tuple(BPIX_L4, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B4_dphi"));
 
     TH2Params params_dz = {"$\\eta$",       100, -4,   4,
                            "$\\delta z$(cm)", 100, -0.7,  0.7};
@@ -623,42 +601,41 @@ void setup_sc_residuals(TrackingDataSet& tds){
      * examins the matched pixel hits. It calculates a residual based on the
      * extrapolated position of the SC track and the position of the matched
      * hit.
-     *   det: 1 for barrel, 2 for endcap
+     *   subdet: 1 for barrel, 2 for endcap
      *   pix_layer: 1-4 for barrel, 1-3 for endcap
      *   hit_number: examin either the first or second matched hit
      *   sel_dRz: True: calculate dR, False: calculate dz
      *   pcheck: a boolean function that filters residuals based on
      *   ladder/blade. Normally used to select either even or odd ladders.
      */
-    func<pair_vec(vector<SuperCluster>,
-                  PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals",
-        FUNC(([](const vector<SuperCluster>& super_clusters,
-                 const PixDetElem&& pixdet,
+    func<pair_vec(PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals",
+        FUNC(([](const PixDetElem&& pixdet,
                  const int&& hit_number,
                  const bool&& sel_dRz,
                  const std::function<bool(int)>& pcheck){
             vector<float> residuals;
             vector<float> etas;
-            for(const SuperCluster& super_cluster : super_clusters){ // loop over all super-clusters
+            for(auto super_cluster : super_clusters){ // loop over all super-clusters
                 float dRz, dPhi;
-                int ladder_blade;
-                unsigned int nSeeds = super_cluster.charge.size();
+                int ladder;
+                unsigned int nSeeds = super_cluster.charge().size();
                 for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
                     if(hit_number == 0){
-                        if(!pixdet.contains((PixSubDet)super_cluster.subDet1[seedIdx], super_cluster.lay1[seedIdx])) continue;
-                        dRz = super_cluster.dRz1[seedIdx];
-                        dPhi = super_cluster.dPhi1[seedIdx];
-                        ladder_blade = super_cluster.ladder_blade1[seedIdx];
+                        if(!pixdet.contains((PixSubDet)super_cluster.subDet1()[seedIdx], super_cluster.lay1()[seedIdx])) continue;
+                        dRz = super_cluster.dRz1()[seedIdx];
+                        dPhi = super_cluster.dPhi1()[seedIdx];
+                        /* ladder = super_cluster.ladder1()[seedIdx]; */
                     }else{
-                        if(!pixdet.contains((PixSubDet)super_cluster.subDet2[seedIdx], super_cluster.lay2[seedIdx])) continue;
-                        dRz = super_cluster.dRz2[seedIdx];
-                        dPhi = super_cluster.dPhi2[seedIdx];
-                        ladder_blade = super_cluster.ladder_blade2[seedIdx];
+                        if(!pixdet.contains((PixSubDet)super_cluster.subDet2()[seedIdx], super_cluster.lay2()[seedIdx])) continue;
+                        dRz = super_cluster.dRz2()[seedIdx];
+                        dPhi = super_cluster.dPhi2()[seedIdx];
+                        /* ladder = super_cluster.ladder2()[seedIdx]; */
                     }
+                    ladder = 0;  // TODO: Need to re-add ladder to tree for super-clusters
                     DEBUG("New Seed, Idx: " << seedIdx << endl
                           << "\tdRz: " << dRz << endl
                           << "\tdPhi: " << dPhi << endl);
-                    if(!pcheck(ladder_blade)) continue;
+                    if(!pcheck(ladder)) continue;
                     if(sel_dRz)
                         residuals.push_back(dRz);
                     else
@@ -695,47 +672,45 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
     };
 
 
-    auto sc_cross_correlations = func<pair_vec(vector<SuperCluster>,
-                  PixDetElem, PixDetElem, Res, Res)>("sc_cross_correlations",
-        FUNC(([](const vector<SuperCluster>& super_clusters,
-                 const PixDetElem&& subdet1,
+    auto sc_cross_correlations = func<pair_vec(PixDetElem, PixDetElem, Res, Res)>("sc_cross_correlations",
+        FUNC(([](const PixDetElem&& subdet1,
                  const PixDetElem&& subdet2,
                  const Res&& res1,
                  const Res&& res2){
             vector<float> residuals1;
             vector<float> residuals2;
-            for(const SuperCluster& super_cluster : super_clusters){ // loop over all supser-clusters
-                unsigned int nSeeds = super_cluster.charge.size();
+            for(auto super_cluster : super_clusters){ // loop over all supser-clusters
+                unsigned int nSeeds = super_cluster.charge().size();
                 for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
-                    if (!subdet1.contains((PixSubDet)super_cluster.subDet1[seedIdx],super_cluster.lay1[seedIdx]) ||
-                        !subdet2.contains((PixSubDet)super_cluster.subDet2[seedIdx],super_cluster.lay2[seedIdx]))
+                    if (!subdet1.contains((PixSubDet)super_cluster.subDet1()[seedIdx],super_cluster.lay1()[seedIdx]) ||
+                        !subdet2.contains((PixSubDet)super_cluster.subDet2()[seedIdx],super_cluster.lay2()[seedIdx]))
                         continue;
                     switch(res1){
                         case Res::dz1:
-                            residuals1.push_back(super_cluster.dRz1[seedIdx]);
+                            residuals1.push_back(super_cluster.dRz1()[seedIdx]);
                             break;
                         case Res::dz2:
-                            residuals1.push_back(super_cluster.dRz2[seedIdx]);
+                            residuals1.push_back(super_cluster.dRz2()[seedIdx]);
                             break;
                         case Res::dPhi1:
-                            residuals1.push_back(super_cluster.dPhi1[seedIdx]);
+                            residuals1.push_back(super_cluster.dPhi1()[seedIdx]);
                             break;
                         case Res::dPhi2:
-                            residuals1.push_back(super_cluster.dPhi2[seedIdx]);
+                            residuals1.push_back(super_cluster.dPhi2()[seedIdx]);
                             break;
                     }
                     switch(res2){
                         case Res::dz1:
-                            residuals2.push_back(super_cluster.dRz1[seedIdx]);
+                            residuals2.push_back(super_cluster.dRz1()[seedIdx]);
                             break;
                         case Res::dz2:
-                            residuals2.push_back(super_cluster.dRz2[seedIdx]);
+                            residuals2.push_back(super_cluster.dRz2()[seedIdx]);
                             break;
                         case Res::dPhi1:
-                            residuals2.push_back(super_cluster.dPhi1[seedIdx]);
+                            residuals2.push_back(super_cluster.dPhi1()[seedIdx]);
                             break;
                         case Res::dPhi2:
-                            residuals2.push_back(super_cluster.dPhi2[seedIdx]);
+                            residuals2.push_back(super_cluster.dPhi2()[seedIdx]);
                             break;
                     }
                 }
@@ -754,16 +729,16 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
     auto v_dPhi2 = constant("dPhi2", Res::dPhi2);
 
     auto sc_dphi2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L2");
+            fv::tuple(BPIX_L1, BPIX_L2, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L2");
 
     auto sc_dz2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L2");
+            fv::tuple(BPIX_L1, BPIX_L2, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L2");
 
     auto sc_dphi2_v_dphi1_L1_L2 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L2");
+            fv::tuple(BPIX_L1, BPIX_L2, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L2");
 
     auto sc_dz2_v_dphi1_L1_L2 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L2");
+            fv::tuple(BPIX_L1, BPIX_L2, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L2");
 
     TH2Params hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
     tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L2",
@@ -796,16 +771,16 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
                                                     "sc_dphi2_v_dphi1_L1_L2_zoom", hist_params);
 
     auto sc_dphi2_v_dz1_L1_L3 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L3");
+            fv::tuple(BPIX_L1, BPIX_L3, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L3");
 
     auto sc_dz2_v_dz1_L1_L3 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L3");
+            fv::tuple(BPIX_L1, BPIX_L3, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L3");
 
     auto sc_dphi2_v_dphi1_L1_L3 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L3");
+            fv::tuple(BPIX_L1, BPIX_L3, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L3");
 
     auto sc_dz2_v_dphi1_L1_L3 = fv::tup_apply(sc_cross_correlations,
-            fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L3");
+            fv::tuple(BPIX_L1, BPIX_L3, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L3");
 
     hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
     tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L3",
@@ -856,8 +831,8 @@ void run_analysis(const vector<fv::util::DataFileDescriptor>& dfds, const string
 
     setup_first_hit_pairs(tds);
     setup_skipped_layer_hit_pairs(tds);
-    setup_sc_residuals(tds);
-    setup_residual_cross_corrolations(tds);
+    /* setup_sc_residuals(tds); */
+    /* setup_residual_cross_corrolations(tds); */
 
 
     tds.process(silent);

+ 1 - 1
filval

@@ -1 +1 @@
-Subproject commit 9a6a227982091f200e56402c9b808f3d2d4894e3
+Subproject commit bcde82f005abe4ff9a43f3c4ddfbc27ae5f66952