TrackingNtupleObjs.hpp 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
  1. /** TrackingNtupleObjs.hpp created on 2018-06-07 15:07:37.572190 by generate_class.py
  2. * AVOID EDITING THIS FILE BY HAND!! Instead edit TrackingNtupleObjs.yaml and re-run
  3. * generate_class.py
  4. */
  5. #include "filval.hpp"
  6. #include "root_filval.hpp"
  7. #include<cmath>
  8. #include "TrackingNtuple.h"
  9. using namespace std;
  10. using namespace fv;
  11. using namespace fv_root;
  12. typedef TreeDataSet<TrackingNtuple> TrackingDataSet;
  13. struct Seed;
  14. class SeedCollection {
  15. public:
  16. class iter {
  17. public:
  18. iter(SeedCollection* collection, size_t idx)
  19. :collection(collection), idx(idx) { }
  20. iter operator++() { ++idx; return *this; }
  21. bool operator!=(const iter & other) { return idx != other.idx; }
  22. Seed operator*();
  23. private:
  24. SeedCollection* collection;
  25. size_t idx;
  26. };
  27. TrackingDataSet* tds;
  28. Value<vector<short>>* val_fitok;
  29. bool fitok_loaded;
  30. Value<vector<float>>* val_px;
  31. bool px_loaded;
  32. Value<vector<float>>* val_py;
  33. bool py_loaded;
  34. Value<vector<float>>* val_pz;
  35. bool pz_loaded;
  36. Value<vector<float>>* val_pt;
  37. bool pt_loaded;
  38. Value<vector<float>>* val_eta;
  39. bool eta_loaded;
  40. Value<vector<float>>* val_phi;
  41. bool phi_loaded;
  42. Value<vector<float>>* val_dxy;
  43. bool dxy_loaded;
  44. Value<vector<float>>* val_dz;
  45. bool dz_loaded;
  46. Value<vector<float>>* val_ptErr;
  47. bool ptErr_loaded;
  48. Value<vector<float>>* val_etaErr;
  49. bool etaErr_loaded;
  50. Value<vector<float>>* val_phiErr;
  51. bool phiErr_loaded;
  52. Value<vector<float>>* val_dxyErr;
  53. bool dxyErr_loaded;
  54. Value<vector<float>>* val_dzErr;
  55. bool dzErr_loaded;
  56. Value<vector<float>>* val_chi2;
  57. bool chi2_loaded;
  58. Value<vector<int>>* val_q;
  59. bool q_loaded;
  60. Value<vector<unsigned int>>* val_nValid;
  61. bool nValid_loaded;
  62. Value<vector<unsigned int>>* val_nPixel;
  63. bool nPixel_loaded;
  64. Value<vector<unsigned int>>* val_nGlued;
  65. bool nGlued_loaded;
  66. Value<vector<unsigned int>>* val_nStrip;
  67. bool nStrip_loaded;
  68. Value<vector<unsigned int>>* val_algo;
  69. bool algo_loaded;
  70. Value<vector<int>>* val_trkIdx;
  71. bool trkIdx_loaded;
  72. Value<vector<vector<float>>>* val_shareFrac;
  73. bool shareFrac_loaded;
  74. Value<vector<vector<int>>>* val_simTrkIdx;
  75. bool simTrkIdx_loaded;
  76. Value<vector<unsigned int>>* val_offset;
  77. bool offset_loaded;
  78. Value<vector<float>>* val_Et;
  79. bool Et_loaded;
  80. Value<vector<float>>* val_hoe;
  81. bool hoe_loaded;
  82. Value<vector<vector<int>>>* val_isBarrel;
  83. bool isBarrel_loaded;
  84. Value<vector<vector<int>>>* val_layerOrDiskNr;
  85. bool layerOrDiskNr_loaded;
  86. Value<vector<vector<int>>>* val_isValidPos;
  87. bool isValidPos_loaded;
  88. Value<vector<vector<float>>>* val_dRZPos;
  89. bool dRZPos_loaded;
  90. Value<vector<vector<float>>>* val_dPhiPos;
  91. bool dPhiPos_loaded;
  92. Value<vector<vector<int>>>* val_isValidNeg;
  93. bool isValidNeg_loaded;
  94. Value<vector<vector<float>>>* val_dRZNeg;
  95. bool dRZNeg_loaded;
  96. Value<vector<vector<float>>>* val_dPhiNeg;
  97. bool dPhiNeg_loaded;
  98. Value<vector<short>>* val_isECALDriven;
  99. bool isECALDriven_loaded;
  100. Value<vector<int>>* val_sclIdx;
  101. bool sclIdx_loaded;
  102. SeedCollection() { }
  103. void init(TrackingDataSet* tds){
  104. this->tds = tds;
  105. }
  106. size_t size() {
  107. if (!this->fitok_loaded) {
  108. this->val_fitok = this->tds->track_branch_obj<vector<short>>("see_fitok");
  109. this->fitok_loaded = true;
  110. }
  111. return (*this->val_fitok)().size();
  112. }
  113. Seed operator[](size_t);
  114. iter begin() { return iter(this, 0); }
  115. iter end() { return iter(this, size()); }
  116. };
  117. struct Seed {
  118. SeedCollection* collection;
  119. size_t idx;
  120. Seed(SeedCollection* collection, const size_t idx)
  121. :collection(collection), idx(idx) { }
  122. const short& fitok() const {
  123. if (!collection->fitok_loaded) {
  124. collection->val_fitok = collection->tds->track_branch_obj<vector<short>>("see_fitok");
  125. collection->fitok_loaded = true;
  126. }
  127. return (*collection->val_fitok)().at(idx);
  128. }
  129. const float& px() const {
  130. if (!collection->px_loaded) {
  131. collection->val_px = collection->tds->track_branch_obj<vector<float>>("see_px");
  132. collection->px_loaded = true;
  133. }
  134. return (*collection->val_px)().at(idx);
  135. }
  136. const float& py() const {
  137. if (!collection->py_loaded) {
  138. collection->val_py = collection->tds->track_branch_obj<vector<float>>("see_py");
  139. collection->py_loaded = true;
  140. }
  141. return (*collection->val_py)().at(idx);
  142. }
  143. const float& pz() const {
  144. if (!collection->pz_loaded) {
  145. collection->val_pz = collection->tds->track_branch_obj<vector<float>>("see_pz");
  146. collection->pz_loaded = true;
  147. }
  148. return (*collection->val_pz)().at(idx);
  149. }
  150. const float& pt() const {
  151. if (!collection->pt_loaded) {
  152. collection->val_pt = collection->tds->track_branch_obj<vector<float>>("see_pt");
  153. collection->pt_loaded = true;
  154. }
  155. return (*collection->val_pt)().at(idx);
  156. }
  157. const float& eta() const {
  158. if (!collection->eta_loaded) {
  159. collection->val_eta = collection->tds->track_branch_obj<vector<float>>("see_eta");
  160. collection->eta_loaded = true;
  161. }
  162. return (*collection->val_eta)().at(idx);
  163. }
  164. const float& phi() const {
  165. if (!collection->phi_loaded) {
  166. collection->val_phi = collection->tds->track_branch_obj<vector<float>>("see_phi");
  167. collection->phi_loaded = true;
  168. }
  169. return (*collection->val_phi)().at(idx);
  170. }
  171. const float& dxy() const {
  172. if (!collection->dxy_loaded) {
  173. collection->val_dxy = collection->tds->track_branch_obj<vector<float>>("see_dxy");
  174. collection->dxy_loaded = true;
  175. }
  176. return (*collection->val_dxy)().at(idx);
  177. }
  178. const float& dz() const {
  179. if (!collection->dz_loaded) {
  180. collection->val_dz = collection->tds->track_branch_obj<vector<float>>("see_dz");
  181. collection->dz_loaded = true;
  182. }
  183. return (*collection->val_dz)().at(idx);
  184. }
  185. const float& ptErr() const {
  186. if (!collection->ptErr_loaded) {
  187. collection->val_ptErr = collection->tds->track_branch_obj<vector<float>>("see_ptErr");
  188. collection->ptErr_loaded = true;
  189. }
  190. return (*collection->val_ptErr)().at(idx);
  191. }
  192. const float& etaErr() const {
  193. if (!collection->etaErr_loaded) {
  194. collection->val_etaErr = collection->tds->track_branch_obj<vector<float>>("see_etaErr");
  195. collection->etaErr_loaded = true;
  196. }
  197. return (*collection->val_etaErr)().at(idx);
  198. }
  199. const float& phiErr() const {
  200. if (!collection->phiErr_loaded) {
  201. collection->val_phiErr = collection->tds->track_branch_obj<vector<float>>("see_phiErr");
  202. collection->phiErr_loaded = true;
  203. }
  204. return (*collection->val_phiErr)().at(idx);
  205. }
  206. const float& dxyErr() const {
  207. if (!collection->dxyErr_loaded) {
  208. collection->val_dxyErr = collection->tds->track_branch_obj<vector<float>>("see_dxyErr");
  209. collection->dxyErr_loaded = true;
  210. }
  211. return (*collection->val_dxyErr)().at(idx);
  212. }
  213. const float& dzErr() const {
  214. if (!collection->dzErr_loaded) {
  215. collection->val_dzErr = collection->tds->track_branch_obj<vector<float>>("see_dzErr");
  216. collection->dzErr_loaded = true;
  217. }
  218. return (*collection->val_dzErr)().at(idx);
  219. }
  220. const float& chi2() const {
  221. if (!collection->chi2_loaded) {
  222. collection->val_chi2 = collection->tds->track_branch_obj<vector<float>>("see_chi2");
  223. collection->chi2_loaded = true;
  224. }
  225. return (*collection->val_chi2)().at(idx);
  226. }
  227. const int& q() const {
  228. if (!collection->q_loaded) {
  229. collection->val_q = collection->tds->track_branch_obj<vector<int>>("see_q");
  230. collection->q_loaded = true;
  231. }
  232. return (*collection->val_q)().at(idx);
  233. }
  234. const unsigned int& nValid() const {
  235. if (!collection->nValid_loaded) {
  236. collection->val_nValid = collection->tds->track_branch_obj<vector<unsigned int>>("see_nValid");
  237. collection->nValid_loaded = true;
  238. }
  239. return (*collection->val_nValid)().at(idx);
  240. }
  241. const unsigned int& nPixel() const {
  242. if (!collection->nPixel_loaded) {
  243. collection->val_nPixel = collection->tds->track_branch_obj<vector<unsigned int>>("see_nPixel");
  244. collection->nPixel_loaded = true;
  245. }
  246. return (*collection->val_nPixel)().at(idx);
  247. }
  248. const unsigned int& nGlued() const {
  249. if (!collection->nGlued_loaded) {
  250. collection->val_nGlued = collection->tds->track_branch_obj<vector<unsigned int>>("see_nGlued");
  251. collection->nGlued_loaded = true;
  252. }
  253. return (*collection->val_nGlued)().at(idx);
  254. }
  255. const unsigned int& nStrip() const {
  256. if (!collection->nStrip_loaded) {
  257. collection->val_nStrip = collection->tds->track_branch_obj<vector<unsigned int>>("see_nStrip");
  258. collection->nStrip_loaded = true;
  259. }
  260. return (*collection->val_nStrip)().at(idx);
  261. }
  262. const unsigned int& algo() const {
  263. if (!collection->algo_loaded) {
  264. collection->val_algo = collection->tds->track_branch_obj<vector<unsigned int>>("see_algo");
  265. collection->algo_loaded = true;
  266. }
  267. return (*collection->val_algo)().at(idx);
  268. }
  269. const int& trkIdx() const {
  270. if (!collection->trkIdx_loaded) {
  271. collection->val_trkIdx = collection->tds->track_branch_obj<vector<int>>("see_trkIdx");
  272. collection->trkIdx_loaded = true;
  273. }
  274. return (*collection->val_trkIdx)().at(idx);
  275. }
  276. const vector<float>& shareFrac() const {
  277. if (!collection->shareFrac_loaded) {
  278. collection->val_shareFrac = collection->tds->track_branch_obj<vector<vector<float>>>("see_shareFrac");
  279. collection->shareFrac_loaded = true;
  280. }
  281. return (*collection->val_shareFrac)().at(idx);
  282. }
  283. const vector<int>& simTrkIdx() const {
  284. if (!collection->simTrkIdx_loaded) {
  285. collection->val_simTrkIdx = collection->tds->track_branch_obj<vector<vector<int>>>("see_simTrkIdx");
  286. collection->simTrkIdx_loaded = true;
  287. }
  288. return (*collection->val_simTrkIdx)().at(idx);
  289. }
  290. const unsigned int& offset() const {
  291. if (!collection->offset_loaded) {
  292. collection->val_offset = collection->tds->track_branch_obj<vector<unsigned int>>("see_offset");
  293. collection->offset_loaded = true;
  294. }
  295. return (*collection->val_offset)().at(idx);
  296. }
  297. const float& Et() const {
  298. if (!collection->Et_loaded) {
  299. collection->val_Et = collection->tds->track_branch_obj<vector<float>>("see_Et");
  300. collection->Et_loaded = true;
  301. }
  302. return (*collection->val_Et)().at(idx);
  303. }
  304. const float& hoe() const {
  305. if (!collection->hoe_loaded) {
  306. collection->val_hoe = collection->tds->track_branch_obj<vector<float>>("see_hoe");
  307. collection->hoe_loaded = true;
  308. }
  309. return (*collection->val_hoe)().at(idx);
  310. }
  311. const vector<int>& isBarrel() const {
  312. if (!collection->isBarrel_loaded) {
  313. collection->val_isBarrel = collection->tds->track_branch_obj<vector<vector<int>>>("see_isBarrel");
  314. collection->isBarrel_loaded = true;
  315. }
  316. return (*collection->val_isBarrel)().at(idx);
  317. }
  318. const vector<int>& layerOrDiskNr() const {
  319. if (!collection->layerOrDiskNr_loaded) {
  320. collection->val_layerOrDiskNr = collection->tds->track_branch_obj<vector<vector<int>>>("see_layerOrDiskNr");
  321. collection->layerOrDiskNr_loaded = true;
  322. }
  323. return (*collection->val_layerOrDiskNr)().at(idx);
  324. }
  325. const vector<int>& isValidPos() const {
  326. if (!collection->isValidPos_loaded) {
  327. collection->val_isValidPos = collection->tds->track_branch_obj<vector<vector<int>>>("see_isValidPos");
  328. collection->isValidPos_loaded = true;
  329. }
  330. return (*collection->val_isValidPos)().at(idx);
  331. }
  332. const vector<float>& dRZPos() const {
  333. if (!collection->dRZPos_loaded) {
  334. collection->val_dRZPos = collection->tds->track_branch_obj<vector<vector<float>>>("see_dRZPos");
  335. collection->dRZPos_loaded = true;
  336. }
  337. return (*collection->val_dRZPos)().at(idx);
  338. }
  339. const vector<float>& dPhiPos() const {
  340. if (!collection->dPhiPos_loaded) {
  341. collection->val_dPhiPos = collection->tds->track_branch_obj<vector<vector<float>>>("see_dPhiPos");
  342. collection->dPhiPos_loaded = true;
  343. }
  344. return (*collection->val_dPhiPos)().at(idx);
  345. }
  346. const vector<int>& isValidNeg() const {
  347. if (!collection->isValidNeg_loaded) {
  348. collection->val_isValidNeg = collection->tds->track_branch_obj<vector<vector<int>>>("see_isValidNeg");
  349. collection->isValidNeg_loaded = true;
  350. }
  351. return (*collection->val_isValidNeg)().at(idx);
  352. }
  353. const vector<float>& dRZNeg() const {
  354. if (!collection->dRZNeg_loaded) {
  355. collection->val_dRZNeg = collection->tds->track_branch_obj<vector<vector<float>>>("see_dRZNeg");
  356. collection->dRZNeg_loaded = true;
  357. }
  358. return (*collection->val_dRZNeg)().at(idx);
  359. }
  360. const vector<float>& dPhiNeg() const {
  361. if (!collection->dPhiNeg_loaded) {
  362. collection->val_dPhiNeg = collection->tds->track_branch_obj<vector<vector<float>>>("see_dPhiNeg");
  363. collection->dPhiNeg_loaded = true;
  364. }
  365. return (*collection->val_dPhiNeg)().at(idx);
  366. }
  367. const short& isECALDriven() const {
  368. if (!collection->isECALDriven_loaded) {
  369. collection->val_isECALDriven = collection->tds->track_branch_obj<vector<short>>("see_isECALDriven");
  370. collection->isECALDriven_loaded = true;
  371. }
  372. return (*collection->val_isECALDriven)().at(idx);
  373. }
  374. const int& sclIdx() const {
  375. if (!collection->sclIdx_loaded) {
  376. collection->val_sclIdx = collection->tds->track_branch_obj<vector<int>>("see_sclIdx");
  377. collection->sclIdx_loaded = true;
  378. }
  379. return (*collection->val_sclIdx)().at(idx);
  380. }
  381. };
  382. bool operator==(const Seed& obj1, const Seed& obj2) {
  383. return obj1.idx == obj2.idx;
  384. }
  385. Seed SeedCollection::iter::operator*() {
  386. return {collection, idx};
  387. }
  388. Seed SeedCollection::operator[](size_t idx) {
  389. return {this, idx};
  390. }
  391. struct Track;
  392. class TrackCollection {
  393. public:
  394. class iter {
  395. public:
  396. iter(TrackCollection* collection, size_t idx)
  397. :collection(collection), idx(idx) { }
  398. iter operator++() { ++idx; return *this; }
  399. bool operator!=(const iter & other) { return idx != other.idx; }
  400. Track operator*();
  401. private:
  402. TrackCollection* collection;
  403. size_t idx;
  404. };
  405. TrackingDataSet* tds;
  406. Value<vector<float>>* val_px;
  407. bool px_loaded;
  408. Value<vector<float>>* val_py;
  409. bool py_loaded;
  410. Value<vector<float>>* val_pz;
  411. bool pz_loaded;
  412. Value<vector<float>>* val_pt;
  413. bool pt_loaded;
  414. Value<vector<float>>* val_inner_px;
  415. bool inner_px_loaded;
  416. Value<vector<float>>* val_inner_py;
  417. bool inner_py_loaded;
  418. Value<vector<float>>* val_inner_pz;
  419. bool inner_pz_loaded;
  420. Value<vector<float>>* val_inner_pt;
  421. bool inner_pt_loaded;
  422. Value<vector<float>>* val_outer_px;
  423. bool outer_px_loaded;
  424. Value<vector<float>>* val_outer_py;
  425. bool outer_py_loaded;
  426. Value<vector<float>>* val_outer_pz;
  427. bool outer_pz_loaded;
  428. Value<vector<float>>* val_outer_pt;
  429. bool outer_pt_loaded;
  430. Value<vector<float>>* val_eta;
  431. bool eta_loaded;
  432. Value<vector<float>>* val_lambda;
  433. bool lambda_loaded;
  434. Value<vector<float>>* val_cotTheta;
  435. bool cotTheta_loaded;
  436. Value<vector<float>>* val_phi;
  437. bool phi_loaded;
  438. Value<vector<float>>* val_dxy;
  439. bool dxy_loaded;
  440. Value<vector<float>>* val_dz;
  441. bool dz_loaded;
  442. Value<vector<float>>* val_ptErr;
  443. bool ptErr_loaded;
  444. Value<vector<float>>* val_etaErr;
  445. bool etaErr_loaded;
  446. Value<vector<float>>* val_lambdaErr;
  447. bool lambdaErr_loaded;
  448. Value<vector<float>>* val_phiErr;
  449. bool phiErr_loaded;
  450. Value<vector<float>>* val_dxyErr;
  451. bool dxyErr_loaded;
  452. Value<vector<float>>* val_dzErr;
  453. bool dzErr_loaded;
  454. Value<vector<float>>* val_refpoint_x;
  455. bool refpoint_x_loaded;
  456. Value<vector<float>>* val_refpoint_y;
  457. bool refpoint_y_loaded;
  458. Value<vector<float>>* val_refpoint_z;
  459. bool refpoint_z_loaded;
  460. Value<vector<float>>* val_nChi2;
  461. bool nChi2_loaded;
  462. Value<vector<int>>* val_q;
  463. bool q_loaded;
  464. Value<vector<unsigned int>>* val_nValid;
  465. bool nValid_loaded;
  466. Value<vector<unsigned int>>* val_nInvalid;
  467. bool nInvalid_loaded;
  468. Value<vector<unsigned int>>* val_nPixel;
  469. bool nPixel_loaded;
  470. Value<vector<unsigned int>>* val_nStrip;
  471. bool nStrip_loaded;
  472. Value<vector<unsigned int>>* val_nPixelLay;
  473. bool nPixelLay_loaded;
  474. Value<vector<unsigned int>>* val_nStripLay;
  475. bool nStripLay_loaded;
  476. Value<vector<unsigned int>>* val_n3DLay;
  477. bool n3DLay_loaded;
  478. Value<vector<unsigned int>>* val_nOuterLost;
  479. bool nOuterLost_loaded;
  480. Value<vector<unsigned int>>* val_nInnerLost;
  481. bool nInnerLost_loaded;
  482. Value<vector<unsigned int>>* val_algo;
  483. bool algo_loaded;
  484. Value<vector<unsigned int>>* val_originalAlgo;
  485. bool originalAlgo_loaded;
  486. Value<vector<ULong64_t>>* val_algoMask;
  487. bool algoMask_loaded;
  488. Value<vector<unsigned int>>* val_stopReason;
  489. bool stopReason_loaded;
  490. Value<vector<short>>* val_isHP;
  491. bool isHP_loaded;
  492. Value<vector<int>>* val_seedIdx;
  493. bool seedIdx_loaded;
  494. Value<vector<float>>* val_vtxx;
  495. bool vtxx_loaded;
  496. Value<vector<float>>* val_vtxy;
  497. bool vtxy_loaded;
  498. Value<vector<float>>* val_vtxz;
  499. bool vtxz_loaded;
  500. Value<vector<vector<float>>>* val_shareFrac;
  501. bool shareFrac_loaded;
  502. Value<vector<vector<int>>>* val_simTrkIdx;
  503. bool simTrkIdx_loaded;
  504. Value<vector<int>>* val_genIdx;
  505. bool genIdx_loaded;
  506. Value<vector<float>>* val_genDR;
  507. bool genDR_loaded;
  508. TrackCollection() { }
  509. void init(TrackingDataSet* tds){
  510. this->tds = tds;
  511. }
  512. size_t size() {
  513. if (!this->px_loaded) {
  514. this->val_px = this->tds->track_branch_obj<vector<float>>("trk_px");
  515. this->px_loaded = true;
  516. }
  517. return (*this->val_px)().size();
  518. }
  519. Track operator[](size_t);
  520. iter begin() { return iter(this, 0); }
  521. iter end() { return iter(this, size()); }
  522. };
  523. struct Track {
  524. TrackCollection* collection;
  525. size_t idx;
  526. Track(TrackCollection* collection, const size_t idx)
  527. :collection(collection), idx(idx) { }
  528. const float& px() const {
  529. if (!collection->px_loaded) {
  530. collection->val_px = collection->tds->track_branch_obj<vector<float>>("trk_px");
  531. collection->px_loaded = true;
  532. }
  533. return (*collection->val_px)().at(idx);
  534. }
  535. const float& py() const {
  536. if (!collection->py_loaded) {
  537. collection->val_py = collection->tds->track_branch_obj<vector<float>>("trk_py");
  538. collection->py_loaded = true;
  539. }
  540. return (*collection->val_py)().at(idx);
  541. }
  542. const float& pz() const {
  543. if (!collection->pz_loaded) {
  544. collection->val_pz = collection->tds->track_branch_obj<vector<float>>("trk_pz");
  545. collection->pz_loaded = true;
  546. }
  547. return (*collection->val_pz)().at(idx);
  548. }
  549. const float& pt() const {
  550. if (!collection->pt_loaded) {
  551. collection->val_pt = collection->tds->track_branch_obj<vector<float>>("trk_pt");
  552. collection->pt_loaded = true;
  553. }
  554. return (*collection->val_pt)().at(idx);
  555. }
  556. const float& inner_px() const {
  557. if (!collection->inner_px_loaded) {
  558. collection->val_inner_px = collection->tds->track_branch_obj<vector<float>>("trk_inner_px");
  559. collection->inner_px_loaded = true;
  560. }
  561. return (*collection->val_inner_px)().at(idx);
  562. }
  563. const float& inner_py() const {
  564. if (!collection->inner_py_loaded) {
  565. collection->val_inner_py = collection->tds->track_branch_obj<vector<float>>("trk_inner_py");
  566. collection->inner_py_loaded = true;
  567. }
  568. return (*collection->val_inner_py)().at(idx);
  569. }
  570. const float& inner_pz() const {
  571. if (!collection->inner_pz_loaded) {
  572. collection->val_inner_pz = collection->tds->track_branch_obj<vector<float>>("trk_inner_pz");
  573. collection->inner_pz_loaded = true;
  574. }
  575. return (*collection->val_inner_pz)().at(idx);
  576. }
  577. const float& inner_pt() const {
  578. if (!collection->inner_pt_loaded) {
  579. collection->val_inner_pt = collection->tds->track_branch_obj<vector<float>>("trk_inner_pt");
  580. collection->inner_pt_loaded = true;
  581. }
  582. return (*collection->val_inner_pt)().at(idx);
  583. }
  584. const float& outer_px() const {
  585. if (!collection->outer_px_loaded) {
  586. collection->val_outer_px = collection->tds->track_branch_obj<vector<float>>("trk_outer_px");
  587. collection->outer_px_loaded = true;
  588. }
  589. return (*collection->val_outer_px)().at(idx);
  590. }
  591. const float& outer_py() const {
  592. if (!collection->outer_py_loaded) {
  593. collection->val_outer_py = collection->tds->track_branch_obj<vector<float>>("trk_outer_py");
  594. collection->outer_py_loaded = true;
  595. }
  596. return (*collection->val_outer_py)().at(idx);
  597. }
  598. const float& outer_pz() const {
  599. if (!collection->outer_pz_loaded) {
  600. collection->val_outer_pz = collection->tds->track_branch_obj<vector<float>>("trk_outer_pz");
  601. collection->outer_pz_loaded = true;
  602. }
  603. return (*collection->val_outer_pz)().at(idx);
  604. }
  605. const float& outer_pt() const {
  606. if (!collection->outer_pt_loaded) {
  607. collection->val_outer_pt = collection->tds->track_branch_obj<vector<float>>("trk_outer_pt");
  608. collection->outer_pt_loaded = true;
  609. }
  610. return (*collection->val_outer_pt)().at(idx);
  611. }
  612. const float& eta() const {
  613. if (!collection->eta_loaded) {
  614. collection->val_eta = collection->tds->track_branch_obj<vector<float>>("trk_eta");
  615. collection->eta_loaded = true;
  616. }
  617. return (*collection->val_eta)().at(idx);
  618. }
  619. const float& lambda() const {
  620. if (!collection->lambda_loaded) {
  621. collection->val_lambda = collection->tds->track_branch_obj<vector<float>>("trk_lambda");
  622. collection->lambda_loaded = true;
  623. }
  624. return (*collection->val_lambda)().at(idx);
  625. }
  626. const float& cotTheta() const {
  627. if (!collection->cotTheta_loaded) {
  628. collection->val_cotTheta = collection->tds->track_branch_obj<vector<float>>("trk_cotTheta");
  629. collection->cotTheta_loaded = true;
  630. }
  631. return (*collection->val_cotTheta)().at(idx);
  632. }
  633. const float& phi() const {
  634. if (!collection->phi_loaded) {
  635. collection->val_phi = collection->tds->track_branch_obj<vector<float>>("trk_phi");
  636. collection->phi_loaded = true;
  637. }
  638. return (*collection->val_phi)().at(idx);
  639. }
  640. const float& dxy() const {
  641. if (!collection->dxy_loaded) {
  642. collection->val_dxy = collection->tds->track_branch_obj<vector<float>>("trk_dxy");
  643. collection->dxy_loaded = true;
  644. }
  645. return (*collection->val_dxy)().at(idx);
  646. }
  647. const float& dz() const {
  648. if (!collection->dz_loaded) {
  649. collection->val_dz = collection->tds->track_branch_obj<vector<float>>("trk_dz");
  650. collection->dz_loaded = true;
  651. }
  652. return (*collection->val_dz)().at(idx);
  653. }
  654. const float& ptErr() const {
  655. if (!collection->ptErr_loaded) {
  656. collection->val_ptErr = collection->tds->track_branch_obj<vector<float>>("trk_ptErr");
  657. collection->ptErr_loaded = true;
  658. }
  659. return (*collection->val_ptErr)().at(idx);
  660. }
  661. const float& etaErr() const {
  662. if (!collection->etaErr_loaded) {
  663. collection->val_etaErr = collection->tds->track_branch_obj<vector<float>>("trk_etaErr");
  664. collection->etaErr_loaded = true;
  665. }
  666. return (*collection->val_etaErr)().at(idx);
  667. }
  668. const float& lambdaErr() const {
  669. if (!collection->lambdaErr_loaded) {
  670. collection->val_lambdaErr = collection->tds->track_branch_obj<vector<float>>("trk_lambdaErr");
  671. collection->lambdaErr_loaded = true;
  672. }
  673. return (*collection->val_lambdaErr)().at(idx);
  674. }
  675. const float& phiErr() const {
  676. if (!collection->phiErr_loaded) {
  677. collection->val_phiErr = collection->tds->track_branch_obj<vector<float>>("trk_phiErr");
  678. collection->phiErr_loaded = true;
  679. }
  680. return (*collection->val_phiErr)().at(idx);
  681. }
  682. const float& dxyErr() const {
  683. if (!collection->dxyErr_loaded) {
  684. collection->val_dxyErr = collection->tds->track_branch_obj<vector<float>>("trk_dxyErr");
  685. collection->dxyErr_loaded = true;
  686. }
  687. return (*collection->val_dxyErr)().at(idx);
  688. }
  689. const float& dzErr() const {
  690. if (!collection->dzErr_loaded) {
  691. collection->val_dzErr = collection->tds->track_branch_obj<vector<float>>("trk_dzErr");
  692. collection->dzErr_loaded = true;
  693. }
  694. return (*collection->val_dzErr)().at(idx);
  695. }
  696. const float& refpoint_x() const {
  697. if (!collection->refpoint_x_loaded) {
  698. collection->val_refpoint_x = collection->tds->track_branch_obj<vector<float>>("trk_refpoint_x");
  699. collection->refpoint_x_loaded = true;
  700. }
  701. return (*collection->val_refpoint_x)().at(idx);
  702. }
  703. const float& refpoint_y() const {
  704. if (!collection->refpoint_y_loaded) {
  705. collection->val_refpoint_y = collection->tds->track_branch_obj<vector<float>>("trk_refpoint_y");
  706. collection->refpoint_y_loaded = true;
  707. }
  708. return (*collection->val_refpoint_y)().at(idx);
  709. }
  710. const float& refpoint_z() const {
  711. if (!collection->refpoint_z_loaded) {
  712. collection->val_refpoint_z = collection->tds->track_branch_obj<vector<float>>("trk_refpoint_z");
  713. collection->refpoint_z_loaded = true;
  714. }
  715. return (*collection->val_refpoint_z)().at(idx);
  716. }
  717. const float& nChi2() const {
  718. if (!collection->nChi2_loaded) {
  719. collection->val_nChi2 = collection->tds->track_branch_obj<vector<float>>("trk_nChi2");
  720. collection->nChi2_loaded = true;
  721. }
  722. return (*collection->val_nChi2)().at(idx);
  723. }
  724. const int& q() const {
  725. if (!collection->q_loaded) {
  726. collection->val_q = collection->tds->track_branch_obj<vector<int>>("trk_q");
  727. collection->q_loaded = true;
  728. }
  729. return (*collection->val_q)().at(idx);
  730. }
  731. const unsigned int& nValid() const {
  732. if (!collection->nValid_loaded) {
  733. collection->val_nValid = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nValid");
  734. collection->nValid_loaded = true;
  735. }
  736. return (*collection->val_nValid)().at(idx);
  737. }
  738. const unsigned int& nInvalid() const {
  739. if (!collection->nInvalid_loaded) {
  740. collection->val_nInvalid = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nInvalid");
  741. collection->nInvalid_loaded = true;
  742. }
  743. return (*collection->val_nInvalid)().at(idx);
  744. }
  745. const unsigned int& nPixel() const {
  746. if (!collection->nPixel_loaded) {
  747. collection->val_nPixel = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nPixel");
  748. collection->nPixel_loaded = true;
  749. }
  750. return (*collection->val_nPixel)().at(idx);
  751. }
  752. const unsigned int& nStrip() const {
  753. if (!collection->nStrip_loaded) {
  754. collection->val_nStrip = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nStrip");
  755. collection->nStrip_loaded = true;
  756. }
  757. return (*collection->val_nStrip)().at(idx);
  758. }
  759. const unsigned int& nPixelLay() const {
  760. if (!collection->nPixelLay_loaded) {
  761. collection->val_nPixelLay = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nPixelLay");
  762. collection->nPixelLay_loaded = true;
  763. }
  764. return (*collection->val_nPixelLay)().at(idx);
  765. }
  766. const unsigned int& nStripLay() const {
  767. if (!collection->nStripLay_loaded) {
  768. collection->val_nStripLay = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nStripLay");
  769. collection->nStripLay_loaded = true;
  770. }
  771. return (*collection->val_nStripLay)().at(idx);
  772. }
  773. const unsigned int& n3DLay() const {
  774. if (!collection->n3DLay_loaded) {
  775. collection->val_n3DLay = collection->tds->track_branch_obj<vector<unsigned int>>("trk_n3DLay");
  776. collection->n3DLay_loaded = true;
  777. }
  778. return (*collection->val_n3DLay)().at(idx);
  779. }
  780. const unsigned int& nOuterLost() const {
  781. if (!collection->nOuterLost_loaded) {
  782. collection->val_nOuterLost = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nOuterLost");
  783. collection->nOuterLost_loaded = true;
  784. }
  785. return (*collection->val_nOuterLost)().at(idx);
  786. }
  787. const unsigned int& nInnerLost() const {
  788. if (!collection->nInnerLost_loaded) {
  789. collection->val_nInnerLost = collection->tds->track_branch_obj<vector<unsigned int>>("trk_nInnerLost");
  790. collection->nInnerLost_loaded = true;
  791. }
  792. return (*collection->val_nInnerLost)().at(idx);
  793. }
  794. const unsigned int& algo() const {
  795. if (!collection->algo_loaded) {
  796. collection->val_algo = collection->tds->track_branch_obj<vector<unsigned int>>("trk_algo");
  797. collection->algo_loaded = true;
  798. }
  799. return (*collection->val_algo)().at(idx);
  800. }
  801. const unsigned int& originalAlgo() const {
  802. if (!collection->originalAlgo_loaded) {
  803. collection->val_originalAlgo = collection->tds->track_branch_obj<vector<unsigned int>>("trk_originalAlgo");
  804. collection->originalAlgo_loaded = true;
  805. }
  806. return (*collection->val_originalAlgo)().at(idx);
  807. }
  808. const ULong64_t& algoMask() const {
  809. if (!collection->algoMask_loaded) {
  810. collection->val_algoMask = collection->tds->track_branch_obj<vector<ULong64_t>>("trk_algoMask");
  811. collection->algoMask_loaded = true;
  812. }
  813. return (*collection->val_algoMask)().at(idx);
  814. }
  815. const unsigned int& stopReason() const {
  816. if (!collection->stopReason_loaded) {
  817. collection->val_stopReason = collection->tds->track_branch_obj<vector<unsigned int>>("trk_stopReason");
  818. collection->stopReason_loaded = true;
  819. }
  820. return (*collection->val_stopReason)().at(idx);
  821. }
  822. const short& isHP() const {
  823. if (!collection->isHP_loaded) {
  824. collection->val_isHP = collection->tds->track_branch_obj<vector<short>>("trk_isHP");
  825. collection->isHP_loaded = true;
  826. }
  827. return (*collection->val_isHP)().at(idx);
  828. }
  829. const int& seedIdx() const {
  830. if (!collection->seedIdx_loaded) {
  831. collection->val_seedIdx = collection->tds->track_branch_obj<vector<int>>("trk_seedIdx");
  832. collection->seedIdx_loaded = true;
  833. }
  834. return (*collection->val_seedIdx)().at(idx);
  835. }
  836. const float& vtxx() const {
  837. if (!collection->vtxx_loaded) {
  838. collection->val_vtxx = collection->tds->track_branch_obj<vector<float>>("trk_vtxx");
  839. collection->vtxx_loaded = true;
  840. }
  841. return (*collection->val_vtxx)().at(idx);
  842. }
  843. const float& vtxy() const {
  844. if (!collection->vtxy_loaded) {
  845. collection->val_vtxy = collection->tds->track_branch_obj<vector<float>>("trk_vtxy");
  846. collection->vtxy_loaded = true;
  847. }
  848. return (*collection->val_vtxy)().at(idx);
  849. }
  850. const float& vtxz() const {
  851. if (!collection->vtxz_loaded) {
  852. collection->val_vtxz = collection->tds->track_branch_obj<vector<float>>("trk_vtxz");
  853. collection->vtxz_loaded = true;
  854. }
  855. return (*collection->val_vtxz)().at(idx);
  856. }
  857. const vector<float>& shareFrac() const {
  858. if (!collection->shareFrac_loaded) {
  859. collection->val_shareFrac = collection->tds->track_branch_obj<vector<vector<float>>>("trk_shareFrac");
  860. collection->shareFrac_loaded = true;
  861. }
  862. return (*collection->val_shareFrac)().at(idx);
  863. }
  864. const vector<int>& simTrkIdx() const {
  865. if (!collection->simTrkIdx_loaded) {
  866. collection->val_simTrkIdx = collection->tds->track_branch_obj<vector<vector<int>>>("trk_simTrkIdx");
  867. collection->simTrkIdx_loaded = true;
  868. }
  869. return (*collection->val_simTrkIdx)().at(idx);
  870. }
  871. const int& genIdx() const {
  872. if (!collection->genIdx_loaded) {
  873. collection->val_genIdx = collection->tds->track_branch_obj<vector<int>>("trk_genIdx");
  874. collection->genIdx_loaded = true;
  875. }
  876. return (*collection->val_genIdx)().at(idx);
  877. }
  878. const float& genDR() const {
  879. if (!collection->genDR_loaded) {
  880. collection->val_genDR = collection->tds->track_branch_obj<vector<float>>("trk_genDR");
  881. collection->genDR_loaded = true;
  882. }
  883. return (*collection->val_genDR)().at(idx);
  884. }
  885. };
  886. bool operator==(const Track& obj1, const Track& obj2) {
  887. return obj1.idx == obj2.idx;
  888. }
  889. Track TrackCollection::iter::operator*() {
  890. return {collection, idx};
  891. }
  892. Track TrackCollection::operator[](size_t idx) {
  893. return {this, idx};
  894. }
  895. struct Gen;
  896. class GenCollection {
  897. public:
  898. class iter {
  899. public:
  900. iter(GenCollection* collection, size_t idx)
  901. :collection(collection), idx(idx) { }
  902. iter operator++() { ++idx; return *this; }
  903. bool operator!=(const iter & other) { return idx != other.idx; }
  904. Gen operator*();
  905. private:
  906. GenCollection* collection;
  907. size_t idx;
  908. };
  909. TrackingDataSet* tds;
  910. Value<vector<float>>* val_px;
  911. bool px_loaded;
  912. Value<vector<float>>* val_py;
  913. bool py_loaded;
  914. Value<vector<float>>* val_pz;
  915. bool pz_loaded;
  916. Value<vector<float>>* val_charge;
  917. bool charge_loaded;
  918. Value<vector<int>>* val_pdgId;
  919. bool pdgId_loaded;
  920. Value<vector<float>>* val_vx;
  921. bool vx_loaded;
  922. Value<vector<float>>* val_vy;
  923. bool vy_loaded;
  924. Value<vector<float>>* val_vz;
  925. bool vz_loaded;
  926. Value<vector<int>>* val_status;
  927. bool status_loaded;
  928. Value<vector<int>>* val_mother;
  929. bool mother_loaded;
  930. Value<vector<bool>>* val_isTauDecayProduct;
  931. bool isTauDecayProduct_loaded;
  932. Value<vector<bool>>* val_isDirectHadronDecayProduct;
  933. bool isDirectHadronDecayProduct_loaded;
  934. Value<vector<bool>>* val_isPrompt;
  935. bool isPrompt_loaded;
  936. GenCollection() { }
  937. void init(TrackingDataSet* tds){
  938. this->tds = tds;
  939. }
  940. size_t size() {
  941. if (!this->px_loaded) {
  942. this->val_px = this->tds->track_branch_obj<vector<float>>("gen_px");
  943. this->px_loaded = true;
  944. }
  945. return (*this->val_px)().size();
  946. }
  947. Gen operator[](size_t);
  948. iter begin() { return iter(this, 0); }
  949. iter end() { return iter(this, size()); }
  950. };
  951. struct Gen {
  952. GenCollection* collection;
  953. size_t idx;
  954. Gen(GenCollection* collection, const size_t idx)
  955. :collection(collection), idx(idx) { }
  956. const float& px() const {
  957. if (!collection->px_loaded) {
  958. collection->val_px = collection->tds->track_branch_obj<vector<float>>("gen_px");
  959. collection->px_loaded = true;
  960. }
  961. return (*collection->val_px)().at(idx);
  962. }
  963. const float& py() const {
  964. if (!collection->py_loaded) {
  965. collection->val_py = collection->tds->track_branch_obj<vector<float>>("gen_py");
  966. collection->py_loaded = true;
  967. }
  968. return (*collection->val_py)().at(idx);
  969. }
  970. const float& pz() const {
  971. if (!collection->pz_loaded) {
  972. collection->val_pz = collection->tds->track_branch_obj<vector<float>>("gen_pz");
  973. collection->pz_loaded = true;
  974. }
  975. return (*collection->val_pz)().at(idx);
  976. }
  977. const float& charge() const {
  978. if (!collection->charge_loaded) {
  979. collection->val_charge = collection->tds->track_branch_obj<vector<float>>("gen_charge");
  980. collection->charge_loaded = true;
  981. }
  982. return (*collection->val_charge)().at(idx);
  983. }
  984. const int& pdgId() const {
  985. if (!collection->pdgId_loaded) {
  986. collection->val_pdgId = collection->tds->track_branch_obj<vector<int>>("gen_pdgId");
  987. collection->pdgId_loaded = true;
  988. }
  989. return (*collection->val_pdgId)().at(idx);
  990. }
  991. const float& vx() const {
  992. if (!collection->vx_loaded) {
  993. collection->val_vx = collection->tds->track_branch_obj<vector<float>>("gen_vx");
  994. collection->vx_loaded = true;
  995. }
  996. return (*collection->val_vx)().at(idx);
  997. }
  998. const float& vy() const {
  999. if (!collection->vy_loaded) {
  1000. collection->val_vy = collection->tds->track_branch_obj<vector<float>>("gen_vy");
  1001. collection->vy_loaded = true;
  1002. }
  1003. return (*collection->val_vy)().at(idx);
  1004. }
  1005. const float& vz() const {
  1006. if (!collection->vz_loaded) {
  1007. collection->val_vz = collection->tds->track_branch_obj<vector<float>>("gen_vz");
  1008. collection->vz_loaded = true;
  1009. }
  1010. return (*collection->val_vz)().at(idx);
  1011. }
  1012. const int& status() const {
  1013. if (!collection->status_loaded) {
  1014. collection->val_status = collection->tds->track_branch_obj<vector<int>>("gen_status");
  1015. collection->status_loaded = true;
  1016. }
  1017. return (*collection->val_status)().at(idx);
  1018. }
  1019. const int& mother() const {
  1020. if (!collection->mother_loaded) {
  1021. collection->val_mother = collection->tds->track_branch_obj<vector<int>>("gen_mother");
  1022. collection->mother_loaded = true;
  1023. }
  1024. return (*collection->val_mother)().at(idx);
  1025. }
  1026. const bool isTauDecayProduct() const {
  1027. if (!collection->isTauDecayProduct_loaded) {
  1028. collection->val_isTauDecayProduct = collection->tds->track_branch_obj<vector<bool>>("gen_isTauDecayProduct");
  1029. collection->isTauDecayProduct_loaded = true;
  1030. }
  1031. return (*collection->val_isTauDecayProduct)().at(idx);
  1032. }
  1033. const bool isDirectHadronDecayProduct() const {
  1034. if (!collection->isDirectHadronDecayProduct_loaded) {
  1035. collection->val_isDirectHadronDecayProduct = collection->tds->track_branch_obj<vector<bool>>("gen_isDirectHadronDecayProduct");
  1036. collection->isDirectHadronDecayProduct_loaded = true;
  1037. }
  1038. return (*collection->val_isDirectHadronDecayProduct)().at(idx);
  1039. }
  1040. const bool isPrompt() const {
  1041. if (!collection->isPrompt_loaded) {
  1042. collection->val_isPrompt = collection->tds->track_branch_obj<vector<bool>>("gen_isPrompt");
  1043. collection->isPrompt_loaded = true;
  1044. }
  1045. return (*collection->val_isPrompt)().at(idx);
  1046. }
  1047. };
  1048. bool operator==(const Gen& obj1, const Gen& obj2) {
  1049. return obj1.idx == obj2.idx;
  1050. }
  1051. Gen GenCollection::iter::operator*() {
  1052. return {collection, idx};
  1053. }
  1054. Gen GenCollection::operator[](size_t idx) {
  1055. return {this, idx};
  1056. }
  1057. struct SimTrack;
  1058. class SimTrackCollection {
  1059. public:
  1060. class iter {
  1061. public:
  1062. iter(SimTrackCollection* collection, size_t idx)
  1063. :collection(collection), idx(idx) { }
  1064. iter operator++() { ++idx; return *this; }
  1065. bool operator!=(const iter & other) { return idx != other.idx; }
  1066. SimTrack operator*();
  1067. private:
  1068. SimTrackCollection* collection;
  1069. size_t idx;
  1070. };
  1071. TrackingDataSet* tds;
  1072. Value<vector<int>>* val_event;
  1073. bool event_loaded;
  1074. Value<vector<int>>* val_bunchCrossing;
  1075. bool bunchCrossing_loaded;
  1076. Value<vector<int>>* val_pdgId;
  1077. bool pdgId_loaded;
  1078. Value<vector<float>>* val_px;
  1079. bool px_loaded;
  1080. Value<vector<float>>* val_py;
  1081. bool py_loaded;
  1082. Value<vector<float>>* val_pz;
  1083. bool pz_loaded;
  1084. Value<vector<float>>* val_pt;
  1085. bool pt_loaded;
  1086. Value<vector<float>>* val_eta;
  1087. bool eta_loaded;
  1088. Value<vector<float>>* val_phi;
  1089. bool phi_loaded;
  1090. Value<vector<float>>* val_pca_pt;
  1091. bool pca_pt_loaded;
  1092. Value<vector<float>>* val_pca_eta;
  1093. bool pca_eta_loaded;
  1094. Value<vector<float>>* val_pca_lambda;
  1095. bool pca_lambda_loaded;
  1096. Value<vector<float>>* val_pca_cotTheta;
  1097. bool pca_cotTheta_loaded;
  1098. Value<vector<float>>* val_pca_phi;
  1099. bool pca_phi_loaded;
  1100. Value<vector<float>>* val_pca_dxy;
  1101. bool pca_dxy_loaded;
  1102. Value<vector<float>>* val_pca_dz;
  1103. bool pca_dz_loaded;
  1104. Value<vector<int>>* val_q;
  1105. bool q_loaded;
  1106. Value<vector<unsigned int>>* val_nValid;
  1107. bool nValid_loaded;
  1108. Value<vector<unsigned int>>* val_nPixel;
  1109. bool nPixel_loaded;
  1110. Value<vector<unsigned int>>* val_nStrip;
  1111. bool nStrip_loaded;
  1112. Value<vector<unsigned int>>* val_nLay;
  1113. bool nLay_loaded;
  1114. Value<vector<unsigned int>>* val_nPixelLay;
  1115. bool nPixelLay_loaded;
  1116. Value<vector<unsigned int>>* val_n3DLay;
  1117. bool n3DLay_loaded;
  1118. Value<vector<vector<int>>>* val_trkIdx;
  1119. bool trkIdx_loaded;
  1120. Value<vector<vector<float>>>* val_shareFrac;
  1121. bool shareFrac_loaded;
  1122. Value<vector<int>>* val_parentVtxIdx;
  1123. bool parentVtxIdx_loaded;
  1124. Value<vector<vector<int>>>* val_decayVtxIdx;
  1125. bool decayVtxIdx_loaded;
  1126. Value<vector<vector<int>>>* val_seedIdx;
  1127. bool seedIdx_loaded;
  1128. SimTrackCollection() { }
  1129. void init(TrackingDataSet* tds){
  1130. this->tds = tds;
  1131. }
  1132. size_t size() {
  1133. if (!this->event_loaded) {
  1134. this->val_event = this->tds->track_branch_obj<vector<int>>("sim_event");
  1135. this->event_loaded = true;
  1136. }
  1137. return (*this->val_event)().size();
  1138. }
  1139. SimTrack operator[](size_t);
  1140. iter begin() { return iter(this, 0); }
  1141. iter end() { return iter(this, size()); }
  1142. };
  1143. struct SimTrack {
  1144. SimTrackCollection* collection;
  1145. size_t idx;
  1146. SimTrack(SimTrackCollection* collection, const size_t idx)
  1147. :collection(collection), idx(idx) { }
  1148. const int& event() const {
  1149. if (!collection->event_loaded) {
  1150. collection->val_event = collection->tds->track_branch_obj<vector<int>>("sim_event");
  1151. collection->event_loaded = true;
  1152. }
  1153. return (*collection->val_event)().at(idx);
  1154. }
  1155. const int& bunchCrossing() const {
  1156. if (!collection->bunchCrossing_loaded) {
  1157. collection->val_bunchCrossing = collection->tds->track_branch_obj<vector<int>>("sim_bunchCrossing");
  1158. collection->bunchCrossing_loaded = true;
  1159. }
  1160. return (*collection->val_bunchCrossing)().at(idx);
  1161. }
  1162. const int& pdgId() const {
  1163. if (!collection->pdgId_loaded) {
  1164. collection->val_pdgId = collection->tds->track_branch_obj<vector<int>>("sim_pdgId");
  1165. collection->pdgId_loaded = true;
  1166. }
  1167. return (*collection->val_pdgId)().at(idx);
  1168. }
  1169. const float& px() const {
  1170. if (!collection->px_loaded) {
  1171. collection->val_px = collection->tds->track_branch_obj<vector<float>>("sim_px");
  1172. collection->px_loaded = true;
  1173. }
  1174. return (*collection->val_px)().at(idx);
  1175. }
  1176. const float& py() const {
  1177. if (!collection->py_loaded) {
  1178. collection->val_py = collection->tds->track_branch_obj<vector<float>>("sim_py");
  1179. collection->py_loaded = true;
  1180. }
  1181. return (*collection->val_py)().at(idx);
  1182. }
  1183. const float& pz() const {
  1184. if (!collection->pz_loaded) {
  1185. collection->val_pz = collection->tds->track_branch_obj<vector<float>>("sim_pz");
  1186. collection->pz_loaded = true;
  1187. }
  1188. return (*collection->val_pz)().at(idx);
  1189. }
  1190. const float& pt() const {
  1191. if (!collection->pt_loaded) {
  1192. collection->val_pt = collection->tds->track_branch_obj<vector<float>>("sim_pt");
  1193. collection->pt_loaded = true;
  1194. }
  1195. return (*collection->val_pt)().at(idx);
  1196. }
  1197. const float& eta() const {
  1198. if (!collection->eta_loaded) {
  1199. collection->val_eta = collection->tds->track_branch_obj<vector<float>>("sim_eta");
  1200. collection->eta_loaded = true;
  1201. }
  1202. return (*collection->val_eta)().at(idx);
  1203. }
  1204. const float& phi() const {
  1205. if (!collection->phi_loaded) {
  1206. collection->val_phi = collection->tds->track_branch_obj<vector<float>>("sim_phi");
  1207. collection->phi_loaded = true;
  1208. }
  1209. return (*collection->val_phi)().at(idx);
  1210. }
  1211. const float& pca_pt() const {
  1212. if (!collection->pca_pt_loaded) {
  1213. collection->val_pca_pt = collection->tds->track_branch_obj<vector<float>>("sim_pca_pt");
  1214. collection->pca_pt_loaded = true;
  1215. }
  1216. return (*collection->val_pca_pt)().at(idx);
  1217. }
  1218. const float& pca_eta() const {
  1219. if (!collection->pca_eta_loaded) {
  1220. collection->val_pca_eta = collection->tds->track_branch_obj<vector<float>>("sim_pca_eta");
  1221. collection->pca_eta_loaded = true;
  1222. }
  1223. return (*collection->val_pca_eta)().at(idx);
  1224. }
  1225. const float& pca_lambda() const {
  1226. if (!collection->pca_lambda_loaded) {
  1227. collection->val_pca_lambda = collection->tds->track_branch_obj<vector<float>>("sim_pca_lambda");
  1228. collection->pca_lambda_loaded = true;
  1229. }
  1230. return (*collection->val_pca_lambda)().at(idx);
  1231. }
  1232. const float& pca_cotTheta() const {
  1233. if (!collection->pca_cotTheta_loaded) {
  1234. collection->val_pca_cotTheta = collection->tds->track_branch_obj<vector<float>>("sim_pca_cotTheta");
  1235. collection->pca_cotTheta_loaded = true;
  1236. }
  1237. return (*collection->val_pca_cotTheta)().at(idx);
  1238. }
  1239. const float& pca_phi() const {
  1240. if (!collection->pca_phi_loaded) {
  1241. collection->val_pca_phi = collection->tds->track_branch_obj<vector<float>>("sim_pca_phi");
  1242. collection->pca_phi_loaded = true;
  1243. }
  1244. return (*collection->val_pca_phi)().at(idx);
  1245. }
  1246. const float& pca_dxy() const {
  1247. if (!collection->pca_dxy_loaded) {
  1248. collection->val_pca_dxy = collection->tds->track_branch_obj<vector<float>>("sim_pca_dxy");
  1249. collection->pca_dxy_loaded = true;
  1250. }
  1251. return (*collection->val_pca_dxy)().at(idx);
  1252. }
  1253. const float& pca_dz() const {
  1254. if (!collection->pca_dz_loaded) {
  1255. collection->val_pca_dz = collection->tds->track_branch_obj<vector<float>>("sim_pca_dz");
  1256. collection->pca_dz_loaded = true;
  1257. }
  1258. return (*collection->val_pca_dz)().at(idx);
  1259. }
  1260. const int& q() const {
  1261. if (!collection->q_loaded) {
  1262. collection->val_q = collection->tds->track_branch_obj<vector<int>>("sim_q");
  1263. collection->q_loaded = true;
  1264. }
  1265. return (*collection->val_q)().at(idx);
  1266. }
  1267. const unsigned int& nValid() const {
  1268. if (!collection->nValid_loaded) {
  1269. collection->val_nValid = collection->tds->track_branch_obj<vector<unsigned int>>("sim_nValid");
  1270. collection->nValid_loaded = true;
  1271. }
  1272. return (*collection->val_nValid)().at(idx);
  1273. }
  1274. const unsigned int& nPixel() const {
  1275. if (!collection->nPixel_loaded) {
  1276. collection->val_nPixel = collection->tds->track_branch_obj<vector<unsigned int>>("sim_nPixel");
  1277. collection->nPixel_loaded = true;
  1278. }
  1279. return (*collection->val_nPixel)().at(idx);
  1280. }
  1281. const unsigned int& nStrip() const {
  1282. if (!collection->nStrip_loaded) {
  1283. collection->val_nStrip = collection->tds->track_branch_obj<vector<unsigned int>>("sim_nStrip");
  1284. collection->nStrip_loaded = true;
  1285. }
  1286. return (*collection->val_nStrip)().at(idx);
  1287. }
  1288. const unsigned int& nLay() const {
  1289. if (!collection->nLay_loaded) {
  1290. collection->val_nLay = collection->tds->track_branch_obj<vector<unsigned int>>("sim_nLay");
  1291. collection->nLay_loaded = true;
  1292. }
  1293. return (*collection->val_nLay)().at(idx);
  1294. }
  1295. const unsigned int& nPixelLay() const {
  1296. if (!collection->nPixelLay_loaded) {
  1297. collection->val_nPixelLay = collection->tds->track_branch_obj<vector<unsigned int>>("sim_nPixelLay");
  1298. collection->nPixelLay_loaded = true;
  1299. }
  1300. return (*collection->val_nPixelLay)().at(idx);
  1301. }
  1302. const unsigned int& n3DLay() const {
  1303. if (!collection->n3DLay_loaded) {
  1304. collection->val_n3DLay = collection->tds->track_branch_obj<vector<unsigned int>>("sim_n3DLay");
  1305. collection->n3DLay_loaded = true;
  1306. }
  1307. return (*collection->val_n3DLay)().at(idx);
  1308. }
  1309. const vector<int>& trkIdx() const {
  1310. if (!collection->trkIdx_loaded) {
  1311. collection->val_trkIdx = collection->tds->track_branch_obj<vector<vector<int>>>("sim_trkIdx");
  1312. collection->trkIdx_loaded = true;
  1313. }
  1314. return (*collection->val_trkIdx)().at(idx);
  1315. }
  1316. const vector<float>& shareFrac() const {
  1317. if (!collection->shareFrac_loaded) {
  1318. collection->val_shareFrac = collection->tds->track_branch_obj<vector<vector<float>>>("sim_shareFrac");
  1319. collection->shareFrac_loaded = true;
  1320. }
  1321. return (*collection->val_shareFrac)().at(idx);
  1322. }
  1323. const int& parentVtxIdx() const {
  1324. if (!collection->parentVtxIdx_loaded) {
  1325. collection->val_parentVtxIdx = collection->tds->track_branch_obj<vector<int>>("sim_parentVtxIdx");
  1326. collection->parentVtxIdx_loaded = true;
  1327. }
  1328. return (*collection->val_parentVtxIdx)().at(idx);
  1329. }
  1330. const vector<int>& decayVtxIdx() const {
  1331. if (!collection->decayVtxIdx_loaded) {
  1332. collection->val_decayVtxIdx = collection->tds->track_branch_obj<vector<vector<int>>>("sim_decayVtxIdx");
  1333. collection->decayVtxIdx_loaded = true;
  1334. }
  1335. return (*collection->val_decayVtxIdx)().at(idx);
  1336. }
  1337. const vector<int>& seedIdx() const {
  1338. if (!collection->seedIdx_loaded) {
  1339. collection->val_seedIdx = collection->tds->track_branch_obj<vector<vector<int>>>("sim_seedIdx");
  1340. collection->seedIdx_loaded = true;
  1341. }
  1342. return (*collection->val_seedIdx)().at(idx);
  1343. }
  1344. };
  1345. bool operator==(const SimTrack& obj1, const SimTrack& obj2) {
  1346. return obj1.idx == obj2.idx;
  1347. }
  1348. SimTrack SimTrackCollection::iter::operator*() {
  1349. return {collection, idx};
  1350. }
  1351. SimTrack SimTrackCollection::operator[](size_t idx) {
  1352. return {this, idx};
  1353. }
  1354. struct SimVertex;
  1355. class SimVertexCollection {
  1356. public:
  1357. class iter {
  1358. public:
  1359. iter(SimVertexCollection* collection, size_t idx)
  1360. :collection(collection), idx(idx) { }
  1361. iter operator++() { ++idx; return *this; }
  1362. bool operator!=(const iter & other) { return idx != other.idx; }
  1363. SimVertex operator*();
  1364. private:
  1365. SimVertexCollection* collection;
  1366. size_t idx;
  1367. };
  1368. TrackingDataSet* tds;
  1369. Value<vector<int>>* val_event;
  1370. bool event_loaded;
  1371. Value<vector<int>>* val_bunchCrossing;
  1372. bool bunchCrossing_loaded;
  1373. Value<vector<unsigned int>>* val_processType;
  1374. bool processType_loaded;
  1375. Value<vector<float>>* val_x;
  1376. bool x_loaded;
  1377. Value<vector<float>>* val_y;
  1378. bool y_loaded;
  1379. Value<vector<float>>* val_z;
  1380. bool z_loaded;
  1381. Value<vector<vector<int>>>* val_sourceSimIdx;
  1382. bool sourceSimIdx_loaded;
  1383. Value<vector<vector<int>>>* val_daughterSimIdx;
  1384. bool daughterSimIdx_loaded;
  1385. SimVertexCollection() { }
  1386. void init(TrackingDataSet* tds){
  1387. this->tds = tds;
  1388. }
  1389. size_t size() {
  1390. if (!this->event_loaded) {
  1391. this->val_event = this->tds->track_branch_obj<vector<int>>("simvtx_event");
  1392. this->event_loaded = true;
  1393. }
  1394. return (*this->val_event)().size();
  1395. }
  1396. SimVertex operator[](size_t);
  1397. iter begin() { return iter(this, 0); }
  1398. iter end() { return iter(this, size()); }
  1399. };
  1400. struct SimVertex {
  1401. SimVertexCollection* collection;
  1402. size_t idx;
  1403. SimVertex(SimVertexCollection* collection, const size_t idx)
  1404. :collection(collection), idx(idx) { }
  1405. const int& event() const {
  1406. if (!collection->event_loaded) {
  1407. collection->val_event = collection->tds->track_branch_obj<vector<int>>("simvtx_event");
  1408. collection->event_loaded = true;
  1409. }
  1410. return (*collection->val_event)().at(idx);
  1411. }
  1412. const int& bunchCrossing() const {
  1413. if (!collection->bunchCrossing_loaded) {
  1414. collection->val_bunchCrossing = collection->tds->track_branch_obj<vector<int>>("simvtx_bunchCrossing");
  1415. collection->bunchCrossing_loaded = true;
  1416. }
  1417. return (*collection->val_bunchCrossing)().at(idx);
  1418. }
  1419. const unsigned int& processType() const {
  1420. if (!collection->processType_loaded) {
  1421. collection->val_processType = collection->tds->track_branch_obj<vector<unsigned int>>("simvtx_processType");
  1422. collection->processType_loaded = true;
  1423. }
  1424. return (*collection->val_processType)().at(idx);
  1425. }
  1426. const float& x() const {
  1427. if (!collection->x_loaded) {
  1428. collection->val_x = collection->tds->track_branch_obj<vector<float>>("simvtx_x");
  1429. collection->x_loaded = true;
  1430. }
  1431. return (*collection->val_x)().at(idx);
  1432. }
  1433. const float& y() const {
  1434. if (!collection->y_loaded) {
  1435. collection->val_y = collection->tds->track_branch_obj<vector<float>>("simvtx_y");
  1436. collection->y_loaded = true;
  1437. }
  1438. return (*collection->val_y)().at(idx);
  1439. }
  1440. const float& z() const {
  1441. if (!collection->z_loaded) {
  1442. collection->val_z = collection->tds->track_branch_obj<vector<float>>("simvtx_z");
  1443. collection->z_loaded = true;
  1444. }
  1445. return (*collection->val_z)().at(idx);
  1446. }
  1447. const vector<int>& sourceSimIdx() const {
  1448. if (!collection->sourceSimIdx_loaded) {
  1449. collection->val_sourceSimIdx = collection->tds->track_branch_obj<vector<vector<int>>>("simvtx_sourceSimIdx");
  1450. collection->sourceSimIdx_loaded = true;
  1451. }
  1452. return (*collection->val_sourceSimIdx)().at(idx);
  1453. }
  1454. const vector<int>& daughterSimIdx() const {
  1455. if (!collection->daughterSimIdx_loaded) {
  1456. collection->val_daughterSimIdx = collection->tds->track_branch_obj<vector<vector<int>>>("simvtx_daughterSimIdx");
  1457. collection->daughterSimIdx_loaded = true;
  1458. }
  1459. return (*collection->val_daughterSimIdx)().at(idx);
  1460. }
  1461. };
  1462. bool operator==(const SimVertex& obj1, const SimVertex& obj2) {
  1463. return obj1.idx == obj2.idx;
  1464. }
  1465. SimVertex SimVertexCollection::iter::operator*() {
  1466. return {collection, idx};
  1467. }
  1468. SimVertex SimVertexCollection::operator[](size_t idx) {
  1469. return {this, idx};
  1470. }
  1471. struct SuperCluster;
  1472. class SuperClusterCollection {
  1473. public:
  1474. class iter {
  1475. public:
  1476. iter(SuperClusterCollection* collection, size_t idx)
  1477. :collection(collection), idx(idx) { }
  1478. iter operator++() { ++idx; return *this; }
  1479. bool operator!=(const iter & other) { return idx != other.idx; }
  1480. SuperCluster operator*();
  1481. private:
  1482. SuperClusterCollection* collection;
  1483. size_t idx;
  1484. };
  1485. TrackingDataSet* tds;
  1486. Value<vector<float>>* val_e;
  1487. bool e_loaded;
  1488. Value<vector<float>>* val_px;
  1489. bool px_loaded;
  1490. Value<vector<float>>* val_py;
  1491. bool py_loaded;
  1492. Value<vector<float>>* val_pz;
  1493. bool pz_loaded;
  1494. Value<vector<float>>* val_x;
  1495. bool x_loaded;
  1496. Value<vector<float>>* val_y;
  1497. bool y_loaded;
  1498. Value<vector<float>>* val_z;
  1499. bool z_loaded;
  1500. Value<vector<float>>* val_hoe;
  1501. bool hoe_loaded;
  1502. SuperClusterCollection() { }
  1503. void init(TrackingDataSet* tds){
  1504. this->tds = tds;
  1505. }
  1506. size_t size() {
  1507. if (!this->e_loaded) {
  1508. this->val_e = this->tds->track_branch_obj<vector<float>>("scl_e");
  1509. this->e_loaded = true;
  1510. }
  1511. return (*this->val_e)().size();
  1512. }
  1513. SuperCluster operator[](size_t);
  1514. iter begin() { return iter(this, 0); }
  1515. iter end() { return iter(this, size()); }
  1516. };
  1517. struct SuperCluster {
  1518. SuperClusterCollection* collection;
  1519. size_t idx;
  1520. SuperCluster(SuperClusterCollection* collection, const size_t idx)
  1521. :collection(collection), idx(idx) { }
  1522. const float& e() const {
  1523. if (!collection->e_loaded) {
  1524. collection->val_e = collection->tds->track_branch_obj<vector<float>>("scl_e");
  1525. collection->e_loaded = true;
  1526. }
  1527. return (*collection->val_e)().at(idx);
  1528. }
  1529. const float& px() const {
  1530. if (!collection->px_loaded) {
  1531. collection->val_px = collection->tds->track_branch_obj<vector<float>>("scl_px");
  1532. collection->px_loaded = true;
  1533. }
  1534. return (*collection->val_px)().at(idx);
  1535. }
  1536. const float& py() const {
  1537. if (!collection->py_loaded) {
  1538. collection->val_py = collection->tds->track_branch_obj<vector<float>>("scl_py");
  1539. collection->py_loaded = true;
  1540. }
  1541. return (*collection->val_py)().at(idx);
  1542. }
  1543. const float& pz() const {
  1544. if (!collection->pz_loaded) {
  1545. collection->val_pz = collection->tds->track_branch_obj<vector<float>>("scl_pz");
  1546. collection->pz_loaded = true;
  1547. }
  1548. return (*collection->val_pz)().at(idx);
  1549. }
  1550. const float& x() const {
  1551. if (!collection->x_loaded) {
  1552. collection->val_x = collection->tds->track_branch_obj<vector<float>>("scl_x");
  1553. collection->x_loaded = true;
  1554. }
  1555. return (*collection->val_x)().at(idx);
  1556. }
  1557. const float& y() const {
  1558. if (!collection->y_loaded) {
  1559. collection->val_y = collection->tds->track_branch_obj<vector<float>>("scl_y");
  1560. collection->y_loaded = true;
  1561. }
  1562. return (*collection->val_y)().at(idx);
  1563. }
  1564. const float& z() const {
  1565. if (!collection->z_loaded) {
  1566. collection->val_z = collection->tds->track_branch_obj<vector<float>>("scl_z");
  1567. collection->z_loaded = true;
  1568. }
  1569. return (*collection->val_z)().at(idx);
  1570. }
  1571. const float& hoe() const {
  1572. if (!collection->hoe_loaded) {
  1573. collection->val_hoe = collection->tds->track_branch_obj<vector<float>>("scl_hoe");
  1574. collection->hoe_loaded = true;
  1575. }
  1576. return (*collection->val_hoe)().at(idx);
  1577. }
  1578. };
  1579. bool operator==(const SuperCluster& obj1, const SuperCluster& obj2) {
  1580. return obj1.idx == obj2.idx;
  1581. }
  1582. SuperCluster SuperClusterCollection::iter::operator*() {
  1583. return {collection, idx};
  1584. }
  1585. SuperCluster SuperClusterCollection::operator[](size_t idx) {
  1586. return {this, idx};
  1587. }