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
Pipeline #10108 failed
......@@ -85,16 +85,16 @@ void tutorial1_hit_position(const char* fname = "gem_tracker_sim.root") {
};
auto d1 = d0.Define("nhits", nhits, {"GEMTrackerHits"})
.Filter([=](const std::vector<dd4pod::TrackerHitData>& hits) {
for (auto h : hits) {
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)) {
return true;
}
}
return false;
},
{"GEMTrackerHits"})
//.Filter([=](const std::vector<dd4pod::TrackerHitData>& hits) {
// for (auto h : hits) {
// 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)) {
// return true;
// }
// }
// return false;
// },
// {"GEMTrackerHits"})
.Define("xy_hit_pos", local_position, {"GEMTrackerHits"})
.Define("x_pos", x_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