Skip to content
Snippets Groups Projects
Commit 9f46116a authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: scripts/tutorial1_hit_position.cxx

parent c5fdeb17
No related branches found
No related tags found
No related merge requests found
...@@ -85,16 +85,16 @@ void tutorial1_hit_position(const char* fname = "gem_tracker_sim.root") { ...@@ -85,16 +85,16 @@ void tutorial1_hit_position(const char* fname = "gem_tracker_sim.root") {
}; };
auto d1 = d0.Define("nhits", nhits, {"GEMTrackerHits"}) auto d1 = d0.Define("nhits", nhits, {"GEMTrackerHits"})
.Filter([=](const std::vector<dd4pod::TrackerHitData>& hits) { //.Filter([=](const std::vector<dd4pod::TrackerHitData>& hits) {
for (auto h : hits) { // for (auto h : hits) {
auto pos = ROOT::Math::XYZVector(h.position.x,h.position.y,h.position.z); // auto pos = ROOT::Math::XYZVector(h.position.x,h.position.y,h.position.z);
if ((pos.r() > 100.0) && (std::abs(pos.phi()-M_PI/2.0)< M_PI/6)) { // if ((pos.r() > 100.0) && (std::abs(pos.phi()-M_PI/2.0)< M_PI/6)) {
return true; // return true;
} // }
} // }
return false; // return false;
}, // },
{"GEMTrackerHits"}) // {"GEMTrackerHits"})
.Define("xy_hit_pos", local_position, {"GEMTrackerHits"}) .Define("xy_hit_pos", local_position, {"GEMTrackerHits"})
.Define("x_pos", x_pos, {"xy_hit_pos"}) .Define("x_pos", x_pos, {"xy_hit_pos"})
.Define("y_pos", y_pos, {"xy_hit_pos"}); .Define("y_pos", y_pos, {"xy_hit_pos"});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment