/** TrackingNtupleObjs.hpp created on 2018-06-07 15:07:37.572190 by generate_class.py * AVOID EDITING THIS FILE BY HAND!! Instead edit TrackingNtupleObjs.yaml and re-run * generate_class.py */ #include "filval.hpp" #include "root_filval.hpp" #include #include "TrackingNtuple.h" using namespace std; using namespace fv; using namespace fv_root; typedef TreeDataSet TrackingDataSet; struct Seed; class SeedCollection { public: class iter { public: iter(SeedCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } Seed operator*(); private: SeedCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_fitok; bool fitok_loaded; Value>* val_px; bool px_loaded; Value>* val_py; bool py_loaded; Value>* val_pz; bool pz_loaded; Value>* val_pt; bool pt_loaded; Value>* val_eta; bool eta_loaded; Value>* val_phi; bool phi_loaded; Value>* val_dxy; bool dxy_loaded; Value>* val_dz; bool dz_loaded; Value>* val_ptErr; bool ptErr_loaded; Value>* val_etaErr; bool etaErr_loaded; Value>* val_phiErr; bool phiErr_loaded; Value>* val_dxyErr; bool dxyErr_loaded; Value>* val_dzErr; bool dzErr_loaded; Value>* val_chi2; bool chi2_loaded; Value>* val_q; bool q_loaded; Value>* val_nValid; bool nValid_loaded; Value>* val_nPixel; bool nPixel_loaded; Value>* val_nGlued; bool nGlued_loaded; Value>* val_nStrip; bool nStrip_loaded; Value>* val_algo; bool algo_loaded; Value>* val_trkIdx; bool trkIdx_loaded; Value>>* val_shareFrac; bool shareFrac_loaded; Value>>* val_simTrkIdx; bool simTrkIdx_loaded; Value>* val_offset; bool offset_loaded; Value>* val_Et; bool Et_loaded; Value>* val_hoe; bool hoe_loaded; Value>>* val_isBarrel; bool isBarrel_loaded; Value>>* val_layerOrDiskNr; bool layerOrDiskNr_loaded; Value>>* val_isValidPos; bool isValidPos_loaded; Value>>* val_dRZPos; bool dRZPos_loaded; Value>>* val_dPhiPos; bool dPhiPos_loaded; Value>>* val_isValidNeg; bool isValidNeg_loaded; Value>>* val_dRZNeg; bool dRZNeg_loaded; Value>>* val_dPhiNeg; bool dPhiNeg_loaded; Value>* val_isECALDriven; bool isECALDriven_loaded; Value>* val_sclIdx; bool sclIdx_loaded; SeedCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->fitok_loaded) { this->val_fitok = this->tds->track_branch_obj>("see_fitok"); this->fitok_loaded = true; } return (*this->val_fitok)().size(); } Seed operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct Seed { SeedCollection* collection; size_t idx; Seed(SeedCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const short& fitok() const { if (!collection->fitok_loaded) { collection->val_fitok = collection->tds->track_branch_obj>("see_fitok"); collection->fitok_loaded = true; } return (*collection->val_fitok)().at(idx); } const float& px() const { if (!collection->px_loaded) { collection->val_px = collection->tds->track_branch_obj>("see_px"); collection->px_loaded = true; } return (*collection->val_px)().at(idx); } const float& py() const { if (!collection->py_loaded) { collection->val_py = collection->tds->track_branch_obj>("see_py"); collection->py_loaded = true; } return (*collection->val_py)().at(idx); } const float& pz() const { if (!collection->pz_loaded) { collection->val_pz = collection->tds->track_branch_obj>("see_pz"); collection->pz_loaded = true; } return (*collection->val_pz)().at(idx); } const float& pt() const { if (!collection->pt_loaded) { collection->val_pt = collection->tds->track_branch_obj>("see_pt"); collection->pt_loaded = true; } return (*collection->val_pt)().at(idx); } const float& eta() const { if (!collection->eta_loaded) { collection->val_eta = collection->tds->track_branch_obj>("see_eta"); collection->eta_loaded = true; } return (*collection->val_eta)().at(idx); } const float& phi() const { if (!collection->phi_loaded) { collection->val_phi = collection->tds->track_branch_obj>("see_phi"); collection->phi_loaded = true; } return (*collection->val_phi)().at(idx); } const float& dxy() const { if (!collection->dxy_loaded) { collection->val_dxy = collection->tds->track_branch_obj>("see_dxy"); collection->dxy_loaded = true; } return (*collection->val_dxy)().at(idx); } const float& dz() const { if (!collection->dz_loaded) { collection->val_dz = collection->tds->track_branch_obj>("see_dz"); collection->dz_loaded = true; } return (*collection->val_dz)().at(idx); } const float& ptErr() const { if (!collection->ptErr_loaded) { collection->val_ptErr = collection->tds->track_branch_obj>("see_ptErr"); collection->ptErr_loaded = true; } return (*collection->val_ptErr)().at(idx); } const float& etaErr() const { if (!collection->etaErr_loaded) { collection->val_etaErr = collection->tds->track_branch_obj>("see_etaErr"); collection->etaErr_loaded = true; } return (*collection->val_etaErr)().at(idx); } const float& phiErr() const { if (!collection->phiErr_loaded) { collection->val_phiErr = collection->tds->track_branch_obj>("see_phiErr"); collection->phiErr_loaded = true; } return (*collection->val_phiErr)().at(idx); } const float& dxyErr() const { if (!collection->dxyErr_loaded) { collection->val_dxyErr = collection->tds->track_branch_obj>("see_dxyErr"); collection->dxyErr_loaded = true; } return (*collection->val_dxyErr)().at(idx); } const float& dzErr() const { if (!collection->dzErr_loaded) { collection->val_dzErr = collection->tds->track_branch_obj>("see_dzErr"); collection->dzErr_loaded = true; } return (*collection->val_dzErr)().at(idx); } const float& chi2() const { if (!collection->chi2_loaded) { collection->val_chi2 = collection->tds->track_branch_obj>("see_chi2"); collection->chi2_loaded = true; } return (*collection->val_chi2)().at(idx); } const int& q() const { if (!collection->q_loaded) { collection->val_q = collection->tds->track_branch_obj>("see_q"); collection->q_loaded = true; } return (*collection->val_q)().at(idx); } const unsigned int& nValid() const { if (!collection->nValid_loaded) { collection->val_nValid = collection->tds->track_branch_obj>("see_nValid"); collection->nValid_loaded = true; } return (*collection->val_nValid)().at(idx); } const unsigned int& nPixel() const { if (!collection->nPixel_loaded) { collection->val_nPixel = collection->tds->track_branch_obj>("see_nPixel"); collection->nPixel_loaded = true; } return (*collection->val_nPixel)().at(idx); } const unsigned int& nGlued() const { if (!collection->nGlued_loaded) { collection->val_nGlued = collection->tds->track_branch_obj>("see_nGlued"); collection->nGlued_loaded = true; } return (*collection->val_nGlued)().at(idx); } const unsigned int& nStrip() const { if (!collection->nStrip_loaded) { collection->val_nStrip = collection->tds->track_branch_obj>("see_nStrip"); collection->nStrip_loaded = true; } return (*collection->val_nStrip)().at(idx); } const unsigned int& algo() const { if (!collection->algo_loaded) { collection->val_algo = collection->tds->track_branch_obj>("see_algo"); collection->algo_loaded = true; } return (*collection->val_algo)().at(idx); } const int& trkIdx() const { if (!collection->trkIdx_loaded) { collection->val_trkIdx = collection->tds->track_branch_obj>("see_trkIdx"); collection->trkIdx_loaded = true; } return (*collection->val_trkIdx)().at(idx); } const vector& shareFrac() const { if (!collection->shareFrac_loaded) { collection->val_shareFrac = collection->tds->track_branch_obj>>("see_shareFrac"); collection->shareFrac_loaded = true; } return (*collection->val_shareFrac)().at(idx); } const vector& simTrkIdx() const { if (!collection->simTrkIdx_loaded) { collection->val_simTrkIdx = collection->tds->track_branch_obj>>("see_simTrkIdx"); collection->simTrkIdx_loaded = true; } return (*collection->val_simTrkIdx)().at(idx); } const unsigned int& offset() const { if (!collection->offset_loaded) { collection->val_offset = collection->tds->track_branch_obj>("see_offset"); collection->offset_loaded = true; } return (*collection->val_offset)().at(idx); } const float& Et() const { if (!collection->Et_loaded) { collection->val_Et = collection->tds->track_branch_obj>("see_Et"); collection->Et_loaded = true; } return (*collection->val_Et)().at(idx); } const float& hoe() const { if (!collection->hoe_loaded) { collection->val_hoe = collection->tds->track_branch_obj>("see_hoe"); collection->hoe_loaded = true; } return (*collection->val_hoe)().at(idx); } const vector& isBarrel() const { if (!collection->isBarrel_loaded) { collection->val_isBarrel = collection->tds->track_branch_obj>>("see_isBarrel"); collection->isBarrel_loaded = true; } return (*collection->val_isBarrel)().at(idx); } const vector& layerOrDiskNr() const { if (!collection->layerOrDiskNr_loaded) { collection->val_layerOrDiskNr = collection->tds->track_branch_obj>>("see_layerOrDiskNr"); collection->layerOrDiskNr_loaded = true; } return (*collection->val_layerOrDiskNr)().at(idx); } const vector& isValidPos() const { if (!collection->isValidPos_loaded) { collection->val_isValidPos = collection->tds->track_branch_obj>>("see_isValidPos"); collection->isValidPos_loaded = true; } return (*collection->val_isValidPos)().at(idx); } const vector& dRZPos() const { if (!collection->dRZPos_loaded) { collection->val_dRZPos = collection->tds->track_branch_obj>>("see_dRZPos"); collection->dRZPos_loaded = true; } return (*collection->val_dRZPos)().at(idx); } const vector& dPhiPos() const { if (!collection->dPhiPos_loaded) { collection->val_dPhiPos = collection->tds->track_branch_obj>>("see_dPhiPos"); collection->dPhiPos_loaded = true; } return (*collection->val_dPhiPos)().at(idx); } const vector& isValidNeg() const { if (!collection->isValidNeg_loaded) { collection->val_isValidNeg = collection->tds->track_branch_obj>>("see_isValidNeg"); collection->isValidNeg_loaded = true; } return (*collection->val_isValidNeg)().at(idx); } const vector& dRZNeg() const { if (!collection->dRZNeg_loaded) { collection->val_dRZNeg = collection->tds->track_branch_obj>>("see_dRZNeg"); collection->dRZNeg_loaded = true; } return (*collection->val_dRZNeg)().at(idx); } const vector& dPhiNeg() const { if (!collection->dPhiNeg_loaded) { collection->val_dPhiNeg = collection->tds->track_branch_obj>>("see_dPhiNeg"); collection->dPhiNeg_loaded = true; } return (*collection->val_dPhiNeg)().at(idx); } const short& isECALDriven() const { if (!collection->isECALDriven_loaded) { collection->val_isECALDriven = collection->tds->track_branch_obj>("see_isECALDriven"); collection->isECALDriven_loaded = true; } return (*collection->val_isECALDriven)().at(idx); } const int& sclIdx() const { if (!collection->sclIdx_loaded) { collection->val_sclIdx = collection->tds->track_branch_obj>("see_sclIdx"); collection->sclIdx_loaded = true; } return (*collection->val_sclIdx)().at(idx); } }; bool operator==(const Seed& obj1, const Seed& obj2) { return obj1.idx == obj2.idx; } Seed SeedCollection::iter::operator*() { return {collection, idx}; } Seed SeedCollection::operator[](size_t idx) { return {this, idx}; } struct Track; class TrackCollection { public: class iter { public: iter(TrackCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } Track operator*(); private: TrackCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_px; bool px_loaded; Value>* val_py; bool py_loaded; Value>* val_pz; bool pz_loaded; Value>* val_pt; bool pt_loaded; Value>* val_inner_px; bool inner_px_loaded; Value>* val_inner_py; bool inner_py_loaded; Value>* val_inner_pz; bool inner_pz_loaded; Value>* val_inner_pt; bool inner_pt_loaded; Value>* val_outer_px; bool outer_px_loaded; Value>* val_outer_py; bool outer_py_loaded; Value>* val_outer_pz; bool outer_pz_loaded; Value>* val_outer_pt; bool outer_pt_loaded; Value>* val_eta; bool eta_loaded; Value>* val_lambda; bool lambda_loaded; Value>* val_cotTheta; bool cotTheta_loaded; Value>* val_phi; bool phi_loaded; Value>* val_dxy; bool dxy_loaded; Value>* val_dz; bool dz_loaded; Value>* val_ptErr; bool ptErr_loaded; Value>* val_etaErr; bool etaErr_loaded; Value>* val_lambdaErr; bool lambdaErr_loaded; Value>* val_phiErr; bool phiErr_loaded; Value>* val_dxyErr; bool dxyErr_loaded; Value>* val_dzErr; bool dzErr_loaded; Value>* val_refpoint_x; bool refpoint_x_loaded; Value>* val_refpoint_y; bool refpoint_y_loaded; Value>* val_refpoint_z; bool refpoint_z_loaded; Value>* val_nChi2; bool nChi2_loaded; Value>* val_q; bool q_loaded; Value>* val_nValid; bool nValid_loaded; Value>* val_nInvalid; bool nInvalid_loaded; Value>* val_nPixel; bool nPixel_loaded; Value>* val_nStrip; bool nStrip_loaded; Value>* val_nPixelLay; bool nPixelLay_loaded; Value>* val_nStripLay; bool nStripLay_loaded; Value>* val_n3DLay; bool n3DLay_loaded; Value>* val_nOuterLost; bool nOuterLost_loaded; Value>* val_nInnerLost; bool nInnerLost_loaded; Value>* val_algo; bool algo_loaded; Value>* val_originalAlgo; bool originalAlgo_loaded; Value>* val_algoMask; bool algoMask_loaded; Value>* val_stopReason; bool stopReason_loaded; Value>* val_isHP; bool isHP_loaded; Value>* val_seedIdx; bool seedIdx_loaded; Value>* val_vtxx; bool vtxx_loaded; Value>* val_vtxy; bool vtxy_loaded; Value>* val_vtxz; bool vtxz_loaded; Value>>* val_shareFrac; bool shareFrac_loaded; Value>>* val_simTrkIdx; bool simTrkIdx_loaded; Value>* val_genIdx; bool genIdx_loaded; Value>* val_genDR; bool genDR_loaded; TrackCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->px_loaded) { this->val_px = this->tds->track_branch_obj>("trk_px"); this->px_loaded = true; } return (*this->val_px)().size(); } Track operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct Track { TrackCollection* collection; size_t idx; Track(TrackCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const float& px() const { if (!collection->px_loaded) { collection->val_px = collection->tds->track_branch_obj>("trk_px"); collection->px_loaded = true; } return (*collection->val_px)().at(idx); } const float& py() const { if (!collection->py_loaded) { collection->val_py = collection->tds->track_branch_obj>("trk_py"); collection->py_loaded = true; } return (*collection->val_py)().at(idx); } const float& pz() const { if (!collection->pz_loaded) { collection->val_pz = collection->tds->track_branch_obj>("trk_pz"); collection->pz_loaded = true; } return (*collection->val_pz)().at(idx); } const float& pt() const { if (!collection->pt_loaded) { collection->val_pt = collection->tds->track_branch_obj>("trk_pt"); collection->pt_loaded = true; } return (*collection->val_pt)().at(idx); } const float& inner_px() const { if (!collection->inner_px_loaded) { collection->val_inner_px = collection->tds->track_branch_obj>("trk_inner_px"); collection->inner_px_loaded = true; } return (*collection->val_inner_px)().at(idx); } const float& inner_py() const { if (!collection->inner_py_loaded) { collection->val_inner_py = collection->tds->track_branch_obj>("trk_inner_py"); collection->inner_py_loaded = true; } return (*collection->val_inner_py)().at(idx); } const float& inner_pz() const { if (!collection->inner_pz_loaded) { collection->val_inner_pz = collection->tds->track_branch_obj>("trk_inner_pz"); collection->inner_pz_loaded = true; } return (*collection->val_inner_pz)().at(idx); } const float& inner_pt() const { if (!collection->inner_pt_loaded) { collection->val_inner_pt = collection->tds->track_branch_obj>("trk_inner_pt"); collection->inner_pt_loaded = true; } return (*collection->val_inner_pt)().at(idx); } const float& outer_px() const { if (!collection->outer_px_loaded) { collection->val_outer_px = collection->tds->track_branch_obj>("trk_outer_px"); collection->outer_px_loaded = true; } return (*collection->val_outer_px)().at(idx); } const float& outer_py() const { if (!collection->outer_py_loaded) { collection->val_outer_py = collection->tds->track_branch_obj>("trk_outer_py"); collection->outer_py_loaded = true; } return (*collection->val_outer_py)().at(idx); } const float& outer_pz() const { if (!collection->outer_pz_loaded) { collection->val_outer_pz = collection->tds->track_branch_obj>("trk_outer_pz"); collection->outer_pz_loaded = true; } return (*collection->val_outer_pz)().at(idx); } const float& outer_pt() const { if (!collection->outer_pt_loaded) { collection->val_outer_pt = collection->tds->track_branch_obj>("trk_outer_pt"); collection->outer_pt_loaded = true; } return (*collection->val_outer_pt)().at(idx); } const float& eta() const { if (!collection->eta_loaded) { collection->val_eta = collection->tds->track_branch_obj>("trk_eta"); collection->eta_loaded = true; } return (*collection->val_eta)().at(idx); } const float& lambda() const { if (!collection->lambda_loaded) { collection->val_lambda = collection->tds->track_branch_obj>("trk_lambda"); collection->lambda_loaded = true; } return (*collection->val_lambda)().at(idx); } const float& cotTheta() const { if (!collection->cotTheta_loaded) { collection->val_cotTheta = collection->tds->track_branch_obj>("trk_cotTheta"); collection->cotTheta_loaded = true; } return (*collection->val_cotTheta)().at(idx); } const float& phi() const { if (!collection->phi_loaded) { collection->val_phi = collection->tds->track_branch_obj>("trk_phi"); collection->phi_loaded = true; } return (*collection->val_phi)().at(idx); } const float& dxy() const { if (!collection->dxy_loaded) { collection->val_dxy = collection->tds->track_branch_obj>("trk_dxy"); collection->dxy_loaded = true; } return (*collection->val_dxy)().at(idx); } const float& dz() const { if (!collection->dz_loaded) { collection->val_dz = collection->tds->track_branch_obj>("trk_dz"); collection->dz_loaded = true; } return (*collection->val_dz)().at(idx); } const float& ptErr() const { if (!collection->ptErr_loaded) { collection->val_ptErr = collection->tds->track_branch_obj>("trk_ptErr"); collection->ptErr_loaded = true; } return (*collection->val_ptErr)().at(idx); } const float& etaErr() const { if (!collection->etaErr_loaded) { collection->val_etaErr = collection->tds->track_branch_obj>("trk_etaErr"); collection->etaErr_loaded = true; } return (*collection->val_etaErr)().at(idx); } const float& lambdaErr() const { if (!collection->lambdaErr_loaded) { collection->val_lambdaErr = collection->tds->track_branch_obj>("trk_lambdaErr"); collection->lambdaErr_loaded = true; } return (*collection->val_lambdaErr)().at(idx); } const float& phiErr() const { if (!collection->phiErr_loaded) { collection->val_phiErr = collection->tds->track_branch_obj>("trk_phiErr"); collection->phiErr_loaded = true; } return (*collection->val_phiErr)().at(idx); } const float& dxyErr() const { if (!collection->dxyErr_loaded) { collection->val_dxyErr = collection->tds->track_branch_obj>("trk_dxyErr"); collection->dxyErr_loaded = true; } return (*collection->val_dxyErr)().at(idx); } const float& dzErr() const { if (!collection->dzErr_loaded) { collection->val_dzErr = collection->tds->track_branch_obj>("trk_dzErr"); collection->dzErr_loaded = true; } return (*collection->val_dzErr)().at(idx); } const float& refpoint_x() const { if (!collection->refpoint_x_loaded) { collection->val_refpoint_x = collection->tds->track_branch_obj>("trk_refpoint_x"); collection->refpoint_x_loaded = true; } return (*collection->val_refpoint_x)().at(idx); } const float& refpoint_y() const { if (!collection->refpoint_y_loaded) { collection->val_refpoint_y = collection->tds->track_branch_obj>("trk_refpoint_y"); collection->refpoint_y_loaded = true; } return (*collection->val_refpoint_y)().at(idx); } const float& refpoint_z() const { if (!collection->refpoint_z_loaded) { collection->val_refpoint_z = collection->tds->track_branch_obj>("trk_refpoint_z"); collection->refpoint_z_loaded = true; } return (*collection->val_refpoint_z)().at(idx); } const float& nChi2() const { if (!collection->nChi2_loaded) { collection->val_nChi2 = collection->tds->track_branch_obj>("trk_nChi2"); collection->nChi2_loaded = true; } return (*collection->val_nChi2)().at(idx); } const int& q() const { if (!collection->q_loaded) { collection->val_q = collection->tds->track_branch_obj>("trk_q"); collection->q_loaded = true; } return (*collection->val_q)().at(idx); } const unsigned int& nValid() const { if (!collection->nValid_loaded) { collection->val_nValid = collection->tds->track_branch_obj>("trk_nValid"); collection->nValid_loaded = true; } return (*collection->val_nValid)().at(idx); } const unsigned int& nInvalid() const { if (!collection->nInvalid_loaded) { collection->val_nInvalid = collection->tds->track_branch_obj>("trk_nInvalid"); collection->nInvalid_loaded = true; } return (*collection->val_nInvalid)().at(idx); } const unsigned int& nPixel() const { if (!collection->nPixel_loaded) { collection->val_nPixel = collection->tds->track_branch_obj>("trk_nPixel"); collection->nPixel_loaded = true; } return (*collection->val_nPixel)().at(idx); } const unsigned int& nStrip() const { if (!collection->nStrip_loaded) { collection->val_nStrip = collection->tds->track_branch_obj>("trk_nStrip"); collection->nStrip_loaded = true; } return (*collection->val_nStrip)().at(idx); } const unsigned int& nPixelLay() const { if (!collection->nPixelLay_loaded) { collection->val_nPixelLay = collection->tds->track_branch_obj>("trk_nPixelLay"); collection->nPixelLay_loaded = true; } return (*collection->val_nPixelLay)().at(idx); } const unsigned int& nStripLay() const { if (!collection->nStripLay_loaded) { collection->val_nStripLay = collection->tds->track_branch_obj>("trk_nStripLay"); collection->nStripLay_loaded = true; } return (*collection->val_nStripLay)().at(idx); } const unsigned int& n3DLay() const { if (!collection->n3DLay_loaded) { collection->val_n3DLay = collection->tds->track_branch_obj>("trk_n3DLay"); collection->n3DLay_loaded = true; } return (*collection->val_n3DLay)().at(idx); } const unsigned int& nOuterLost() const { if (!collection->nOuterLost_loaded) { collection->val_nOuterLost = collection->tds->track_branch_obj>("trk_nOuterLost"); collection->nOuterLost_loaded = true; } return (*collection->val_nOuterLost)().at(idx); } const unsigned int& nInnerLost() const { if (!collection->nInnerLost_loaded) { collection->val_nInnerLost = collection->tds->track_branch_obj>("trk_nInnerLost"); collection->nInnerLost_loaded = true; } return (*collection->val_nInnerLost)().at(idx); } const unsigned int& algo() const { if (!collection->algo_loaded) { collection->val_algo = collection->tds->track_branch_obj>("trk_algo"); collection->algo_loaded = true; } return (*collection->val_algo)().at(idx); } const unsigned int& originalAlgo() const { if (!collection->originalAlgo_loaded) { collection->val_originalAlgo = collection->tds->track_branch_obj>("trk_originalAlgo"); collection->originalAlgo_loaded = true; } return (*collection->val_originalAlgo)().at(idx); } const ULong64_t& algoMask() const { if (!collection->algoMask_loaded) { collection->val_algoMask = collection->tds->track_branch_obj>("trk_algoMask"); collection->algoMask_loaded = true; } return (*collection->val_algoMask)().at(idx); } const unsigned int& stopReason() const { if (!collection->stopReason_loaded) { collection->val_stopReason = collection->tds->track_branch_obj>("trk_stopReason"); collection->stopReason_loaded = true; } return (*collection->val_stopReason)().at(idx); } const short& isHP() const { if (!collection->isHP_loaded) { collection->val_isHP = collection->tds->track_branch_obj>("trk_isHP"); collection->isHP_loaded = true; } return (*collection->val_isHP)().at(idx); } const int& seedIdx() const { if (!collection->seedIdx_loaded) { collection->val_seedIdx = collection->tds->track_branch_obj>("trk_seedIdx"); collection->seedIdx_loaded = true; } return (*collection->val_seedIdx)().at(idx); } const float& vtxx() const { if (!collection->vtxx_loaded) { collection->val_vtxx = collection->tds->track_branch_obj>("trk_vtxx"); collection->vtxx_loaded = true; } return (*collection->val_vtxx)().at(idx); } const float& vtxy() const { if (!collection->vtxy_loaded) { collection->val_vtxy = collection->tds->track_branch_obj>("trk_vtxy"); collection->vtxy_loaded = true; } return (*collection->val_vtxy)().at(idx); } const float& vtxz() const { if (!collection->vtxz_loaded) { collection->val_vtxz = collection->tds->track_branch_obj>("trk_vtxz"); collection->vtxz_loaded = true; } return (*collection->val_vtxz)().at(idx); } const vector& shareFrac() const { if (!collection->shareFrac_loaded) { collection->val_shareFrac = collection->tds->track_branch_obj>>("trk_shareFrac"); collection->shareFrac_loaded = true; } return (*collection->val_shareFrac)().at(idx); } const vector& simTrkIdx() const { if (!collection->simTrkIdx_loaded) { collection->val_simTrkIdx = collection->tds->track_branch_obj>>("trk_simTrkIdx"); collection->simTrkIdx_loaded = true; } return (*collection->val_simTrkIdx)().at(idx); } const int& genIdx() const { if (!collection->genIdx_loaded) { collection->val_genIdx = collection->tds->track_branch_obj>("trk_genIdx"); collection->genIdx_loaded = true; } return (*collection->val_genIdx)().at(idx); } const float& genDR() const { if (!collection->genDR_loaded) { collection->val_genDR = collection->tds->track_branch_obj>("trk_genDR"); collection->genDR_loaded = true; } return (*collection->val_genDR)().at(idx); } }; bool operator==(const Track& obj1, const Track& obj2) { return obj1.idx == obj2.idx; } Track TrackCollection::iter::operator*() { return {collection, idx}; } Track TrackCollection::operator[](size_t idx) { return {this, idx}; } struct Gen; class GenCollection { public: class iter { public: iter(GenCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } Gen operator*(); private: GenCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_px; bool px_loaded; Value>* val_py; bool py_loaded; Value>* val_pz; bool pz_loaded; Value>* val_charge; bool charge_loaded; Value>* val_pdgId; bool pdgId_loaded; Value>* val_vx; bool vx_loaded; Value>* val_vy; bool vy_loaded; Value>* val_vz; bool vz_loaded; Value>* val_status; bool status_loaded; Value>* val_mother; bool mother_loaded; Value>* val_isTauDecayProduct; bool isTauDecayProduct_loaded; Value>* val_isDirectHadronDecayProduct; bool isDirectHadronDecayProduct_loaded; Value>* val_isPrompt; bool isPrompt_loaded; GenCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->px_loaded) { this->val_px = this->tds->track_branch_obj>("gen_px"); this->px_loaded = true; } return (*this->val_px)().size(); } Gen operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct Gen { GenCollection* collection; size_t idx; Gen(GenCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const float& px() const { if (!collection->px_loaded) { collection->val_px = collection->tds->track_branch_obj>("gen_px"); collection->px_loaded = true; } return (*collection->val_px)().at(idx); } const float& py() const { if (!collection->py_loaded) { collection->val_py = collection->tds->track_branch_obj>("gen_py"); collection->py_loaded = true; } return (*collection->val_py)().at(idx); } const float& pz() const { if (!collection->pz_loaded) { collection->val_pz = collection->tds->track_branch_obj>("gen_pz"); collection->pz_loaded = true; } return (*collection->val_pz)().at(idx); } const float& charge() const { if (!collection->charge_loaded) { collection->val_charge = collection->tds->track_branch_obj>("gen_charge"); collection->charge_loaded = true; } return (*collection->val_charge)().at(idx); } const int& pdgId() const { if (!collection->pdgId_loaded) { collection->val_pdgId = collection->tds->track_branch_obj>("gen_pdgId"); collection->pdgId_loaded = true; } return (*collection->val_pdgId)().at(idx); } const float& vx() const { if (!collection->vx_loaded) { collection->val_vx = collection->tds->track_branch_obj>("gen_vx"); collection->vx_loaded = true; } return (*collection->val_vx)().at(idx); } const float& vy() const { if (!collection->vy_loaded) { collection->val_vy = collection->tds->track_branch_obj>("gen_vy"); collection->vy_loaded = true; } return (*collection->val_vy)().at(idx); } const float& vz() const { if (!collection->vz_loaded) { collection->val_vz = collection->tds->track_branch_obj>("gen_vz"); collection->vz_loaded = true; } return (*collection->val_vz)().at(idx); } const int& status() const { if (!collection->status_loaded) { collection->val_status = collection->tds->track_branch_obj>("gen_status"); collection->status_loaded = true; } return (*collection->val_status)().at(idx); } const int& mother() const { if (!collection->mother_loaded) { collection->val_mother = collection->tds->track_branch_obj>("gen_mother"); collection->mother_loaded = true; } return (*collection->val_mother)().at(idx); } const bool isTauDecayProduct() const { if (!collection->isTauDecayProduct_loaded) { collection->val_isTauDecayProduct = collection->tds->track_branch_obj>("gen_isTauDecayProduct"); collection->isTauDecayProduct_loaded = true; } return (*collection->val_isTauDecayProduct)().at(idx); } const bool isDirectHadronDecayProduct() const { if (!collection->isDirectHadronDecayProduct_loaded) { collection->val_isDirectHadronDecayProduct = collection->tds->track_branch_obj>("gen_isDirectHadronDecayProduct"); collection->isDirectHadronDecayProduct_loaded = true; } return (*collection->val_isDirectHadronDecayProduct)().at(idx); } const bool isPrompt() const { if (!collection->isPrompt_loaded) { collection->val_isPrompt = collection->tds->track_branch_obj>("gen_isPrompt"); collection->isPrompt_loaded = true; } return (*collection->val_isPrompt)().at(idx); } }; bool operator==(const Gen& obj1, const Gen& obj2) { return obj1.idx == obj2.idx; } Gen GenCollection::iter::operator*() { return {collection, idx}; } Gen GenCollection::operator[](size_t idx) { return {this, idx}; } struct SimTrack; class SimTrackCollection { public: class iter { public: iter(SimTrackCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } SimTrack operator*(); private: SimTrackCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_event; bool event_loaded; Value>* val_bunchCrossing; bool bunchCrossing_loaded; Value>* val_pdgId; bool pdgId_loaded; Value>* val_px; bool px_loaded; Value>* val_py; bool py_loaded; Value>* val_pz; bool pz_loaded; Value>* val_pt; bool pt_loaded; Value>* val_eta; bool eta_loaded; Value>* val_phi; bool phi_loaded; Value>* val_pca_pt; bool pca_pt_loaded; Value>* val_pca_eta; bool pca_eta_loaded; Value>* val_pca_lambda; bool pca_lambda_loaded; Value>* val_pca_cotTheta; bool pca_cotTheta_loaded; Value>* val_pca_phi; bool pca_phi_loaded; Value>* val_pca_dxy; bool pca_dxy_loaded; Value>* val_pca_dz; bool pca_dz_loaded; Value>* val_q; bool q_loaded; Value>* val_nValid; bool nValid_loaded; Value>* val_nPixel; bool nPixel_loaded; Value>* val_nStrip; bool nStrip_loaded; Value>* val_nLay; bool nLay_loaded; Value>* val_nPixelLay; bool nPixelLay_loaded; Value>* val_n3DLay; bool n3DLay_loaded; Value>>* val_trkIdx; bool trkIdx_loaded; Value>>* val_shareFrac; bool shareFrac_loaded; Value>* val_parentVtxIdx; bool parentVtxIdx_loaded; Value>>* val_decayVtxIdx; bool decayVtxIdx_loaded; Value>>* val_seedIdx; bool seedIdx_loaded; SimTrackCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->event_loaded) { this->val_event = this->tds->track_branch_obj>("sim_event"); this->event_loaded = true; } return (*this->val_event)().size(); } SimTrack operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct SimTrack { SimTrackCollection* collection; size_t idx; SimTrack(SimTrackCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const int& event() const { if (!collection->event_loaded) { collection->val_event = collection->tds->track_branch_obj>("sim_event"); collection->event_loaded = true; } return (*collection->val_event)().at(idx); } const int& bunchCrossing() const { if (!collection->bunchCrossing_loaded) { collection->val_bunchCrossing = collection->tds->track_branch_obj>("sim_bunchCrossing"); collection->bunchCrossing_loaded = true; } return (*collection->val_bunchCrossing)().at(idx); } const int& pdgId() const { if (!collection->pdgId_loaded) { collection->val_pdgId = collection->tds->track_branch_obj>("sim_pdgId"); collection->pdgId_loaded = true; } return (*collection->val_pdgId)().at(idx); } const float& px() const { if (!collection->px_loaded) { collection->val_px = collection->tds->track_branch_obj>("sim_px"); collection->px_loaded = true; } return (*collection->val_px)().at(idx); } const float& py() const { if (!collection->py_loaded) { collection->val_py = collection->tds->track_branch_obj>("sim_py"); collection->py_loaded = true; } return (*collection->val_py)().at(idx); } const float& pz() const { if (!collection->pz_loaded) { collection->val_pz = collection->tds->track_branch_obj>("sim_pz"); collection->pz_loaded = true; } return (*collection->val_pz)().at(idx); } const float& pt() const { if (!collection->pt_loaded) { collection->val_pt = collection->tds->track_branch_obj>("sim_pt"); collection->pt_loaded = true; } return (*collection->val_pt)().at(idx); } const float& eta() const { if (!collection->eta_loaded) { collection->val_eta = collection->tds->track_branch_obj>("sim_eta"); collection->eta_loaded = true; } return (*collection->val_eta)().at(idx); } const float& phi() const { if (!collection->phi_loaded) { collection->val_phi = collection->tds->track_branch_obj>("sim_phi"); collection->phi_loaded = true; } return (*collection->val_phi)().at(idx); } const float& pca_pt() const { if (!collection->pca_pt_loaded) { collection->val_pca_pt = collection->tds->track_branch_obj>("sim_pca_pt"); collection->pca_pt_loaded = true; } return (*collection->val_pca_pt)().at(idx); } const float& pca_eta() const { if (!collection->pca_eta_loaded) { collection->val_pca_eta = collection->tds->track_branch_obj>("sim_pca_eta"); collection->pca_eta_loaded = true; } return (*collection->val_pca_eta)().at(idx); } const float& pca_lambda() const { if (!collection->pca_lambda_loaded) { collection->val_pca_lambda = collection->tds->track_branch_obj>("sim_pca_lambda"); collection->pca_lambda_loaded = true; } return (*collection->val_pca_lambda)().at(idx); } const float& pca_cotTheta() const { if (!collection->pca_cotTheta_loaded) { collection->val_pca_cotTheta = collection->tds->track_branch_obj>("sim_pca_cotTheta"); collection->pca_cotTheta_loaded = true; } return (*collection->val_pca_cotTheta)().at(idx); } const float& pca_phi() const { if (!collection->pca_phi_loaded) { collection->val_pca_phi = collection->tds->track_branch_obj>("sim_pca_phi"); collection->pca_phi_loaded = true; } return (*collection->val_pca_phi)().at(idx); } const float& pca_dxy() const { if (!collection->pca_dxy_loaded) { collection->val_pca_dxy = collection->tds->track_branch_obj>("sim_pca_dxy"); collection->pca_dxy_loaded = true; } return (*collection->val_pca_dxy)().at(idx); } const float& pca_dz() const { if (!collection->pca_dz_loaded) { collection->val_pca_dz = collection->tds->track_branch_obj>("sim_pca_dz"); collection->pca_dz_loaded = true; } return (*collection->val_pca_dz)().at(idx); } const int& q() const { if (!collection->q_loaded) { collection->val_q = collection->tds->track_branch_obj>("sim_q"); collection->q_loaded = true; } return (*collection->val_q)().at(idx); } const unsigned int& nValid() const { if (!collection->nValid_loaded) { collection->val_nValid = collection->tds->track_branch_obj>("sim_nValid"); collection->nValid_loaded = true; } return (*collection->val_nValid)().at(idx); } const unsigned int& nPixel() const { if (!collection->nPixel_loaded) { collection->val_nPixel = collection->tds->track_branch_obj>("sim_nPixel"); collection->nPixel_loaded = true; } return (*collection->val_nPixel)().at(idx); } const unsigned int& nStrip() const { if (!collection->nStrip_loaded) { collection->val_nStrip = collection->tds->track_branch_obj>("sim_nStrip"); collection->nStrip_loaded = true; } return (*collection->val_nStrip)().at(idx); } const unsigned int& nLay() const { if (!collection->nLay_loaded) { collection->val_nLay = collection->tds->track_branch_obj>("sim_nLay"); collection->nLay_loaded = true; } return (*collection->val_nLay)().at(idx); } const unsigned int& nPixelLay() const { if (!collection->nPixelLay_loaded) { collection->val_nPixelLay = collection->tds->track_branch_obj>("sim_nPixelLay"); collection->nPixelLay_loaded = true; } return (*collection->val_nPixelLay)().at(idx); } const unsigned int& n3DLay() const { if (!collection->n3DLay_loaded) { collection->val_n3DLay = collection->tds->track_branch_obj>("sim_n3DLay"); collection->n3DLay_loaded = true; } return (*collection->val_n3DLay)().at(idx); } const vector& trkIdx() const { if (!collection->trkIdx_loaded) { collection->val_trkIdx = collection->tds->track_branch_obj>>("sim_trkIdx"); collection->trkIdx_loaded = true; } return (*collection->val_trkIdx)().at(idx); } const vector& shareFrac() const { if (!collection->shareFrac_loaded) { collection->val_shareFrac = collection->tds->track_branch_obj>>("sim_shareFrac"); collection->shareFrac_loaded = true; } return (*collection->val_shareFrac)().at(idx); } const int& parentVtxIdx() const { if (!collection->parentVtxIdx_loaded) { collection->val_parentVtxIdx = collection->tds->track_branch_obj>("sim_parentVtxIdx"); collection->parentVtxIdx_loaded = true; } return (*collection->val_parentVtxIdx)().at(idx); } const vector& decayVtxIdx() const { if (!collection->decayVtxIdx_loaded) { collection->val_decayVtxIdx = collection->tds->track_branch_obj>>("sim_decayVtxIdx"); collection->decayVtxIdx_loaded = true; } return (*collection->val_decayVtxIdx)().at(idx); } const vector& seedIdx() const { if (!collection->seedIdx_loaded) { collection->val_seedIdx = collection->tds->track_branch_obj>>("sim_seedIdx"); collection->seedIdx_loaded = true; } return (*collection->val_seedIdx)().at(idx); } }; bool operator==(const SimTrack& obj1, const SimTrack& obj2) { return obj1.idx == obj2.idx; } SimTrack SimTrackCollection::iter::operator*() { return {collection, idx}; } SimTrack SimTrackCollection::operator[](size_t idx) { return {this, idx}; } struct SimVertex; class SimVertexCollection { public: class iter { public: iter(SimVertexCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } SimVertex operator*(); private: SimVertexCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_event; bool event_loaded; Value>* val_bunchCrossing; bool bunchCrossing_loaded; Value>* val_processType; bool processType_loaded; Value>* val_x; bool x_loaded; Value>* val_y; bool y_loaded; Value>* val_z; bool z_loaded; Value>>* val_sourceSimIdx; bool sourceSimIdx_loaded; Value>>* val_daughterSimIdx; bool daughterSimIdx_loaded; SimVertexCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->event_loaded) { this->val_event = this->tds->track_branch_obj>("simvtx_event"); this->event_loaded = true; } return (*this->val_event)().size(); } SimVertex operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct SimVertex { SimVertexCollection* collection; size_t idx; SimVertex(SimVertexCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const int& event() const { if (!collection->event_loaded) { collection->val_event = collection->tds->track_branch_obj>("simvtx_event"); collection->event_loaded = true; } return (*collection->val_event)().at(idx); } const int& bunchCrossing() const { if (!collection->bunchCrossing_loaded) { collection->val_bunchCrossing = collection->tds->track_branch_obj>("simvtx_bunchCrossing"); collection->bunchCrossing_loaded = true; } return (*collection->val_bunchCrossing)().at(idx); } const unsigned int& processType() const { if (!collection->processType_loaded) { collection->val_processType = collection->tds->track_branch_obj>("simvtx_processType"); collection->processType_loaded = true; } return (*collection->val_processType)().at(idx); } const float& x() const { if (!collection->x_loaded) { collection->val_x = collection->tds->track_branch_obj>("simvtx_x"); collection->x_loaded = true; } return (*collection->val_x)().at(idx); } const float& y() const { if (!collection->y_loaded) { collection->val_y = collection->tds->track_branch_obj>("simvtx_y"); collection->y_loaded = true; } return (*collection->val_y)().at(idx); } const float& z() const { if (!collection->z_loaded) { collection->val_z = collection->tds->track_branch_obj>("simvtx_z"); collection->z_loaded = true; } return (*collection->val_z)().at(idx); } const vector& sourceSimIdx() const { if (!collection->sourceSimIdx_loaded) { collection->val_sourceSimIdx = collection->tds->track_branch_obj>>("simvtx_sourceSimIdx"); collection->sourceSimIdx_loaded = true; } return (*collection->val_sourceSimIdx)().at(idx); } const vector& daughterSimIdx() const { if (!collection->daughterSimIdx_loaded) { collection->val_daughterSimIdx = collection->tds->track_branch_obj>>("simvtx_daughterSimIdx"); collection->daughterSimIdx_loaded = true; } return (*collection->val_daughterSimIdx)().at(idx); } }; bool operator==(const SimVertex& obj1, const SimVertex& obj2) { return obj1.idx == obj2.idx; } SimVertex SimVertexCollection::iter::operator*() { return {collection, idx}; } SimVertex SimVertexCollection::operator[](size_t idx) { return {this, idx}; } struct SuperCluster; class SuperClusterCollection { public: class iter { public: iter(SuperClusterCollection* collection, size_t idx) :collection(collection), idx(idx) { } iter operator++() { ++idx; return *this; } bool operator!=(const iter & other) { return idx != other.idx; } SuperCluster operator*(); private: SuperClusterCollection* collection; size_t idx; }; TrackingDataSet* tds; Value>* val_e; bool e_loaded; Value>* val_px; bool px_loaded; Value>* val_py; bool py_loaded; Value>* val_pz; bool pz_loaded; Value>* val_x; bool x_loaded; Value>* val_y; bool y_loaded; Value>* val_z; bool z_loaded; Value>* val_hoe; bool hoe_loaded; SuperClusterCollection() { } void init(TrackingDataSet* tds){ this->tds = tds; } size_t size() { if (!this->e_loaded) { this->val_e = this->tds->track_branch_obj>("scl_e"); this->e_loaded = true; } return (*this->val_e)().size(); } SuperCluster operator[](size_t); iter begin() { return iter(this, 0); } iter end() { return iter(this, size()); } }; struct SuperCluster { SuperClusterCollection* collection; size_t idx; SuperCluster(SuperClusterCollection* collection, const size_t idx) :collection(collection), idx(idx) { } const float& e() const { if (!collection->e_loaded) { collection->val_e = collection->tds->track_branch_obj>("scl_e"); collection->e_loaded = true; } return (*collection->val_e)().at(idx); } const float& px() const { if (!collection->px_loaded) { collection->val_px = collection->tds->track_branch_obj>("scl_px"); collection->px_loaded = true; } return (*collection->val_px)().at(idx); } const float& py() const { if (!collection->py_loaded) { collection->val_py = collection->tds->track_branch_obj>("scl_py"); collection->py_loaded = true; } return (*collection->val_py)().at(idx); } const float& pz() const { if (!collection->pz_loaded) { collection->val_pz = collection->tds->track_branch_obj>("scl_pz"); collection->pz_loaded = true; } return (*collection->val_pz)().at(idx); } const float& x() const { if (!collection->x_loaded) { collection->val_x = collection->tds->track_branch_obj>("scl_x"); collection->x_loaded = true; } return (*collection->val_x)().at(idx); } const float& y() const { if (!collection->y_loaded) { collection->val_y = collection->tds->track_branch_obj>("scl_y"); collection->y_loaded = true; } return (*collection->val_y)().at(idx); } const float& z() const { if (!collection->z_loaded) { collection->val_z = collection->tds->track_branch_obj>("scl_z"); collection->z_loaded = true; } return (*collection->val_z)().at(idx); } const float& hoe() const { if (!collection->hoe_loaded) { collection->val_hoe = collection->tds->track_branch_obj>("scl_hoe"); collection->hoe_loaded = true; } return (*collection->val_hoe)().at(idx); } }; bool operator==(const SuperCluster& obj1, const SuperCluster& obj2) { return obj1.idx == obj2.idx; } SuperCluster SuperClusterCollection::iter::operator*() { return {collection, idx}; } SuperCluster SuperClusterCollection::operator[](size_t idx) { return {this, idx}; }