Skip to content

Commit b04a8f4

Browse files
committed
Add pixel charge and deltaphi to lstntuple
1 parent dd7156a commit b04a8f4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

RecoTracker/LSTCore/standalone/code/core/write_lst_ntuple.cc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ void createPixelLineSegmentBranches() {
456456
ana.tx->createBranch<std::vector<float>>("pLS_py");
457457
ana.tx->createBranch<std::vector<float>>("pLS_pz");
458458
ana.tx->createBranch<std::vector<bool>>("pLS_isQuad");
459+
ana.tx->createBranch<std::vector<int>>("pLS_charge");
460+
ana.tx->createBranch<std::vector<float>>("pLS_deltaPhi");
459461
}
460462

461463
//________________________________________________________________________________________________________________________________
@@ -1466,16 +1468,18 @@ std::map<unsigned int, unsigned int> setPixelLineSegmentBranches(LSTEvent* event
14661468
ana.tx->pushbackToBranch<float>("pLS_py", pixelSeeds.py()[ipLS]);
14671469
ana.tx->pushbackToBranch<float>("pLS_pz", pixelSeeds.pz()[ipLS]);
14681470
ana.tx->pushbackToBranch<bool>("pLS_isQuad", static_cast<bool>(pixelSeeds.isQuad()[ipLS]));
1471+
ana.tx->pushbackToBranch<int>("pLS_charge", pixelSeeds.charge()[ipLS]);
1472+
ana.tx->pushbackToBranch<float>("pLS_deltaPhi", pixelSeeds.deltaPhi()[ipLS]);
14691473
ana.tx->pushbackToBranch<int>("pLS_nhit", hit_idx.size());
14701474
for (size_t ihit = 0; ihit < trk_see_hitIdx[ipLS].size(); ++ihit) {
14711475
int hitidx = trk_see_hitIdx[ipLS][ihit];
14721476
int hittype = trk_see_hitType[ipLS][ihit];
1473-
int x = trk_pix_x[hitidx];
1474-
int y = trk_pix_y[hitidx];
1475-
int z = trk_pix_z[hitidx];
1476-
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%d_x", ihit), x);
1477-
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%d_y", ihit), y);
1478-
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%d_z", ihit), z);
1477+
auto const& x = trk_pix_x[hitidx];
1478+
auto const& y = trk_pix_y[hitidx];
1479+
auto const& z = trk_pix_z[hitidx];
1480+
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%zu_x", ihit), x);
1481+
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%zu_y", ihit), y);
1482+
ana.tx->pushbackToBranch<float>(TString::Format("pLS_hit%zu_z", ihit), z);
14791483
}
14801484
if (trk_see_hitIdx[ipLS].size() == 3) {
14811485
ana.tx->pushbackToBranch<float>("pLS_hit3_x", -999);

0 commit comments

Comments
 (0)